| Age | Commit message (Collapse) | Author |
|
Previously we relied on graphicx internals and made global
changes to Gin to force images to be resized if they exceed
textwidth. This approach is brittle and caused problems
with `\includesvg` (see #9660).
The new approach uses a new macro `\pandocbounded` that is
now defined in the LaTeX template. (Thanks here to Falk Hanisch in
https://github.com/mrpiggi/svg/issues/60.)
The LaTeX writer has been changed to enclose `\includegraphics`
and `\includesvg` commands in this macro when they don't explicitly
specify a width or height.
In addition, the writer now adds `keepaspectratio` to the
`\includegraphics` or `\includesvg` options if `height` is specified
without width, or vice versa. Previously, this was set in the preamble
as a global option.
Compatibility issues:
- If custom templates are used with the new LaTeX writer, they will have
to be updated to include the new `\pandocbounded` macro, or an error
will be raised because of the undefined macro.
- Documents that specify explicit dimensions for an image may render
differently, if the dimensions are greater than the line width or
page height. Previously pandoc would shrink these images to fit,
but the new behavior takes the specified dimensions literally.
In addition, pandoc previously always enforced `keepaspectratio`,
even when width and height were both specified, so images with
width and height specified that do not conform to their intrinsic
aspect ratio will appear differently.
Closes #9660.
|
|
...and only include it if `english` or `german` is used.
Since 3d8f011, the babel language is not specified as a
class option any more; so now we need to explicitly specify
the language option when we load `selnolig`. Only `german`
and `english` are valid, so we construct the variable
`selnolig-langs` in the writer and include `selnolig` if it
is nonempty.
This should restore proper ligature suppression when
lualatex is used.
Closes #9863. Supersedes #9864.
Thanks to @fkohrt for the initial fix.
|
|
This is required to make beamer use proper localized terms for
things like "Section." Closes #9868.
|
|
Previously only top-level sections were ever included in the TOC,
regardless of the setting of `--toc-depth`.
Closes #9861.
|
|
See #9818.
|
|
|
|
...for title, author, date, email.
Fixes #9823 (escaped `\@` in rendered email).
Allows formatting in title, author, date, and email fields.
Since the PDF metadata requires a string, and typst only
converts the title to a string (not the authors), we use
a small function content-to-string to do this conversion.
Background: https://github.com/typst/typst/issues/2196
|
|
This doesn't seem necessary for what we're doing, and it causes a
crash due to a bug in ConTeXt. Closes #9820.
|
|
|
|
The `--reference-doc` option allows customization of styles in docx
output, but it does not allow one to adjust the content of the output
(e.g., changing the order in which metadata, the table of contents,
and the body of the document are displayed), or adding boilerplate
text before or after the document body. For these changes, one can
now use `--template` with an OpenXML template. (See the default
`openxml` template for a sample.)
This patch also allows `--include-before-body` and
`--include-after-body` to be used with `docx` output.
The included files must be OpenXML fragments suitable for
inclusion in the document body.
Closes #8338 (`--include-before-body`, `--include-after-body`).
Closes #9069 (a custom template can be used to omit the
title page).
Closes #7256.
Closes #2928.
|
|
Center Subtitle, remove color.
|
|
|
|
|
|
Including a title graphic on a beamer template might require some
options, like e.g. `height=1.5cm` to ensure some image will fit at its
place in a given template.
|
|
This includes using the sans-serif font Aptos instead of
the serif font Cambria.
See #7280.
|
|
|
|
We use the default styles for headings and the title instead
of what pandoc was using.
See #7280.
|
|
* Typst writer: support Typst 0.11 table features.
- colspans
- rowspans
- cell alignment overrides
- relative column widths
- header and footer
- multiple table bodies with intermediate headers
Row heads are not yet supported.
The default typst template has been modified so that tables
don't have lines by default. As is standard with pandoc, we only
add a line under a header or over a footer. However, a different
default stroke pattern can easily be added in a template.
Closes #9588.
|
|
|
|
`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.
|
|
This was invalid YAML, and not desired anyway, since a colon
is added.
|
|
The PR replaces polyfill.io with cdnjs.cloudflare.com/polyfill.
polyfill.io has been acquired by Funnull, and the service has
become unstable.
This is essentially a cleaned up version of PR #2384 by @SukkaW;
see the PR for more information.
|
|
Djot is a light markup syntax (https://djot.net).
This patch adds djot as input and output formats.
API changes:
Add Text.Pandoc.Readers.Djot
Add Text.Pandoc.Writers.Djot
|
|
This uses the same YAML options as the LaTeX template.
|
|
|
|
* LuaLaTeX-specific (uses luaotfload)
* Configured in YAML metadata
* Sans/main/mono fonts have separate fallback chains
|
|
|
|
These styles were going into an office:styles element in content.xml,
but this is invalid. Instead they must go in styles.xml. See #9287.
The variable `highlighting-styles` no longer has any effect on
the default opendocument template, and highlighting styles are
not included in opendocument output.
|
|
I don't think we need to support IE < 9 any more!
|
|
```
{
"Description": "The element has unexpected child element 'http://schemas.openxmlformats.org/wordprocessingml/2006/main:bCs'.",
"Path": {
"NamespacesDefinitions": [
"xmlns:w=\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\""
],
"Namespaces": {
},
"XPath": "/w:styles[1]/w:style[15]/w:rPr[1]",
"PartUri": "/word/styles.xml"
},
"Id": "Sch_UnexpectedElementContentExpectingComplex",
"ErrorType": "Schema"
},
```
Signed-off-by: Edwin Török <[email protected]>
|
|
From OOXMLValidator:
```
{
"Description": "The element has unexpected child element 'http://schemas.openxmlformats.org/wordprocessingml/2006/main:b'.",
"Path": {
"NamespacesDefinitions": [
"xmlns:w=\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\""
],
"Namespaces": {
},
"XPath": "/w:styles[1]/w:style[9]/w:rPr[1]",
"PartUri": "/word/styles.xml"
},
"Id": "Sch_UnexpectedElementContentExpectingComplex",
"ErrorType": "Schema"
},
```
Signed-off-by: Edwin Török <[email protected]>
|
|
```
{
"Description": "The element has unexpected child element 'http://schemas.openxmlformats.org/wordprocessingml/2006/main:doNotTrackMoves'.",
"Path": {
"NamespacesDefinitions": [
"xmlns:w=\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\""
],
"Namespaces": {
},
"XPath": "/w:settings[1]",
"PartUri": "/word/settings.xml"
},
"Id": "Sch_UnexpectedElementContentExpectingComplex",
"ErrorType": "Schema"
}
```
According to `wml.xsd` the order is:
```
<xsd:complexType name="CT_Settings">
<xsd:sequence>
<xsd:element name="doNotTrackMoves" type="CT_OnOff" minOccurs="0"/>
[...]
<xsd:element name="footnotePr" type="CT_FtnDocProps" minOccurs="0"/>
```
Signed-off-by: Edwin Török <[email protected]>
|
|
Error from OOXMLValidator:
```
{
"Description": "The required attribute 'val' is missing.",
"Path": {
"NamespacesDefinitions": [
"xmlns:w=\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\""
],
"Namespaces": {
},
"XPath": "/w:document[1]/w:body[1]/w:tbl[1]/w:tr[1]/w:trPr[1]/w:cnfStyle[1]",
"PartUri": "/word/document.xml"
},
"Id": "Sch_MissRequiredAttribute",
"ErrorType": "Schema"
},
```
This is a bitmask where the first bit means 'first row', which is set as
an attribute already.
Signed-off-by: Edwin Török <[email protected]>
|
|
```
./tmp/document-pretty.xml:260: element tblW: Schemas validity error : Element '{http://schemas.openxmlformats.org/wordprocessingml/2006/main}tblW', attribute '{http://schemas.openxmlformats.org/wordprocessingml/2006/main}w': '0.0' is not a valid value of the union type '{http://schemas.openxmlformats.org/wordprocessingml/2006/main}ST_MeasurementOrPercent'.
```
See http://officeopenxml.com/WPtableWidth.php, there is a disagreement
here between standard versions on whether a `%` is required or not when
type=`pct`, but the default is 0 when omitted, so just delete this
entry.
Signed-off-by: Edwin Török <[email protected]>
|
|
There were 2 `pStyle` for `Abstract`:
```
./tmp/document-pretty.xml:47: element pStyle: Schemas validity error : Element '{http://schemas.openxmlformats.org/wordprocessingml/2006/main}pStyle': This element is not expected. Expected is one of ( {http://schemas.openxmlformats.org/wordprocessingml/2006/main}keepNext, {http://schemas.openxmlformats.org/wordprocessingml/2006/main}keepLines, {http://schemas.openxmlformats.org/wordprocessingml/2006/main}pageBreakBefore, {http://schemas.openxmlformats.org/wordprocessingml/2006/main}framePr, {http://schemas.openxmlformats.org/wordprocessingml/2006/main}widowControl, {http://schemas.openxmlformats.org/wordprocessingml/2006/main}numPr, {http://schemas.openxmlformats.org/wordprocessingml/2006/main}suppressLineNumbers, {http://schemas.openxmlformats.org/wordprocessingml/2006/main}pBdr, {http://schemas.openxmlformats.org/wordprocessingml/2006/main}shd, {http://schemas.openxmlformats.org/wordprocessingml/2006/main}tabs ).
```
Signed-off-by: Edwin Török <[email protected]>
|
|
According to `wml.xsd` the order must be:
```
<xsd:sequence>
<xsd:element name="tcBorders" type="CT_TcBorders" minOccurs="0" maxOccurs="1"/>
[...]
<xsd:element name="vAlign" type="CT_VerticalJc" minOccurs="0"/>
```
Signed-off-by: Edwin Török <[email protected]>
|
|
There was an extra `>` which showed up as "character content" in the XML:
```
/tmp/styles-pretty.xml:113: element rPr: Schemas validity error : Element '{http://schemas.openxmlformats.org/wordprocessingml/2006/main}rPr': Character content other than whitespace is not allowed because the content type is 'element-only'.
```
Signed-off-by: Edwin Török <[email protected]>
|
|
```
./tmp/styles-pretty.xml:111: element spacing: Schemas validity error : Element '{http://schemas.openxmlformats.org/wordprocessingml/2006/main}spacing': This element is not expected. Expected is one of ( {http://schemas.openxmlformats.org/wordprocessingml/2006/main}textDirection, {http://schemas.openxmlformats.org/wordprocessingml/2006/main}textAlignment, {http://schemas.openxmlformats.org/wordprocessingml/2006/main}textboxTightWrap, {http://schemas.openxmlformats.org/wordprocessingml/2006/main}outlineLvl, {http://schemas.openxmlformats.org/wordprocessingml/2006/main}divId, {http://schemas.openxmlformats.org/wordprocessingml/2006/main}cnfStyle, {http://schemas.openxmlformats.org/wordprocessingml/2006/main}pPrChange ).
```
According to `wml.xsd` `spacing` must be placed before `jc`:
```
<xsd:sequence>
<xsd:element name="spacing" type="CT_Spacing" minOccurs="0"/>
[...]
<xsd:element name="jc" type="CT_Jc" minOccurs="0"/>
```
Signed-off-by: Edwin Török <[email protected]>
|
|
```
./tmp/styles-pretty.xml:30: element qFormat: Schemas validity error : Element '{http://schemas.openxmlformats.org/wordprocessingml/2006/main}qFormat': This element is not expected. Expected is one of ( {http://schemas.openxmlformats.org/wordprocessingml/2006/main}rPr, {http://schemas.openxmlformats.org/wordprocessingml/2006/main}tblPr, {http://schemas.openxmlformats.org/wordprocessingml/2006/main}trPr, {http://schemas.openxmlformats.org/wordprocessingml/2006/main}tcPr, {http://schemas.openxmlformats.org/wordprocessingml/2006/main}tblStylePr ).
```
According to `wml.xsd` it must come before `pPr`:
```
<xsd:complexType name="CT_Style">
<xsd:sequence>
[...]
<xsd:element name="qFormat" type="CT_OnOff" minOccurs="0"/>
[...]
<xsd:element name="pPr" type="CT_PPrGeneral" minOccurs="0" maxOccurs="1"/>
```
Signed-off-by: Edwin Török <[email protected]>
|
|
|
|
Remove custom definitiion of blockquote in default template.
|
|
Using "Footnote Block Text" for the style name, so it can be
given a different font size if footnotes are.
Closes #9243.
|
|
Closes #9242.
|
|
Typst now supports CSL for its native citation engine, so pandoc
should use a specified `csl` style in the template, falling back to
`bibliographystyle` if `csl` is not specified.
https://typst.app/docs/reference/meta/bibliography/
|
|
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.
|
|
Closes #9160.
|
|
|
|
1) Renamed no.yaml (macrolanguage Norwegian) to nb.yaml (Norwegian Bokmål)
2) Created soft symbolic link from no.yaml pointing to nb.yaml.
|
|
|
|
|