View previous topic :: View next topic |
Author |
Message |
pgu l33t
Joined: 30 Jul 2009 Posts: 721 Location: Oslo, Norway
|
Posted: Thu Dec 03, 2015 10:58 am Post subject: [SOLVED] Problems with latex glossaries |
|
|
I tried to run the following example https://www.sharelatex.com/learn/Glossaries through pdflatex, but I could not get any glossary entries printed. I also tried to use Code: | \usepackage[xindy]{glossaries} | after emerging xindy, but still no luck.
Anybody else using glossaries in latex on Gentoo?
Last edited by pgu on Mon Dec 07, 2015 10:52 am; edited 1 time in total |
|
Back to top |
|
|
fidel Guru
Joined: 16 Jul 2004 Posts: 407 Location: CH
|
Posted: Fri Dec 04, 2015 10:14 pm Post subject: |
|
|
The glossaries are not created by pdflatex itself, you would need to invoke Code: | makeglossaries {file}.glo | Resp. you would type:
Code: | latex {file}.tex
makeglossaries {file}.glo
pdflatex {file}.tex |
Alternatively you can use latexmk, with this you can heavily ease the process of creating your documents by just invoking 'make'. You can use the following template and replace every occurrence of '<++>' with the basename of your document (the name without the ending .tex):
Code: |
# You want latexmk to *always* run, because make does not have all the info.
# Also, include non-file targets in .PHONY so they are run regardless of any
# file of the given name existing.
.PHONY: <++>.pdf all clean
# The first rule in a Makefile is the one executed by default ("make"). It
# should always be the "all" rule, so that "make" and "make all" are identical.
all: <++>.pdf
# CUSTOM BUILD RULES
# In case you didn't know, '$@' is a variable holding the name of the target,
# and '$<' is a variable holding the (first) dependency of a rule.
# "raw2tex" and "dat2tex" are just placeholders for whatever custom steps
# you might have.
%.tex: %.raw
./raw2tex $< > $@
%.tex: %.dat
./dat2tex $< > $@
# MAIN LATEXMK RULE
# -pdf tells latexmk to generate PDF directly (instead of DVI).
# -pdflatex="" tells latexmk to call a specific backend with specific options.
# -use-make tells latexmk to call make for generating missing files.
# -interactive=nonstopmode keeps the pdflatex backend from stopping at a
# missing file reference and interactively asking you for an alternative.
# Use the first line if you also use biblatex (or the like) with a separate .bib file
## <++>.pdf: <++>.tex <++>.bib
<++>.pdf: <++>.tex
latexmk -pdf -pdflatex="pdflatex -interactive=nonstopmode" -use-make <++>.tex
clean:
latexmk -CA
|
Hope that helps. Happy typing! |
|
Back to top |
|
|
pgu l33t
Joined: 30 Jul 2009 Posts: 721 Location: Oslo, Norway
|
Posted: Mon Dec 07, 2015 11:18 am Post subject: |
|
|
My problem was that I was using the wrong arguments when running xindy. However, now I see that "makeglossaries basename" will actually run xindy, and with the correct arguments. Thanks a lot for pointing me in the right direction. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|