Skip to content

PDF with comments generated via GH action is no longer in A4 format #51

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

Closed
vladak opened this issue Mar 1, 2023 · 9 comments
Closed

Comments

@vladak
Copy link
Member

vladak commented Mar 1, 2023

Starting with release v91 the PDFs generated via Github Actions seems to have the paper size wrong. v90 (Nov 2022) is fine.

@vladak
Copy link
Member Author

vladak commented Mar 1, 2023

Unfortunately the logs for the Github Action that created v90 assets were removed.

@vladak
Copy link
Member Author

vladak commented Mar 1, 2023

For the record, v91 was built with:

pdflatex unix-linux-prog-in-c_slides-only.m4.tex
This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2022/dev/Debian) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
(./unix-linux-prog-in-c_slides-only.m4.tex
LaTeX2e <2021-11-15> patch level 1
L3 programming layer <2022-01-21>
(/usr/share/texlive/texmf-dist/tex/latex/seminar/seminar.cls
Document Class: seminar 2021/07/01, 1.63a
Documentclass: `seminar' v1.63a <2021/07/01> (tvz,hv)

and further below there is a warning:

LaTeX Warning: You have requested document class `seminar',
               but the document class provides `xcomment'.

however I get the same warning when building locally on macOS (see #51 (comment) below for version information) where this problem does not happen.

More below is this warning:

*******************************************************
***** !! PRINT THIS DOCUMENT IN LANDSCAPE MODE !! *****
*******************************************************
(./unix-linux-prog-in-c_slides-only.m4.aux)

however I also get the same warning when building locally and also it seems to be specific just to the "slides only" PDFs.

@vladak
Copy link
Member Author

vladak commented Mar 1, 2023

My local pdfTex version is 3.1415926-2.4-1.40.13 (TeX Live 2012) which is not that different than the one used by Github Actions runner. If I were to guess, it is rather caused by some of the styles, e.g. the local version of seminar.sty is 2008/10/15, 1.5 and the one used by the runner comes from 2021.

Another thing for consideration is that the Git repository contains xcomment.{sty,tex}.

@vladak
Copy link
Member Author

vladak commented Mar 1, 2023

The PRINT THIS DOCUMENT IN LANDSCAPE MODE comes from seminar.sty, so maybe in the old version it was overriden by something but in the new version it is for real.

That said, the warning seems to be displayed just for the "slides only" PDF so is probably just a red herring.

@vladak
Copy link
Member Author

vladak commented Mar 1, 2023

Checking the size of the document generated from the Github action in the Preview macOS app, I can see 27,94 × 21,59 cm which seems to match the letter paper size. A4 should be 210 mm × 297 mm.

@vladak vladak changed the title PDFs should not be in landscape PDF with comments is no longer in A4 format Mar 1, 2023
@vladak
Copy link
Member Author

vladak commented Oct 1, 2023

For the record, on macOS with rather old pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012), LaTeX2e <2011/06/27> still generates the PDF as A4. Another possibly relevant piece of data is Document Class: seminar 2008/10/15, 1.5.

@vladak vladak changed the title PDF with comments is no longer in A4 format PDF with comments generated via GH action is no longer in A4 format Oct 1, 2023
@vladak
Copy link
Member Author

vladak commented Oct 1, 2023

Displaying the properties of the file in evince says: US Letter, Landscape (279 × 216 mm)

This means the command at the top of unix-linux-prog-in-c.tex:

\AtBeginDocument{%                                                              
  \pdfhorigin=1sp                                                               
  \pdfvorigin=1sp                                                               
  \paperwidth=297truemm                                                         
  \paperheight=210truemm                                                        
}

no longer works. I tried experimenting with geometry package and adding various options to the seminar package however could not produce A4 with correct content.

@vladak
Copy link
Member Author

vladak commented Oct 1, 2023

A4 format can be brought back via the

  \pdfpagewidth=297truemm
  \pdfpageheight=210truemm

added to the \AtBeginDocument section, however it still remains in landscape mode.

@vladak
Copy link
Member Author

vladak commented Oct 2, 2023

After minimizing the content to single file, I found that that when I remove the hyperref package and add the a4 option to the seminar package, the A4 is generated in portrait mode, however the content on the page is not centered.

@vladak vladak closed this as completed in 2cffd73 Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant