Support LaTeX glossaries export #11

Closed
opened 2023-01-31 23:09:54 +00:00 by authsec · 2 comments
authsec commented 2023-01-31 23:09:54 +00:00 (Migrated from github.com)

Can you show me an export-spec that works with the glossaries latex package? I tried with the following to start

(org-glossary-set-export-spec 'latex t
  :first-use "\\gls{gls-%K}"
  :use "\\gls{gls-%K}"
  :backref ""
  :backref-seperator ""
  :definition-structure "%d"
  :heading ""
  :definition "\\newacronym{gls-%K}{%t}{%v}")

Which seems to work at least somewhat. It however creates the Acronyms and Glossary chapters too and obviously now everything is an acronym. Is it possible to switch the definition depending on if it's an acronym or glossary type?

The MWE is:

#+title: Glossary Demo
#+latex_header: \usepackage[toc,acronyms,numberedsection]{glossaries}
#+glossary_sources: glossary-it-general acronyms-it-general

* One

Use a reference and a glossary entry to the PC or a blog in the EmRE.

* Two
No refs aside from the PC glossary entry.

#+begin_src emacs-lisp :exports none
(org-glossary-set-export-spec 'latex t
  :first-use "\\gls{gls-%K}"
  :use "\\gls{gls-%K}"
  :backref ""
  :backref-seperator ""
  :definition-structure "%d"
  :heading ""
  :definition "\\newacronym{gls-%K}{%t}{%v}")
#+end_src

#+latex: \printglossaries

with the two files from https://github.com/tecosaur/org-glossary/issues/9#issuecomment-1344504097

Can you show me an export-spec that works with the [glossaries latex](https://www.overleaf.com/learn/latex/Glossaries) package? I tried with the following to start ``` (org-glossary-set-export-spec 'latex t :first-use "\\gls{gls-%K}" :use "\\gls{gls-%K}" :backref "" :backref-seperator "" :definition-structure "%d" :heading "" :definition "\\newacronym{gls-%K}{%t}{%v}") ``` Which seems to work at least somewhat. It however creates the Acronyms and Glossary chapters too and obviously now everything is an acronym. Is it possible to switch the definition depending on if it's an acronym or glossary type? The MWE is: ``` #+title: Glossary Demo #+latex_header: \usepackage[toc,acronyms,numberedsection]{glossaries} #+glossary_sources: glossary-it-general acronyms-it-general * One Use a reference and a glossary entry to the PC or a blog in the EmRE. * Two No refs aside from the PC glossary entry. #+begin_src emacs-lisp :exports none (org-glossary-set-export-spec 'latex t :first-use "\\gls{gls-%K}" :use "\\gls{gls-%K}" :backref "" :backref-seperator "" :definition-structure "%d" :heading "" :definition "\\newacronym{gls-%K}{%t}{%v}") #+end_src #+latex: \printglossaries ``` with the two files from https://github.com/tecosaur/org-glossary/issues/9#issuecomment-1344504097
tecosaur commented 2023-02-01 01:11:30 +00:00 (Migrated from github.com)

Have you read this section of the manual: https://github.com/tecosaur/org-glossary/blob/master/org-glossary.org#export-configuration ?

It's very much possible to do what you want, it will just take a little more work.

All that said, I'd hoped the default generated LaTeX would be good enough, how does it fall short for you?

Have you read this section of the manual: https://github.com/tecosaur/org-glossary/blob/master/org-glossary.org#export-configuration ? It's very much possible to do what you want, it will just take a little more work. All that said, I'd hoped the default generated LaTeX would be good enough, how does it fall short for you?
tecosaur commented 2023-02-03 02:53:49 +00:00 (Migrated from github.com)

Closing as it is supported with more work.

Closing as it is supported with more work.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: tec/org-glossary#11
No description provided.