diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/glossaries-extra/samples/sample-header.tex |
Initial commit
Diffstat (limited to 'macros/latex/contrib/glossaries-extra/samples/sample-header.tex')
-rw-r--r-- | macros/latex/contrib/glossaries-extra/samples/sample-header.tex | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/macros/latex/contrib/glossaries-extra/samples/sample-header.tex b/macros/latex/contrib/glossaries-extra/samples/sample-header.tex new file mode 100644 index 0000000000..4b004c0245 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/samples/sample-header.tex @@ -0,0 +1,73 @@ +% arara: pdflatex +% arara: makeglossaries +% arara: pdflatex +% arara: pdflatex +\documentclass{report} + +\usepackage[T1]{fontenc}% provide bold small caps +\usepackage[utf8]{inputenc} +\usepackage{slantsc}% provide slanted small caps +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} + +\makeglossaries + +\setabbreviationstyle{long-short-sc} +\newabbreviation{html}{html}{hypertext markup language} + +\newglossaryentry{sample}{name=sample, + description={an example}} + +\pagestyle{headings} + +% entries with the headuc attribute set to "true" +% will ensure the \glsfmttext etc commands use the +% upper case version in page headers. +\glssetcategoryattribute{general}{headuc}{true} + +% This attribute isn't set for the "abbreviation" category +% which keeps the abbreviation as small caps in the header. + +% Uncomment the following to set the attribute for the +% abbreviations as well: +%\glssetcategoryattribute{abbreviation}{headuc}{true} + +\begin{document} +\begin{abstract} +This is a sample document that tests the use of entries +in sectioning commands through commands like \verb|\glsfmtshort| +and \verb|\glsfmttext|. +\end{abstract} + +\tableofcontents + +\chapter{\Glsfmttext{sample} Chapter with \glsfmtshort{html} Abbreviation} +\label{ch:sample} + +First use: \gls{html}. Next use: \gls{html}. +Note that the \gls{sample} entry that occurs at the start of +the chapter title appears in lower case in the PDF bookmarks, since +the case-changing command can't be used there. + +\newpage + +Page break to test header. + +\chapter{Another + \texorpdfstring{\Glsfmttext{sample}}{Sample} + Chapter with \glsfmtshort{html} Abbreviation} + +The case-changing commands can't be used in PDF bookmarks, +so this chapter has used \verb|\texorpdfstring| to provide +an alternative for the PDF bookmark. The first chapter +(\nameref{ch:sample}) +didn't do this so ``\Gls{sample}'' appeared in lower case in +the PDF bookmark. + +\newpage + +Page break to test header. + +\printglossaries + +\end{document} |