Commit graph

14569 commits

Author SHA1 Message Date
John MacFarlane
a366bd6abc LaTeX reader: Fix parsing of +- in siunitx numbers.
See #6658.
2021-05-20 09:03:29 -07:00
John MacFarlane
8437a4a002 LaTeX reader: support \pm in SI{..}.
Closes #6620.
2021-05-20 08:16:46 -07:00
Albert Krewinkel
b6239f4150
ZimWiki writer: allow links and emphasis in headers
The latest version of ZimWiki supports this.

Closes: #6605
2021-05-20 12:48:05 +02:00
John MacFarlane
5736b331d8 LaTeX reader: better support for \xspace.
Previously we only supported it in inline contexts; now
we support it in all contexts, including math.

Partially addresses #7299.
2021-05-19 16:14:49 -07:00
John MacFarlane
7efb71f4f6 Revisions to citation syntax description update. 2021-05-19 10:43:53 -07:00
John MacFarlane
d452155bcf Update documentation on citation syntax. 2021-05-19 10:20:37 -07:00
John MacFarlane
640dbf8b8f Remove unused pragma. 2021-05-19 09:51:50 -07:00
John MacFarlane
9b5798bd9a Use fetchItem instead of downloadOrRead in fetchMediaResource. 2021-05-18 22:35:18 -07:00
John MacFarlane
ddbd984a0d Text.Pandoc.MediaBag: change type to use a Text key...
instead of `[FilePath]`.
We normalize the path and use `/` separators for consistency.
2021-05-18 22:34:23 -07:00
John MacFarlane
ad2b4423ef Updaet changelog. 2021-05-18 22:14:19 -07:00
Albert Krewinkel
eb3dff148e
LaTeX writer: separate successive quote chars with thin space
Successive quote characters are separated with a thin space to improve
readability and to prevent unwanted ligatures. Detection of these quotes
sometimes had failed if the second quote was nested in a span element.

Closes: #6958
2021-05-18 22:55:47 +02: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
56fb4dae1b Citeproc: ensure that CSL-related attributes are passed on...
...to a Div with id 'refs'.  Previously we just left the
attributes of such a Div alone, which meant that style
options like entry-spacing had no effect there.
2021-05-17 20:42:43 -07:00
Albert Krewinkel
1843a8793a
HTML writer: keep attributes from code nested below pre tag.
If a code block is defined with `<pre><code
class="language-x">…</code></pre>`, where the `<pre>` element has no
attributes, then the attributes from the `<code>` element are used
instead. Any leading `language-` prefix is dropped in the code's *class*
attribute are dropped to improve syntax highlighting.

Closes: #7221
2021-05-17 18:08:02 +02:00
Albert Krewinkel
25f5b92777
HTML writer: ensure headings only have valid attribs in HTML4
Fixes: #5944
2021-05-17 15:42:15 +02:00
Albert Krewinkel
4417dacc44
ConTeXt writer: use span identifiers as reference anchors.
Closes: #7246
2021-05-17 13:14:32 +02:00
Albert Krewinkel
d3ca48656f
ConTeXt writer tests: keep code lines below 80 chars. 2021-05-17 13:11:33 +02: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
John MacFarlane
5a6399d9f6 Markdown writer: fewer unneeded escapes for #.
See #6259.
2021-05-16 12:23:34 -07:00
John MacFarlane
39a69c4f93 Markdown writer: improve escaping of @.
We need to escape literal `@` before `{` because of
the new citation syntax.
2021-05-16 11:53:19 -07:00
John MacFarlane
98a5a63b52 Fix .editorconfig so Emacs can open zip archives and docx again.
See https://github.com/hlissner/doom-emacs/issues/5057
2021-05-15 19:55:00 -07:00
John MacFarlane
0a4c6925b6 Docx writer: copy over more settings from referenc.odcx.
From settings.xml in the reference-doc, we now include:
`zoom`, `embedSystemFonts`, `doNotTrackMoves`, `defaultTabStop`,
`drawingGridHorizontalSpacing`, `drawingGridVerticalSpacing`,
`displayHorizontalDrawingGridEvery`, `displayVerticalDrawingGridEvery`,
`characterSpacingControl`, `savePreviewPicture`, `mathPr`, `themeFontLang`,
`decimalSymbol`, `listSeparator`, `autoHyphenation`, `compat`.

Closes #7240.
2021-05-15 15:40:49 -07:00
John MacFarlane
31b650b4ec docx writer settings.xml:
- Set zoom to 100% by default.
- Align math options more with current Word defaults (e.g.
  Cambria Math font).
