1

I've created a new taxon, called popular, for use with the biocon package. However, it seems that the package does not accept the 'ç' character.

A minimal working example follows:

\documentclass{article}
\usepackage{biocon}

\usepackage[utf8]{inputenc}

\newtaxon{popular}
\newtaxastyle{OnlyPopular}{\taxon{!popular!}}

\newplant{araca}{genus=Psidium, epithet=cattleianum, author= Sabine, popular=Araçá}
\newplant{alecrim}{genus=Rosmarinus, epithet=officinalis, author=L., popular=Alecrim}

\begin{document}

Working: \plant[OnlyPopular]{alecrim}

Not working: \plant[OnlyPopular]{araca}

\end{document}

The error that I got is:

./test.tex:9: Illegal parameter number in definition of \Paraca@popular. \crcr l.9 ...ttleianum, author= Sabine, popular=Araçá}

The "alecrim" plant works fine, thus I believe my problem is only with the "ç" char. Also, I've notice that the "á" char works as well.

Anyone knows how to make the package works for plants whose popular name has a "ç" character?

1 Answer 1

2

The error depends on a conceptual error in the biocon package, which uses \edef in places where textual input is expected. Macros for accented characters (which are implicit when you use UTF-8 input) don't generally survive \edef and, indeed, LaTeX has \protected@edef for the purpose.

I made an experiment: I edited a copy of biocon.sty, changing every \edef into \protected@edef and your document compiled successfully.

You can work around the bug by using \unexpanded:

\documentclass{article}
\usepackage{biocon}

\usepackage[utf8]{inputenc}

\newtaxon{popular}
\newtaxastyle{OnlyPopular}{\taxon{!popular!}}

\newplant{araca}{genus=Psidium, epithet=cattleianum, author= Sabine, popular=\unexpanded{Araçá}}
\newplant{alecrim}{genus=Rosmarinus, epithet=officinalis, author=L., popular=Alecrim}

\begin{document}

Working: \plant[OnlyPopular]{alecrim}

Not working: \plant[OnlyPopular]{araca}

\end{document}

What the text is claiming is now false. ;-)

enter image description here

Note. Also adding \usepackage[T1]{fontenc} solves the problem, for this particular case. I recommend loading it anyway, if you use accented characters.

1
  • Thanks for your answer. I got everything working fine in this sense. About your note: Sadly, I'm bound by my old university class for dissertations. If I change some parts of it, I get a lot of errors (from packages used within the class).
    – Isma
    Feb 13, 2016 at 1:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .