Commit graph

424 commits

Author SHA1 Message Date
John MacFarlane
9053214fba LaTeX template: Move urlstyle and xurl commands to after hyperref.
Closes #7978.
2022-03-21 10:42:18 -07:00
John MacFarlane
c9cf8568bf LaTeX template: Fix regression with code in footnotes...
...due to moving hyperref later in the template.

Closes #7964.
2022-03-14 12:28:56 -07:00
John MacFarlane
8d3959ea29 Remove special redefinition of \sout.
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-13 17:18:31 -07:00
John MacFarlane
6328ac5097 LaTeX template: Move \sout correction after hyperref.
This fixes the previous change the default.latex.
2022-03-13 15:25:32 -07:00
John MacFarlane
f3fcdd52c8 LaTeX template: move hyperref near end of preamble.
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-13 10:48:09 -07:00
John MacFarlane
bc7f74968e LaTeX template: skip \babelprovide if babel-lang is empty.
This avoids an error.  See #7945.
2022-03-02 08:52:13 -08:00
John MacFarlane
c3cf339f1d RST writer: support all standard metadata ("bibliographic") fields. 2022-03-01 13:20:31 -08:00
Mauro Bieg
9e60142cc9
CSS in HTML template: adjust #TOC and h1 on mobile (#7835) 2022-01-16 09:22:43 -08:00
John MacFarlane
c6cf78a033 Improve on fix to #7506.
Don't boldface code in output formats that can represent
it as monospace.

Define aliases for VI, VB, VBI as well.
2022-01-15 12:57:26 -08:00
John MacFarlane
c40727bfbb Man writer: use custom font V for inline code.
The V font is defined conditionally, so that it renders
like CB in output formats that support that, and like B
in those that don't (e.g. the terminal).

We could just redefine C, but this would affect code
blocks, too, and putting them all in boldface looks ugly,
I think.

Possible drawback: fragments created by pandoc's man
writer will presuppose a nonstandard V font.

