summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/glossaries-extra/sample-header.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-01-26 22:52:39 +0000
committerKarl Berry <karl@freefriends.org>2016-01-26 22:52:39 +0000
commit8d88e6714a570bf2b598132718ae2beb4641c80b (patch)
tree6d627fdd2263e73984a523aeaacd6b0aca1c358e /Master/texmf-dist/doc/latex/glossaries-extra/sample-header.tex
parent9b9abe02f86c766295512f6699dac2b40de6968c (diff)
glossaries-extra (24jan15)
git-svn-id: svn://tug.org/texlive/trunk@39487 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/glossaries-extra/sample-header.tex')
-rw-r--r--Master/texmf-dist/doc/latex/glossaries-extra/sample-header.tex73
1 files changed, 73 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-header.tex b/Master/texmf-dist/doc/latex/glossaries-extra/sample-header.tex
new file mode 100644
index 00000000000..c0fd7b39926
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/glossaries-extra/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}