public
Created

\gls with automatic use of \gls* as a per-glossary setting

  • Download Gist
glossarystartest.tex
TeX
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
\documentclass[german,pagesize,BCOR=0mm,titlepage,toc=bib,headinclude,headsepline]{book}
\tableofcontents
\usepackage[pdfusetitle,pdftex,colorlinks]{hyperref}
 
 
% DOCUMENTATION HERE:
% http://www.latex-community.org/know-how/263-glossaries-nomenclature-lists-of-symbols-and-acronyms
% °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
% INCLUDE THIS EVER TIME!!!
%\newglossary[⟨log-ext⟩]{⟨name⟩}{⟨in-ext⟩}{⟨out-ext⟩} {⟨title⟩}[⟨counter ⟩]
\usepackage[acronym]{glossaries}
\newglossary{opad}{gls}{glo}{Technical and Research Terms}
\newglossary{tech}{tgls}{tglo}{Software and Libraries}
\newglossary[glignoredl]{ignored}{glignored}{glignoredin}{Ignored Glossary}
 
 
 
\makeglossaries
 
 
% ==============================================================================
% STYLING
% ==============================================================================
 
\defglsdisplayfirst[ignored]{\textit{#1}}
\defglsdisplay[ignored]{#1}
\defglsdisplayfirst[opad]{\textit{#1}}
\defglsdisplay[opad]{#1}
 
% TODO@IMPORTANT: How to highlight the tech terms? Declare them in the intro!!!
\defglsdisplayfirst[tech]{\textbf{{#1}}}
\defglsdisplay[tech]{ \textbf{{#1}} }
 
\defglsdisplayfirst[acronym]{\textit{#1}}
\defglsdisplay[acronym]{#1}
 
 
\renewcommand*{\firstacronymfont}[1]{\normalfont{#1}}
\renewcommand*{\acronymfont}[1]{\normalfont{#1}}
 
 
 
 
 
% I want this: http://tex.stackexchange.com/questions/25805/disable-hyperlinks-in-some-entries-for-glossaries !!!
% TODO@GLOSS put gls* behind all links of type ignore. baaaah :(
\newglossaryentry{withoutlink}{
type=tech, name={withoutlink},
description={withoutlink} }
}
 
\newglossaryentry{withlink}{
type=tech, name={withlink},
description={withlink} }
}
 
 
% ==============================================================================
\begin{document}
 
\section{Manual Test}
 
\subsection{Gloss}
\gls*{withoutlink} (gls*)... Okay, that behavior can be done with starring gls. But I dont want to do this in my whole document since sometimes I muse gloss from the ignored type to the used type.\\
\noindent
\gls{withoutlink} (gls)... this should be without link by setting something in the \texttt{\defglsdisplay[ignored]{#1}} or so
\noindent
\gls{withlink}... This is just the normal behavior
\ \\
 
%\section{Ignored Gloss}
%\printglossary[type=ignored, title={Ignored Glossary. Don't show this in production!}]
\printglossary[type=opad]
\printglossary[type=tech]
 
\end{document}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.