aboutsummaryrefslogtreecommitdiff
path: root/src/Text
AgeCommit message (Collapse)AuthorFilesLines
2017-12-26LaTeX reader: support `\foreignlanguage` from babel.John MacFarlane1-0/+30
2017-12-26HTML writer: Use br elements in line blocks...John MacFarlane1-2/+1
instead of relying on CSS. Closes #4162. HTML-based templates have had the custom CSS for div.line-block removed. Those maintaining custom templates will want to remove this too. We still enclose line blocks in a div with class line-block.
2017-12-24RST reader: allow empty list items (as docutils does).John MacFarlane1-2/+2
Closes #4193.
2017-12-23JATS reader: handle author-notes.John MacFarlane1-5/+6
2017-12-23JATS reader: code refactoring.John MacFarlane1-63/+48
2017-12-23Plain writer: don't linkify table of contents.John MacFarlane1-10/+12
2017-12-23Fixed bug: when target is PDF, writer extensions were being ignored.John MacFarlane1-3/+3
E.g. `-t latex-smart -o file.pdf` would produce a different latex intermediate than `-t latex-smart -o file.tex`. Thanks to Bernhard Fisseni for pointing this out. This is a regression since pandoc 2.0 (introduced in commit c7e3c1ec).
2017-12-23Lua modules: add function pandoc.utils.hierarchicalizeAlbert Krewinkel2-8/+39
Convert list of Pandoc blocks into (hierarchical) list of Elements.
2017-12-23JATS reader: include institute metadata.John MacFarlane1-2/+11
2017-12-23JATS reader: process author metadata.John MacFarlane1-5/+27
2017-12-23Lua modules: add function pandoc.utils.normalize_dateAlbert Krewinkel2-2/+14
The function parses a date and converts it (if possible) to "YYYY-MM-DD" format.
2017-12-23Lua modules: add function pandoc.utils.to_roman_numeralAlbert Krewinkel1-1/+9
The function allows conversion of numbers below 4000 into roman numerals.
2017-12-23JATS reader: better citation handling.John MacFarlane1-3/+79
We now convert a ref-list element into a list of citations in metadata, suitable for use with pandoc-citeproc. We also convert references to pandoc citation elements. Thus a JATS article with embedded bibliographic information can be processed with pandoc and pandoc-citeproc to produce a formatted bibliography.
2017-12-23HTML Reader: be more forgiving about figcaptionmb211-4/+7
fixes #4183
2017-12-22Merge pull request #4189 from mb21/export-blocksToInlinesJohn MacFarlane3-3/+4
API change: export blocksToInlines' from Text.Pandoc.Shared
2017-12-22`latex_macros` extension changes.John MacFarlane2-5/+11
Don't pass through macro definitions themselves when `latex_macros` is set. The macros have already been applied. If `latex_macros` is enabled, then `rawLaTeXBlock` in Text.Pandoc.Readers.LaTeX will succeed in parsing a macro definition, and will update pandoc's internal macro map accordingly, but the empty string will be returned. Together with earlier changes, this closes #4179.
2017-12-22Markdown reader: improved raw tex parsing.John MacFarlane1-6/+9
+ Preserve original whitespace between blocks. + Recognize `\placeformula` as context.
2017-12-22LaTeX reader: use applyMacros in rawLaTeXBlock, rawLaTeXInline.John MacFarlane1-2/+5
2017-12-22LaTeX reader: Refactored inlineCommand.John MacFarlane1-24/+11
2017-12-22API change: export blocksToInlines' from Text.Pandoc.Sharedmb213-3/+4
2017-12-22Lua modules: add stringify function to pandoc.utilsAlbert Krewinkel1-6/+35
The new function `pandoc.utils.stringify` converts any AST element to a string with formatting removed.
2017-12-22Lua.Util: avoid altering the stack if peeking failsAlbert Krewinkel1-4/+12
The stack now remains unaltered if `getRawInt` or `getTable` fail. This is important when those functions are used in an operation that is part of an Alternative. Change: minor
2017-12-22RST writer: fix anchors for headers.John MacFarlane1-1/+1
We were missing an `_`. See #4188.
2017-12-22PowerPoint writer: Treat lists inside BlockQuotes as listsJesse Rosenthal1-1/+13
We don't yet produce incremental lists in PowerPoint, but we should at least treat lists inside BlockQuotes as lists, for compatibility with other slide formats.
2017-12-21Merge pull request #4177 from stencila/jats-xml-readerJohn MacFarlane3-19/+437
Add Basic JATS reader based on DocBook reader
2017-12-21Merge branch 'master' of github.com:jgm/pandocJohn MacFarlane1-2/+8
2017-12-21Docx writer: ensure that `distArchive` is the one that comes with pandoc.John MacFarlane1-2/+6
Previously a `reference.docx` in `~/.pandoc` (or the user data dir) would be used instead, and this could cause problems because a user-modified docx sometimes lacks vital sections that we count on the `distArchive` to supply. Closes #4182.
2017-12-21JATS writer: Make <p> optional in <td> and <th> (#4178)Hamish Mackenzie1-0/+3
If the contents are single `Plain` block then do not wrap them with a <p> element.
2017-12-21jats writer: Self closing tags for empty xref (#4187)Hamish Mackenzie1-2/+5
2017-12-22Improve support for code language in JATSHamish Mackenzie2-20/+48
2017-12-21Change notes to a smaller size.Jesse Rosenthal1-5/+22
This will allow more to fit on a single slide, and will probably look better.
2017-12-21PowerPoint writer: Add ability to force size.Jesse Rosenthal1-2/+6
This replaces the more specific blockQuote runProp, which only affected the size of blockquotes. We can use this for notes, etc.
2017-12-21Lua modules: added pandoc.utils moduleAlbert Krewinkel3-8/+52
A new module `pandoc.utils` has been created. It holds utility functions like `sha1`, which was moved from the main `pandoc` module.
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