TransWikia.com

How to eliminate number labels from two-column bibliography

TeX - LaTeX Asked by James Youngman on June 30, 2021

I found a code snippet for a two-column bibliography in this answer:

usepackage{multicol}

makeatletter
renewenvironment{thebibliography}[1]
     {begin{multicols}{2}[section*{refname}]%
      @mkboth{MakeUppercaserefname}{MakeUppercaserefname}%
      list{@biblabel{@arabicc@enumiv}}%
           {settowidthlabelwidth{@biblabel{#1}}%
            leftmarginlabelwidth
            advanceleftmarginlabelsep
            @openbib@code
            usecounter{enumiv}%
            letp@enumiv@empty
            renewcommandtheenumiv{@arabicc@enumiv}}%
      sloppy
      clubpenalty4000
      @clubpenalty clubpenalty
      widowpenalty4000%
      sfcode`.@m}
     {def@noitemerr
       {@latex@warning{Empty `thebibliography' environment}}%
      endlistend{multicols}}
makeatother

This basically does what I want (i.e. is in two columns, so takes up less space) except that each item is preceded by [1], [2], …
Since I’m using the bibliography in moderncv I don’t really need labels since there are no citations in the text. If labels are hard to avoid, I’d prefer something like a bullet.

I guess this might make things more compicated, but for better or worse I am currently using plainyr-rev.bst also. That’s not vital though; the bblography only contains a dozen or so items and I could just change the labels and sort by those, probably.

One Answer

The answer by Gonzalo Medina which I linked in the question provides most of the functionality I need, and with the tweak suggested by Cicada does what I want. So, I ended up with this:

makeatletter
ifthenelse{boolean{twocolbib}}{
renewenvironment{thebibliography}[1]
     {begin{multicols}{2}[section*{refname}]%
      @mkboth{MakeUppercaserefname}{MakeUppercaserefname}%
      list{}
           {settowidthlabelwidth{@biblabel{#1}}%
            leftmarginlabelwidth
            advanceleftmarginlabelsep
            @openbib@code
            usecounter{enumiv}%
            letp@enumiv@empty
            renewcommandtheenumiv{@arabicc@enumiv}}%
      sloppy
      clubpenalty4000
      @clubpenalty clubpenalty
      widowpenalty4000%
      sfcode`.@m}
     {def@noitemerr
       {@latex@warning{Empty `thebibliography' environment}}%
      endlistend{multicols}}
}{}
makeatother

As things turned out though, other parts of my resume got long enough that it no longer fitted on one page anyway, so the advantage of a two-column bibliography went away, and so I added an ifthenelse in case I needed it again.

Correct answer by James Youngman on June 30, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP