aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers
AgeCommit message (Collapse)AuthorFilesLines
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-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-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-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-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-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-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-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-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-02Add XWiki Support (#4167)Derek Chen-Becker2-1/+267
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.)
2019-04-01PowerPoint writer: Correct application of reference doc for contentJesse Rosenthal1-30/+16
Previously we had applied content shapes based on their index (which was "1", "2" in MS Word 2013). It turns out that this was a convention, and could not be relied on. Instead we use a default type (ie, a ph tag with no "type"). This is more correct, and should make the application of reference documents in PowerPoint much more robust.
2019-04-01PowerPoint writer: Make default placeholder type for template lookupJesse Rosenthal1-18/+42
This is the first step toward making templating work better. It seems that content shapes have a default ph type. In other words, shapes with *NO PH TYPE* should be considered to have an "obj" ph type, and used as content shapes. see https://github.com/scanny/python-pptx/blob/master/docs/dev/analysis/placeholders/slide-placeholders/placeholders-in-new-slide.rst
2019-03-31Pptx writer: Apply speaker snotes to metadata slide if applicable.Jesse Rosenthal1-15/+35
If the slide deck has a metadata slide (with author, title, etc) and has speaker notes before any body content, the speaker notes will be applied to the metadata slide. If there is no metadata slide, pandoc will behave as before.
2019-03-30Pptx writer: Correctly handle notes after section-title headerJesse Rosenthal1-3/+4
Previously, if notes came after a section-title header (ie, a level-1 header in a slide-level=2 presentation), they would go on the next slide. This keeps them on the slide with the header.
2019-03-30ipynb reader/writer: use format 'ipynb' for raw cell where no format given.John MacFarlane1-3/+6
According to nbformat docs, this is supposed to render in every format. We don't do that, but we at least preserve it as a raw block in markdown, so you can round-trip.
2019-03-29ipynb writer - consolidate adjacent raw blocks.John MacFarlane1-2/+10
Sometimes pandoc creates two HTML blocks, e.g. one for the open tag and one for a close tag. If these aren't consolidated, only one will show up in output cell.
2019-03-29LaTeX writer: Avoid inadvertently creating ?` or !` ligatures.John MacFarlane1-0/+8
These are upside down ? and !, resp. Closes #5407.
2019-03-28HTML writer: Don't add data- prefix to RDFa attributes.John MacFarlane1-2/+19
Closes #5403.
2019-03-28Ipynb writer: fixed carry-over of nbformat from metadata.John MacFarlane1-1/+1
Previously we wrongly assumed it would be in a MetaString. It's an a MetaInlines.
2019-03-28Shared - improve metaToJSON with numbers.John MacFarlane1-5/+8
We now do a better job marshalling numbers from MetaString OR MetaInlines into JSON Number.
2019-03-28Markdown writer: better rendering of numbers.John MacFarlane1-1/+4
If the number is integral, we render it as an integral not a float. Closes #5398.
2019-03-28Markdown writer: proper rendering of empty map in YAML metadata.John MacFarlane1-1/+3
Should be `{}` not empty string. Partially addresses #5398.
2019-03-28Use strict instead of lazy sum.John MacFarlane1-2/+2
sum is lazy; replace with `foldl' (+) 0` to avoid stack overflow in Text.Pandoc.Pretty with very long strings. Closes #5401.
2019-03-27ipynb writer: preserve nbformat_minor if it's given.John MacFarlane1-2/+10
This helps with round-tripping.
2019-03-27Writers.Shared.metaValueToJSON: use Number Values for integers.John MacFarlane1-4/+9
Pandoc's MetaValue doesn't have a distinguished number type, so numbers are put in MetaStrings. If the MetaString consists entirely of digits, we convert it to a Number. We should probably consider adding a MetaNumber constructor to MetaValue, for better round-tripping with JSON etc. This change aids round-tripping in ipynb metadata fields, like `toc_depth`.
2019-03-26JATS writer: Ensure that plain strings go inside `<pub-id>` tag.John MacFarlane1-1/+9
See #5397.
2019-03-22LaTeX writer: Fix footnotes in table caption and cells.John MacFarlane1-13/+11
This fixes a bug wherein footnotes appeared in the wrong order, and with duplicate numbers, when in table captions and cells. We now use regular `\footnote` commands, even in the table caption and the minipages containing cells. Apparently longtable knows how to handle this. Closes #5367.
2019-03-21Docx writer: Use w:br without attributes for line breaks.John MacFarlane1-4/+1
We previously added the attribute `type="textWrapping"`, but this causes problems on Word Online. Closes #5377.
2019-03-18Improved fix to #5340 and added test.John MacFarlane1-2/+2
2019-03-18Improve autolink detection in LaTeX reader.John MacFarlane1-2/+2
This determines whether `\url` or `\href` is used. Closes #5340.
2019-03-17Properly escape attributes in Markdown writer.John MacFarlane1-4/+9
Closes #5369.
2019-03-11docx writer: avoid extra copy of abstractNum and num elements...John MacFarlane1-1/+9
...in numbering.xml. This caused pandoc-produced docx files to be uneditable using Word Online. The problem was that recent versions of reference.docx include samples of various kinds of text, including lists. The numering elements for these were getting copied over to the new docx, where they clashed with the autogenerated elements produced by pandoc. This didn't confuse Desktop Word, but it did confuse Word Online. Closes #5358.
2019-03-09Markdown writer: improve handling of raw blocks/inline.John MacFarlane1-34/+55
We now emit raw content using `raw_attribute` when no more direct method is available.
2019-03-09Ipynb reader/writer: better handling of cell metadata.John MacFarlane1-7/+6
We now handle even complex cell metadata in the Div's attributes. Simple metadata fields are rendered as a plain string, and complex ones as JSON.
2019-03-06ipynb writer: recurse into native divs for output cell data.John MacFarlane1-0/+1
See #5354.
2019-03-04LaTeX writer: Add classes for frontmatter support (#5353)Andrew Dunning1-2/+2
Remove frontmatter from scrreprt The KOMA-Script `scrreprt` class follows the pattern of `report`, and does not support `\frontmatter`. Use frontmatter for more classes
2019-03-04LaTeX writer/template: better handling of front/main/backmatter.John MacFarlane1-26/+29
In pandoc 2.7 we assumed that every class with chapters would accept `\frontmatter`, `\mainmatter`, and `\backmatter`. This is not so (e.g. report does not). So pandoc 2.7 breaks on report class by including an unsupported command. So we replace the book-class variable in the template with two variables, has-chapters and has-frontmatter, and set these intelligently in the writer. Closes #5348.
2019-03-01LaTeX(Beamer) writer: include contents under headers < slidelevel.John MacFarlane1-1/+8
Currently we keep the fancy title slide and add a new slide with the same title and whatever content was under the header. This changes behavior of slides, but is consistent with the new behavior of the revealjs and other HTML slide show writers. See #4317.
2019-03-01HTML writer: include content under title slides.John MacFarlane1-7/+9
This facilitates real 2D revealjs slideshows, with content under the top-level slide in each stack. It also enables notes on title slides. Closes #4317 and #5237.
2019-03-01Remove license boilerplate.John MacFarlane36-659/+0
The haddock module header contains essentially the same information, so the boilerplate is redundant and just one more thing to get out of sync.