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

Improvements to latex-div #1984

Merged
merged 3 commits into from
Dec 18, 2020
Merged

Improvements to latex-div #1984

merged 3 commits into from
Dec 18, 2020

Conversation

jjallaire
Copy link
Member

  • Allow "latex" attribute (as alternative to "data-latex"). Note that the "data-" prefix is an HTML convention and Pandoc already automatically adds a "data-" prefix to HTML attributes it doesn't recognize. Net: for markdown syntax like this we don't need to use "data-" prefixes.

  • Allow slightly more intuitive syntax for a latex div with no options: latex=true or latex=1

  • If the leading and trailing blocks in the div are paragraphs than write the environment begin/end flush up to the block text (the extra lines added when inserting raw blocks can make a difference for some environment implementations)

- Allow "latex" attribute (as alternative to "data-latex"). Note that the "data-" prefix is an HTML convention and Pandoc already automatically adds a "data-" prefix to HTML attributes it doesn't recognize. Net: for markdown syntax like this we don't need to use "data-" prefixes.

- Allow slightly more intuitive syntax for a latex div with no options: `latex=true` or `latex=1`

- If the leading and trailing blocks in the div are paragraphs than write the environment begin/end flush up to the block text (the extra lines added when inserting raw blocks can make a difference for some environment implementations)
Copy link
Collaborator

@cderv cderv left a comment

Choose a reason for hiding this comment

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

Looks great, thank you ! latex=true or latex=1 is indeed more intuitive.

We just need to add a NEWS bullet and bump the version before merging.

@jjallaire
Copy link
Member Author

Okay, done!

@cderv cderv merged commit 433e726 into master Dec 18, 2020
@cderv cderv deleted the feature/latex-div-improvements branch December 18, 2020 14:54
jonathan-g added a commit to jonathan-g/rmarkdown that referenced this pull request Jan 25, 2021
Merge branch 'master' of https://github.com/rstudio/rmarkdown

* 'master' of https://github.com/rstudio/rmarkdown: (111 commits)
  get rid of names, otherwise the returned vector will have names like this:
  Only run testrmd if pandoc is available
  Warn that cropping is disabled if pdfcrop or ghostscript are not found. (rstudio#2017)
  Add shiny to remotes (rstudio#2014)
  file.path.ci is too loose with file matching (rstudio#2012)
  improve error messages for the new theme argument behavior
  Add Bootstrap 4 support (rstudio#1706)
  amend rstudio#1965: do not force `options(htmltools.preserve.raw = TRUE)` when this option has been set, otherwise it is impossible for other packages to turn this option off, e.g., yihui/xaringan#293
  htmltools 0.5.1 is on CRAN now
  remove download stats
  use on.exit to remove file (rstudio#2001)
  use only the TinyTeX-1 version in CI (rstudio#1998)
  Cache should work on Windows with recent version of R (rstudio#1997)
  exclude renv folder from render_site() copied resources (rstudio#1996)
  Update CI to last Pandoc 2.11.3.1 (rstudio#1992)
  Revert "return div not nil for non-qualifying latex div"
  Add missing NEWS item for v2.6 release
  return div not nil for non-qualifying latex div
  Add `output_format_filter` function to `default_site_generator()`. (rstudio#1989)
  Improvements to latex-div (rstudio#1984)
  ...

# Conflicts:
#	NEWS.md
#	R/render.R
#	man/render.Rd
jonathan-g added a commit to jonathan-g/rmarkdown that referenced this pull request Jan 25, 2021
* master: (111 commits)
  get rid of names, otherwise the returned vector will have names like this:
  Only run testrmd if pandoc is available
  Warn that cropping is disabled if pdfcrop or ghostscript are not found. (rstudio#2017)
  Add shiny to remotes (rstudio#2014)
  file.path.ci is too loose with file matching (rstudio#2012)
  improve error messages for the new theme argument behavior
  Add Bootstrap 4 support (rstudio#1706)
  amend rstudio#1965: do not force `options(htmltools.preserve.raw = TRUE)` when this option has been set, otherwise it is impossible for other packages to turn this option off, e.g., yihui/xaringan#293
  htmltools 0.5.1 is on CRAN now
  remove download stats
  use on.exit to remove file (rstudio#2001)
  use only the TinyTeX-1 version in CI (rstudio#1998)
  Cache should work on Windows with recent version of R (rstudio#1997)
  exclude renv folder from render_site() copied resources (rstudio#1996)
  Update CI to last Pandoc 2.11.3.1 (rstudio#1992)
  Revert "return div not nil for non-qualifying latex div"
  Add missing NEWS item for v2.6 release
  return div not nil for non-qualifying latex div
  Add `output_format_filter` function to `default_site_generator()`. (rstudio#1989)
  Improvements to latex-div (rstudio#1984)
  ...
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants