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

Part of the document is not included in PDF output for some reason. #2

Open
cderv opened this issue Jun 30, 2022 · 0 comments
Open

Comments

@cderv
Copy link
Collaborator

cderv commented Jun 30, 2022

Opening issue to track the finding. I may compile all that later in a Wiki page in this repo. Not sure yet. For now, if you encounter this issue, you may end up here.

TL;DR

CTAN lineo package for line numbers has issue with tcolorbox. This cause some part of the document to be missing.
Some of Quarto feature use tcolorbox package with breakable option. So if you document needs line number, you need to set code-block-border-left: false in your extension YAML to deactivate the quarto feature of special syntax highlighting. (https://quarto.org/docs/authoring/article-layout.html#code-blocks)

Context

While working on PLOS template, I found an issue with Quarto features (which requires injection of some LaTeX) and template expected feature. Part of the document where hidden and not in the output starting at a highlighted code block.

Here is why.

Some of Quarto feature use tcolorbox package with breakable option. This does not play well with lineno package used for line numbering. And it seems to be a known issue latex-lineno/lineno#3 and T-F-S/tcolorbox#183

code-block-border-left: false can be used to deactivate the Quarto feature and prevent injection of tcolorbox environment for code blocks https://quarto.org/docs/authoring/article-layout.html#code-blocks

Minimal reproducible example with Quarto

---
title: "Issue"
format: 
  pdf:
    include-in-header: 
      text: |
        \usepackage[right]{lineno}
        \linenumbers
    # code-block-border-left: false
---

# Figures

Block of code

```yaml
crossref:
  fig-title: Fig 
```
Something else

# Acknowledgments

Another part that won't show
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

1 participant