aboutsummaryrefslogtreecommitdiff
path: root/data/templates/default.latex
AgeCommit message (Collapse)AuthorFilesLines
2021-10-16Ensure that babel is loaded also with pdflatex.John MacFarlane1-3/+2
This fixes a regression in #7604, which modernized babel usage but omitted to load babel for pdflatex, with the result that even simple documents could no longer be produced. Closes #7627.
2021-10-03Make babel use more idiomatichseg1-16/+13
* Use `babel`'s bidi implementation * Remove global `lang` option -- it broke eg hebrew * Import babel languages individually instead of as package options -- was broken for greek, hebrew * Move `header-includes` to after `babel` setup Closes #7604
2021-09-19Use babel, not polyglossia, with xelatex.John MacFarlane1-13/+1
Previously polyglossia worked better with xelatex, but that is no longer the case, so we simplify the code so that babel is used with all latex engines. This involves a change to the default LaTeX template.
2021-07-22LaTeX writer: Use ulem for underline.John MacFarlane1-0/+1
ulem is conditionally included already when the `strikeout` variable is set, so we set this when there is underlined text, and use `\uline` instead of `\underline`. This fixes wrapping for underlined text. Closes #7351.
2021-07-03Revert "LaTeX template: move title, author, date up to top of preamble."John MacFarlane1-29/+29
This reverts commit cc088687b4013c2b8b744eb337ed04fc63f315f2 and PR #7295. This fixes issues people had when using LaTeX commands defined later in the preamble (or in some cases UTF-8 text) in the title or author fields. Closes #7422.
2021-05-17LaTeX template: improve treatment of CSL entry-spacing.John MacFarlane1-3/+3
Previously with the default template settings (`indent` variable not set), we would get interparagraph spaces separating bib entries even with `entry-spacing="0"`. On the other hand, setting `entry-spacing="2"` gave ridiculously large spacing. This change makes the spacing caused by `entry-spacing` a multiple of `\parskip` by default, which gives aesthetically reasonable output. Those who want a larger or smaller unit (e.g. because they use `indent` which sets `\parskip` to 0) may `\setlength{\cslentryspacingunit}{10pt}` in header-includes to override the defaults. Closes #7296.
2021-05-16LaTeX template: move title, author, date up to top of preamble.John MacFarlane1-29/+29
This allows header-includes to use them, and puts them in a position where you can see them immediately. Closes #7295.
2021-05-16LaTeX template: define commands for zero width non-joiner characterAlbert Krewinkel1-0/+19
Closes: #6639 The zero-width non-joiner character is used to avoid ligatures (e.g. in German).
2021-05-14LaTeX template: Move CSL macro defs before header-includes.John MacFarlane1-25/+25
This allows them to be overriden by header-includes. Closes #7286.
2021-05-10latex template: use non-starred names for xcolor color names.John MacFarlane1-1/+1
This should make svgnames and x11names work properly. Closes #6109.
2021-04-29Update default.latex (#7234)badumont1-1/+4
Fix bad vertical spacing after the bibliography.
2021-04-28list of figures before list of tables in LaTeX and ConTeXt templates (#7235)Julien Dutant1-3/+3
2021-03-14Handle 'nocite' better with --biblatex and --natbib.John MacFarlane1-0/+3
Previously the nocite metadata field was ignored with these formats. Now it populates a `nocite-ids` template variable and causes a `\nocite` command to be issued. Closes #4585.
2021-02-26Wrap url colours in braces in the default LaTeX template (#7121)Loïc Grobol1-4/+4
2021-02-18Revert "LaTeX template: disable `` ?` `` and `` !` `` ligatures."John MacFarlane1-1/+0
This reverts commit 24d7cd539ba70aa94480976a7957420c020cb19a.
2021-02-18LaTeX template: disable `` ?` `` and `` !` `` ligatures.John MacFarlane1-0/+1
These are often triggered by accident in languagegs that use ` `` ` for end quote (e.g. German). See jgm/citeproc#54.
2021-02-03LaTeX template: Update to iftex package (#7073)Andrew Dunning1-11/+11
Load the iftex package directly rather than via the ifxetex and ifluatex compatibility wrappers, which have been merged into a single package that is part of the LaTeX core. The capitalization of the commands has been changed for compatibility with older versions of TeX Live that have the version of iftex by the Persian TeX Group. This had been removed in <https://github.com/jgm/pandoc/commit/2845794c0c31b2ef1f3e6a73bb5b109da4c74f37> for compatibility with BasicTeX, but that is no longer an issue.
2020-12-20LaTeX writer: support colspans and rowspans in tables. (#6950)Albert Krewinkel1-0/+3
Note that the multirow package is needed for rowspans. It is included in the latex template under a variable, so that it won't be used unless needed for a table.
2020-12-07LaTeX template: include csquotes package if csquotes variable set.John MacFarlane1-0/+3
2020-11-25latex template: put back amssymbJohn MacFarlane1-3/+1
We need it for checkboxes in todo lists, and maybe for other things. In this location it seems compatible with the cases that propmted #6469 and PR #6762.
2020-11-25LaTeX writer: improve longtable output.John MacFarlane1-1/+1
- Don't create minipages for regular paragraphs. - Put width and alignment information in the longtable column descriptors. - Closes #6883.
2020-11-25latex template: disable language-specific shorthands in babel.John MacFarlane1-1/+4
Babel defines "shorthands" for some languages, and these can produce unexpected results. For example, in Spanish, `1.22` gets rendered as `122`, and `et~al.` as `etal`. One would think that babel's `shorthands=off` option (which we were using) would disable these, but it doesn't. So we remove `shorthands=off` and add some code that redefines the shorthands macro. Eventually this will be fixed in babel, I hope, and we can revert to something simpler. Closes #6817, closes #6887.
2020-11-18latex template: add a `\break` after parbox in CSLRightInline.John MacFarlane1-1/+1
This should fix spacing problems between entries with numeric styles.
2020-11-18latex template: fix number of params on CSLReferences.John MacFarlane1-1/+1
2020-11-03LaTeX template: fix `\CSLRightInline`...John MacFarlane1-3/+3
so that it does not run over the right margin.
2020-10-29LaTeX writer: Improved calculation of table column widths.John MacFarlane1-0/+1
We now have LaTeX do the calculation, using `\tabcolsep`. So we should now have accurate relative column widths no matter what the text width. The default template has been modified to load the calc package if tables are used.
2020-10-19Do not load amssymb if not needed (#6762)Angelo Peronio1-1/+3
Fixes #6469. From https://tex.stackexchange.com/a/549938
2020-10-13default.latex: fix CSLReference macro definition.John MacFarlane1-3/+2
It improperly handled entry spacing and expected 3 parameters instead of 2.
2020-09-21Add built-in citation support using new citeproc library.John MacFarlane1-4/+19
This deprecates the use of the external pandoc-citeproc filter; citation processing is now built in to pandoc. * Add dependency on citeproc library. * Add Text.Pandoc.Citeproc module (and some associated unexported modules under Text.Pandoc.Citeproc). Exports `processCitations`. [API change] * Add data files needed for Text.Pandoc.Citeproc: default.csl in the data directory, and a citeproc directory that is just used at compile-time. Note that we've added file-embed as a mandatory rather than a conditional depedency, because of the biblatex localization files. We might eventually want to use readDataFile for this, but it would take some code reorganization. * Text.Pandoc.Loging: Add `CiteprocWarning` to `LogMessage` and use it in `processCitations`. [API change] * Add tests from the pandoc-citeproc package as command tests (including some tests pandoc-citeproc did not pass). * Remove instructions for building pandoc-citeproc from CI and release binary build instructions. We will no longer distribute pandoc-citeproc. * Markdown reader: tweak abbreviation support. Don't insert a nonbreaking space after a potential abbreviation if it comes right before a note or citation. This messes up several things, including citeproc's moving of note citations. * Add `csljson` as and input and output format. This allows pandoc to convert between `csljson` and other bibliography formats, and to generate formatted versions of CSL JSON bibliographies. * Add module Text.Pandoc.Writers.CslJson, exporting `writeCslJson`. [API change] * Add module Text.Pandoc.Readers.CslJson, exporting `readCslJson`. [API change] * Added `bibtex`, `biblatex` as input formats. This allows pandoc to convert between BibLaTeX and BibTeX and other bibliography formats, and to generated formatted versions of BibTeX/BibLaTeX bibliographies. * Add module Text.Pandoc.Readers.BibTeX, exporting `readBibTeX` and `readBibLaTeX`. [API change] * Make "standalone" implicit if output format is a bibliography format. This is needed because pandoc readers for bibliography formats put the bibliographic information in the `references` field of metadata; and unless standalone is specified, metadata gets ignored. (TODO: This needs improvement. We should trigger standalone for the reader when the input format is bibliographic, and for the writer when the output format is markdown.) * Carry over `citationNoteNum` to `citationNoteNumber`. This was just ignored in pandoc-citeproc. * Text.Pandoc.Filter: Add `CiteprocFilter` constructor to Filter. [API change] This runs the processCitations transformation. We need to treat it like a filter so it can be placed in the sequence of filter runs (after some, before others). In FromYAML, this is parsed from `citeproc` or `{type: citeproc}`, so this special filter may be specified either way in a defaults file (or by `citeproc: true`, though this gives no control of positioning relative to other filters). TODO: we need to add something to the manual section on defaults files for this. * Add deprecation warning if `upandoc-citeproc` filter is used. * Add `--citeproc/-C` option to trigger citation processing. This behaves like a filter and will be positioned relative to filters as they appear on the command line. * Rewrote the manual on citatations, adding a dedicated Citations section which also includes some information formerly found in the pandoc-citeproc man page. * Look for CSL styles in the `csl` subdirectory of the pandoc user data directory. This changes the old pandoc-citeproc behavior, which looked in `~/.csl`. Users can simply symlink `~/.csl` to the `csl` subdirectory of their pandoc user data directory if they want the old behavior. * Add support for CSL bibliography entry formatting to LaTeX, HTML, Ms writers. Added CSL-related CSS to styles.html.
2020-07-15Use selnolig to selectively suppress ligatures with lualatex.John MacFarlane1-0/+3
Closes #6534
2020-06-14Make polyglossia package options list-aware in the LaTeX template. (#6444)Frederik Elwert1-2/+2
2020-01-29LaTeX template: add space option to xeCJK with PassOptionsToPackage.John MacFarlane1-1/+4
Otherwise we can get a clash with documentclasses that already load the package. Closes #6002.
2019-12-27Allow framebreaks for beamer's TOC (#6012)Heiko Schlittermann1-1/+1
2019-12-05Keep the \author{} command even if author is not specified (#5961)Yihui Xie1-2/+0
Otherwise there will be a LaTeX warning "No \author given" when the .tex file is compiled. This does not affect spacing in the title block.
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