2021-05-15 11:04:53 -07:00
John MacFarlane
2cf971cf56 docx writer: Remove rsids from settings.docx.
Word will add these when revisions are made.  But it's
pointless to start out with a set of them.
2021-05-15 10:54:05 -07:00
John MacFarlane
bf73a15197 MANUAL: note that institute variable works for HTML-based slides. 2021-05-15 09:58:43 -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
Albert Krewinkel
0794862aac
HTML writer: parse <header> as a Div
HTML5 `<header>` elements are treated like `<div>` elements.
2021-05-15 16:46:02 +02:00
Albert Krewinkel
46baf6659d
MANUAL: add info about YAML escape sequences, link to spec.
Closes: #7152
2021-05-14 22:48:40 +02:00
Albert Krewinkel
013e4a3164
HTML reader: keep h1 tags as normal headers (#7274)
The tags `<title>` and `<h1 class="title">` often contain the same
information, so the latter was dropped from the document. However, as
this can lead to loss of information, the heading is now always
retained.

Use `--shift-heading-level-by=-1` to turn the `<h1>` into the document
title, or a filter to restore the previous behavior.

Closes: #2293
2021-05-14 12:31:24 -07:00
John MacFarlane
247b1cd18b Update changelog. 2021-05-14 10:20:53 -07:00
John MacFarlane
76a4e7127b Beamer writer: support exampleblock and alertblock.
A block will be rendered as an exampleblock if the heading
has class `example` and alertblock if it has class `alert`.

Closes #7278.
2021-05-14 10:09:46 -07:00
Albert Krewinkel
b9b1ec586a
changelog.md: fix Markdown, marking <p> as code. 2021-05-14 17:53:27 +02: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
Albert Krewinkel
3ec5726c9b
Docx writer: fix alignment for cells.
This fixes a regression introduced with the in the colspan/rowspan
changes that caused column alignments to be ignored. The column
alignment is used only if a default alignment is specified at the cell
level; otherwise the cell-level alignment takes precedence.
2021-05-14 16:49:19 +02:00
Albert Krewinkel
17d96404f5
Docx writer: allow multirow table headers 2021-05-14 16:19:20 +02:00
Albert Krewinkel
875f8f3654
HTML reader: don't fail on unmatched closing "script" tag.
Prevent the reader from crashing if the HTML input contains an unmatched
closing `</script>` tag.

Fixes: #7282
2021-05-14 12:13:40 +02:00
John MacFarlane
3f09f53459 Implement curly-brace syntax for Markdown citation keys.
The change provides a way to use citation keys that contain
special characters not usable with the standard citation
key syntax.  Example: `@{foo_bar{x}'}` for the key `foo_bar{x}`.
Closes #6026.

The change requires adding a new parameter to the `citeKey`
parser from Text.Pandoc.Parsing [API change].

Markdown reader: recognize @{..} syntax for citatinos.

Markdown writer:  use @{..} syntax for citations when needed.

Update manual with curly-brace syntax for citations.

Closes #6026.
2021-05-13 21:59:32 -07:00
John MacFarlane
c46482bfc3 Update manual date and man page. 2021-05-13 14:11:15 -07:00
John MacFarlane
b243bf0f44 Bump to 2.14 and update changelog. 2021-05-13 14:10:47 -07:00
John MacFarlane
697d149733 Use released citeproc 0.4. 2021-05-12 14:35:06 -07:00
John MacFarlane
84fa901fd6 Use texmath 0.12.3. 2021-05-12 12:52:04 -07:00
John MacFarlane
edca1d1656 Plain writer: handle superscript unicode minus.
Closes #7276.  Note:  currently we still get unwanted
white space around the minus; this needs to be addressed
with a change in texmath.
2021-05-12 11:12:27 -07:00
John MacFarlane
0217ae2a4f Hande 'annote' field in bibtex/biblatex writer.
Closes #7266.
2021-05-12 11:05:55 -07:00
John MacFarlane
46309319ef Fix source position reporting for YAML bibliographies.
Closes #7273.
2021-05-12 06:01:13 -06:00
John MacFarlane
5eb7ad7d1e Improve integration of settings from reference.docx.
The settings we can carry over from a reference.docx are
autoHyphenation, consecutiveHyphenLimit, hyphenationZone,
doNotHyphenateCap, evenAndOddHeaders, and proofState.

Previously this was implemented in a buggy way, so that the
reference doc's values AND the new values were included.

This change allows users to create a reference.docx that
sets w:proofState for spelling or grammar to "dirty,"
so that spell/grammar checking will be triggered on the
generated docx.

Closes #1209.
2021-05-11 22:31:38 -06:00
John MacFarlane
a66e50840b T.P.XML.Light - add Eq, Ord instances...
for Content, Element, Attr, CDataKind.
[API change]
2021-05-11 09:01:36 -06:00
John MacFarlane
2bd5d0cafb LaTeX writer: better handling of line breaks in simple tables.
Now we also handle the case where they're embedded in other
elements, e.g. spans. Closes #7272.
2021-05-11 07:52:05 -06:00
nuew
ff7176de80
epub Writer: Fix belongs-to-collection XML id choice (#7267)
The epub writer previously used the same XML id for both the book
identifier and the epub collection. This causes an error on epubcheck.
2021-05-10 09:26:32 -06: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