aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
AgeCommit message (Collapse)AuthorFilesLines
2019-05-21Markdown writer: fix small error in ed73bd28Jesse Rosenthal1-4/+3
A `do` notation was left in a non-monadic function.
2019-05-21Markdown writer: Handle labels with integer namesJesse Rosenthal1-3/+20
Previously if labels had integer names, it could produce a conflict with auto-labeled reference links. Now we test for a conflict and find the next available integer. Note that this involves adding a new state variable `stPrevRefs` to keep track of refs used in other document parts when using `--reference-location=block|section` Closes #5495
2019-05-18Add tex_math_dollars to multimarkdownExtensions.John MacFarlane1-0/+1
This form is now supported in multimarkdown, in addition to `tex_math_double_backslash`. See #5512.
2019-05-16JATS writer: properly handle footnotes.John MacFarlane1-7/+24
"Best Practice: When footnotes are grouped at the end of an article, wrap them in a `<fn-group>` and use an `<xref>` element in the text, as usual, to tie each footnote in the list to a particular location in the text." Closes #5511.
2019-05-15FB2 writer: do not wrap note references into <sup> and bracketsAlexander Krotov1-1/+1
Existing FB2 readers, such as FBReader, already display links with type="note" as a superscript.
2019-05-15hlint FB2 writerAlexander Krotov1-27/+22
2019-05-13Org reader: fix planning elements in headers level 3 and higherAlbert Krewinkel1-1/+1
Planning info is now always placed before the subtree contents. Previously, the planning info was placed after the content if the header's subtree was converted to a list, which happens with headers of level 3 and higher per default. Fixes: #5494
2019-05-13Org reader: omit, but warn about unknown export optionsAlbert Krewinkel3-4/+20
Unknown export options are properly ignored and omitted from the output.
2019-05-12Org writer: always indent src blocks content by 2 spacesAlbert Krewinkel1-3/+1
Emacs always uses two spaces when indenting the content of src blocks, e.g., when exiting a `C-c '` edit-buffer. Pandoc used to indent contents by the space-equivalent of one tab, but now always uses two spaces, too. Closes: #5440
2019-05-11FB2 reader: parse notesAlexander Krotov1-3/+51
Closes #5493
2019-05-11FB2 reader: use XML.Light.Input.parseXMLDoc to parse the root elementAlexander Krotov1-12/+11
2019-05-11Reduce the amount of state in FB2 readerAlexander Krotov1-1/+3
2019-05-11FB2 reader: use Text.XML.Light.unqual where possibleAlexander Krotov1-8/+8
2019-05-05Asciidoc writer: use `` `+...+` `` form for inline code.John MacFarlane1-1/+1
The old `` `a__b__c` `` yields emphasis inside code in asciidoc. To get a pure literal code span, use `` `+a__b__c+` ``.
2019-05-05Asciidoc writer: use proper smart quotes with asciidoctor.John MacFarlane1-4/+10
Asciidoctor has a different format for smart quotes. Closes #5487.
2019-05-05LaTeX writer: don't produce columns environment unless beamer.John MacFarlane1-2/+2
The environment is beamer-only and as far as I'm aware there's no latex package that provides it for non-beamer use. Closes #5485.
2019-05-05Org reader: prefer plain symbols over math symbolsAlbert Krewinkel1-1/+1
Symbols like `\alpha` are output plain and unemphasized, not as math. Fixes: #5483
2019-05-05Org reader: recognize emphasis after TODO/DONE keywordAlbert Krewinkel1-1/+3
Fixes: #5484
2019-05-04HTML writer: don't add variation selector if it's already there.John MacFarlane1-1/+4
See f11d0c9dc8b61cc38e138aaecb0f0094add3465a This fixes round-trip failures.
2019-05-04Add template variable `curdir` with working directoryJohn MacFarlane1-0/+5
from which pandoc is run. Closes #5464.
2019-05-04FB2 writer: use genre metadata field (#5478)John1-1/+4
2019-05-04JATS writer: fix citations with PMID so they validate.John MacFarlane1-6/+10
Closes #5481. This includes an update to data/jats.csl.
2019-05-04Improve c4a81fb941adf6c3bf524916c46623685d276f32.John MacFarlane1-1/+1
We do want to recognize "0" as a number, even though it has "0" as a prefix.
2019-05-03metaToJSON: treat digits starting with 0 as a string...John MacFarlane1-0/+3
not a number. Closes #5479.
2019-05-04Lua: add `pandoc.system` module (#5468)Albert Krewinkel2-0/+36
The `system` Lua module provides utility functions to interact with the operating- and file system. E.g. print(pandoc.system.get_current_directory()) or pandoc.system.with_temporary_directory('tikz', function (dir) -- write and compile a TikZ file with pdflatex end)
2019-05-03LaTeX reader: Allow newlines in `\mintinline`.John MacFarlane1-3/+7
2019-05-01MediaWiki reader: handle multiple attributes in table row (#5471)chinapedia1-2/+2
2019-05-01Fix footnote in image caption.John MacFarlane1-10/+16
Regression! The fix for #4683 broke this case.
2019-04-30HTML: prevent gratuitious emojification on iOS.John MacFarlane1-1/+10
iOS chooses to render a number of Unicode entities, including '↩', as big colorful emoji. This can be defeated by appending Unicode VARIATION SELECTOR-15'/'VARIATION SELECTOR-16'. So we now append this character when escaping strings, for both '↩' and '↔'. If other characters prove problematic, they can simply be added to needsVariationSelector. Closes #5469.
2019-04-25Fix --self-contained so it works when output format has extensions.John MacFarlane1-4/+4
Previously if you used `--self-contained` with `html-smart` or `html+smart`, it wouldn't work.
2019-04-23Allow use of -output-directory in --pdf-engine-opt.John MacFarlane1-4/+6
This is currently possible with `mklatex` and `-outdir`, but was not yet possible with xelatex and `-output-directory`. Closes #5462.
2019-04-23EPUB writer: Ensure unique ids for styleesheets in content.opf.John MacFarlane1-3/+3
Closes #5463.
2019-04-20HTML writer: Add class="heading" to level 7+ Headers...John MacFarlane1-1/+1
rendered as p tags. Closes #5457.
2019-04-16Text.Pandoc.PDF: replace `</>` with literal "/".John MacFarlane1-2/+2
We use forward-slash for a directory separator in tmpDir, even on Windows (because that's what tex likes). So we should not put a backslash between the tmpDir and the filename on Windows. This is harmless enough in normal Windows setups, but it breaks on Cygwin. Closes #5451. Thanks to @cc2x for noticing and diagnosing the problem.
2019-04-16Tigthen up fix to #5446.John MacFarlane1-2/+2
We only treat Span as transparent if it has no attributes.
2019-04-15RST writer: treat Span as transparent.John MacFarlane1-0/+3
Previously an Emph inside a Span was being treated as nested markup and ignored. With this patch, the Span is just ignored. Closes #5446.
2019-04-10LaTeX reader: add braces when resolving `\DeclareMathOperator`.John MacFarlane1-1/+2
These seem to be needed for xelatex but not pdflatex. Closes #5441.
2019-04-07Asciify.hs: add Turkish undotted-i (#5434)Mauro Bieg1-0/+1
fixes #5433
2019-04-05More fixes to beamer table footnotes.John MacFarlane1-14/+19
2019-04-05LaTeX writer: rename stInMinipage -> stExternalNotesJohn MacFarlane1-13/+14
2019-04-05Make footnotes work properly in beamer tables.John MacFarlane1-0/+6
This fixes a regression in beamer due to the fix to #5367. We put table footnotes outside the table in beamer, because footnote/footnotehyper don't work with beamer.
2019-04-05Vimwiki reader: improve handling of internal links.John MacFarlane1-5/+12
1) Don't append `.html` 2) Add `wikilink` title This mirrors behavior of other wiki readers. Generally the `.html` extension is not wanted. It may be important for output to HTML in certain circumstances, but it can always be added using a filter that matches on links with title `wikilink`. Note that if you have a workflow that uses pandoc to convert vimwiki to readable HTML pages, you may need to add such a filter to reproduce current behavior. Here is a filter that does the job: ```lua function Link(el) if el.title == 'wikilink' then el.target = el.target .. ".html" end return el end ``` Save this as `fixlinks.lua` and use with `--lua-filter fixlinks.lua`. Closes #5414.
2019-04-05PowerPoint writer code style fixJesse Rosenthal1-30/+14
I had been using record syntax in an ADT, is bad style, since it means that each record produces a partial function. Fortunately we weren't using the partial functions anywhere, so this changes it to positional syntax.
2019-04-05PowerPoint writer: expand builtin reference doc to model all layoutsJesse Rosenthal1-0/+4
The previous built-in reference doc had only title and content layouts. Add in a section-header slide and a two-content slide, so users can more easily modify it to build their own templates. Golden files needed to be regenerated. Checked on MS PowerPoint 2013.
2019-04-04PowerPoint writer: Always open up in slide viewJesse Rosenthal1-8/+26
When editing a template/reference-doc, the user might be in Master view, but when producing a slide show, it is assumed that slide view will be desired. This removes the "lastView" attr from the viewProps.xml slide so that the presentation will always open up in slide view. Note this requires creating a new "ppt/viewProps.xml" instead of just moving over the old one from the viewProps file. Since this produces a slightly different order of xml files in the content manifest, the golden files will have to be rebuilt.
2019-04-03Add support for go with --listings.John MacFarlane1-0/+1
Closes #5427.
2019-04-02Fix harmless error in file-scope code.John MacFarlane1-2/+2
Closes #5422.
2019-04-02Add XWiki Support (#4167)Derek Chen-Becker3-1/+270
Add XWiki Support Closes #1800
2019-04-01PowerPoint writer: Remove handoutsMasterList from template presentation.xmlJesse Rosenthal1-7/+9
We don't build it at the moment, so it was causing corruption.
2019-04-01PowerPoint writer: Build sp trees correctlyJesse Rosenthal1-17/+19
We were previously carrying over too many elements from the layout, which produced visual artifacts and some corruption. This empties the sptree (except for properties) after building the shapes, and then inserts them. Together with 5e944bf5, fixes #5402 (Note that this addresses the issue and template in that particular bug report. Other issues will arise no doubt arise with other templates.)