0

I'm using the scrreprt document class and BibTeX, Version 0.99d with apsrev4-2 for by bibliography. I'd like to modify my local .bst file such that the eprint field is printed with the \texttt typewriter font. I assume that I have to modify the FUNCTION {format.eprint} function, but I have no idea how.

For reference, this is how the relevant part in my .bst file looks like:

FUNCTION {format.eprint}
{
  eprint duplicate$ empty$
  control.eprint #0 <
  or
    { pop$ "" }
    {
      duplicate$
      ""
        archive duplicate$ empty$ { pop$ archiv.base } 'skip$ if$ *
        "/" *
        swap$ *
        "{" swap$ * "}" *
      swap$
      ""
        archivePrefix duplicate$ empty$ { pop$ "" } { ":" * } if$ *
        swap$ *
        primaryClass  duplicate$ empty$ { pop$ "" } { " [" swap$ * "]" * } if$ *
        "{" swap$ * "}" *
      *
      eprint.command swap$ *
    }
  if$
}
0

Found a solution:

FUNCTION {format.eprint}
{
  eprint duplicate$ empty$
  control.eprint #0 <
  or
    { pop$ "" }
    {
      duplicate$
      ""
        archive duplicate$ empty$ { pop$ archiv.base } 'skip$ if$ *
        "/" *
        swap$ *
        "{" swap$ * "}" *
      swap$
      "\ttfamily " %%% INSERT HERE 
        archivePrefix duplicate$ empty$ { pop$ "" } { ":" * } if$ *
        swap$ *
        primaryClass  duplicate$ empty$ { pop$ "" } { " [" swap$ * "]" * } if$ *
        "{" swap$ * "}" *
      *
      eprint.command swap$ *
    }
  if$
}

Note that for scrreprt and other KOMA classes, one must use \ttfamily instead of \tt.

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.