13

I have a bibliography in biblatex and I want to use different fonts than Computer Modern, namely Lato & Bitstream Charter. Here is a minimal example:

\documentclass{article}

\usepackage[T1]{fontenc}
\usepackage[defaultsans, scale=0.9]{lato}
\usepackage[bitstream-charter]{mathdesign}
\usepackage{filecontents}

\begin{filecontents*}{references.bib}
@article{
  shannon,
  author = {Shannon, C. E.},
  title = {A mathematical theory of communication},
  journal = {SIGMOBILE Mob. Comput. Commun. Rev.},
  issue_date = {January 2001},
  volume = {5},
  number = {1},
  month = jan,
  year = {2001},
  issn = {1559-1662},
  pages = {3--55},
  numpages = {53},
  url = {http://doi.acm.org/10.1145/584091.584093},
  doi = {10.1145/584091.584093},
  acmid = {584093},
  publisher = {ACM},
  address = {New York, NY, USA},
}
\end{filecontents*}

\usepackage[backend=biber,style=alphabetic,natbib=true]{biblatex}
\addbibresource{references.bib}

\begin{document}

\nocite{*}
\printbibliography

\end{document}

This results in the following output after running biber and pdflatex:

example

The red arrows indicate my problem: Because Bitstream Charter has no actual small caps, LaTeX simply shrinks the characters for acronyms like ISSN and I don't like how this looks. So my question is: How can I change the font such that acronyms are simply displayed regularly?

11

You need to change the macro \mkbibacro. Its original definition is

\newcommand*{\mkbibacro}[1]{%
  \ifcsundef{\f@encoding/\f@family/\f@series/sc}
    {#1}
    {\textsc{\MakeLowercase{#1}}}}

so a somewhat brute-force approach (replacing small caps with "typeset as-is" (here: capitals) for all fonts) would be

\renewcommand*{\mkbibacro}[1]{#1}

A better way is to trick biblatex into thinking that Mathdesign/Bitstream Charter doesn't feature small caps. Add the following to your preamble:

\makeatletter
\renewcommand*{\mkbibacro}[1]{%
  \csundef{\f@encoding/mdbch/\f@series/sc}%
  \ifcsundef{\f@encoding/\f@family/\f@series/sc}
    {#1}
    {\textsc{\MakeLowercase{#1}}}}
\makeatother

enter image description here

Note: The "font shorthand" mdbch for Mathdesign/Bitstream Charter can be detected by adding \show\rmdefault to the OP's example.

  • Would you mind to clarify why "trick" is better? A "brute-force" approach seems shorter. – mlt Jun 4 '14 at 6:33
  • @mlt The brute-force method will always result in capitals, even if you switch to a font that features small caps. – lockstep Jun 4 '14 at 6:50
  • 1
    @lockstep Thank you. I actually was looking for lowercase "doi" in a regular font and I settled on \renewcommand*{\mkbibacro}[1]{\MakeLowercase{#1}} and \urlstyle{same}. – mlt Jun 4 '14 at 14:15

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.