diff options
Diffstat (limited to 'support/bib2gls/examples/sample-authors.tex')
-rw-r--r-- | support/bib2gls/examples/sample-authors.tex | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/support/bib2gls/examples/sample-authors.tex b/support/bib2gls/examples/sample-authors.tex new file mode 100644 index 0000000000..ee53973f03 --- /dev/null +++ b/support/bib2gls/examples/sample-authors.tex @@ -0,0 +1,50 @@ +% This file is public domain. See the "Examples" chapter +% in the bib2gls user manual for a more detailed description +% of this file. + +\documentclass[12pt,a4paper]{article} + +\usepackage[colorlinks]{hyperref} +\usepackage[record,% using bib2gls +nostyles,% don't load default styles +stylemods={bookindex},% load glossary-bookindex and patch styles +style=bookindex]{glossaries-extra} + +\GlsXtrLoadResources[ + src=no-interpret-preamble, + interpret-preamble=false +] + +\GlsXtrLoadResources[ + src={interpret-preamble2,people,books}, + write-preamble=false, + interpret-label-fields, + field-aliases={identifier=category,author=parent}, + check-end-punctuation={name}, + replicate-fields={name={first}} +] + +\newcommand*{\bookfont}[1]{\emph{#1}} +\glssetcategoryattribute{book}{textformat}{bookfont} +\glssetcategoryattribute{book}{glossnamefont}{bookfont} + +% requires glossaries-extra v1.23 +\renewcommand*{\glsxtrifcustomdiscardperiod}[2]{% + \GlsXtrIfFieldUndef{nameendpunc}{\glslabel}{#2}{#1}% +} + +\begin{document} +\section{Sample} + +\gls{ataleoftwocities}. \gls{bleakhouse}. \gls{thebigsleep}. +\gls{thelonggoodbye}. \gls{redharvest}. +\gls{murderontheorientexpress}. \gls{whydidnttheyaskevans}. +\gls{icecoldinalex}. \gls{thehobbit}. \gls{thelordoftherings}. +\gls{thewonderfulwizardofoz}. \gls{whiskygalore}. +\gls{whereeaglesdare}. \gls{icestationzebra}. \gls{ubik}. +\gls{doandroidsdreamofelectricsheep}. \gls{thetroublewithharry}. +\gls{brightonrock}. + +\printunsrtglossary[title={Author and Book List}] + +\end{document} |