aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers
AgeCommit message (Collapse)AuthorFilesLines
2021-05-25Allow compilation with base 4.15Albert Krewinkel1-51/+47
2021-05-25Jira: add support for "smart" linksAlbert Krewinkel1-0/+2
Support has been added for the new `[alias|https://example.com|smart-card]` syntax.
2021-05-24Jira writer: use `{color}` when span has a color attributeAlbert Krewinkel1-3/+7
Closes: tarleb/jira-wiki-markup#10
2021-05-20Ms writer: handle tables with multiple paragraphs.John MacFarlane1-6/+22
Previously they overflowed the table cell width. We now set line lengths per-cell and restore them after the table has been written. Closes #7288.
2021-05-20ConTeXt reader: improve ordered lists (#7304)Denis Maier1-11/+3
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-20ZimWiki writer: allow links and emphasis in headersAlbert Krewinkel1-1/+1
The latest version of ZimWiki supports this. Closes: #6605
2021-05-18LaTeX writer: separate successive quote chars with thin spaceAlbert Krewinkel1-2/+3
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-17HTML writer: ensure headings only have valid attribs in HTML4Albert Krewinkel1-2/+14
Fixes: #5944
2021-05-17ConTeXt writer: use span identifiers as reference anchors.Albert Krewinkel1-2/+6
Closes: #7246
2021-05-16LaTeX template: define commands for zero width non-joiner characterAlbert Krewinkel3-6/+7
Closes: #6639 The zero-width non-joiner character is used to avoid ligatures (e.g. in German).
2021-05-16Markdown writer: fewer unneeded escapes for `#`.John MacFarlane1-2/+11
See #6259.
2021-05-16Markdown writer: improve escaping of `@`.John MacFarlane1-1/+1
We need to escape literal `@` before `{` because of the new citation syntax.
2021-05-15Docx writer: copy over more settings from referenc.odcx.John MacFarlane1-1/+16
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-14Beamer writer: support exampleblock and alertblock.John MacFarlane1-3/+8
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-14Docx writer: fix alignment for cells.Albert Krewinkel1-14/+20
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-14Docx writer: allow multirow table headersAlbert Krewinkel1-17/+25
2021-05-13Implement curly-brace syntax for Markdown citation keys.John MacFarlane1-2/+7
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-12Plain writer: handle superscript unicode minus.John MacFarlane1-0/+1
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-11Improve integration of settings from reference.docx.John MacFarlane1-13/+14
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-11LaTeX writer: better handling of line breaks in simple tables.John MacFarlane1-3/+1
Now we also handle the case where they're embedded in other elements, e.g. spans. Closes #7272.
2021-05-10epub Writer: Fix belongs-to-collection XML id choice (#7267)nuew1-3/+3
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-07ConTeXt writer: support blank lines in line blocks.Albert Krewinkel1-2/+6
Fixes: #6564 Thanks to @denismaier.
2021-05-01Docx writer: support colspans and rowspans in tablesAlbert Krewinkel3-70/+140
See: #6315
2021-05-01Add new internal module Text.Pandoc.Writers.GridTableAlbert Krewinkel1-0/+157
2021-04-30Org writer: inline latex envs need newlines (#7259)tecosaur1-0/+2
Closes #7252 As specified in https://orgmode.org/manual/LaTeX-fragments.html, an inline \begin{}...\end{} LaTeX block must start on a new line.
2021-04-28JATS writer: use either styled-content or named-content for spans.Albert Krewinkel1-10/+26
If the element has a content-type attribute, or at least one class, then that value is used as `content-type` and the span is put inside a `<named-content>` element. Otherwise a `<styled-content>` element is used instead. Closes: #7211
2021-04-27Docx writer: autoset table width if no column has an explicit width.Albert Krewinkel1-7/+11
2021-04-25Writers: Recognize custom syntax definitions (#7241)Jan Tojnar3-17/+21
Languages defined using `--syntax-definition` were not recognized by `languagesByExtension`. This patch corrects that, allowing the writers to see all custom definitions. The LaTeX still uses the default syntax map, but that's okay in that context, since `--syntax-definition` won't create new listings styles.
2021-04-25Markdown writer: Cleaner (code)blocks with single class (#7242)Jan Tojnar1-2/+8
When a block only has a single class and no other attributes, it is not necessary to wrap the class attribute in curly braces – the class name can be placed after the opening mark as is. This will result in bit cleaner output when pandoc is used as a markdown pretty-printer.
2021-04-25Add quotes properly in markdown YAML metadata fields.John MacFarlane1-6/+5
This fixes a bug, which caused the writer to look at the LAST rather than the FIRST character in determining whether quotes were needed. So we got spurious quotes in some cases and didn't get necessary quotes in others. Closes #7245. Updated a number of test cases accordingly.
2021-04-20Docx writer: add missing fileAlbert Krewinkel1-0/+181
2021-04-20Docx writer: extract Table handling into separate moduleAlbert Krewinkel2-221/+119
2021-04-17Update to released unicode-collation, latest citeproc dev version.John MacFarlane7-7/+7
Update citeproc test.
2021-04-17Remove Text.Pandoc.BCP47 module.John MacFarlane9-42/+44
[API change] Use Lang from UnicodeCollation.Lang instead. This is a richer implementation of BCP 47.
2021-04-17Move getLang from BCP47 -> T.P.Writers.Shared.John MacFarlane2-58/+73
[API change]
2021-04-16JATS writer: reduce unnecessary use of <p> elements for wrappingAlbert Krewinkel3-16/+47
The `<p>` element is used for wrapping in cases were the contents would otherwise not be allowed in a certain context. Unnecessary wrapping is avoided, especially around quotes (`<disp-quote>` elements). Closes: #7227
2021-04-10JATS writer: convert spans to <named-content> elementsAlbert Krewinkel1-6/+7
Spans with attributes are converted to `<named-content>` elements instead of being wrapped with `<milestone-start/>` and `<milestone-end>` elements. Milestone elements are not allowed in documents using the articleauthoring tag set, so this change ensures the creation of valid documents. Closes: #7211
2021-04-10JATS writer: add footnote number as label in backmatterAlbert Krewinkel1-0/+1
Footnotes in the backmatter are given the footnote's number as a label. The articleauthoring output is unaffected from this change, as footnotes are placed inline there. Closes: #7210
2021-04-05Commonmark writer: Use backslash escapes for `<` and `|`...John MacFarlane1-1/+11
instead of entities. Closes #7208.
2021-04-05JATS writer: escape disallows chars in identifiersAlbert Krewinkel3-17/+19
XML identifiers must start with an underscore or letter, and can contain only a limited set of punctuation characters. Any IDs not adhering to these rules are rewritten by writing the offending characters as Uxxxx, where `xxxx` is the character's hex code.
2021-04-01Org writer: Use LaTeX style maths deliminators (#7196)tecosaur1-2/+2
Org works better with LaTeX-style delimiters.
2021-03-29Powerpoint writer: allow monofont to be specified in metadata...John MacFarlane2-6/+19
...not just using `--variable` on the command line (as in other writers). Closes #7187.
2021-03-20RST writer: use NonEmpty for init, last.John MacFarlane1-8/+12
2021-03-20Include Header.Attr.attributes as XML attributes on sectionErik Rask1-2/+45
Add key-value pairs found in the attributes list of Header.Attr as XML attributes on the corresponding section element. Any key name not allowed as an XML attribute name is dropped, as are keys with invalid values where they are defined as enums in DocBook, and xml:id (for DocBook 5)/id (for DocBook 4) to not intervene with computed identifiers.
2021-03-20T.P.Shared: remove `backslashEscapes`, `escapeStringUsing`.John MacFarlane7-34/+77
[API change] These are inefficient association list lookups. Replace with more efficient functions in the writers that used them (with 10-25% performance improvements in haddock, org, rtf, texinfo writers).
2021-03-19Protect partial uses of maximum with NonEmpty.John MacFarlane15-69/+84
2021-03-19Use NonEmpty instead of minimumDef.John MacFarlane1-2/+3
2021-03-18Use minimumDef instead of minimum (partial function).John MacFarlane1-5/+2
2021-03-17Docx writer: make nsid in abstractNum deterministic.John MacFarlane1-6/+4
Previously we assigned a random number (though in a deterministic way). But changes in the random package mean we get different results now on different architectures, even with the same random seed. We don't need random values; so now we just assign a value based on the list number id, which is guaranteed to be unique to the list marker.
2021-03-16Removed unused LANGUAGE pragmas.John MacFarlane1-1/+0