pfmc-assessments / sa4ss

Generate a stock assessment document from Stock Synthesis output
https://pfmc-assessments.github.io/sa4ss/
Other
12 stars 7 forks source link

glossary entry for sdmtmb is not working #101

Closed kellijohnson-NOAA closed 1 year ago

kellijohnson-NOAA commented 1 year ago

Problem

Rendering of glossary entry sdmtmb is currently 🤮 because it does not render "TMB", which is contained within its title. Thanks to @okenk for reporting.

Proposal

Do some 🔍 to find a solution to having a \gls call within a title for a \gls object. Kind of recursive, hence the problem.

kellijohnson-NOAA commented 1 year ago

Thanks again to @okenk for carefully looking at the rendered output from the text for the survey workup, which includes a call to `\gls{sdmtmb}. I FINALLY found out, after trial and error, why "Template Model Builder" was not being rendered in the resulting text and instead is represented by just a blank space. It is because the definition of TMB comes after the definition of sdmTMB in the glossaries file. This will happen for any entry where the long version of the name references an entry that is defined after it. Below is a minimal reproducible example

\documentclass{article}
\usepackage{glossaries}
\newacronym{child1}{Child 1}{Child 1}
\newacronym{adult1}{Adult 1}{Adult 1 \glsentrylong{child1}}
\newacronym{adult2}{Adult 2}{Adult 2 \glsentrylong{child2}}
\newacronym{child2}{Child 2}{Child 2}
\begin{document}
\Gls{adult1}

\Gls{adult2}
\end{document}

image I posted an issue on the 🐛 tracker for the CTAN package glossaries. If it cannot be fixed, then I will just reorder the glossaries file to ensure that all entries with a nested structure come after the entries without.

kellijohnson-NOAA commented 1 year ago

@okenk Thanks again for reporting this. I ended up removing all nested acronyms and just typing the full name out in the glossaries file.