Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local pdflatex output for the repository's example.tex differs significantly from scrot.jpg #345

Open
pineapplemachine opened this issue Aug 12, 2022 · 5 comments

Comments

@pineapplemachine
Copy link

pineapplemachine commented Aug 12, 2022

I imagine this is going to be an issue on my end, but I am not very experienced with latex and I hope I can get some help understanding what's happening here.

Here is the PDF output I get for example.tex, using pdflatex. Layout problems include the paper background image being cut off a very short vertical distance down the page, the page footer overlapping with the content, and the table of contents being empty. I did not notice any differences between pdflatex and lualatex PDF outputs. I see the same formatting oddities when trying with a fairly basic document I wrote based on the example.

http://files.pineapplemachine.com/public/logs/2022-08-13-DND-5e-pdflatex.pdf

http://files.pineapplemachine.com/public/logs/2022-08-13-DND-5e-pdflatex.log

What can I do to fix these problems?

I'm running Kubuntu 22.04. I installed this template using the git clone command documented in the readme. I ran sudo apt-get install texlive-full just very recently. Here's the version information shown for pdflatex:

pineapple:latex$ pdflatex --version
pdfTeX 3.141592653-2.6-1.40.22 (TeX Live 2022/dev/Debian)
kpathsea version 6.3.4/dev
Copyright 2021 Han The Thanh (pdfTeX) et al.
There is NO warranty.  Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Han The Thanh (pdfTeX) et al.
Compiled with libpng 1.6.37; using libpng 1.6.37
Compiled with zlib 1.2.11; using zlib 1.2.11
Compiled with xpdf version 4.03

And for lualatex:

pineapple:latex$ lualatex --version
This is LuaHBTeX, Version 1.14.0 (TeX Live 2022/dev/Debian)

Execute  'luahbtex --credits'  for credits and version details.

There is NO warranty. Redistribution of this software is covered by
the terms of the GNU General Public License, version 2 or (at your option)
any later version. For more information about these matters, see the file
named COPYING and the LuaTeX source.

LuaTeX is Copyright 2021 Taco Hoekwater and the LuaTeX Team.
@pineapplemachine
Copy link
Author

I found that removing the paper background seemed to fix pretty much everything, for me?

I made some changes to increase contrast and improve print-friendliness, including removing the paper background. Works great for me now: https://github.com/pineapplemachine/TTRPG-LaTeX-Template

@BrianCriswell
Copy link
Member

I haven't yet tested on TeXLive 2022 (it's been a busy year), so there could be an incompatibility in a modified package. I can't delve deeper right now as I'm in the process of an international move.

Usually when I get part of a background or other obviously misplaced elements, the compilation ended early (usually from an error). I was unable to access your log file to see if there were any errors. You could try posting it as a gist.

You can also try putting the background back in, removing the temp files from the build. Most LaTeX build processes run multiple times to reach the final output, and sometimes things get confused, which can lead to the misplaced elements.

@pineapplemachine
Copy link
Author

Can you explain what you mean by being unable to access the log file? In any case, here's another link: https://hastebin.com/biwuvuhode.txt

I tried re-adding the paper background in my working repo and running pdflatex twice, and that did seem to fix the layout problems. The background appeared as expected, and the elements that were previously affected appeared as normal.

My issue is solved, anyway, since I'd prefer black-and-white. But if this is a normal thing to encounter, perhaps it could be documented in the readme?

@BrianCriswell
Copy link
Member

The first link didn't work for me. The hastebin link worked.

The behavior is not normal. Something is going wrong for you, and the log doesn't seem to be indicating anything is wrong, which means that pdfLaTeX thinks everything is going well. That being said, there could be some issues going on. The book class is saying that it doesn't know what to do with the passed arguments like twocolumn which is very strange.

Rather than removing the image, you could also pass the argument bg=print into the class options. That should remove the background as well.

@DC23
Copy link

DC23 commented Sep 18, 2022

I ended up here because I was having similar issues - the parchment background strangely truncated, and pdflatex complaining that the book class doesn't understand twocolumn, a4paper and other standard arguments. I was also getting an empty table of contents and chapter numbering starting at 0. That was the clue. I just modified my Makefile to compile the document twice. The second pass seemed to fix all the issues with both the example.pdf and my own document.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants