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

Can't render PDF with fig-align="right" #8733

Closed
m-fehr opened this issue Feb 14, 2024 · 1 comment · Fixed by #8736
Closed

Can't render PDF with fig-align="right" #8733

m-fehr opened this issue Feb 14, 2024 · 1 comment · Fixed by #8736
Assignees
Labels
bug Something isn't working latex LaTeX engines related libraries and technologies
Milestone

Comments

@m-fehr
Copy link

m-fehr commented Feb 14, 2024

Bug description

Getting started with Quarto, I wanted to test image alignment. While I can use "left," "center," and "right" when rendering to HTML, I get an error message when rendering to PDF.

Steps to reproduce

https://github.com/m-fehr/Quarto_Alignment_Test

---
title: "Quarto Testfile"
format: pdf
---

# Test alignment to the right

![dummy image](test_image.jpg){fig-align="left" #fig-logol  width=4in}

![dummy image](test_image.jpg){fig-align="center" #fig-logoc  width=4in}

![dummy image](test_image.jpg){fig-align="right" #fig-logor  width=4in}

Expected behavior

I expect one image aligned to the left, another in the center, and a third one on the right, both in HTML and PDF.

Actual behavior

I receive the following error message:

Error running filter /Applications/quarto/share/filters/main.lua:
/Applications/quarto/share/filters/main.lua:20464: wrong number of arguments to 'insert'
stack traceback:
        /Applications/quarto/share/filters/main.lua:20464: in field 'render'
        /Applications/quarto/share/filters/main.lua:835: in local 'filter_fn'
        /Applications/quarto/share/filters/main.lua:302: in function </Applications/quarto/share/filters/main.lua:292>
        (...tail calls...)
        [C]: in ?
        [C]: in method 'walk'
        /Applications/quarto/share/filters/main.lua:224: in function </Applications/quarto/share/filters/main.lua:214>
        (...tail calls...)
        /Applications/quarto/share/filters/main.lua:936: in local 'callback'
        /Applications/quarto/share/filters/main.lua:954: in upvalue 'run_emulated_filter_chain'
        /Applications/quarto/share/filters/main.lua:990: in function </Applications/quarto/share/filters/main.lua:987>
stack traceback:
        /Applications/quarto/share/filters/main.lua:224: in function </Applications/quarto/share/filters/main.lua:214>
        (...tail calls...)
        /Applications/quarto/share/filters/main.lua:936: in local 'callback'
        /Applications/quarto/share/filters/main.lua:954: in upvalue 'run_emulated_filter_chain'
        /Applications/quarto/share/filters/main.lua:990: in function </Applications/quarto/share/filters/main.lua:987>
ERROR: Error
    at renderFiles (file:///Applications/quarto/bin/quarto.js:77074:29)
    at eventLoopTick (ext:core/01_core.js:183:11)
    at async render (file:///Applications/quarto/bin/quarto.js:81807:21)
    at async Command.fn (file:///Applications/quarto/bin/quarto.js:81954:32)
    at async Command.execute (file:///Applications/quarto/bin/quarto.js:8104:13)
    at async quarto (file:///Applications/quarto/bin/quarto.js:114968:5)
    at async file:///Applications/quarto/bin/quarto.js:114986:9

Your environment

  • IDE VSCode Version: 1.86.0
  • MacOS Sonoma 14.3

Quarto check output

Quarto 1.4.549
[✓] 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: 1.4.549
      Path: /Applications/quarto/bin

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

[✓] Checking LaTeX....................OK
      Using: TinyTex
      Path: /Users/mfehr/Library/TinyTeX/bin/universal-darwin
      Version: 2023

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

[✓] Checking Python 3 installation....OK
      Version: 3.11.7
      Path: /opt/homebrew/opt/python@3.11/bin/python3.11
      Jupyter: 5.7.1
      Kernels: python3

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

[✓] Checking R installation...........(None)

      Unable to locate an installed version of R.
      Install R from https://cloud.r-project.org/
@m-fehr m-fehr added the bug Something isn't working label Feb 14, 2024
@cscheid cscheid self-assigned this Feb 14, 2024
@cscheid cscheid added this to the Hot-fix milestone Feb 14, 2024
@cscheid
Copy link
Collaborator

cscheid commented Feb 14, 2024

Thanks! That is a pretty bad bug. It's an easy fix and we'll have it out shortly.

@mcanouil mcanouil added the latex LaTeX engines related libraries and technologies label Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working latex LaTeX engines related libraries and technologies
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants