Created
March 18, 2012 09:59
-
-
Save tillcarlos/2070269 to your computer and use it in GitHub Desktop.
\gls with automatic use of \gls* as a per-glossary setting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\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} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment