yochju / latex-makefile

Automatically exported from code.google.com/p/latex-makefile
Other
0 stars 0 forks source link

glossaries support #118

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I use the glossaries package in latex:

\usepackage{glossaries}
\begin{document}
\newglossaryentry{foo}{name=bla,description{spam spam spam}}
Use \gls{foo} to get spam.
\printglossery
\end{document}

This short tex-file doesn't complie with the latex-makefile-2.2.0-rc11. I'll 
get an error:

$ make 
= main.glo --> main.gls =
!! Input index error (file = main.glo, line = 1):
   -- Unknown index keyword \glossaryentry.
make: *** [main.gls] Error 1

I found a solution that woks for me. I create a new target:

@@ -2672,12 +2672,18 @@
 # get index file dependencies from the logs.
 %.ind: %.idx
        $(QUIET)$(call echo-build,$<,$@)
        $(QUIET)$(call run-makeindex,$<,$@,$*.ilg)

 # Create the working glossary file out of my ist file
+%.gls:        %.glo %.tex %.ist
+      $(QUIET)$(call echo-build,$<,$@)
+      $(QUIET)$(call run-makeindex,$<,$@,$*.glg,-s $*.ist)
+
+
+# Create the glossary file
 %.gls: %.glo %.tex
        $(QUIET)$(call echo-build,$<,$@)
        $(QUIET)$(call run-makeindex,$<,$@,$*.glg,-s nomencl.ist)

 # Create the nomenclature file
 %.nls: %.nlo %.tex

Original issue reported on code.google.com by sandrokn...@gmail.com on 13 Mar 2011 at 4:25

GoogleCodeExporter commented 9 years ago
I'm having a hard time reproducing this.  After fixing the missing 
\documentclass in your example above, it still gives me the following errors in 
my log file.  Any thoughts?

./test.tex:4: You can't use `macro parameter character #' in horizontal mode.
\in@ #1#2->\def \in@@ ##1#1##
                             2##3\in@@ {\ifx \in@ ##2\in@false \else \in@tru...
l.4 ...{foo}{name=bla,description{spam spam spam}}
●●●●●●●●●●●●●●●●●●●●●●●●●●��
�●●●●●●●●●●●●●●●●●●●●●●●
Sorry, but I'm not programmed to handle this case;
I'll just pretend that you didn't ask for it.
If you're in the wrong mode, you might be able to
return to the right one by typing `I}' or `I$' or `I\par'.

./test.tex:4: You can't use `macro parameter character #' in horizontal mode.
\in@ #1#2->\def \in@@ ##1#1##2##
                                3\in@@ {\ifx \in@ ##2\in@false \else \in@tru...
l.4 ...{foo}{name=bla,description{spam spam spam}}
●●●●●●●●●●●●●●●●●●●●●●●●●●��
�●●●●●●●●●●●●●●●●●●●●●●●
Sorry, but I'm not programmed to handle this case;
I'll just pretend that you didn't ask for it.
If you're in the wrong mode, you might be able to
return to the right one by typing `I}' or `I$' or `I\par'.

./test.tex:4: Extra \else.
\XKV@s@tk@ys ...V@tkey ,}{,\XKV@na ,}\ifin@ \else●
                                                  \XKV@knftrue \KV@@sp@def \...
l.4 ...{foo}{name=bla,description{spam spam spam}}
●●●●●●●●●●●●●●●●●●●●●●●●●●��
�●●●●●●●●●●●●●●●●●●●●●●●
I'm ignoring this; it doesn't match any \if.

./test.tex:4: Package xkeyval Error: `description{spam spam spam}' undefined in 

 families `glossentry'.

See the xkeyval package documentation for explanation.
Type  H <return>  for immediate help.
 ...●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●
●●●●●●●●●●●●●●●●●●●●●●●●●●��
�●●●●●●●●●●●●●●●●●●●●●●●
l.4 ...{foo}{name=bla,description{spam spam spam}}
●●●●●●●●●●●●●●●●●●●●●●●●●●��
�●●●●●●●●●●●●●●●●●●●●●●●
Try typing  <return>  to proceed.
If that doesn't work, type  X <return>  to quit.

./test.tex:4: Extra \fi.
\XKV@f@r ...two \else #2\expandafter \XKV@f@r \fi●
                                                  #1{#2}
l.4 ...{foo}{name=bla,description{spam spam spam}}
●●●●●●●●●●●●●●●●●●●●●●●●●●��
�●●●●●●●●●●●●●●●●●●●●●●●
I'm ignoring this; it doesn't match any \if.

./test.tex:6: Undefined control sequence.
l.6 \printglossery
●●●●●●●●●●●●●●●●●●
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

Package glossaries Warning: \makeglossaries hasn't been used,
the glossaries will not be updated.

Package glossaries Warning: No \printglossary or \printglossaries found.
This document will not have a glossary.

Original comment by shiblon on 15 Mar 2011 at 1:50

GoogleCodeExporter commented 9 years ago
Sorry I wrote the code block too fast. And didn't actually tested this part. So 
now I've written a complete example, that runs without an error.

Here without patch:

$ ls
gl-test.tex  Makefile

$ make
NOTE: You may ignore warnings about the following files:

     gl-test.d

Makefile:2476: gl-test.d: No such file or directory
= gl-test.tex --> gl-test.d gl-test.pdf.1st.make (0-1) =
= gl-test.glo --> gl-test.gls =
!! Input index error (file = gl-test.glo, line = 1):
   -- Unknown index keyword \glossaryentry.
make: *** [gl-test.gls] Error 1

adding patch for Makefile:
$ make clean

$ ls
gl-test.tex  Makefile

$ make
NOTE: You may ignore warnings about the following files:

     gl-test.d

Makefile:2476: gl-test.d: No such file or directory
= gl-test.tex --> gl-test.d gl-test.pdf.1st.make (0-1) =
= gl-test.glo --> gl-test.gls =
= gl-test.tex --> gl-test.pdf (1-2) =
Success!  Wrote 1 page, 13001 bytes to gl-test.pdf

Original comment by sandrokn...@gmail.com on 15 Mar 2011 at 2:28

Attachments:

GoogleCodeExporter commented 9 years ago
Cool - it appears that your attachment is 0 bytes in size.  Empty file.  Maybe 
try again?

Original comment by shiblon on 15 Mar 2011 at 2:50

GoogleCodeExporter commented 9 years ago
another try ;)

Original comment by sandrokn...@gmail.com on 15 Mar 2011 at 3:11

Attachments:

GoogleCodeExporter commented 9 years ago
Very good.  This actually pointed to some other bugs I had in the dependencies. 
 Attached is the new makefile - let me know if it works for you.

The changes are in r3158161c26f3.   I'll push out another version at some point 
in the next few days, probably, meanwhile you can use the attached.

Original comment by shiblon on 15 Mar 2011 at 4:32

Attachments:

GoogleCodeExporter commented 9 years ago
Jup works for me.

Original comment by sandrokn...@gmail.com on 15 Mar 2011 at 4:49

GoogleCodeExporter commented 9 years ago
Uploading rc12 now.

Original comment by shiblon on 15 Mar 2011 at 6:05