cgnieder / acro

acronyms for LaTeX
LaTeX Project Public License v1.3c
41 stars 9 forks source link

Foreign only #209

Closed recke96 closed 3 years ago

recke96 commented 3 years ago

I am writing in German and have an acronym that does not have a German long form, I think it would be nice to declare only an foreign form.

recke96 commented 3 years ago

Example in question:

\DeclareAcronym{elisa}{
    short = ELISA,
    foreign = enzyme-linked immunosorbent assay,
    foreign-babel=english,
    foreign-locale=englisch
}
cgnieder commented 3 years ago

I'd probably just use the long form for this and set the long format to choose the correct babel language:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[english,ngerman]{babel}
\usepackage{acro}

\babeltags{EN=english}

\DeclareAcronym{elisa}{
  short = ELISA ,
  long = enzyme-linked immunosorbent assay ,
  long-format = \textEN ,
  first-style = short-long
}

\begin{document}

Text auf deutsch bla bla aber \ac{elisa} \par
und später \ac{elisa}

\end{document}
recke96 commented 3 years ago

Thank you.