Closed Ma-Nu-El closed 1 year ago
Solution:
It seems like macOS needs a different treatment.
From here I got the solution: https://stackoverflow.com/questions/51084740/latex-printglossaries-not-working-on-mac
And using an example in Overleaf.com https://es.overleaf.com/learn/latex/Glossaries#Terms_and_Acronyms
Then I have to
pdflatex file.tex
makeglossaries file
pdflatex file.tex
Notice the lack of extension in makeglossaries
: it will not work if you put the extension.
Now, the next thing would be to make Emacs do this automatically, but my Elisp-fu is quite bad at the moment.
Noticed that my solution didn't involve features of org-ref-glossary.el
.
Table of Contents
.tex
and.pdf
exportDoom Emacs Configuration
init.org
: nothingconfig.org
:`config.org`
```` #+begin_src elisp (use-package! org-ref :after org :commands (org-ref-cite-hydra/body org-ref-bibtex-hydra/body) :init ; code to run before loading org-ref :config (require 'org-ref) (add-hook 'org-export-before-parsing-hook 'org-ref-acronyms-before-parsing 'org-ref-glossary-before-parsing) ) #+end_src ````packages.org
:Minimal Example
test.org
:`file.org`
```` #+title: File #+date: #+author: #+LATEX_HEADER: \usepackage{glossaries} #+LATEX_HEADER: \makeglossaries Here I just define keys and labels, but I do not want them exported here. #+name: glossary | label | name | description | |-------+-------+---------------| | tree | Tree | A woody plant | | shrub | Shrub | A woody bush | #+name: acronyms | key | abbreviation | full form | |------+--------------+--------------------------------| | mimo | | multiple-input multiple output | | qos | QoS | quality-of-service | | bb | BB | branch and bound | Below is a test of where I want the table of glossaries and acronyms: - QoS is an acronym for quality-of-service. - Shrub is defined in glossary as A woody bush printglossaries: ````With expanded links:
file.org
:`file.org` with expanded links
```` #+title: File #+date: #+author: #+LATEX_HEADER: \usepackage{glossaries} #+LATEX_HEADER: \makeglossaries Here I just define keys and labels, but I do not want them exported here. #+name: glossary | label | name | description | |-------+-------+---------------| | tree | Tree | A woody plant | | shrub | Shrub | A woody bush | #+name: acronyms | key | abbreviation | full form | |------+--------------+--------------------------------| | mimo | | multiple-input multiple output | | qos | QoS | quality-of-service | | bb | BB | branch and bound | Below is a test of where I want the table of glossaries and acronyms: - [[acrshort:qos][QoS]] is an acronym for [[acrlong:qos][quality-of-service]]. - [[gls:shrub][Shrub]] is defined in glossary as [[glsdesc:shrub][A woody bush]] [[printglossaries:]] ````What is working and not working
Working:
org-ref-insert-glossary-link
andorg-ref-insert-acronym-link
.Not working:
.tex
and.pdf
export`.tex`
```` % Created 2023-04-27 Thu 21:32 % Intended LaTeX compiler: pdflatex \documentclass[11pt]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{graphicx} \usepackage{longtable} \usepackage{wrapfig} \usepackage{rotating} \usepackage[normalem]{ulem} \usepackage{amsmath} \usepackage{amssymb} \usepackage{capt-of} \usepackage{hyperref} \usepackage{glossaries} \makeglossaries \date{} \title{File} \hypersetup{ pdfauthor={}, pdftitle={File}, pdfkeywords={}, pdfsubject={}, pdfcreator={Emacs 28.2 (Org mode 9.6.1)}, pdflang={English}} \begin{document} \maketitle \tableofcontents Here I just define keys and labels, but I do not want them exported here. \begin{table}[htbp] \label{glossary} \centering \begin{tabular}{lll} label & name & description\\[0pt] \hline tree & Tree & A woody plant\\[0pt] shrub & Shrub & A woody bush\\[0pt] \end{tabular} \end{table} \begin{table}[htbp] \label{acronyms} \centering \begin{tabular}{lll} key & abbreviation & full form\\[0pt] \hline mimo & & multiple-input multiple output\\[0pt] qos & QoS & quality-of-service\\[0pt] bb & BB & branch and bound\\[0pt] \end{tabular} \end{table} Below is a test of where I want the table of glossaries and acronyms: \begin{itemize} \item \acrshort{qos} is an acronym for \acrlong{qos}. \item \gls{shrub} is defined in glossary as \glsdesc{shrub} \end{itemize} \printglossaries \end{document} ````The issue
The tables are being displayed as they are being typed in the orgmode file instead of being displayed according to the position of the
[[printglossaries:]]
directive. Should I use a#+begin_src latex
block instead?On another note, does anyone know how to activate
org-ref
keyboard shortcuts in Doom Emacs?Will update if I come to a solution.