I could not find an option in makebst that would make the titles of articles be underlined, however, using emphasize in an otherwise correct bst I was able to underline it. Unfortunately this makes the resulting underlined text get outside the margins. My code is

\decimalpoint %\spanishdecimal{.}


asdasd \citep{chsh_inequality} asdasd \citep*{aspect_test_bell}


and my bib file is

% This file was created with JabRef 2.5. % Encoding: Cp1252

   author = {{Clauser}, J.~F. and {Horne}, M.~A. and {Shimony}, A. and {Holt}, R.~A.
    title = "{Proposed Experiment to Test Local Hidden-Variable Theories}",
  journal = {Physical Review Letters},
     year = 1969,
    month = oct,
   volume = 23,
   number = 15,
    pages = {880-884},
      doi = {10.1103/PhysRevLett.23.880},
   adsurl = {http://adsabs.harvard.edu/abs/1969PhRvL..23..880C},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}

   author = {{Aspect}, A. and {Grangier}, P. and {Roger}, G.},
    title = "{Experimental Tests of Realistic Local Theories via Bell's Theorem}",
  journal = {Physical Review Letters},
 keywords = {Fluorescence, phosphorescence},
     year = 1981,
    month = aug,
   volume = 47,
   number = 15,
    pages = {460-463},
      doi = {10.1103/PhysRevLett.47.460},
   adsurl = {http://adsabs.harvard.edu/abs/1981PhRvL..47..460A},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}

The bst file I generated with makebst is http://pastebin.com/ji5d4vrx. On line 527 replacing { title with { emphasize title makes the titles become underlined, but they come outside of the margins. like thisenter image description here

How could I fix the margins? Also, how to add the missing spaces between the authors and the title and between the title and the year?

  • 3
    Underlining is a sure sign of bad typography; please, don't do it. – egreg Jan 5 '13 at 11:41
  • But I absolutely have to. – Oscar Lazo Jan 5 '13 at 11:44
  • 1
    In this case look at what the soul package provides. – egreg Jan 5 '13 at 11:46
  • But that is meant for use in the body of the document, how can I make it work through a bst? – Oscar Lazo Jan 5 '13 at 12:12
  • If I make the change you propose, I get that the author list is underlined. – egreg Jan 5 '13 at 13:28

I suggest you to revise your .bst file. For instance, change lines 1574--1575 into

  write$ newline$
  "\expandafter\ifx\csname bbluline\endcsname\relax\let\bbluline\underline\fi"

and in your TeX file write


Also the definition of \enquote should be changed: lines 1572-1573 should be

  write$ newline$
  "\newcommand{\enquote}[1]{~`#1'\ }"

Moreover, line 197 must be changed as

    { "\bbluline{" swap$ * "}" * }

(that is, changing \uline into \bbluline).

Of course, line 527 should become

526 FUNCTION {format.title}
527 { title emphasize
528    "title" bibinfo.check

that is, removing also add.blank.

| improve this answer | |
  • That will produce a similar result, the underlined text goes on until it reaches the margins. – Oscar Lazo Jan 5 '13 at 15:35
  • @OscarLazo Not in my experiment. Actually the plain \uline from ulem would work if you didn't enclose the full title in the additional pair of braces. – egreg Jan 5 '13 at 15:36
  • Could you post your code? I'm pretty sure I did just what you suggested. – Oscar Lazo Jan 5 '13 at 15:58
  • @OscarLazo Sorry, I forgot the change on line 197, where \uline should become \bbluline – egreg Jan 5 '13 at 16:10
  • I tried with just \usepackage{ulem} \def\bbluline#1{\uline#1} in the tex file and "\enquote{ \uline" swap$ * in line 531 – Oscar Lazo Jan 5 '13 at 16:14

write into the preamble of your document


and change the title function in your bst file to

FUNCTION {format.title}
{ title add.blank
   "title" bibinfo.check
  duplicate$ empty$ 'skip$
      "\enquote{\ul{" swap$ *
        { "}} " * }
        { "}} " * }

then it should work.

| improve this answer | |
  • what is a typo? If I do what you suggest I get an error after pdflatex bibtex pdflatex: Package soul Error: Reconstruction failed – Oscar Lazo Jan 5 '13 at 16:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.