Open StickySli opened 2 years ago
I have an idea for the second issue: use babel's \iflanguage
to check if foreign is different that the document's main language. If true, display foreign, otherwise hide it.
Example:
\DeclareAcronym{gpio}{
short = GPIO ,
long = general-purpose inputs/output ,
foreign = entrada/sortida per a un ús general ,
foreign-babel = english ,
}
This seems counterintuitive since it would display if the document's language id different than english "general-purpose inputs/output (GPIO, english: entrada/sortida per a un ús general)" but this is similar to how Wikipedia articles display the foreign meaning.
Would it be please possible for you to post a real MWE?
Otherwise just a suggestion: you can easily redefine acro
's templates which use the foreign
property to include the language check.
I'm trying to write an article in two languages simultaneously using
babel
. I need to define some acronyms that usually have a definition in both languages but use the sameshort
acronym. I have defined the following command to switch between languages quickly:My
acsetup
contains:Using TeX Live for windows with
acro
version 61762 (3.7),babel
version 62203 (3.73). Compiling with pdflatex and biber.1st issue: Trying to use command withing
foreign-babel
does not get expandedExample that does not work:
Error output:
Expected outcome
I would expect that ACRO could expand the command like the other commands do just fine, since babel can't recognize
\langsubs {}{english}
.2nd issue: Empty
foreign
makes empty parenthesesCommenting out the
foreign-babel
and compiling withenglish
, outputs the following document:Expected outcome
I would expect that the parentheses that show
(english: )
should not appear in this case. This should be similat to settingplural = ,
. Disablinglist/locale/display
inacsetup
just shows()
after the long acronym.Workaround
Works fine, but it's a bit long:
The pdf output of the previous example: