So I have started developing an acronym style that is paragraph based.
I have a general paragraph working except for two problems"
- one, I haven't figured out how to remove the list separation punctuation from the last element
- and two, if I use my glossary counts attribute on a custom field that I called "category", I don't get a list... at all:
Here's a MWE that doesn't produce a list at all.
\documentclass{article}
\usepackage{textgreek}
\usepackage[savewrites=true,nogroupskip,style=tree]{glossaries-extra}
\newcommand{\acrinverse}[1]{{\acrshort{#1}}\xspace{\acrlong{#1}}}
\newglossary[alg]{acronym}{acr}{acn}{List of Acronyms}
\makeindex
\makeglossaries
\glsenableentrycount % enable \cgls, \cglspl, \cGls, \cGlspl
\glssetcategoryattribute{acronym}{entrycount}{1}
% Not using \newabbreviation so redefine \cglsformat
% to just check for the long field.
% http://tex.stackexchange.com/questions/319997/problems-with-glsenableentrycount-when-usepackageglossaries-extra-instead-of
\renewcommand*{\cglsformat}[2]{%
\ifglshaslong{#1}{\glsentrylong{#1}}{\glsentryfirst{#1}}#2%
}
\AtEndPreamble{%
\let\ncgls\gls
\let\ncglspl\glspl
\let\ncGls\Gls
\let\ncGlspl\Glspl
\let\gls\cgls
\let\glspl\cglspl
\let\Gls\cGls
\let\Glspl\cGlspl
}
%==================================================================================================================================================================
\newglossarystyle{paragraphAcronymList}{%
\setglossarystyle{tree}% base this style on the list style
\renewcommand{\glspostdescription}{;}
\renewcommand*{\glossentry}[2]{%
\glstarget{##1}{\glossentryname{##1}}:~\space\glossentrydesc{##1}\glspostdescription\space}%
%\space\glspostdescription\space}%
}
%==================================================================================================================================================================
\newglossaryentry{TNF}{
type={acronym},
category={acronym},
sort={tumor necrosis factor},
name={TNF},
first={tumor necrosis factor (TNF)},
description={tumor necrosis factor}
}
\glssetnoexpandfield{first}
\glssetnoexpandfield{firstpl}
\newcommand{\TNFalpha}{TNF--{\textalpha}}
\newglossaryentry{TNFalpha}{
type={acronym},
category={acronym},
sort={tumor necrosis factor alpha},
name={\TNFalpha},
first={\ifglsused{TNF}{\TNFalpha}{\glsunset{TNF}tumor necrosis factor alpha~(\TNFalpha)}},
description={tumor necrosis factor alpha}
}
\newglossaryentry{HDPE}
{
type={acronym},
category={acronym},
name={HDPE},
short={HDPE},
long={high density polyethylene},
first={high density polyethylene (HDPE)},
description={high density polyethylene}
}
\newglossaryentry{SHG}{%
type={acronym},
category={acronym},
name={SHG},
short={SHG},
long={second harmonic generation},
description={second harmonic generation},
first={second harmonic generation (SHG)},
sort={second harmonic generation}
}%
\newglossaryentry{SRS}{%
type={acronym},
category={acronym},
name={SRS},
short={SRS},
long={stimulated Raman scattering},
description={stimulated Raman scattering},
first={stimulated Raman scattering (SRS)},
sort={stimulated Raman scattering}
}%
\newglossaryentry{TPEF}{%
type={acronym},
category={acronym},
name={TPEF},
short={TPEF},
long={two-photon-excited fluorescence},
description={two-photon-excited fluorescence},
first={two-photon-excited fluorescence (TPEF) },
sort={two-photon-excited fluorescence}
}%
\begin{document}
\gls{TNFalpha}
\gls{TNFalpha}
\gls{TNF}
\gls{TNF}
\gls{HDPE}
\gls{HDPE}
\gls{TPEF}
\gls{TPEF}
\gls{SHG}
\gls{SHG}
\gls{SRS}
\gls{SRS}
\printglossary[type=acronym,style=paragraphAcronymList]\clearpage
\end{document}
\parindent
and\hangindent
rather than lists or tabulated material. – Nicola Talbot Nov 1 '16 at 23:04glossary-inline
also looks like it has potential. Still investigating! – EngBIRD Nov 1 '16 at 23:38style=tree
to the optional package arguments. Unfortunately, I still only get two entries. Not even the first alphabetical terms, but my two most frequently used terms. I will tackle a MWE for this behavior as soon as I get some time. Just wanted to follow up from your suggested direction. The complete document makes use of things like glossary counting and glossaries-extra that aren't in the original MWE so these need to be tested for the MWE. – EngBIRD Nov 4 '16 at 1:53\printglossary
. Are there any error messages or warnings in themakeindex
log file? There's also a diagnostic applicationmakeglossariesgui
that can check for common problems. – Nicola Talbot Nov 4 '16 at 15:17\glssetcategoryattribute{acronym}{entrycount}{1}
is the problem line. If I remove this line, it works (except for my semicolon issue on the last entry) but then my counts won't work properly. I've written an entirely new question and MWE to illustrate. Thanks. – EngBIRD Nov 11 '16 at 2:22