Skip to content

PDF has bad display of code-line-numbers combined with code-block-border-left #10798

Open
@veralvx

Description

@veralvx

Bug description

Description

When code-line-numbers is true and code-block-border-left is some color, the numbers overlay and overflow the border, resulting in something like this:

quarto-pdf-ln-bl

Steps to reproduce

File: mwe.qmd

---
title: "MWE"
format:
  pdf:
    code-line-numbers: true
    code-block-bg: false
    code-block-border-left: "#F0F0F0"
---


```{.python}
print("This is a MWE.")

while True:
    print("code-line-numbers and code-block-border-left mwe.")
```

Then run:

quarto render mwe.qmd --to pdf

Expected behavior

The numbers should not overlay the left border. Instead, they should be completely on its left, with some margin (something like what happens with the epub output). Or, alternatively, the numbers could overlay the border, but not overflow it. That is, the border width must large enough to accommodate the numbers within its limits.

Actual behavior

The numbers overlay and overflow the left border.

Your environment

  • OS: Debian 12.7

Quarto check output

Quarto 1.5.57
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.2.0: OK
Dart Sass version 1.70.0: OK
Deno version 1.41.0: OK
Typst version 0.11.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.5.57
Path: /opt/quarto/bin

[✓] Checking tools....................OK
TinyTeX: (not installed)
Chromium: (not installed)

[✓] Checking LaTeX....................OK
Using: Installation From Path
Path: /usr/bin
Version: 2022

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

[✓] Checking Python 3 installation....OK
Version: 3.11.2
Path: /usr/bin/python3
Jupyter: 4.12.0
Kernels: python3

(-) Checking Jupyter engine render....[IPKernelApp] ERROR | No such comm target registered: quarto_kernel_setup
[✓] Checking Jupyter engine render....OK

[✓] Checking R installation...........OK
Version: 4.2.2
Path: /usr/lib/R
LibPaths:
- /home/lux/R/x86_64-pc-linux-gnu-library/4.2
- /usr/local/lib/R/site-library
- /usr/lib/R/site-library
- /usr/lib/R/library
knitr: 1.48
rmarkdown: 2.28

[✓] Checking Knitr engine render......OK

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcode-blockslatexLaTeX engines related libraries and technologiesneeds-design

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions