aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers
AgeCommit message (Collapse)AuthorFilesLines
2018-03-05Remove extraneous, significant whitespace in JATS writer output (#4335)Nokome Bentley1-6/+6
This patch fixes some cases where the JATS writer was introducing semantically significant whitespace by indenting and wrapping tags. Note that the JATS spec has a content model for `<p>` tags of `(#PCDATA | ...`. Any tag where `#PCDATA` children are possible should not have any indentation. The same is true for `<th>`, `<td>`, `<term>`, `<label>`.
2018-03-05Muse writer: expand math before inline list normalizationAlexander Krotov1-3/+13
2018-03-02hlint Muse reader and writerAlexander Krotov1-1/+1
2018-03-02Muse writer: join strings during inline normalizationAlexander Krotov1-0/+2
2018-03-02Org writer: fix a typo s/prettyfy/prettify/Alexander Krotov1-2/+2
2018-02-28Muse writer: change verse markupAlexander Krotov1-9/+2
Use "> " instead of <verse> tag
2018-02-28Muse writer: remove empty strings during inline normalizationAlexander Krotov1-0/+2
2018-02-27Powerpoint writer: use `trim` from SharedJesse Rosenthal1-3/+2
Instead of writing my own.
2018-02-27Powerpoint writer: Use table stylesJesse Rosenthal1-3/+17
This will use the default table style in the reference-doc file. As a result they will be easier when using in a template, and match the color scheme.
2018-02-27Powerpoint writer: Remove empty slidesJesse Rosenthal1-2/+38
Make sure there are no empty slides in the pptx output. Because of the way that slides were split, these could be accidentally produced by comments after images. When animations are added, there will be a way to add an empty slide with either incremental lists or pauses. Test outputs checked with MS PowerPoint (Office 2013, Windows 10, VBox). Both files have expected output and are not corrupted.
2018-02-24Lua: register script name in global variableAlbert Krewinkel1-1/+2
The name of the Lua script which is executed is made available in the global Lua variable `PANDOC_SCRIPT_FILE`, both for Lua filters and custom writers. Closes: #4393
2018-02-23Muse writer: don't indent nested definition listsAlexander Krotov1-1/+3
2018-02-23Docx writer: trim trailing whitespace.Jesse Rosenthal1-14/+14
2018-02-23Docx writer: fix #3930laptop1\Andrew1-84/+100
Fixes an issuue regarding image sizing if the same image is included more than once. Previously, a record was kept, indexed by image source, which would include the XML for that image. For every image element in the document, this record was checked, and if the image was the same as previous examples, the same XML would be included twice. The information in this XML incudes the image description, title text, and size on the page, thus all images from the same source would always be sized the same, and have the same description. This commit fixes this by generating unique XML every time, but keeping the image ID and path if it is the same image.
2018-02-22Presentations: Use divs to set incremental/non-incrementalJesse Rosenthal2-53/+83
Currently, html and beamer presentations use a list-inside-blockquote convention for setting incremental and all-at-once presentation of lists (or reversing the command-line default). This allows the user to set this on a per-case basis with divs, named `incremental` and `nonincremental` respectively, as in: ::: incremental - snap - crackle - pop ::: Note that the former list-inside-blockquote convention still works so as not to break any existing presentations. Closes: #4381
2018-02-21LaTeX writer: Put hypertarget inside figure environment.John MacFarlane1-4/+4
Previously it surrounded the figure. This works around a problem with the endfloat package and makes pandoc's output compatible with it. Closes #4388.
2018-02-21LaTeX writer: Fix image height with percentage.John MacFarlane1-1/+5
This previously caused the image to be resized to a percentage of textwidth, rather than textheight. Closes #4389.
2018-02-20Powerpoint writer: Use ph name and idx for getting layout shapesJesse Rosenthal1-37/+26
Internal change: when we take shapes from the layout for title, content, etc, we should use the attributes of the "ph" (placeholder) tag -- idx and name. This is what powerpoint uses internally, and therefore seems more dependable across reference-docs than using the shape names, as we had previously done. There should be no output changes as a result of this commit.
2018-02-19Powerpoint writer: Add notesMaster to presentation.xml if necessaryJesse Rosenthal1-25/+54
In previous version, we only modified the notesMaster entry in the presentation.xml file, and removed it if necessary. But if using a template, it might not be available. So we always delete it, and then add it back in if necessary. We also have to make sure that we add it appropriately the .rels file associated with presentation.xml.
2018-02-18Powerpoint writer: Another attempt at avoiding compiler warnings.Jesse Rosenthal1-4/+2
2018-02-18Powerpoint writer: fix compiler complaints.Jesse Rosenthal1-7/+11
2018-02-18Powerpoint writer: separate SpeakerNotes paragraphs with empy parJesse Rosenthal1-4/+8
This will add a space between notes paragraphs, which seems more like what most users would do by hand (press "enter" twice).
2018-02-18Powerpoint writer: Ignore links and (end)notes in speaker notes.Jesse Rosenthal2-10/+30
MS PowerPoint does not offer a way to insert links into speaker notes text, so we match that behavior, and make our lives easier. As for (end)notes, there is no clear solution to the question of wat that would *mean*. The default behavior would be to add it to the endnote slide, but that would put speaker note content into the public presentation. The best solution would be to put the content at the bottom of the notes page, but that would take some doing, and can be added to the speaker notes feature later.
2018-02-18Powerpoint writer: Output speaker notes.Jesse Rosenthal1-25/+287
There are a number of interlocking parts here. The main thing to note is that, to match the MSPowerPoint-generated pptx files, we only include the notesMaster and notesSlide files if there are notes. This means we have to be careful with the rIds, and build a number of files conditionally.
2018-02-18Powerpoint writer: modify speaker notes in presentation.xmlJesse Rosenthal1-1/+12
We remove the `notesMasterIdLst` entry in `presentation.xml` if there no speaker notes in the presentation.
2018-02-18Powerpoint writer: Read speaker note templates conditionallyJesse Rosenthal1-18/+38
If there are speaker notes in the presentation, we read in the notesMasters templates from the reference pptx file.
2018-02-18Powerpoint writer: Read notes into powerpoint Presentatation type.Jesse Rosenthal1-3/+20
We record notes in a map in state while processing.
2018-02-18Powerpoint writer: Change references to Notes to SpeakerNotesJesse Rosenthal1-7/+7
This is to avoid confusion with {foot,end}notes.
2018-02-18EMF Image size support (#4375)Andrew Pritchard2-0/+2
2018-02-16Markdown writer: properly escape @ to avoid capture as citation.John MacFarlane1-1/+7
Closes #4366.
2018-02-16TEI writer: more attribute fixes.John MacFarlane1-18/+15
- Ensure that id prefix is always used. - Don't emit `role` attribute; that was a leftover from the Docbook writer.
2018-02-16TEI writer: Use 'xml:id', not 'id' attribute.John MacFarlane1-3/+3
Closes #4371.
2018-02-15Muse writer: use unicode quotes for quoted textAlexander Krotov1-2/+2
2018-02-13AsciiDoc writer: do not output implicit heading IDsAlexander Krotov1-1/+8
Convert to asciidoc-auto_identifiers for old behaviour. Fixes #4363
2018-02-03Muse writer: write image width specified in percent in Text::Amuse modeAlexander Krotov1-2/+7
2018-02-01TEI writer: Use height instead of depth for images.John MacFarlane1-1/+1
Closes #4331.
2018-01-30Muse writer: don't wrap displayMath into <verse>Alexander Krotov1-5/+2
<verse> is a block tag and displayMath is an inline element. Writing <verse> around displayMath could result in nested <verse> tags.
2018-01-29Muse writer: escape nonbreaking space ("~~")Alexander Krotov1-1/+2
2018-01-27Docx writer: make more deterministic to facilitate testingJesse Rosenthal1-10/+16
This will allow us to compare files directly in a golden test. Times are still based on IO, but we will be able to safely skip those. Changes: - `getUniqueId` now calls to the state to get an incremented digit, instead of calling to P.uniqueHash. - we always start the PRNG in mkNumbering/mkAbstractNum with the same seed (1848), so our randoms should be the same each time.
2018-01-27Docx writer: Fix ids in comment writingJesse Rosenthal1-9/+17
Comments from `--track-changes=all` were producing corrupt docx, because the writer was trying to get id from the `(ID,_,_)` field of the attributes, and ignoring the "id" entry in the key-value pairs. We now check both. There is a larger conversation to be had about the right way to treat "id" and "class" entries in kvs, but this fix will correctly interpret the output of the docx reader work.
2018-01-25ConTeXt writer: new section syntax and --section-divs (#4295)Henri Menke1-17/+37
Fixes #2609. This PR introduces the new-style section headings: `\section[my-header]{My Header}` -> `\section[title={My Header},reference={my-header}]`. On top of this, the ConTeXt writer now supports the `--section-divs` option to write sections in the fenced style, with `\startsection` and `\stopsection`.
2018-01-25Dock writer: Fix deletion track changesJesse Rosenthal1-6/+6
This had been mistakenly written as a second insertion function. Closes: #4303
2018-01-23ConTeXt writer: xtables: correct wrong usage of captionHenri Menke1-1/+1
2018-01-22Muse writer: join code with different attributes during normalizationAlexander Krotov1-2/+2
2018-01-22Muse writer: indent lists inside DivAlexander Krotov1-1/+1
2018-01-19Conditional import to avoid warning.John MacFarlane1-2/+5
2018-01-19hlint code improvements.John MacFarlane16-83/+75
2018-01-19remove `blockToRST'` moving its logic into `fixBlocks`danse1-32/+13
2018-01-19in RST writer insert comment between lists and quotes, closes #4248danse1-1/+12
2018-01-19Muse writer: support definitions with multiple descriptionsAlexander Krotov1-4/+7
Muse reader does not support this syntax yet, but Emacs Muse parses it correctly.