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 new Pandoc 3.4 behavior with GFM math #2573

Merged
merged 3 commits into from
Sep 10, 2024
Merged

Support new Pandoc 3.4 behavior with GFM math #2573

merged 3 commits into from
Sep 10, 2024

Conversation

cderv
Copy link
Collaborator

@cderv cderv commented Sep 10, 2024

closes #2572

As explained in this issue, Pandoc does by default uses the alternative GFM syntax for math.

In github_document(), we choose to keep writing the dollars syntax $$ and $ to avoid any future breakage.

In the future, we may add an option to activate the writing of ```math and $` if necessary. It seems they were added by Github to handle specific characters
https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/writing-mathematical-expressions

You can either surround the expression with dollar symbols ($), or start the expression with $and end it with$. The latter syntax is useful when the expression you are writing contains characters that overlap with markdown syntax.

Copy link
Member

@yihui yihui left a comment

Choose a reason for hiding this comment

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

Sounds good to me. Thanks!

[skip ci]
@cderv cderv merged commit da85f8c into main Sep 10, 2024
1 check passed
@cderv cderv deleted the github-math branch September 10, 2024 19:40
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.

Adapt to new github math for next Pandoc
2 participants