LaTeX forum ⇒ MakeIndex, Nomenclature, Glossaries and AcronymsAcronym long version in the margin

Information and discussion about MakeIndex - the tool to generate subject indices for LaTeX documents.
Posts: 1
Joined: Thu Dec 19, 2019 11:02 am

Acronym long version in the margin

Postby mahrr » Thu Dec 19, 2019 11:13 am

I'm using the glossaries package to enter acronyms, in an scrbook document. For now, I'm using \gls in the text, and \acrshort & \acrlong in tables (to manually control the form).

Because I use a lot of acronyms in my thesis, I would like LaTeX, when using \gls, to display the long version of the acronym in the margin (right or left since it is a two side document, and with the possibility to make the text smaller), along the paragraph, except for the first time in each chapter since the long version is automatically entered in the text, and only in the \mainmatter.

I've tried to delete all non related packages, here is a minimal working example, I don't know how to start to achieve this :
Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. \documentclass[chapterprefix,twoside,12pt,DIV=12]{scrbook}
  2. \KOMAoptions{headsepline=true, chapterprefix=true}
  3. \usepackage{lmodern}
  4. \usepackage[utf8]{inputenc}
  5. \usepackage[T1]{fontenc}
  6. \usepackage[french]{babel}
  7. \usepackage{setspace}
  8. \setstretch{1.5}
  9. \usepackage[bottom]{footmisc}
  11. \usepackage[acronym,smallcaps]{glossaries}
  12. \makeglossaries
  14. \newglossarystyle{long-ucdesc}{%
  15. \setglossarystyle{long}%
  16. \renewcommand{\glossentry}[2]{%
  17. \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} &
  18. \Glossentrydesc{##1}\glspostdescription\space ##2\tabularnewline
  19. }%
  20. }
  22. \newacronym{unesco}{unesco}{United Nations Educational, Scientific and Cultural Organization}
  24. \begin{document}
  25. \frontmatter
  26. \mainmatter
  27. \gls{unesco} ......
  28. \gls{unesco}
  29. \appendix
  30. \backmatter
  31. \printglossary[type=acronym, style=long]\label{listofacronyms}
  33. \end{document}

Thanks for your help!

User avatar
Site Moderator
Posts: 1993
Joined: Sat Apr 16, 2011 7:27 pm

Postby cgnieder » Mon Jan 13, 2020 10:39 pm

site moderator & package author

Return to “MakeIndex, Nomenclature, Glossaries and Acronyms”

Who is online

Users browsing this forum: No registered users and 1 guest