3

I'm writing an article in which I need to use species name E. coli. My problem is, that "E. coli" is both, an abbreviation and a species name, which should be in italic letters. Is there a way to use \textit within the \acronym package? Something like this:

\documentclass[]{scrbook}

\usepackage{acronym}

\begin{document}
\begin{acronym}
\acro{\textit{E.coli}}{\textit{Escherichia coli}}
\end{acronym}

This is a damn nice \ac{\textit{E. coli}}.

\end{document}
3

You can pass an optional argument which accepts font changes:

enter image description here

\documentclass{scrbook}

\usepackage{acronym}
\usepackage{lmodern}% For bold italics

\begin{document}
\begin{acronym}
\acro{E. coli}[\emph{E. coli}]{\emph{Escherichia coli}}
\end{acronym}

This is a damn nice \ac{E. coli}.

\end{document}

The first argument is the identifier of the acronym. It's used in a \csname, so it can contain only characters. It doesn't need to be the same as the printed text. You could've used, for example, \acro{ecoli}[\emph{E. coli}]{\emph{Escherichia coli}} and then \ac{ecoli}.

I also used \emph instead of \textit, so that when you write \ac{E. coli} in a italicized text, it is typeset upright.

  • Thanks a lot! Works fine. – lefrcom May 17 at 12:02

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.