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

What is the difference between build/main.pdf and build/fachschaft_print.pdf? #21

Open
jalil-salame opened this issue Mar 29, 2024 · 6 comments

Comments

@jalil-salame
Copy link

From what I can tell, it tries to fix some issue with the twoside configuration of the thesis, but it is not documented in the README or the Makefile.

.PHONY: _fachschaft-print
_fachschaft-print:
@if grep -sq '^TUM-Dev LaTeX-Thesis-Template: twoside$$' $(OUT)/$(FILE).log; then \
if [ "$(OUT)/fachschaft_print.pdf" -nt "$(OUT)/$(FILE).pdf" ]; then \
echo "fachschaft_print.pdf is up to date"; \
else \
echo "Building fachschaft_print.pdf..."; \
if ! command -v pdfjam >/dev/null; then \
echo "PDFJAM not installed. Can not build fachschaft_print.pdf."; \
rm -f "$(OUT)/_fachschaft_print.pdf"; \
else \
pdfjam --twoside --a4paper -o "$(OUT)/fachschaft_print.pdf" "$(OUT)/$(FILE).pdf" 1,3-; \
fi \
fi \
else \
cp "$(OUT)/$(FILE).pdf" "$(OUT)/fachschaft_print.pdf"; \
fi;

My guess is that line 23 removes pages 1 and 3 because they are blank?

If it is not using the twoside mode, then it just copies main.pdf to fachschaft_print.pdf.

@CommanderStorm
Copy link
Member

The paragraph mentioned on #15 does not exist on the current website any more.

I have asked a friend at the student council if this is still necessary ^^

@jalil-salame
Copy link
Author

It is still nice to remove the extra pages, but it is still a hack and should probably be removed if it is no longer necessary.

@CommanderStorm
Copy link
Member

Mpic has asked us to leave this as an option as a backup.
The background is that with their current workflow, this page must not exist.

While they do have an option in their custom build printing software to remove this, they have not found a way of automating this.
If you choose duplex vs simplex depends on the amount of pages in your thesis as for one option half of the pages are empty. => inserting said empty page fucks with the layout somehow.

MPIC has looked into automating this process, but for the time being have not found a good solution that works with all the weirdnesses of PDF (did you know that PDF are apparently turning complete because of PostScript?)

@CommanderStorm
Copy link
Member

Idk if we should document this if this is only a backup process..

@jalil-salame
Copy link
Author

jalil-salame commented Mar 30, 2024

MPIC has looked into automating this process, but for the time being have not found a good solution that works with all the weirdnesses of PDF (did you know that PDF are apparently turning complete because of PostScript?)

I knew PDFs were f-ed up, but I did not expect this...

My assumption is that most tools will not use the PDF's Turing complete features, but with how cursed LaTeX itself is I would not be surprised.

Idk if we should document this if this is only a backup process..

I would err on the side of more documentation, a simple comment pointing to this issue should be enough:

# Fix PDF for printing when using the twoside mode
# (see https://github.com/TUM-Dev/tum-thesis-latex/issues/21)
.PHONY: _fachschaft-print 
_fachschaft-print: 
    ...

I can probably make a PR with that exact comment.

@CommanderStorm
Copy link
Member

I can probably make a PR with that exact comment.

Yes, but said comment makes this appear to be a generally superior option (its not, its just different).

MPIC does not allow there to be the empty second page if using the twoside mode
see https://github.com/TUM-Dev/tum-thesis-latex/issues/21 for further context

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

2 participants