JunoLab / Weave.jl

Scientific reports/literate programming for Julia
http://weavejl.mpastell.com
MIT License
821 stars 94 forks source link

Question: can Weave.jl be used to make glossaries? #475

Open AhmedSalih3d opened 9 months ago

AhmedSalih3d commented 9 months ago

Hello!

I am not sure what kind of minimal example would be beneficial here; basically what I am trying to do is producing a glossary using Weave.jl.

Basically something like this (source: https://www.baeldung.com/cs/latex-glossary):

\begin{document} 

\section{Section with glossaries}

% Term definitions 
\newglossaryentry{fondue}{
    name=fondue,
    description={is a Swiss dish consisting of melted cheese that is served in a
      communal pot heated over a portable stove using a candle or a spirit lamp}
}

\newglossaryentry{raclette}{
    name=raclette,
    description={is a Swiss dish that involves heating cheese and
      scraping off the melted portion and topping it onto meats or vegetables}
}

% Use the terms 
\Gls{fondue} is a very popular dish and is often associated with \gls{raclette}.

% Print the glossary 
\printglossaries 

\end{document}

I know that the reason it does not work out of the box is that one needs to compile the document once, then do a makeglossary call and then recompile twice - is this supported in a smart way in Weave.jl?

The reason I ask here is that I have not had any meaningful success asking my questions on Discourse. If this is frowned upon, please let me know and close the issue, thanks!

AhmedSalih3d commented 9 months ago

To answer my own question;

Yes it can.

You just have to produce the TEX file using Weave, then do a few run commands to compile multiple times using xelatex or w/e.

This is of course not directly from Weave then, but it is in a sense using that eco-system :)