Open MAWSpitau opened 4 years ago
that's strange. i also use eisvogel.tex
in my bachelor thesis template, where it works just fine. tested the latest version, works still fine in my setup.
i tried your mwe with --pdf-engine=pdflatex
and also with-V documentclass=scrbook
to be sure. also tested with local images, again with the same result: the numbers are off. must be some small detail here, that we've overlooked?
seems to be working, when using scrreport
...
Interestingly LaTeX behaves differently if I compile via pandoc with --number-sections
or without the flag.
Your command
pandoc minimalBsp.md --pdf-engine=xelatex --template eisvogel --number-sections --top-level-division=chapter -o minimalBsp.pdf
produces the desired result with --number-sections
while the numbers before the headings are undesired. I'll have to experiment a bit because this behavior seems strange to me.
At least this is kind of a workaround! Thanks for looking at it!
well, the difference between --number-sections
and your version is just
\setcounter{secnumdepth}{-\maxdimen} % remove section numbering
(line 113, compiled with pandoc minimalBsp.md --template eisvogel.tex --top-level-division=chapter -o eisvogel_chapter.tex
)
and
\setcounter{secnumdepth}{3}
(line 113, compiled with pandoc minimalBsp.md --template eisvogel.tex --top-level-division=chapter -o eisvogel_number.tex --number-sections
)
btw, when using the pandoc default latex template, you get the same behaviour.
pandoc minimalBsp.md --top-level-division=chapter -o standard.tex --standalone
yields also
\setcounter{secnumdepth}{-\maxdimen} % remove section numbering
and the wrong figure offset is to be observed in the generated pdf. (update: when using document class scrbook
...)
seems to be an upstream bug?
Ah - I see. So it is not a problem with eisvogel at all? It is more an LaTeX issue? Where can we report the bug?
hmmm, using scrbook
as document class:
pandoc minimalBsp.md --top-level-division=chapter --pdf-engine=pdflatex -o scrbook_numbered.pdf -V documentclass=scrbook --number-sections
looks good
pandoc minimalBsp.md --top-level-division=chapter --pdf-engine=pdflatex -o scrbook.pdf -V documentclass=scrbook
figure numbers show wrong offset
however (using default document class):
pandoc minimalBsp.md --top-level-division=chapter --pdf-engine=pdflatex -o book_numbered.pdf --number-sections
looks good (ok, same as above, using --number-sections
)
pandoc minimalBsp.md --top-level-division=chapter --pdf-engine=pdflatex -o book.pdf
figure numbers are as expected
seems, i got it mixed up in my last comment. sry.
so, when using the pandoc default latex template (w/o specifiying a document class), everything is as expected. however, using the default latex template in combination with a book document class like scrbook
, we can observe the reported behaviour.
testing further:
pandoc minimalBsp.md --pdf-engine=pdflatex -o standard.pdf
: numbers are ok, but default class seems to be "report" (i.e. book: true
seem to be ignored?)pandoc minimalBsp.md --pdf-engine=pdflatex -o standard.pdf -V book=true
ditopandoc minimalBsp.md --pdf-engine=pdflatex -o standard.pdf -V documentclass=book
is ok (and proper book)pandoc minimalBsp.md --pdf-engine=pdflatex -o standard.pdf -V documentclass=scrbook
is book, but wrong figure offset ...pandoc minimalBsp.md --pdf-engine=pdflatex -o standard.pdf --template eisvogel.tex
dito (nice eisvogel book, but wrong figure numbers)maybe some document classes don't like the generated \setcounter{secnumdepth}{-\maxdimen}
?
to summarize: using book
document class and the default pandoc latex template is working without further options. when using scrbook
document class (and the default pandoc latex template), the option --number-sections
will do the trick. however, when using eisvogel.tex
template you would need --number-sections
and --top-level-division=chapter
...
So it is a koma Problem?
I will fix my scripts producing my pdf with this option. Thanks for figure it out!
well, as long as you can live with numbered sections :)
i'm not sure, if this is just a koma issue. eisvogel seems to be affected as well, so it may be connected to this generated line \setcounter{secnumdepth}{-\maxdimen}
when using unnumbered sections ...
mhm... yeah. :D
It's not like it supposed to be, but it's a workaround, that helps. Thanks for everything.
maybe this is connected to #116?
Hi there,
there is a problem with the counting in the book-variant of eisvogel.
This is my minimal Example:
I would have expected the numbering something like this:
But the result looks like:
That is kind of a weird counting... I my opinion ;)
This is how the PDF is rendered.
pandoc minimalBsp.md --pdf-engine=xelatex --template eisvogel --top-level-division=chapter -o minimalBsp.pdf
Which infos do oyou else need for some troubleshooting?
minimalBsp.pdf