Closes #7506.
Supersedes 253467a549.
2022-01-15 12:39:19 -08:00
Kolen Cheung
ed2ab2e2b0
HTML template: load header-includes before math (#7833)
MathJax expect the config comes before loading the MathJax script.
This change of order allows one to config MathJax via header-includes,
which loads before the MathJax script.

This potentially is a breaking change.

However, the only kind math supported by pandoc that is configurable
seems to be katex, and according to src/Text/Pandoc/Writers/HTML.hs
the way it is configured is hard-coded (katex doesn't seem to offer
MathJax style config that is independent of loading katex.)
So it seems it is safe to change this order without breaking
others' documents.

c.f. #2750
2022-01-13 20:31:32 -08:00
John MacFarlane
ceb463e36e EPUB template improvements.
Include abstract in default template.

Also ensure that the essential styles needed by
pandoc (`styles.html` partial) are included in the
templates.  This is important for correct formatting
of CSL bibliographies.

Note that much of the styling in `styles.html` will
be ignored for EPUB, because of the conditional on
`document-css`, but if it is desired, you can set
the `document-css` variable.
2022-01-09 11:33:47 -08:00
John MacFarlane
2e50c8d137 Improve abstract in HTML template.
* Add localized title "abstract", unless `abstract-title` variable
  is set.
* Add `abstract-title` div to abstract CSS.
* Move abstract CSS out of CSL conditional.
* Ensure that abstract is aligned left but indented on all sides.
* Use smaller font for abstract.

Improves #7588.
2022-01-09 10:56:28 -08:00
Jannik Buhr
d908e31fe6
Add abstract to default html template (#7588) 2022-01-09 10:30:10 -08:00
John MacFarlane
811eee7cad ConTeXt template: make title appear in PDF title bar.
This is recommended for accessibility reasons.
Note: doesn't work with macOS Preview.app.

See https://groups.google.com/d/msgid/pandoc-discuss/m2lezx20jq.fsf%40MacBook-Pro-2.hsd1.ca.comcast.net
2022-01-02 22:04:55 -08:00
Albert Krewinkel
e54f6dcd7a
JATS template: fix position of contrib affiliations in authoring set
Any `<aff>` element must come before any `<email>` element.
2021-12-23 19:09:22 +01:00
Albert Krewinkel
ddd1b85608
JATS templates: fix affiliation tagging in articleauthoring output
Affiliations were `xlink`ed even in the articleauthoring tag set, but
`<aff>` are not allowed as children of `contrib-group` elements in that
tag set. Each affiliation must be listed directly in the contrib
element.
2021-12-23 09:11:54 +01:00
Albert Krewinkel
7954070b01
JATS templates: add support for article subtitles 2021-12-23 09:11:54 +01:00
binaarinen
0610f16f7f
Add a writer for Markua 0.10 (#7729)
Markua is a markdown variant used by Leanpub.
More information about Markua can be found at https://leanpub.com/markua/read.

Adds a new exported function `writeMarkua` from T.P.Writers.Markdown.
[API change]

Closes #1871.

Co-authored by Tim Wisotzki and Samuel Lemmenmeier.
2021-12-19 12:10:41 -08:00
Albert Krewinkel
fe113dd5fa
JATS template: fix incomplete previous commit 2021-11-11 09:44:49 +01:00
Albert Krewinkel
b116022de4
JATS template: fix equal-contrib attribute
The standard requires the value to be either `yes` or `no`, but is was
set to `true` for authors who contributed equally.
2021-11-11 09:38:07 +01:00
Christophe Dervieux
19eb5c6d6a Add disableLayout variable in revealjs template
This allows to modify it using Pandoc variable. Default value is correctly set to false by Pandoc.
2021-11-08 07:28:18 -08:00
John MacFarlane
fcd3384f9f Fix line numbers in source code with reveal.js
We need "overflow: visible" for these to work, and reveal's
default css disables this.  So this modifies the default
template to add this.

Closes #7634.  Thanks to @cderv for diagnosing the issue.
2021-10-21 08:59:33 -07:00
John MacFarlane
3f489bcb58 Ensure that babel is loaded also with pdflatex.
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-16 23:34:53 -07:00
hseg
da8bcb783b Make babel use more idiomatic
* 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-10-03 19:16:50 -07:00
John MacFarlane
dd7b83ac91 Use babel, not polyglossia, with xelatex.
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-09-19 09:40:59 -07:00
John MacFarlane
ca12e198ba RTF template: specify font family for fixed-width font f1.
According to the spec, this is mandatory.
2021-08-01 09:45:09 -06:00
John MacFarlane
1f1a30bbf6 LaTeX writer: Use ulem for underline.
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-22 23:05:43 -07:00
Mauro Bieg
de4da56079 document-css: reset overflow-wrap on code blocks
fixes #7423
2021-07-05 08:57:23 -07:00
John MacFarlane
972db3cdca Revert "LaTeX template: move title, author, date up to top of preamble."
This reverts commit cc088687b4
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-07-03 15:34:42 -07:00
John MacFarlane
14b2eb2aeb reveal.js writer: better handling of options.
Previously it was impossible to specify false values for
options that default to true; setting the option to false
just caused the portion of the template setting the option
to be omitted.

Now we prepopulate all the variables with their default
values, including them unconditionally and allowing them
to be overridden.
2021-06-21 16:40:52 -07:00
John MacFarlane
3a1988b6b2 reveal.js template: use hash: true by default rather than...
`history: true`.  Closes #6968.  Setting `hash: true` is enough
to get linkability to a particular page of the slide show.
2021-05-20 17:17:15 -07:00
Denis Maier
183ce58477
ConTeXt reader: improve ordered lists (#7304)
Closes #5016 

- change ordered list from itemize to enumerate
- adds new itemgroup for ordered lists
- add fontfeature for table figures
- remove width from itemize in context writer
2021-05-20 09:59:53 -07:00
John MacFarlane
fa23effe25 LaTeX template: improve treatment of CSL entry-spacing.
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-17 20:46:49 -07:00
John MacFarlane
cc088687b4 LaTeX template: move title, author, date up to top of preamble.
This allows header-includes to use them, and puts them
in a position where you can see them immediately.
Closes #7295.
2021-05-16 14:35:13 -07:00
Albert Krewinkel
d92622ba3c
LaTeX template: define commands for zero width non-joiner character
Closes: #6639

The zero-width non-joiner character is used to avoid ligatures (e.g. in
German).
2021-05-16 12:33:32 -07:00
Thomas Hodgson
97a0ee23bc
HTML-based slide shows: add support for institute (#7289)
Add institute variable (string or list) to HTML-based slide formats.
2021-05-15 09:56:48 -07:00
John MacFarlane
0e5b840c2a LaTeX template: Move CSL macro defs before header-includes.
This allows them to be overriden by header-includes.
Closes #7286.
2021-05-14 08:48:59 -07:00
John MacFarlane
ba4ec8c5c0 latex template: use non-starred names for xcolor color names.
This should make svgnames and x11names work properly.
Closes #6109.
2021-05-10 09:21:27 -06:00
Florian Kohrt
96d384ac9e
Support toc-title in revealjs (#7171)
* Support toc-title in revealjs
* Add semantic HTML "nav" tag

Closes #7170.

As with default.html5
2021-04-29 18:49:17 -07:00
badumont
b9b22e3ce4
Update default.latex (#7234)
Fix bad vertical spacing after the bibliography.
2021-04-29 18:47:23 -07:00
Julien Dutant
8fe7e8dd5c
list of figures before list of tables in LaTeX and ConTeXt templates (#7235) 2021-04-28 19:06:13 -07:00
Florian Kohrt
afa801ed3f
Remove JS comment from HTML (#7154)
Illegal, turn into HTML comment
2021-03-16 09:20:54 -07:00
John MacFarlane
3622097da3 Handle 'nocite' better with --biblatex and --natbib.
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-03-14 00:10:37 -08:00
Albert Krewinkel
872b4313a1
JATS templates: support 'equal-contrib' attrib for authors
Authors who contributed equally to a paper may be marked with
`equal-contrib`.
2021-03-11 11:07:59 +01:00
Loïc Grobol
8123571e8e
Wrap url colours in braces in the default LaTeX template (#7121) 2021-02-26 10:05:30 -08:00
maurerle
6b7d614888
revealjs writer: add 'center' option for vertical slide centering.
Closes #7104.
2021-02-20 10:17:31 -08:00
John MacFarlane
005344fb18 Revert "LaTeX template: disable ` ? ` and ! `` ligatures."
This reverts commit 24d7cd539b.
2021-02-18 17:03:11 -08:00
John MacFarlane
24d7cd539b LaTeX template: disable ` ? ` and ! `` ligatures.
These are often triggered by accident in languagegs that
use ` `` ` for end quote (e.g. German).

See jgm/citeproc#54.
2021-02-18 15:48:40 -08:00
Albert Krewinkel
b5b576184c
JATS writer: add date-type to pub-date elements 2021-02-15 13:15:14 +01:00