Closed astridx closed 3 years ago
@astridx
I'm new to this template as well but just adding --toc
to the pandoc comment worked for me without additional latex files. I would recommend to simplify your commend to the bare essentials keeping only --toc
for index generation to see where the problem lays. Also remove all latex stuff from the md file for testing.
@ibayer Thank you very much. I think I did not explain myself well. Table of content (toc) works finde for me. I like to add an Index.
... an alphabetical list of words and expressions with the pages of the book upon which they are to be found
Unfortunately, I still have not found a solution here.
@astridx After re-reading your initial post I realize that I confused index with toc. Sorry for the noise, your question surpasses my current experience with the template. :-) I hope someone else can help out.
Edit I found a temporarily solution:
First I create a *.latex.
pandoc JoomlaEnPDF.en.md \
-o 1.en.tex \
--from markdown \
--template ./eisvogel.latex \
--listings \
--toc \
--toc-depth=1 \
-V toc-title="Content" \
--top-level-division="part" \
--number-sections \
Then I run the commands manually.
pdflatex 1.en.tex
pdflatex 1.en.tex
makeindex 1.en.idx
cat ./1.en.ind >> JoomlaEnPDF.en.md
Then I create the pdf
pandoc JoomlaEnPDF.en.md \
-o 1.en.pdf \
--from markdown \
--template ./eisvogel.latex \
--listings \
--toc \
--toc-depth=1 \
-V toc-title="Table of Contents" \
--top-level-division="part" \
--number-sections \
The default pandoc template and Eisvogel have no support for an index. Your workaround is a nice solution for this shortcoming.
Thank you very much for Eisvogel.
I like to add an index.
I found this page: https://en.wikibooks.org/wiki/LaTeX/Indexing
So I add via
-include-in-header index.tex
this lines:
In my document I use
Installation\index{Installation}
and at the end
\printindex
Unfortunately, no index is printed.
This is my command
I am quite new to Pandoc and Latex. Maybe I am making a simple mistake. I would appreciate a hint.
Because I am not sure, if this is a Eisvogel related, I asked this question here, too: https://stackoverflow.com/questions/67670491/use-makeindex-with-pandoc-while-creating-a-pdf-from-a-markdown-file