summaryrefslogtreecommitdiff
path: root/data/templates/default.latex
AgeCommit message (Collapse)Author
2024-03-09Fix block headings support for unnumbered paragraphs (#9542)Oliver Fabel
`block-headings: true` seems to break unnumbered paragraphs and subparagraphs. This is due to the fact, that the unnumbered version uses the star macros \paragraph* and \subparagraph*. See issue #6018 for details.
2024-01-20LaTeX writer: set font fallback for babel main fontMax Heller
2024-01-19LaTeX template: support font fallbacklawcho
* LuaLaTeX-specific (uses luaotfload) * Configured in YAML metadata * Sans/main/mono fonts have separate fallback chains
2024-01-05Fix beamer highlightingmh4ckt3mh4ckt1c4s
2023-11-03LaTeX template: include bookmark package unconditionally.John MacFarlane
This package produces better PDF bookmarks than hyperref and does it on the first pass. As a consequence, we now default to running LaTeX only once in producing a PDF (instead of twice). If a table of contents is present, we still have to run three times to get the page numbers.
2023-09-10LaTeX template: fix \CSLBlock vertical spaceJohn Purnell
2023-09-07LaTeX template: remove space around `\strut` in CSL commands.John MacFarlane
See #9058.
2023-09-07Fix typo in latex template.John MacFarlane
2023-09-07Adjust default latex template to improve citeproc output.John MacFarlane
- Add a strut to avoid inconsistencies in spacing. - Remove a break at the end of CSLRightInline to avoid inconsistencies in spacing. It shouldn't be necessary because the paragraph should extend to the right margin. See #9058.
2023-09-05Rewrite CSLReferences environment...John MacFarlane
...to avoid depending on enumitem, which plays badly with beamer. Instead we use a regular list environment. Thanks to @jpcirrus for the concept. We also restore the pre-3.1.7 format of the CSLReferences environment, which again has two parameters. The first determines whether a hanging indent is used (1 = yes, 0 = no), and the second is the entry line spacing (0 = none). Closes #9053.
2023-09-04LaTeX template: fix regression with CSL display="block".John MacFarlane
We no longer got a line break before the block; this restores it. Closes #7363.
2023-09-03LaTeX template: add code allow `\cite` to break across lines.John MacFarlane
Closes #9050.
2023-08-29Use `\cite` and `\bibitem` to link up citations, even with citeproc.John MacFarlane
See #9031 and discussion in #9020. This will give us better accessibility; when tagging is enabled, the citation can be linked to the bibliography entry. This changes some of the details of the layout and the default template. We now make CSLReferences a special enumitem list that will contain `\bibitem`s. Internal links inside citations to ids beginning in `ref-` are put inside a `\cite` instead of `\hyperref`. Closes #9031.
2023-08-26LaTeX template: special definition of `\st` for CJK.John MacFarlane
soul's version raises on error on CJK text. Closes #9019.
2023-03-28Fix `\babelfont` in default latex template.John MacFarlane
The first invocation should not specify a language, because it's the default. If we specify a language, we get an error in some cases. Closes #8728.
2023-03-25LaTeX template: set mainfontoptions with `\babelfont` too.John MacFarlane
Closes #8721.
2023-03-20Fix highlight/underline with lualatex.John MacFarlane
We need the lua-ul package instead of soul, which doesn't work with lualatex. Updates default latex template. Closes #8707.
2023-03-15Fix template for babelfonts so it conforms with documentation.John MacFarlane
Closes #8697.
2023-03-10Add `babelfonts` variable to default LaTeX template.John MacFarlane
This allows specifying certain fonts to be used with certain babel languages. Thanks to Frederik Elwert.
2023-03-06Fix background image in Beamer when there are figure environments (#8671)Martín Pozo
2023-02-26LaTeX template: Add CJKsansfont and CJKmonofont for XeLaTeX (#8656)Yudong Jin
`CJKsansfont` and `CJKmonofont` will be set for xelatex only if `CJKmainfont` is also provided.
2023-01-13Support complex figures. [API change]Albert Krewinkel
Thanks and credit go to Aner Lucero, who laid the groundwork for this feature in the 2021 GSoC project. He contributed many changes, including modifications to the readers for HTML, JATS, and LaTeX, and to the HTML and JATS writers. Shared (Albert Krewinkel): - The new function `figureDiv`, exported from `Text.Pandoc.Shared`, offers a standardized way to convert a figure into a Div element. Readers (Aner Lucero): - HTML reader: `<figure>` elements are parsed as figures, with the caption taken from the respective `<figcaption>` elements. - JATS reader: The `<fig>` and `<caption>` elements are parsed into figure elements, even if the contents is more complex. - LaTeX reader: support for figures with non-image contents and for subfigures. - Markdown reader: paragraphs containing just an image are treated as figures if the `implicit_figures` extension is enabled. The identifier is used as the figure's identifier and the image description is also used as figure caption; all other attributes are treated as belonging to the image. Writers (Aner Lucero, Albert Krewinkel): - DokuWiki, Haddock, Jira, Man, MediaWiki, Ms, Muse, PPTX, RTF, TEI, ZimWiki writers: Figures are rendered like Div elements. - Asciidoc writer: The figure contents is unwrapped; each image in the the figure becomes a separate figure. - Classic custom writers: Figures are passed to the global function `Figure(caption, contents, attr)`, where `caption` and `contents` are strings and `attr` is a table of key-value pairs. - ConTeXt writer: Figures are wrapped in a "placefigure" environment with `\startplacefigure`/`\endplacefigure`, adding the features caption and listing title as properties. Subfigures are place in a single row with the `\startfloatcombination` environment. - DocBook writer: Uses `mediaobject` elements, unless the figure contains subfigures or tables, in which case the figure content is unwrapped. - Docx writer: figures with multiple content blocks are rendered as tables with style `FigureTable`; like before, single-image figures are still output as paragraphs with style `Figure` or `Captioned Figure`, depending on whether a caption is attached. - DokuWiki writer: Caption and "alt-text" are no longer combined. The alt text of a figure will now be lost in the conversion. - FB2 writer: The figure caption is added as alt text to the images in the figure; pre-existing alt texts are kept. - ICML writer: Only single-image figures are supported. The contents of figures with additional elements gets unwrapped. - HTML writer: the alt text is no longer constructed from the caption, as was the case with implicit figures. This reduces duplication, but comes at the risk of images that are missing alt texts. Authors should take care to provide alt texts for all images. Some readers, most notably the Markdown reader with the `implicit_figures` extension, add a caption that's identical to the image description. The writer checks for this and adds an `aria-hidden` attribute to the `<figcaption>` element in that case. - JATS writer: The `<fig>` and `<caption>` elements are used write figures. - LaTeX writer: complex figures, e.g. with non-image contents and subfigures, are supported. The `subfigure` template variable is set if the document contains subfigures, triggering the conditional loading of the *subcaption* package. Contants of figures that contain tables are become unwrapped, as longtable environments are not allowed within figures. - Markdown writer: figures are output as implicit figures if possible, via HTML if the `raw_html` extension is enabled, and as Div elements otherwise. - OpenDocument writer: A separate paragraph is generated for each block element in a figure, each with style `FigureWithCaption`. Behavior for single-image figures therefore remains unchanged. - Org writer: Only the first element in a figure is given a caption; additional block elements in the figure are appended without any caption being added. - RST writer: Single-image figures are supported as before; the contents of more complex images become nested in a container of type `float`. - Texinfo writer: Figures are rendered as float with type `figure`. - Textile writer: Figures are rendered with the help of HTML elements. - XWiki: Figures are placed in a group. Co-authored-by: Aner Lucero <4rgento@gmail.com>
2023-01-11LaTeX template: set `\babelfont`...John MacFarlane
when `mainlang` and a lang are specified and pdflatex is not being used. This is needed for good results in Arabic and doesn't seem to hurt for other languages we've tried. Closes #8538.
2022-11-19LaTeX writer: Use soul instead of ulem for strikeout, underline.John MacFarlane
This handles things like hyphenation, line breaks, and nonbreaking spaces better. Closes #8411.
2022-11-10Add LaTeX variable `urlstyle` (#8429)Amar Al-Zubaidi
This is set to `same` by default, so users should not experience any change.
2022-10-06latex template: set fonts after Beamer themeJeremie Knuesel
Beamer themes such as metropolis and saintpetersburg change the default fonts. This change gives precedence to the user font settings by moving them after the loading of the Beamer theme.
2022-09-29LaTeX writer: use `\includesvg` for SVGs...John MacFarlane
...and include the `svg` package. Closes #8334.
2022-08-12LaTeX template: fix behavior of `colorlinks` variableAlbert Krewinkel
Fixes a regression that required the `boxlinks` variable to be set in addition to the usual link coloring variables. Otherwise links were never colored in LaTeX PDF output. Fixes: #8226
2022-07-26Add `boxlinks` variable for LaTeX/PDF output.John MacFarlane
If `boxlinks` is set but `colorlinks` is not, then boxes will be printed around links (`hidelinks` will not be set in `hypersetup`). Addresses #8198.
2022-05-17LaTeX template: fix links-as-notesAlbert Krewinkel
The redefinition of `\href` when using `links-as-notes` must happen after the hyperref package has been loaded. Fixes: #8077
2022-04-23LaTeX template: Fix <200c> character rendering (#8036)Hos Es
Renamed `\textormath` to `\TextOrMath`.
2022-03-21LaTeX template: Move urlstyle and xurl commands to after hyperref.John MacFarlane
Closes #7978.
2022-03-14LaTeX template: Fix regression with code in footnotes...John MacFarlane
...due to moving hyperref later in the template. Closes #7964.
2022-03-13Remove special redefinition of `\sout`.John MacFarlane
This used to be necessary to avoid problems with hyperref, when headings contain strikeout text, but it does not seem to be necessary any more (tested).
2022-03-13LaTeX template: Move `\sout` correction after hyperref.John MacFarlane
This fixes the previous change the default.latex.
2022-03-13LaTeX template: move hyperref near end of preamble.John MacFarlane
It now comes after header-includes and right before title, author, date, abstract. The hyperref documentation says: “Make sure it comes last of your loaded packages”. The reason is that it redefines many LaTeX commands. For example, loading it after titlesec (which might be loaded in header-includes) causes links in the table of contents to point to the wrong page (#7960). Closes #5811. Note: Users who presuppose hyperref in their header-includes will now have to add `\usepackage{hyperref}` to their header-includes to make it available there. (The redundant `\usepackage` will do no harm in this case.)
2022-03-02LaTeX template: skip \babelprovide if babel-lang is empty.John MacFarlane
This avoids an error. See #7945.
2021-10-16Ensure that babel is loaded also with pdflatex.John MacFarlane
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 idiomatichseg
* 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 MacFarlane
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 MacFarlane
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 MacFarlane
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 MacFarlane
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 MacFarlane
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 Krewinkel
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 MacFarlane
This allows them to be overriden by header-includes. Closes #7286.
2021-05-10latex template: use non-starred names for xcolor color names.John MacFarlane
This should make svgnames and x11names work properly. Closes #6109.
2021-04-29Update default.latex (#7234)badumont
Fix bad vertical spacing after the bibliography.
2021-04-28list of figures before list of tables in LaTeX and ConTeXt templates (#7235)Julien Dutant
2021-03-14Handle 'nocite' better with --biblatex and --natbib.John MacFarlane
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.