Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- \usepackage[none]{hyphenat} % avoid hypenation
- \usepackage{ragged2e} % more powerful text alignment
- \usepackage[nonumberlist]{glossaries}
- \usepackage{glossary-longextra}
- \makeglossaries
- % allow using hyperlinked short forms in the same way as \glsdesc etc.
- \newcommand{\glsshort}[1]{\glslink{#1}{\glsentryshort{#1}}}
- \newglossarystyle{mystyle}{
- \setglossarystyle{long-booktabs}
- \renewcommand{\glsgroupskip}{}
- \renewcommand{\glossaryheader}{
- \toprule
- \bfseries Term &
- \bfseries Abbr &
- \bfseries Definition
- \tabularnewline\midrule\endhead
- \bottomrule\endfoot
- }
- \newlength{\glsnamewidth}
- \newlength{\glsshortwidth}
- \setlength{\glsnamewidth}{0.35\linewidth}
- \setlength{\glsshortwidth}{0.1\linewidth}
- \setlength{\glsdescwidth}{0.65\linewidth}%
- \renewenvironment{theglossary}{
- \begin{longtable}[l]{p{\glsnamewidth}p{3em}p{\glsdescwidth}}}%
- {\end{longtable}
- }%
- \renewcommand{\glossentry}[2]{% Change the displayed items
- \RaggedRight{\glstarget{##1}{\glossentryname{##1}}} &
- \RaggedRight{\glsentryshort{##1}} &
- \RaggedRight{\glossentrydesc{##1}.} \tabularnewline
- }
- % format first occurency <name> (<short>), use %glsshort{<key>} to print
- % only abbreviation, for the rest use %gls as usual
- \renewcommand{\glsentryfmt}{\glsgenentryfmt\ifglsused{\glslabel}{}{\space(\glsentryshort{\glslabel})}}
- \renewcommand{\arraystretch}{1.2} % more spacing between entries
- }
- \setglossarystyle{mystyle}
- % D
- \newglossaryentry{dbms}{name={Database Management System},description={Lorem
- ipsum dolor sit amer consecutur adipscin elit Lorem ipsum dolor sit
- ame Lorem ipsum dolor sit
- ame Lorem ipsum dolor sit
- ame},short={DBMS}}
- \newglossaryentry{db}{name={Database},description={Lorem ipsum dolor sit
- ame},short={DB}}
- % E
- \newglossaryentry{ects}{
- name={European Accumulation Credit Transfer System},
- short={ECTS},
- description={Test test},
- }
- \cleardoublepage
- \phantomsection
- \addcontentsline{toc}{chapter}{Glossary}
- \printglossary
- \gls{ects} 2nd usage \gls{ects}
- I like \glsshort{dbms}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement