shiblon / latex-makefile

A Makefile for LaTeX - drop it in, type make, and magic happens.
Other
186 stars 30 forks source link

including makeglossaries #9

Open MeraX opened 9 years ago

MeraX commented 9 years ago

Hi, I have a problem using the package glossaries. Taking the example below (from http://texblog.org/2014/01/15/glossary-and-list-of-acronyms-with-latex/), and using latex-makefile-2.2.1-alpha9 I have to run make, makeglossaries and make again to compile the tex properly. Is it possible to use glossaries with this makefile or is it possible to include makeglossaries in the makefile?

\documentclass{article}

\usepackage[acronym,nomain]{glossaries}

% Generate the glossary
\makeglossaries

\begin{document}

\section*{Section with acronyms}

% Acronym definitions
\newacronym{utc}{UTC}{Coordinated Universal Time}
\newacronym{adt}{ADT}{Atlantic Daylight Time}
\newacronym{est}{EST}{Eastern Standard Time}

% Use the acronyms
\gls{utc} is 3 hours behind \gls{adt} and 10 hours ahead of \gls{est}.

%Print the glossary
\printglossaries

\small\hfill Created by http://texblog.org

\end{document}
victoredwardocallaghan commented 9 years ago

I have this same issue !

shiblon commented 9 years ago

Good question. I wish I knew!

Here's how I usually tackle these things to see if they can be automated:

If you can see something clear in the log, aux, or fls file, then we can add a dynamic dependency on it.

What the Makefile does is basically this: run latex once, then parse the output files above to see what it is missing, then build .d files that contain dependencies. Since the makefile already depends on these .d files, that triggers a re-run with these dependencies now in place, and the proper steps are then taken.

So, the key to all of this is getting the information we need out of that first run's log/aux/fls files.

If this is still hard to make progress on, please make up a tiny example that illustrates the problem and attach the files to this bug. I'll take a look (hopefully a lot faster than last time).