aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers
AgeCommit message (Collapse)AuthorFilesLines
2020-07-29Writers/Shared: add missing function docsAlbert Krewinkel1-7/+21
Ensure that all functions in the module have a haddock comment.
2020-07-23Markdown writer: use numerical labels for refs...John MacFarlane1-5/+9
...that are longer than 999 characters or contain square brackets. For conformity with commonmark. Closes #6560
2020-07-23Add `raw_markdown` extension affecting `ipynb` reader.John MacFarlane1-2/+2
Specifying `-f ipynb+raw_markdown` will cause Markdown cells to be represented as raw Markdown blocks, instead of being parsed. This is not what you want when going from `ipynb` to other formats, but it may be useful when going from `ipynb` to Markdown or to `ipynb`, to avoid semantically insignificant changes in the contents of the Markdown cells that might otherwise be introduced. Closes #5408.
2020-07-22Docx writer: support --number-sections.John MacFarlane1-4/+17
Closes #1413.
2020-07-19Markdown writer: move asciify out of escapeString.John MacFarlane1-9/+9
Otherwise unsmartify doesn't catch quotes that have already been turned to entities.
2020-07-19Remove use of cmark-gfm for commonmark/gfm rendering.John MacFarlane2-429/+96
Instead rely on the markdown writer with appropriate extensions. Export writeCommonMark variant from Markdown writer. This changes a few small things in rendering markdown, e.g. w/r/t requiring backslashes before spaces inside super/subscripts.
2020-07-19Markdown writer: use unicode super/subscript characters...John MacFarlane1-18/+44
when possible if the superscript or subscript extension or raw_html aren't available.
2020-07-19Markdown writer: render caption as following paragraph...John MacFarlane1-2/+5
when `Ext_table_caption` not enabled.
2020-07-19Merge pull request #6495 from tarleb/html5-figure-accessiblityJohn MacFarlane1-2/+10
HTML writer: improve alt-text/caption handling for HTML5
2020-07-17Jira writer: keep image caption as alt attributeAlbert Krewinkel1-10/+12
Fixes #6529
2020-07-12Merge pull request #6513 from brisad/masterJohn MacFarlane1-1/+3
Escape starting periods in ms writer code blocks
2020-07-12Ms writer: fix code highlighting with blank lines.John MacFarlane1-5/+5
Previously blank lines were simply omitted from highligted code.
2020-07-08Escape starting periods in ms writer code blocksMichael Hoffmann1-1/+3
If a line of ms code block output starts with a period (.), it should be prepended by '\&' so that it is not interpreted as a roff command. Fixes #6505
2020-07-02Revert "Ipnyb: allow lossless round-tripping of markdown cell content."John MacFarlane1-5/+2
This reverts commit efbc2050315b60c8a753dee6255465f1083019ab.
2020-07-01HTML writer: improve alt-text/caption handling for HTML5Albert Krewinkel1-2/+10
Screen readers read an image's `alt` attribute and the figure caption, both of which come from the same source in pandoc. The figure caption is hidden from screen readers with the `aria-hidden` attribute. This improves accessibility. For HTML4, where `aria-hidden` is not allowed, pandoc still uses an empty `alt` attribute to avoid duplicate contents. Closes: #6491
2020-06-30Ipnyb: allow lossless round-tripping of markdown cell content.John MacFarlane1-2/+5
The reader now parses the contents of the markdown cell to a Pandoc structure, but *also* stores the raw markdown in a `source` attribute on the cell Div. When we convert back to markdown, this attribute is stripped off and the original source is used. When we convert to other formats, the attribute is usually ignored (though it will come through in HTML as a `data-source` attribute, not unhelpfully). I'll note some potential drawbacks of this approach: - It makes it impossible to use pandoc to clean up or change the contents of markdown cells, e.g. going from `+smart` to `-smart`. - There may be formats where the addition of the `source` attribute is problematic. I can't think of any, though. Closes #5408.
2020-06-23Remove redundant pattern match in pptx writer.John MacFarlane1-3/+0
2020-06-22Handle native Underline in Powerpoint writer.John MacFarlane1-1/+1
(Instead of old Span with underline class. Spans with `underline` will no longer be rendered as underlined text.)
2020-06-22Use native Underline instead of Span in JiraJohn MacFarlane1-4/+1
2020-06-17LaTeX writer: escape `^` specially for listings.John MacFarlane1-1/+1
Closes #6460.
2020-06-14Distinguish between single and double quotes when using enquote package (#6457)dbecher-ito1-1/+3
2020-05-30Change default revealjs-url to use CDN version of revealjs v4.John MacFarlane1-1/+1
See #6408.
2020-05-28Fixed Katex standalone script (#6399)Lucas Escot1-0/+2
Global macros are now persistent when using the HTML Writer with the --katex option.
2020-05-21FB2 writer: properly handle cover-image containing spaces.John MacFarlane1-2/+2
Closes #6391.
2020-05-18Use CSS in favor of <br> for display math (#6372)Lila1-13/+10
Some CSS to ensure that display math is displayed centered and on a new line is now included in the default HTML-based templates; this may be overridden if the user wants a different behavior.
2020-05-17Org writer: clean-up Div handlingAlbert Krewinkel1-30/+59
2020-05-16Docx writer: enable column and row bands for tables.John MacFarlane1-1/+6
This change will not have any effect with the default style. However, it enables users to use a style (via a reference.docx) that turns on row and/or column bands. Closes #6371.
2020-05-16OpenDocument writer: add custom-style "Abstract" in metadata abstract.John MacFarlane1-1/+8
This ensures that the abstract is rendered with style Abstract.
2020-05-16OpenDocument/ODT writer: enable custom-style attribute on a Div.John MacFarlane1-2/+6
This allows you to apply a custom style to contained paragraphs.
2020-05-14Fix underline in RTF writer.John MacFarlane1-1/+1
It should be `\ul` not `\pnul`.
2020-05-12LaTeX writer: create hypertarget for links with identifier.John MacFarlane1-23/+27
Closes #6360.
2020-05-02LaTeX Writer: Add support for customizable alignment of columns in beamer ↵andrebauer1-5/+24
(#6331) Add support for customizable alignment of columns in beamer. Closes #4805, closes #4150.
2020-04-30PowerPoint writer: write math input verbatim in speaker notes.Jesse Rosenthal1-6/+12
OMML in speaker notes would lead to corrupt PowerPoint output. We now output the OMML verbatim as LaTeX in the speaker notes. Closes #6301.
2020-04-28Support new Underline element in readers and writers (#6277)Vaibhav Sagar29-3/+107
Deprecate `underlineSpan` in Shared in favor of `Text.Pandoc.Builder.underline`.
2020-04-24RST writer: properly handle images with same alt text.John MacFarlane1-7/+18
Previously we created duplicate references for these in rendering RST. Closes #6194.
2020-04-22AsciiDoc writer: add blank line after Div.John MacFarlane1-1/+1
Closes #6308.
2020-04-20Haddock Writer: Support Haddock tablesJoe Hermaszewski1-1/+1
See this PR on Haddock for details on the table format: https://github.com/haskell/haddock/pull/718
2020-04-18Fix round-trip bug with HTML tables....John MacFarlane1-9/+13
introduced by parsing of table attributes. (The writer always added a style with width, and we would get multiple such styles through successive round trips.)
2020-04-17Markdown writer: avoid unnecessary escapes before intraword `_`John MacFarlane1-1/+6
when `intraword_underscores` extension is enabled. Closes #6296.
2020-04-17API change: use PandocError for exceptions in Lua subsystemAlbert Krewinkel1-18/+9
The PandocError type is used throughout the Lua subsystem, all Lua functions throw an exception of this type if an error occurs. The `LuaException` type is removed and no longer exported from `Text.Pandoc.Lua`. In its place, a new constructor `PandocLuaError` is added to PandocError.
2020-04-15Modify toLegacyTable to cut up cells, add testsdespresc1-8/+43
Now a cell with dimension (h, w) will be cut up into h*w cells of dimension (1,1), all in the same grid position, with the upper-left holding the original cell contents and the rest being empty.
2020-04-15Use the new builders, modify readers to preserve empty headersdespresc4-5/+5
The Builder.simpleTable now only adds a row to the TableHead when the given header row is not null. This uncovered an inconsistency in the readers: some would unconditionally emit a header filled with empty cells, even if the header was not present. Now every reader has the conditional behaviour. Only the XWiki writer depended on the header row being always present; it now pads its head as necessary.
2020-04-15Adapt to the newest Table type, fix some previous adaptation issuesdespresc31-56/+96
- Writers.Native is now adapted to the new Table type. - Inline captions should now be conditionally wrapped in a Plain, not a Para block. - The toLegacyTable function now lives in Writers.Shared.
2020-04-15Remove the onlySimpleCellBodies function from Shareddespresc3-3/+3
2020-04-15Implement the new Table typedespresc32-181/+239
2020-04-11LaTeX writer: ensure that `-M csquotes` works even in fragment mode.John MacFarlane1-10/+11
Closes #6265.
2020-04-04Jira: support citations, attachment links, and user linksAlbert Krewinkel1-3/+25
Closes: #6231 Closes: #6238 Closes: #6239
2020-04-01Docbook writer: Add personname element to docbook author.John MacFarlane1-1/+2
Closes #6244.
2020-03-31Markdown writer: ensure consistent padding for pipe tables.John MacFarlane1-2/+2
Previously there was no space between text and bar in right-aligned table cells. This commit also ensures space on both sides for centered cells. Closes #6240.
2020-03-31Jira writer: convert spans with class `underline` to inserted textAlbert Krewinkel1-1/+9
Spans with class `underline` as converted into Jira text marked as `+inserted+`, i.e. surrounded by plus-signs.