aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2017-12-21Lua modules: make a Haskell module for each Lua moduleAlbert Krewinkel3-74/+112
Definitions for the `pandoc.mediabag` modules are moved to a separate Haskell module. Change: minor
2017-12-21Lua modules: move to dedicated submoduleAlbert Krewinkel4-34/+37
The Haskell module defining the Lua `pandoc` module is moved to Text.Pandoc.Lua.Module.Pandoc. Change: minor
2017-12-21LaTeX reader: Fixed subtle bug in tokenizer.John MacFarlane1-2/+3
Material following `^^` was dropped if it wasn't a character escape. This only affected invalid LaTeX, so we didn't see it in the wild, but it appeared in a QuickCheck test failure https://travis-ci.org/jgm/pandoc/jobs/319812224
2017-12-21PowerPoint writer: Implement notesJesse Rosenthal1-2/+30
This currently prints all notes on a final slide. Note that at the moment, there is a danger of text overflowing the note slide, since there is no logic for adding further slides. A future commit will shrink the font size on these notes, but that won't take care of the problem altogether. (We might have to implement some sort of clumsy page-breaking logic here based on font size and text-box dimensions, though that seems like a can of worms.)
2017-12-21PowerPoint writer: Register notes to state.Jesse Rosenthal1-0/+8
When we encounter a note, we write it to the state directory of notes, and input a superscript.
2017-12-21Add Note state to PowerPoint writer.Jesse Rosenthal1-0/+2
First step toward implementing notes in pptx writer.
2017-12-21Implement basic definition list functionality to PowerPoint writer.Jesse Rosenthal1-0/+9
These are currently implemented in terms of a Bold para for the terms, and then blockquotes for the definitions. THis can be refined a bit in the future.
2017-12-21Don't look for default template file for Powerpoint.Jesse Rosenthal1-0/+1
When using readerStandalone, this keeps us from looking for a non-existent template pptx file. Closes #4181
2017-12-21Add pptx to isTextFormat listJesse Rosenthal1-1/+1
This is used to check standalone and not writing to the terminal.
2017-12-21Org writer: do not wrap "-" to avoid accidental bullet listsAlexander Krotov1-7/+12
Also add TODO for ordered lists.
2017-12-21Muse reader: parse anchors immediately after headings as IDsAlexander Krotov2-6/+10
2017-12-20Lua modules: turn pipe, read into full Haskell functionsAlbert Krewinkel2-31/+77
The `pipe` and `read` utility functions are converted from hybrid lua/haskell functions into full Haskell functions. This avoids the need for intermediate `_pipe`/`_read` helper functions, which have dropped.
2017-12-20Org reader: fix asterisks-related parsing errorAlbert Krewinkel1-1/+1
A parsing error was fixed which caused the org reader to fail when parsing a paragraph starting with two or more asterisks. Fixes: #4180
2017-12-20Muse reader: require that note references does not start with 0Alexander Krotov1-1/+3
2017-12-20Add Basic JATS reader based on DocBook readerHamish Mackenzie2-1/+391
2017-12-19Muse writer: don't wrap note references to the next lineAlexander Krotov1-1/+7
Closes #4172.
2017-12-19Fix for #4171 fix: don't wrap note references after SoftBreakAlexander Krotov1-0/+2
2017-12-19Muse reader: parse empty comments correctlyAlexander Krotov1-2/+1
2017-12-18Org writer: don't allow fn refs to wrap to beginning of line.John MacFarlane1-1/+5
Otherwise they can be interpreted as footnote definitions. Closes #4171.
2017-12-18Lua filters: perform minor code clean-upAlbert Krewinkel2-11/+8
Change: minor
2017-12-17OPML reader: enable raw HTML and other extensions by default for notes.John MacFarlane2-9/+15
This fixes a regression in 2.0. Note that extensions can now be individually disabled, e.g. `-f opml-smart-raw_html`. Closes #4164.
2017-12-15LaTeX writer: use \renewcommand for \textlatin with babel.John MacFarlane1-4/+7
This avoids a clash with a deprecated \textlatin command defined in Babel. Closes #4161.
2017-12-15LaTeX reader: export tokenize, untokenize.John MacFarlane1-1/+3
Mainly so they can be tested.
2017-12-15Fixed regression in LateX tokenization.John MacFarlane1-2/+2
This mainly affects the Markdown reader when parsing raw LaTeX with escaped spaces. Closes #4159.
2017-12-14RST reader: more accurate parsing of references.John MacFarlane1-36/+24
Previously we erroneously included the enclosing backticks in a reference ID (closes #4156). This change also disables interpretation of syntax inside references, as in docutils. So, there is no emphasis in `my *link*`_
2017-12-14Merge pull request #4148 from stencila/jats-figuresJohn MacFarlane1-14/+37
fig, table-wrap & caption Divs for JATS writer
2017-12-14Markdown reader: be pickier about table captions.John MacFarlane1-1/+1
A caption starts with a `:` which can't be followed by punctuation. Otherwise we can falsely interpret the start of a fenced div, or even a table header line like `:--:|:--:`, as a caption.
2017-12-14Deduplicate JATS writer image mime type codeHamish Mackenzie1-15/+14
2017-12-13Removed whitespace at ends of line.John MacFarlane4-42/+42
2017-12-13Merge pull request #4153 from tarleb/unify-lua-initJohn MacFarlane4-135/+164
Unify lua initalization
2017-12-13Docx writer: Continue lists after interruption.Jesse Rosenthal1-15/+22
Docx expects that lists will continue where they left off after an interruption and introduces a new id if a list is starting again. So we keep track of the state of lists and use them to define a "start" attribute, if necessary. Closes #4025
2017-12-13Custom writer: use init file to setup Lua interpreterAlbert Krewinkel4-55/+106
The same init file (`data/init`) that is used to setup the Lua interpreter for Lua filters is also used to setup the interpreter of custom writers.lua.
2017-12-13Lua filters: drop unused code, language extensionsAlbert Krewinkel1-11/+1
2017-12-13Custom writer: define instances for newtype wrapperAlbert Krewinkel1-69/+57
The custom writer used its own `ToLuaStack` instance definitions, which made it difficult to share code with Lua filters, as this could result in conflicting instances. A `Stringify` wrapper is introduced to avoid this problem.
2017-12-13Markdown reader: always use four space rule for example lists.John MacFarlane1-9/+16
It would be awkward to indent example list contents to the first non-space character after the label, since example list labels are often long. Thanks to Bernhard Fisseni for the suggestion.
2017-12-12Markdown: Improved computation of relative cell widths in pipe tables.John MacFarlane1-1/+1
2017-12-12Pipe tables: use full text width for tables with wrapping cells.John MacFarlane1-2/+2
Previously we computed the column sizes based on the ratio between the header lines and the text width (as set by `--columns`). This meant that tables with very short header lines would be very narrow. With this change, pipe tables with wrapping cells will always take up the whole text width. The relative column widths will still be determined by the ratio of header lines, but they will be normalized to add up to 1.0.
2017-12-13fig, table-wrap & caption Divs for JATS writerHamish Mackenzie1-6/+30
Support writing <fig> and <table-wrap> elements with <title> and <caption> inside them by using Divs with class set to on of fig, table-wrap or cation. The title is included as a Heading so the constraint on where Heading can occur is also relaxed. Also leaves out empty alt attributes on links.
2017-12-11`--pdf-engine-opt`: fix bug where option order was reversed.John MacFarlane1-1/+1
Closes #4137.
2017-12-11Fix comment that confused compiler.Jesse Rosenthal1-2/+0
2017-12-11Remove redundant imports from Docx writer.Jesse Rosenthal1-3/+0
These were a result of moving functions to the OOXML module.
2017-12-11Integrate Powerpoint writer into pandoc.Jesse Rosenthal3-0/+5
2017-12-11Add Powerpoint writer.Jesse Rosenthal1-0/+1665
This imports the essential Powerpoint writer. It works following the standard Pandoc conventions for making other sorts of slides. At the moment, there are still these TODOs: 1. Syntax highlighting is not yet implemented. (This is difficult because there are no character classes in Powerpoint.) 2. Footnotes and Definition lists are not yet implemented. (Notes will usually take the form of a final slide. 3. Image placement and auto-resizing has a few glitches. 4. Reference powerpoint files don't work dependably from the command line. This will be implemented, but at the moment users are advised to change themes from within Powerpoint.
2017-12-11Add necessary powerpoint functions to Class.Jesse Rosenthal1-0/+64
2017-12-11Create shared OOXML writer file.Jesse Rosenthal2-33/+110
This is for functions used by both Powerpoint and Docx writers.
2017-12-10Changes for skylighting-0.5.John MacFarlane3-6/+7
This fixes a bug in 2.0.4, whereby pandoc could not read the theme files generated with `--print-highlight-style`. It also fixes some CSS issues involving line numbers. Highlighted code blocks are now enclosed in a div with class sourceCode. Highlighting CSS no longer sets a generic color for pre and code; we only set these for class `sourceCode`. This will close #4133 and #4128.
2017-12-10Lua filters: fix package loading for Lua 5.1Albert Krewinkel1-1/+4
The list of package searchers is named `package.loaders` in Lua 5.1 and LuaJIT, and `package.searchers` in Lua 5.2 and later.
2017-12-09Man writer: omit internal links.John MacFarlane1-0/+2
That is, just print the link text without the url. Closes #4136.
2017-12-08LaTeX reader: fix \ before newline.John MacFarlane1-3/+14
This should be a nonbreaking space, as long as it's not followed by a blank line. This has been fixed at the tokenizer level. Closes #4134.
2017-12-06Markdown reader: accept processing instructions as raw HTML.John MacFarlane1-2/+3
Closes #4125.