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
jonathan-g added a commit to jonathan-g/rmarkdown that referenced this pull request Oct 17, 2024
Merge remote-tracking branch 'rstudio/main' into jg-devel

# By Yihui Xie (4) and others
# Via GitHub
* rstudio/main:
  parameters with `choices` and `multiple = TRUE` should use a `select` input (rstudio#2576)
  Add support for `child=c("child.Rmd")` in find_external_resources() (rstudio#2575)
  Support new Pandoc 3.4 behavior with GFM math (rstudio#2573)
  consistent dev install instructions (rstudio#2571)
  Update actions/checkout to v4 (rstudio#2570)
  start the next version
  CRAN release v2.28
  update tests for lua filters accordingly
  fix rstudio#2567: add classes `odd`, `even`, and `header` back to table rows for Pandoc >= 3.2.1

# Conflicts:
#	DESCRIPTION
#	NEWS.md
jonathan-g added a commit to jonathan-g/rmarkdown that referenced this pull request Oct 17, 2024
* jg-devel:
  parameters with `choices` and `multiple = TRUE` should use a `select` input (rstudio#2576)
  Add support for `child=c("child.Rmd")` in find_external_resources() (rstudio#2575)
  Support new Pandoc 3.4 behavior with GFM math (rstudio#2573)
  consistent dev install instructions (rstudio#2571)
  Update actions/checkout to v4 (rstudio#2570)
  start the next version
  CRAN release v2.28
  update tests for lua filters accordingly
  fix rstudio#2567: add classes `odd`, `even`, and `header` back to table rows for Pandoc >= 3.2.1
jonathan-g added a commit to jonathan-g/rmarkdown that referenced this pull request Oct 17, 2024
* rstudio-main:
  parameters with `choices` and `multiple = TRUE` should use a `select` input (rstudio#2576)
  Add support for `child=c("child.Rmd")` in find_external_resources() (rstudio#2575)
  Support new Pandoc 3.4 behavior with GFM math (rstudio#2573)
  consistent dev install instructions (rstudio#2571)
  Update actions/checkout to v4 (rstudio#2570)
  start the next version
  CRAN release v2.28
  update tests for lua filters accordingly
  fix rstudio#2567: add classes `odd`, `even`, and `header` back to table rows for Pandoc >= 3.2.1
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