This is my first post so apologies if I break any conventions! I've decided to write my PhD thesis in LaTeX, and having some trouble formatting the acronyms/glossaries as I would like. I'm using the glossaries
package, and want to use it for two distinct use cases, one of which (the standard use) I have working well.
The issue relates to trying to use glossaries to deal with manufacturers/companies when referencing e.g. a chemical. Conventionally, when you first list a chemical, it should be referenced along the lines of "Chemical X (Company Y, Sometown, USA)". If you use several products from one company, subsequent references to the company can just mention the company name without needing location. These company references should not appear in the list of acronyms.
With the help of previous answers on this site, I have managed to suppress the company name from the list of acronyms by defining a new 'fake' glossary that is not printed. I tried using \newignoredglossary
but this also seemed to hide the acronym in the text, not sure why, but I am happy with the fake glossary solution.
However, first use of these company acronyms using \gls{}
produces e.g. "Company, Sometown, USA (Company)". I'd like this to display without the company name repeated in parentheses at the end.
I realize that I could use:
\glsdesc{company}
followed by
\glsunset{company} \gls{company}
to achieve exactly the effect I am after - but this would involve having to manually find and tag the first use of each company name with \glsdesc{}
followed by \glsunset{}
- and given that it's likely the order of paragraphs could change during the writing of the thesis, I would much rather that this was handled automatically.
Here is a minimal working example:
\documentclass{article}
\usepackage[acronym]{glossaries}
\newglossary[flg]{fake}{fls}{flo}{Fake Entries}
\newacronym[type=fake]{bio}{Biohazard Inc}{Biohazard Inc, MA, USA}
\newacronym{pbs}{PBS}{Phosphate Buffered Saline}
\makeglossaries
\begin{document}
First use - \gls{bio}. Second use - \gls{bio}. Not displayed in glossary, but first use repeats company name in parentheses.
\gls{pbs} should appear in the glossary. Second use \gls{pbs}.
\printglossary[type=\acronymtype]
\end{document}
Is there an easy way to achieve this in glossaries
? I have wondered whether glossaries-extra
might be able to deal with this better, but the documentation is not 100% clear to me, and I'm concerned that trying to convert might break what is currently a generally effective acronym list in what is already a complex, multi-file document, and not necessarily fix my issue!