-
-
Notifications
You must be signed in to change notification settings - Fork 979
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
make latex-div lua filter apply only on latex output and no need for data-latex=""
#1779
Comments
The new |
Continuing from rstudio/bookdown#883 (comment). Requiring the |
* rstudio/master: (61 commits) make metadata available before running pre_knit (rstudio#1855) fix rstudio#1815: apply the lua filters pagebreak.lua and latex-div.lua to beamer_presentation require the data-latex attribute on fenced Div's again: rstudio#1779 (comment) start the next version CRAN release v2.3 fold any code blocks with the class `foldable` for html_document output (rstudio#1835) fix rstudio#1828: add aria-hidden = "true" to empty <a> tags in highlighted code blocks generated by Pandoc to improve screen reader accessibility (rstudio#1833) add a news item for rstudio#1832 roxygenize no need to turn on --file-scope or actually write the split content into files if the split content is of length < 2 eliminate renumber_footnotes option only test two pandoc versions (devel and RStudio version) and upgrade default to 2.7.3 (rstudio#1846) close rstudio#1838: test more R versions on Travis (rstudio#1845) renumber_footnotes output format option add the <div class="kable-table"> only when the output format is HTML, otherwise the div will be converted to a LaTeX environment, leading to the bug https://stackoverflow.com/q/62340425/559676 change name of file_scope argument to references_scope re-roxygenize Add `publish_site()` function for "one-button" publishing of R Markdown websites. Enable use of pandoc --file-scope for input files originating from multiple Rmds (rstudio#1837) Added missing lang attribute to ioslides_presentation template (rstudio#1841) ...
… 2.4 Christophe Dervieux (7): add lua filter vignette to pkgdown website (#1894) only install pkgdown for website build (#1900) Add an argument `lua_filters` to pandoc_options() to store them in the output format object (#1899) lua filter -> Lua filter bump version after merging #1899 Export pkg_file_lua for package author to use (#1904) bump patch version J.J. Allaire (1): Discover site generators in index.Rmd files in parent directories (#1898) Jonathan Gilligan (2): Fix #1861: do not use backslashes as path-separators in CSS links (#1862) Add documentation about how render() sets output_format options from YAML parameters (#1907) JooYoung Seo (1): support number_sections for word_document() output (#1869) Kirill Müller (1): close #1889: evaluate the output argument before changing working directory in pandoc_convert() (#1890) Yihui Xie (26): start the next version require the data-latex attribute on fenced Div's again: rstudio/rmarkdown#1779 (comment) fix #1815: apply the lua filters pagebreak.lua and latex-div.lua to beamer_presentation replace base64enc with xfun::base64_encode/decode() xfun 0.16 is on CRAN now require Pandoc >= 1.14 tweak news add the citation entry for the R Markdown Cookbook enable figure cropping in pdf_document() only when both pdfcrop and ghostscript are found (yihui/knitr#954), and do not limit this feature to non-Windows platforms generalize the package_root() function to work with more types of projects rename package_root() to proj_root() use our own proj_root() instead of introducing a dependency list.files() with full.names = TRUE (so the files could be read with corret paths), and pass down the `file`/`pattern` arguments in the recursion also suppor dir input in proj_root() recursve into the parent dir at the end add news for #1878 tweak news and docs of #1904 system.file() will signal a similar error when length(package) != 1, so we don't need to repeat the message here (i.e., just let system.file() fail) make sure the rmarkdown/lua/ folder exists amend #1907: the @param field doesn't allow more than one paragraph, so we shouldn't add an empty line here fix the redirected URL remove the pandoc installation vignette, which is no longer useful fix some redirected URLs discoverd by R CMD check on win-builder fix some redirected URLs discovered by the CRAN incoming check (but not the check on win-builder, which is very weird...) enable _R_CHECK_CRAN_INCOMING_ for r-devel, to see if it could reveal potentially "problematic" URLs as CRAN currently tries to identify CRAN release v2.4 atusy (6): make metadata available before running pre_knit (#1855) Generalize number sections (#1879) fix #1905: a chunk with the class "fold-hide" should only hide itself (#1906) incorporate CSS styles from latest Pandoc's tempalte (#1878) also incorporate CSS styles from latest Pandoc's template into ioslides (#1908) fix #457 and fix #1864: add `template` to `output_render_files` of discover_rmd_resources() (#1865)
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary. |
Design about this lua filters by @RLesur has been discussed in yihui/bookdown-crc#1 and added in rmarkdown in cecd812
Currently, the lua filter is only activated and useful for
latex
output ifdata-latex=
has been added. If not useful, it must be set to""
I think this is not obvious from what you expect from pandoc and it does not serve well "multi-format" output, because you need to add
data-latex=""
if you want it to work in pdf and in html. Currently, it seems that example in ongoing bookdown-cookbook is not working : rstudio/rmarkdown-cookbook#188How about improving the filter my thought:
Div
function only apply for latex output format in the lua filter. Noreturn nil
required, and no risk to conflict withfenced_divs
for other format ?data-latex=
is provided, we could generate averbatim
environment, and otherwisedata-latex
should be provided to set options.I don't think this will break anything, just change the way the lua filter is activated, to make this type of example works
https://bookdown.org/yihui/rmarkdown-cookbook/multi-column-layout.html
I have something like this in mind
The text was updated successfully, but these errors were encountered: