-
-
Notifications
You must be signed in to change notification settings - Fork 977
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
Use new LaTeX templates from Pandoc #1510
Comments
Simpler code, submitted in jgm/pandoc#5213: \usepackage{etoolbox}
\makeatletter
\providecommand{\subtitle}[1]{% add subtitle to \maketitle
\apptocmd{\@title}{\par {\large #1 \par}}{}{}
}
\makeatother |
The pandoc -o test.pdf << EOT
---
title: "Test^[test]"
---
test
EOT |
The If you also want to retain the compression of |
Yes, as I said in #1509 (comment), I'm all for dropping our homemade LaTeX template if there is a more elegant way through BTW, RStudio 1.2.x (not officially released yet) has bundled Pandoc 2.6 on Windows only. For *nix platforms, the Pandoc version is still 2.3.1. For RStudio 1.1.x, it is still Pandoc 1.9.x. When you patch the default template, you'll need to consider these information. |
That's excellent. Allowing each version of Pandoc to use its built-in template will fix the problems that the custom templates were attempting to solve. If you're concerned about the subtitle not appearing for users of Pandoc 1.16 (when the problem first appeared) through 2.5, you could add the |
Sounds great! I guess I won't have time for this in the next few months, but I'd welcome a pull request! |
Quick question as I found this issue through searching before I submit a different issue: Am I understanding correctly that this is related to my surprise given that I compared this to (For completeness: I'm on pandoc |
Right – the |
…s too hard to maintain (#1563) * Patch pandoc LaTeX template Patch the pandoc LaTeX template to include the document subtitle (unnecessary with pandoc 2.6 onwards) using `--include-in-header` rather than overwriting its built-in template, avoiding compability problems with newer versions of pandoc. Closes #1510. * Missing quotes * Fix changelog typo * Ensure self-contained is set for LaTeX * Less verbose graphics setting * move news of #1563 to v1.18 * cosmetic * force --self-contained regardless of the template * factor out pandoc_path_arg(rmarkdown_system_file(...)) to system_file_arg() * support compact titles via a header include compact-title.tex I didn't consider ef41eb4. I think it is a relatively minor issue and not worth the effort (if we have to bring it back, we need to test has_yaml_parameter(, 'author') and has_yaml_parameter(, 'date'), and conditionally include more titling hacks) * mention the PR #252 which introduced the titling hacks * cosmetic * shouldn't change the value of the `template` argument when it is `default` * add Andrew Dunning to the list of contributors * also closes #1649
I have finished tweaking the PR #1563 and merged it. Thanks a lot for your contribution! I'm really happy about the outcome! |
Thank you for the revisions and all your work on this! |
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. |
This is following on the discussion from #1509. The
default-1.17.0.2.tex
template is based is on the version at https://github.com/jgm/pandoc-templates/blob/fea830fcd27b4df2a337ac774daa7d4bbca00866/default.latex, which shows that the differences boil down to the following sections:rmarkdown/inst/rmd/latex/default-1.17.0.2.tex
Line 108 in c0b5945
rmarkdown/inst/rmd/latex/default-1.17.0.2.tex
Line 190 in c0b5945
\thanks
for footnotes for\maketitle
rmarkdown/inst/rmd/latex/default-1.17.0.2.tex
Line 195 in c0b5945
The last bit is the only significant difference in the repository's template. I think the intent of this was to fix the problem that Pandoc doesn't render
\subtitle
by default. This could be done more efficiently by adding the following viaheader-includes
:This should be fixed upstream; I'll take care of it.
The text was updated successfully, but these errors were encountered: