aboutsummaryrefslogtreecommitdiff
path: root/data/templates/default.latex
AgeCommit message (Collapse)AuthorFilesLines
2019-11-16Patch for fixing spacing problem on CJK language. (#5855)jeongminkim-islab1-1/+1
This changes the default on the xeCJK package so that spaces between words are preserved instead of being collapsed. This is necessary for Korean. Issue and solution is from below. https://tex.stackexchange.com/questions/17292/how-to-write-spaces-between-korean-words-with-xecjk
2019-10-29Remove include of grffile from default latex template.John MacFarlane1-1/+1
This package is needed for proper handling of image filenames containing periods (in addition to the period before the extension). Unfortunately, grffile breaks in the latest texlive update. Until a fix is released (see ho-tex/oberdiek#73) it seems best to remove this from the default template. This may cause problems if you have filenames with periods. The workaround is to put `\usepackage{grffile}` in header-includes, and be sure you're using an older version of texlive packages. See #5848. We will leave that issue open to remind us to check upstream, and restore grffile when it's possible to do so.
2019-09-03Further mod to hanging indent code in latex template.John MacFarlane1-2/+0
Make sure the length is always defined.
2019-09-03Slight improvements to hanging indent code in latex template.John MacFarlane1-4/+7
See jgm/pandoc-citeproc#410.
2019-09-02LaTeX writer: use `cslreferences` environment for csl bibliographies.John MacFarlane1-0/+7
this allows bibliographies to receive special formatting. The template now contains definition of this environment (enabled only when CSL is used). It also defines a `\cslhangindent` length. This is set to 2em by default when the bibliography style specifies a hanging indent. To override the length, you can use e.g. \setlength{\cslhangindent}{7em} in header-includes. Closes jgm/pandoc-citeproc#410.
2019-05-15Fix using Beamer with geometry (#5505)Daniel Maslowski1-0/+4
Beamer already loads geometry, so we need to use the `\geometry` command to set geometry options.
2019-04-11LaTeX template: Add pdflang to hypersetup if lang is set.John MacFarlane1-0/+3
Closes #5443.
2019-04-02LaTeX template: Ensure correct heading/table order (#5421)Andrew Dunning1-6/+9
Improve the workaround for #1658, adapting a solution by @u-fischer in <https://github.com/latex3/latex2e/issues/131> that works whether or not the `indent` variable is enabled. Remove `subparagraph` variable in LaTeX template. The default is now to use run-in style for level 4 and 5 headings (`\paragraph` and `\subparagraph`). To get the previous default behavior (where these were formatted as blocks, like `\subsubsection`), set the `block-headings` variable. An example is given in the manual of reformatting the appearance of headings more thoroughly using KOMA-Script. Closes #5365.
2019-03-25LaTeX template: Add pandoc to PDF metadata (#5388)Andrew Dunning1-1/+1
Credits pandoc in content creator metadata (the default is 'LaTeX with hyperref').
2019-03-22LaTeX template: Group graphics-related code (#5389)Andrew Dunning1-7/+6
* LaTeX template: Group graphics-related code The default figure placement was added in <https://github.com/jgm/pandoc/commit/f3ab4bc2b99e9f7f3917708a9110d6500aa051a0>; there does not appear to have been a reason for placing it at the end of the preamble. * Update tests
2019-03-21LaTeX template: Move \setstretch after front matter (#5378)Andrew Dunning1-1/+3
Ensures that `\maketitle`, `\tableofcontents`, and so forth are not affected by changes to line spacing. Closes #5179 by partially working around <https://github.com/reutenauer/polyglossia/issues/218>.
2019-03-13 LaTeX template: Improve readability (#5363)Andrew Dunning1-18/+19
+ LaTeX template: Improve template readability Use `hidelinks` option for hyperref, which has the same effect as `pdfborder={0 0 0}`, but its purpose is clearer. Use a simpler conditional for Polyglossia/Babel. Format comments more consistently. + Update tests + Remove hyperref breaklinks option. According to the documentation, hyperref sets this automatically as appropriate to the driver.
2019-03-04 LaTeX template: Robust section numbering removal (#5351)Andrew Dunning1-1/+1
Ensures that section numbering does not reappear with custom section levels. See <https://tex.stackexchange.com/questions/473653/>. Update tests
2019-03-04LaTeX writer/template: better handling of front/main/backmatter.John MacFarlane1-5/+5
In pandoc 2.7 we assumed that every class with chapters would accept `\frontmatter`, `\mainmatter`, and `\backmatter`. This is not so (e.g. report does not). So pandoc 2.7 breaks on report class by including an unsupported command. So we replace the book-class variable in the template with two variables, has-chapters and has-frontmatter, and set these intelligently in the writer. Closes #5348.
2019-03-01LaTeX template: Add \frontmatter, \mainmatter, \backmatter for book classes.John MacFarlane1-0/+9
Closes #5306.
2019-02-09Added support for the `subject` metadata variable to PDF. (#5289)Pascal Wagler1-0/+3
2019-01-25LaTeX template: Set default listings language for lua, assembler.John MacFarlane1-0/+2
Otherwise we get an error when trying to compile code with lua or assembler code. To change the default dialect (currenty 5.3 for lua and x86masm for assembler), you can use `--include-in-header` to inject something like \lstset{defaultdialect=[5.2]Lua} Closes #5227.
2019-01-23LaTeX template: Restrict `institute` to Beamer (#5219)Andrew Dunning1-3/+2
The `\institute` command is only standard in the Beamer class. Use a conditional to restrict this to Beamer output rather than output an empty command. To add this information to a LaTeX class providing an `\institute` command, use `header-includes`.
2019-01-22LaTeX template: Use `footnotehyper` if available (#5234)Andrew Dunning1-2/+3
Use the [`footnotehyper`](https://ctan.org/pkg/footnotehyper/) package if available. This is a rewrite of `footnote` that is compatible with `hyperref` and `babel-frenchb`. This patch also addresses the incompatibility with `xcolor` noted in #4861, but the new package has only been available since 2016, so this template still loads `xcolor` earlier for compatibility with older distributions. Note that the `footnote` package is part of `collection-latexrecommended` in TeX Live, so there shouldn't be any problem loading it unconditionally as we now do if `footnotehyper` is not available.
2019-01-22LaTeX template: Respect `numbersections` for books (#5235)Andrew Dunning1-1/+1
Ensure that `\part` and `\chapter` are only numbered if `numbersections` is set. To return to the previous behaviour, use `-V numbersections -V secnumdepth=0`. Notes on secnumdepth: 1 = Number `\section` 0 = Number `\chapter` -1 = Number `\part` -2 = No numbering
2019-01-22LaTeX template: Fix subtitle spacing (#5244)Andrew Dunning1-1/+1
The `\large` command does not reset the spacing without adding `\par` to the end, which caused `\subtitle` to use the same line spacing as `\title`.
2019-01-12LaTeX template: Simplify fontspec usage (#5218)Andrew Dunning1-9/+8
Simplify the approach of #5212, ensuring that `mainfont` is used as the base font for scaling and that LuaLaTeX does not display the mono font with TeX ligatures (as it does not use the `Mapping=tex-ansi` option). With a modified version of `\defaultfontfeatures`, fontspec will continue to report scaling against the old default font in the log, but it nonetheless displays main font at the specified size. Using this rather than setting `Scale=MatchLowercase` for each family individually means that users will not lose scaling when upgrading to the new template if they were using other font options. Scaling can be disabled for an individual family by adding the option `Scale=1` to `sansfontoptions`, `monofontoptions`, etc. Remove the `\setromanfont` command added in #4665, as this is not documented in the fontspec manual and appears to be a deprecated alias for `\setmainfont`. For the release notes, I should also add that one can imitate the previous appearance with `-V mainfontoptions="Scale=MatchLowercase"`.
2019-01-11 LaTeX template: Render \subtitle (#5213)Andrew Dunning1-1/+9
Addresses closed issues #4675, #3896, #1327. This renders `\subtitle` using the `etoolbox` package if `\subtitle` is not already defined by the documentclass (as it is in beamer, KOMA, memoir classes). Based on an example from Enrico Gregorio, <https://tex.stackexchange.com/a/50186>. Update list of LaTeX packages. Note that `etoolbox` must be loaded outside the command definition. Putting it inside causes an error if `\title` is placed after `\begin{document}`. It's already loaded on LuaLaTeX/XeLaTeX in any case.
2019-01-10LaTeX template: Prevent scaling of main font (#5212)Andrew Dunning1-10/+9
When `Scale=MatchLowercase` is set as a default font option, this scales `mainfont` against the old default, meaning that it resizes whatever is set as the main font to match the metrics of Latin Modern. This can result, for example, in a document set to 12pt appearing in 11pt or 13pt. Setting this option for individual families allows everything to scale against the main font, and permits the user to override the setting if desired. Note that it is not necessary to specify `Ligatures=TeX`, as this is already set by default for the appropriate families. See the `fontspec` manual: <https://ctan.org/pkg/fontspec>. Those who specify font-options in metadata may need to add `Scale=MatchLowercase`, which will now only be provided if `(roman|sans|math|mono)fontoptions` aren't given explicitly.
2019-01-02LaTeX template: Require xcolorAndrew Dunning1-1/+1
2019-01-01LaTeX template: Supply missing forAndrew Dunning1-1/+1
Partially addresses #5179
2019-01-01LaTeX template: Use `bookmark` if availableAndrew Dunning1-1/+1
The `bookmark` package can sometimes correct the levels of headings where `hyperref` cannot: see <https://komascript.de/release3.26>.
2019-01-01LaTeX template: ReindentAndrew Dunning1-46/+71
Use two spaces to be consistent internally and with other templates.
2019-01-01LaTeX template: Remove obsolete fixltx2e packageAndrew Dunning1-1/+0
2019-01-01LaTeX template: Load xurl if availableAndrew Dunning1-0/+1
This breaks URLs in more locations. Only available with TeX Live 2018 and later.
2019-01-01LaTeX template: Load xcolor if availableAndrew Dunning1-3/+1
The `xcolor` package must be loaded before the `footnote` package, which we load to fix foonotes in tables. Closes #4861.
2019-01-01LaTeX Template: Use Babel for LuaTeXAndrew Dunning1-2/+2
There are a number of bugs in Polyglossia under LuaLaTeX with common languages, e.g. <https://github.com/reutenauer/polyglossia/issues/182>.
2018-12-11template:latex: make @ letter before using it (#5145)Enno1-4/+7
This fixes the previous commit for parskip and KOMA classes.
2018-12-11Let KOMA document class handle parskip when applicable (#5143)Enno1-6/+7
This is just a change to the default latex template.
2018-11-03LaTeX template: add variable romanfont (#4665)OvidiusCicero1-0/+3
This opens up the possibility of setting the romanfont in xelatex/lualatex. Note that mainfont actually oversets sansfont in headings
2018-10-04LaTeX template: add variable hyperrefoptions(#4925)Mathias Walter1-1/+1
Introduce a new variable `hyperrefoptions` to pass to the hyperref package. This allows us (for example) to specify `hyperrefoptions: linktoc=all` in a YAML block.
2018-08-25Add support for $toc-title$ to LaTeX (and PDF). (#4853)Wandmalfarbe1-0/+3
2018-08-16LaTeX writer/template: be sensitive to `filecolor` variable.John MacFarlane1-0/+1
`linkcolor` only affects internal links, and `urlcolor` only affects linked URLs. For external links, the option to use is `filecolor`. Closes #4822.
2018-08-15Support "toc-title" in the beamer template. (#4835)Cyril Roelandt1-0/+3
It is a bit awkward to have a title for every frame, but not for the one that holds the table of contents. Allow users to specify a title if they wish.
2018-07-21Moved some beamer code in default.latex template.John MacFarlane1-37/+35
This change allows beamer themes to change the template and font (as Metropolis does). Closes #4450.
2018-04-26Add background-image variable to default.latex (#4601)John Muccigrosso1-0/+5
New variable with same name as comparable variable in (proposed) reveal.js template, so that background images can indicated for both presentation formats with one variable.
2018-03-30Add -V beameroption variable (#4359)Étienne BERSAC1-0/+4
* LaTeX template: Use `pgfpages` package; this is needed for notes on second screen in beamer * LaTeX template: Add `beameroption` variable in template
2018-03-17Provide `bidi` package's option using `\PassOptionsToPackage` (#4357).Václav Haisman1-6/+3
* Provide `bidi` package's option using `\PassOptionsToPackage`. This avoid clash when `polyglossia` loads it first and then it is loaded again for XeLaTeX when `latex-dir-rtl` defined. * Adjust test suite for LaTeX template change.
2017-12-13Update latex template to work with recent versions of beamer.John MacFarlane1-6/+18
The old template produced numbered sections with some recent versions of beamer. Thanks to Thomas Hodgson.
2017-12-11Added support for LaTeX pagestyle variable (#4135)Thomas Hodgson1-0/+3
* Add pagestyle support * Add pagestyle option to MANUAL.txt * Moved mention of pagestyle to the section on variables
2017-11-14LaTeX template: include natbib/biblatex after polyglossia.John MacFarlane1-10/+10
Otherwise we seem to get an error; biblatex wants polyglossia language to be defined. Closes #4073.
2017-09-12Move 'tables in footnotes' fix out of beamer part of default.latex.John MacFarlane1-2/+3
This caused an error in beamer. Footnotes already work in tables in beamer, without this code.
2017-09-08Write euro symbol directly in LaTeXAndrew Dunning1-6/+1
The textcomp package allows pdfLaTeX to parse `€` directly, making the \euro command unneeded. Closes #3801.
2017-09-08Use starred versions of xcolor namesAndrew Dunning1-1/+1
Prevents changes to documents defined using the dvipsnames list (e.g. `Blue` gives a different result with svgnames enabled).
2017-09-08Merge branch 'master' into patch-1Andrew Dunning1-9/+9