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

PDF suddenly does not support multiple page orientation #8512

Closed
lamurian opened this issue Jan 30, 2024 · 3 comments
Closed

PDF suddenly does not support multiple page orientation #8512

lamurian opened this issue Jan 30, 2024 · 3 comments
Labels
latex LaTeX engines related libraries and technologies support a request for support
Milestone

Comments

@lamurian
Copy link

Bug description

User story

As a user, I want to configure multiple page orientations so I can render both landscape and portrait pages in one pdf document.

Issue

When compiling test.qmd and test2.qmd, neither could produce a pdf document with multiple page orientations. I compiled both qmd files using quarto render <filename>. I kept the tex files for further debugging, and when rendering test.tex I got this warning:

Package typearea Warning: Bad type area settings!
(typearea)                The detected line width is about 48%
(typearea)                larger than the heuristically estimated maximum
(typearea)                limit of typographical good line width.
(typearea)                You should e.g. decrease DIV, increase fontsize
(typearea)                or change papersize.

Package typearea Info: These are the values describing the layout:
(typearea)             DIV  = 11
(typearea)             BCOR = 0.0pt
(typearea)             \paperwidth      = 794.96999pt
(typearea)              \textwidth      = 578.16002pt
(typearea)              DIV departure   = -48%
(typearea)              \evensidemargin = 36.135pt
(typearea)              \oddsidemargin  = 36.135pt
(typearea)             \paperheight     = 614.295pt
(typearea)              \textheight     = 459.8002pt
(typearea)              \topmargin      = -53.82501pt
(typearea)              \headheight     = 17.0pt
(typearea)              \headsep        = 20.40001pt
(typearea)              \topskip        = 11.0pt
(typearea)              \footskip       = 47.6pt
(typearea)              \baselineskip   = 13.6pt
(typearea)              on input line 152.
Package typearea Info: Using dirty hack to recalculate internal output
(typearea)             dimensions of LaTeX on input line 152.

I had defined DIV=10, so I'm not sure what the cause of this warning. Meanwhile, when rendering test2.tex I had no warning or error.

Steps to reproduce

Files to reproduce the issues

File test.qmd

---
title: Test file
format:
  pdf:
    keep-tex: true
    include-in-header:
      text: |
        \usepackage{typearea}
---

# Portrait page

{{< pagebreak >}}

\KOMAoptions{paper=landscape, pagesize}
\recalctypearea

# Landscape page

{{< pagebreak >}}

File test2.qmd

---
title: Test file 2
format:
  pdf:
    documentclass: article
    keep-tex: true
    include-in-header:
      text: |
        \usepackage{pdflscape}
        \newcommand{\blandscape}{\begin{landscape}}
        \newcommand{\elandscape}{\end{landscape}}
---

# Portrait page

{{< pagebreak >}}

\blandscape

# Landscape page

\elandscape

Command used

quarto render test.qmd
quarto render test2.qmd
xelatex -interaction=nonstopmode test.tex
xelatex -interaction=nonstopmode test2.tex

Expected behavior

Both files should render as pdf documents with multiple page orientations, as demonstrated in:

Actual behavior

The pdf output only has portrait pages, screenshots are as follows:

Document rendered from test.qmd

Document rendered from test2.qmd

Your environment

Configuration:

  • OS: linux
  • Arch: x86_64
  • Version: 1.5
  • Cwd: /home/lam/data/personal/programs/quarto-cli/package/src
  • Directory configuration:
    • Package folder (build source): /home/lam/data/personal/programs/quarto-cli/package
    • Dist folder (output folder): /home/lam/data/personal/programs/quarto-cli/package/dist
      • bin folder: /home/lam/data/personal/programs/quarto-cli/package/dist/bin
      • share folder: /home/lam/data/personal/programs/quarto-cli/package/dist/share
    • Package working folder: /home/lam/data/personal/programs/quarto-cli/package/pkg-working

Quarto check output

> quarto check

Check file:///home/lam/data/personal/programs/quarto-cli/src/quarto.ts
Quarto 99.9.9
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.1.11: OK
      Dart Sass version 1.69.5: OK
      Deno version 1.37.2: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 99.9.9
      Path: /home/lam/data/personal/programs/quarto-cli/package/dist/bin

[✓] Checking tools....................OK
      TinyTeX: v2024.01
      Chromium: 869685

[✓] Checking LaTeX....................OK
      Using: TinyTex
      Path: /home/lam/.TinyTeX/bin/x86_64-linux
      Version: 2023

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.12.1
      Path: /usr/bin/python3
      Jupyter: (None)

      Jupyter is not available in this Python installation.
      Install with python3 -m pip install jupyter

[✓] Checking R installation...........OK
      Version: 4.3.1
      Path: /usr/lib64/R
      LibPaths:
        - /home/lam/R/x86_64-unknown-linux-gnu-library/4.3
        - /usr/lib/R/library
      knitr: 1.43
      rmarkdown: 2.23

[✓] Checking Knitr engine render......OK
@lamurian lamurian added the bug Something isn't working label Jan 30, 2024
@mcanouil
Copy link
Collaborator

mcanouil commented Jan 30, 2024

You need to use raw LaTeX inline or blocks.

I am going ahead and close this issue as I don't see anything not working when using the proper syntax to include raw code.

Feel free to reopen with additional information if you still have issue.

Quarto documentHTML
---
title: Test file 2
format:
  pdf:
    documentclass: article
    keep-tex: true
    include-in-header:
      text: |
        \usepackage{pdflscape}
        \newcommand{\blandscape}{\begin{landscape}}
        \newcommand{\elandscape}{\end{landscape}}
---

# Portrait page

{{< pagebreak >}}

`\blandscape`{=latex}

# Landscape page

`\elandscape`{=latex}
image
---
title: Test file
format:
  pdf:
    keep-tex: true
    include-in-header:
      text: |
        \usepackage{typearea}
---

# Portrait page

{{< pagebreak >}}

```{=latex}
\KOMAoptions{paper=landscape, pagesize}
\recalctypearea
```

# Landscape page

{{< pagebreak >}}
image

@mcanouil mcanouil added latex LaTeX engines related libraries and technologies support a request for support and removed bug Something isn't working labels Jan 30, 2024
@cderv cderv added this to the v1.5 milestone Jan 31, 2024
@Fpadt
Copy link

Fpadt commented Oct 8, 2024

I just installed the quarto pre-release 1.6.23 and landscape come out-of-the-box, see: #10581,
else you can use the extension from which it originates edvinsyk/quarto-landscape]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
latex LaTeX engines related libraries and technologies support a request for support
Projects
None yet
Development

No branches or pull requests

4 participants