aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2018-02-24Lua: register script name in global variableAlbert Krewinkel5-4/+21
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-24Muse reader: allow single colon in definition list termAlexander Krotov2-1/+4
2018-02-23Docx reader: code cleanup.Jesse Rosenthal1-10/+9
Make the code in `runStyleToTransform` a bit more consistent.
2018-02-23Docx reader: simplify custom-style reading code.Jesse Rosenthal1-41/+23
2018-02-23Docx reader: Don't look up dependant run styles if +styles is enabled.Jesse Rosenthal3-39/+42
It makes more sense not to interpret -- otherwise using the original document as the reference-doc would produce two of everything: the interpreted version and the uninterpreted style version.
2018-02-23Muse writer: don't indent nested definition listsAlexander Krotov2-3/+5
2018-02-23Docx writer: trim trailing whitespace.Jesse Rosenthal1-14/+14
2018-02-23Docx test: adjust test for fix of buglaptop1\Andrew3-5/+8
This commit adjusts the test cases for the Docx writer after the fix of #3930. - Adjusted test cases with inline images. The inline images now have the correct sizing, title and description. - Modified the test case to include an image multiple times with different sizing each time. - Tested on Windows 8.1 with Word 2007 (12.0.6705.5000) The files are not corrupted and display exactly what is expected.
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-23Muse reader: improve verse parsingAlexander Krotov2-1/+13
Now verse marked up with ">" (in contrast to <verse> tag) can be placed inside lists.
2018-02-23Export improved sepBy1 from Text.Pandoc.ParsingAlexander Krotov1-5/+11
2018-02-22Require aeson-pretty 0.8.5. Closes #4394.John MacFarlane1-1/+1
`confTrailingNewline` is introduced in this version.
2018-02-22MANUAL.txt: Document incremental and nonincremental divs.Jesse Rosenthal1-4/+28
Blockquoted lists are still described, but fenced divs are presented in preference.
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-22Docx reader: Move pandoc inline styling inside custom-style spanJesse Rosenthal3-10/+10
Previously Emph, Strong, etc were outside the custom-style span. This moves them inside in order to make it easier to write filters that act on the formatting in these contents. Tests and MANUAL example are changed to match.
2018-02-22Docx reader: Avoid repeated spans in custom styles.Jesse Rosenthal3-15/+24
The previous commit had a bug where custom-style spans would be read with every recurrsion. This fixes that, and changes the example given in the manual.
2018-02-22MANUAL: add documentation on custom styles.Jesse Rosenthal1-2/+64
Discuss workflow of using input document as reference.docx. We also split the "Custom styles" section into two parts: input and output.
2018-02-22Docx reader tests: test custom style extension.Jesse Rosenthal3-0/+22
2018-02-22Docx reader: read custom stylesJesse Rosenthal1-60/+96
This will read all paragraph and character classes as divs and spans, respectively. Dependent styles will still be resolved, but will be wrapped with appropriate style tags. It is controlled by the `+styles` extension (`-f docx+styles`). This can be used in conjunction with the `custom-style` feature in the docx writer for a pandoc-docx editing workflow. Users can convert from an input docx, reading the custom-styles, and then use that same input docx file as a reference-doc for producing an output docx file. Styles will be maintained across the conversion, even if pandoc doesn't understand them. Without the extension: $ pandoc test/docx/custom-style-reference.docx -f docx -t markdown This is some text. This is text with an *emphasized* text style. And this is text with a **strengthened** text style. > Here is a styled paragraph that inherits from Block Text. With the extension: $ pandoc test/docx/custom-style-reference.docx -f docx+styles -t markdown ::: {custom-style="FirstParagraph"} This is some text. ::: ::: {custom-style="BodyText"} This is text with an *[[emphasized]{custom-style="Emphatic"}]{custom-style="Emphatic"}* text style. And this is text with a **[[strengthened]{custom-style="Strengthened"}]{custom-style="Strengthened"}** text style. ::: ::: {custom-style="MyBlockStyle"} Closes: #1843
2018-02-22Extensions: Add Ext_stylesJesse Rosenthal1-0/+1
This will be used in the docx reader (defaulting to off) to read pargraph and character styles not understood by pandoc (as divs and spans, respectively).
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-21Org reader: allow changing emphasis syntaxAlbert Krewinkel4-12/+58
The characters allowed before and after emphasis can be configured via `#+pandoc-emphasis-pre` and `#+pandoc-emphasis-post`, respectively. This allows to change which strings are recognized as emphasized text on a per-document or even per-paragraph basis. The allowed characters must be given as (Haskell) string. #+pandoc-emphasis-pre: "-\t ('\"{" #+pandoc-emphasis-post: "-\t\n .,:!?;'\")}[" If the argument cannot be read as a string, the default value is restored. Closes: #4378
2018-02-21Muse reader: replace setState with updateState where possibleAlexander Krotov1-18/+9
2018-02-20MANUAL.txt: fix typo.Jesse Rosenthal1-1/+1
2018-02-20MANUAL.txt: A bit of clarification on speaker notes.Jesse Rosenthal1-1/+4
Make it clear that pressing `s` is just for reveal.js.
2018-02-20MANUAL.txt: Add instructions for using pptx reference-docsJesse Rosenthal1-0/+24
2018-02-20Muse reader: fix compiler warningJesse Rosenthal1-1/+1
lambda variable `st` shadowed an existing variable.
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-20Muse reader: use updateState instead of setState to restore museInLinkAlexander Krotov1-1/+1
2018-02-19Powerpoint writer tests: Test everything with template as wellJesse Rosenthal11-48/+72
Modify the PowerPoint tests to run all the tests with template (--reference-doc) as well. Because there are so many interlocking pieces, bugs can pop up in weird places when using templates, since it changes how the writer builds its output file. For example, I recently discovered a bug in which speaker notes worked fine and templating worked fine elsewhere, but templating with speaker notes produced a file that would crash MS PowerPoint. That particular bug was fixed, but this will forces us to check for that with each new change.
2018-02-19Powerpoint writer: Update.golden tests.Jesse Rosenthal9-0/+0
Checked with Office 2013. No corruption and output as expected.
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-19Move manyUntil to Text.Pandoc.Parsing and use it in Txt2Tags readerAlexander Krotov4-17/+20
2018-02-18Powerpoint writer: Another attempt at avoiding compiler warnings.Jesse Rosenthal2-5/+4
2018-02-18Powerpoint writer: fix compiler complaints.Jesse Rosenthal1-7/+11
2018-02-18MANUAL: add reference to pptx support for speaker notes.Jesse Rosenthal1-2/+2
2018-02-18Powerpoint writer: Add tests for speaker notes.Jesse Rosenthal3-0/+22
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: update golden test filesJesse Rosenthal8-0/+0
Since the template changed, some small elements of these test files changed as well. All of these were checked with Powerpoint 2013 on Windows 10 (VirtualBox). All had expected outcomes and no corruption.
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: Move notes slides into data tree.Jesse Rosenthal32-23/+51
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 Pritchard3-1/+39
2018-02-17LaTeX reader: Fixed comments inside citations. Closes #4374.John MacFarlane2-3/+10
2018-02-16Markdown writer: properly escape @ to avoid capture as citation.John MacFarlane1-1/+7
Closes #4366.