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

Update to Pandoc 3.1.6.2 #6617

Merged
merged 1 commit into from
Aug 25, 2023
Merged

Update to Pandoc 3.1.6.2 #6617

merged 1 commit into from
Aug 25, 2023

Conversation

jjallaire
Copy link
Collaborator

Note: Submitting PR so the tests will run. We don't want to merge this yet as I still need to find a workaround for the visual editor problem caused by the change in behavior of --id-prefix.

@jjallaire
Copy link
Collaborator Author

The test failure is an inscrutable error from tlmgr so almost certainly transient. I am going to go ahead and merge.

@jjallaire jjallaire merged commit 59ff6aa into main Aug 25, 2023
@jjallaire jjallaire deleted the feature/pandoc-3.1.6.2 branch August 25, 2023 18:59
@cderv
Copy link
Collaborator

cderv commented Aug 28, 2023

Test failure is

    compilation failed- error
    Illegal parameter number in definition of \GetTitleStringResult.
    <to be read again> 
                       c
    l.398 \& Figure Creation}}

It seems we still have this error today. This comes from this content in .tex file:

\caption{\label{fig-timeline}Earthquake data over time (n=5465) to
understand their distributions spatially, by depth, by magnitude and in
time. Source:
\href{https://cderv.github.io/quarto-cli/notebooks/visualization-figure-creation-seaborn-preview.html#cell-fig-timeline}{Visualization
\& Figure Creation}}

And I believe the problem is because the # in url is no more escaped in Pandoc 3.1.6.2. It is in Pandoc 3.1.6

pandoc::pandoc_convert(, version = "3.1.6.1", text = "[](https://cderv.github.io/quarto-cli/notebooks/visualization-figure-creation-seaborn-preview.html#cell-fig-timeline)", to = "latex")
#> \href{https://cderv.github.io/quarto-cli/notebooks/visualization-figure-creation-seaborn-preview.html\#cell-fig-timeline}{}
pandoc::pandoc_convert(version = "3.1.6.2", text = "[](https://cderv.github.io/quarto-cli/notebooks/visualization-figure-creation-seaborn-preview.html#cell-fig-timeline)", to = "latex")
#> \href{https://cderv.github.io/quarto-cli/notebooks/visualization-figure-creation-seaborn-preview.html#cell-fig-timeline}{}

Maybe because of

This is special because \href is used inside \caption here. About \href[options]{URL}{text} in the hyperref manual:

The text is made a hyperlink to the URL; this must be a full URL (relative to the base URL, if that is defined). The special characters # and % do not need to be escaped in any way (unless the command is used in the argument of another command). The optional argument options recognizes the hyperref

Reprex:

---
title: "Example"
format: 
  pdf:
    keep-tex: true
---

See [Quarto guide](https://quarto.org/docs/authoring/markdown-basics.html#text-formatting)

![See [Quarto guide](https://quarto.org/docs/authoring/markdown-basics.html#text-formatting)](https://quarto.org/quarto.png)

This will reproduce the issue.

Removing #text-formatting in second link make the document works.

@cderv
Copy link
Collaborator

cderv commented Aug 28, 2023

Also it has been fixed in dev Pandoc I believe:

Edit: I confirm a test document renders ok with Pandoc nightly

cderv added a commit that referenced this pull request Aug 29, 2023
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.

2 participants