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

Support several words for cross ref option in LaTeX #11909

Merged
merged 4 commits into from
Jan 21, 2025
Merged

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
2 participants