Skip to content

Conversation

@cderv
Copy link
Collaborator

@cderv cderv commented Jan 20, 2025

fix #11903

As explained in #11903, inlines needs to be wrapped in Plain before being converted to latex as otherwise pandoc.Pandoc({inlines}) will automatically do it on each element. This leads to multiline output which is incorrect.

My understanding is that as_latex() would work only with Inlines, but for safety measure, I added a isInlineEl() check to wrap only in this case.

We can remove if not necessary. Assigning @cscheid as crossref related, and @tarleb as this is Lua PR.

@cderv cderv requested review from cscheid and tarleb January 20, 2025 15:16
@cscheid
Copy link
Collaborator

cscheid commented Jan 20, 2025

We have quarto.utils.as_inlines; would that work here?

@cderv
Copy link
Collaborator Author

cderv commented Jan 20, 2025

We have quarto.utils.as_inlines; would that work here?

Instead of which part ?

Now I see as_inlines, I am thinking I should use quarto.utils.as_blocks() inside pandoc.Pandoc() - it does the Plain wrapping and checks for more cases

cderv added 2 commits January 20, 2025 16:36
To insure format output, but it works without because it defaults to `FORMAT` which is already LaTeX
it already does the check and handles more cases to insure Blocks is passed to pandoc.Pandoc
Copy link
Collaborator

@cscheid cscheid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@cderv cderv merged commit 157daf5 into main Jan 21, 2025
47 checks passed
@cderv cderv deleted the crossref/as_latex branch January 21, 2025 09:46
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

Successfully merging this pull request may close these issues.

Quarto replaces spaces in the fig-title option with newlines

3 participants