aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
AgeCommit message (Collapse)AuthorFilesLines
2017-03-24Recognize .roff extension as ms format.John MacFarlane2-0/+10
2017-03-24PDF via groff ms: use -t and -KUTF-8 options to pdfroff.John MacFarlane1-1/+1
2017-03-24Ms writer: Use custom .HRULE macro for horizontal rule.John MacFarlane1-1/+2
2017-03-24Ms writer: warning for non-rendered raw content.John MacFarlane1-6/+10
2017-03-23Allow creation of pdf via groff ms and pdfroff.John MacFarlane3-25/+43
pandoc -t ms -o output.pdf input.txt
2017-03-23Ms writer: improved definition lists.John MacFarlane1-1/+3
Use standard .IP macro. Also properly escape ".
2017-03-23Ms writer: use .IP for more standard definition lists.John MacFarlane1-2/+1
2017-03-23Pipe tables: impose minimum cell size.John MacFarlane1-5/+7
This might help with #3526. At any rate, it fixes another bug (see test/command/3526.md).
2017-03-23Grid tables: remove unnecessary extra space in cells.John MacFarlane1-1/+1
2017-03-23Ms writer: fixed hard line breaks.John MacFarlane1-2/+1
2017-03-23Writers.Shared.gridTable: defensive coding around 'maximum'.John MacFarlane1-1/+2
2017-03-23MS writer: updated TODO comment.John MacFarlane1-1/+0
2017-03-23Ms writer: Super/subscript support.John MacFarlane1-2/+2
Also added some macro definitions to default template to support subscripts + better superscripts.
2017-03-23Ms writer: support for fake smallcaps.John MacFarlane1-28/+52
2017-03-23Ms. writer: don't render links in footnotes as footnotes.John MacFarlane1-5/+15
2017-03-23Ms writer: Improved footnotes.John MacFarlane1-2/+7
2017-03-23Ms writer: fixed strong/emph combination.John MacFarlane1-13/+54
Perhaps something similar is needed in the man writer.
2017-03-23Initial addition of groff ms writer.John MacFarlane3-0/+428
* New module: Text.Pandoc.Writers.Ms. * New template: default.ms. * The writer uses texmath's new eqn writer to convert math to eqn format, so a ms file produced with this writer should be processed with `groff -ms -e` if it contains math.
2017-03-22Markdown reader: allow latex macro definitions indented 1-3 spaces.John MacFarlane1-1/+8
Previously they only worked if nonindented.
2017-03-22Revert "Experimental change to charWidth in Pretty."John MacFarlane1-1/+0
This reverts commit c59e31722471ce3a67a41413de4e6a5ecfd00ba1.
2017-03-22Experimental change to charWidth in Pretty.John MacFarlane1-0/+1
Hunch that this might help with #3526.
2017-03-21Plain writer: use _(..) or ^(..) for super/subscript...John MacFarlane1-24/+31
...unless unicode super/subscripted characters are available.
2017-03-21Improve rendering of superscript in plain output.John MacFarlane1-13/+29
We now handle a few non digit characters (+, -, =, parentheses) for which there are superscripted unicode characters. Closes #3518.
2017-03-21RST writer: improve grid table output, fix bug with empty rows.John MacFarlane2-49/+40
Uses the new gridTable in Writers.Shared, which is here improved to better handle 0-width cells. Closes #3516.
2017-03-21Reuse Writers.Shared.gridTable in Haddock writer.John MacFarlane1-31/+3
2017-03-21Moved more gridTable calculations to Writers.Shared.John MacFarlane2-29/+33
2017-03-21Moved gridTable from Markdown writer to Writers.Shared.John MacFarlane3-43/+43
2017-03-20Add `space_in_atx_header` extension.John MacFarlane2-0/+4
This is enabled by default in pandoc and GitHub markdown but not the other flavors. This requirse a space between the opening #'s and the header text in ATX headers (as CommonMark does but many other implementations do not). This is desirable to avoid falsely capturing things ilke #hashtag or #5 Closes #3512.
2017-03-20Lua filters (#3514)Albert Krewinkel3-0/+289
* Add `--lua-filter` option. This works like `--filter` but takes pathnames of special lua filters and uses the lua interpreter baked into pandoc, so that no external interpreter is needed. Note that lua filters are all applied after regular filters, regardless of their position on the command line. * Add Text.Pandoc.Lua, exporting `runLuaFilter`. Add `pandoc.lua` to data files. * Add private module Text.Pandoc.Lua.PandocModule to supply the default lua module. * Add Tests.Lua to tests. * Add data/pandoc.lua, the lua module pandoc imports when processing its lua filters. * Document in MANUAL.txt.
2017-03-20docx writer: lang meta, see #1667 (#3515)Mauro Bieg1-1/+24
2017-03-19RST reader: recurse into bodies of unknown directives.John MacFarlane1-1/+2
In most cases it's better to preserve the content than to emit it. This isn't guaranteed to have good results; it will fail spectacularly for unknown raw or verbatim directives. See #3432.
2017-03-18HTML reader: Better sanity checks on raw HTML.John MacFarlane1-6/+17
This also affects the Markdown reader. Closes #3257.
2017-03-16Add default abbreviations file (data/abbreviations).John MacFarlane1-4/+4
This contains a list of strings that will be recognized by pandoc's Markdown parser as abbreviations. (A nonbreaking space will be inserted after the period, preventing a sentence space in formats like LaTeX.) Users can override the default by putting a file abbreviations in their user data directory (`~/.pandoc` on *nix).
2017-03-16Added --abbreviations=FILE option for custom abbreviations file.John MacFarlane1-8/+23
2017-03-16LaTeX/Beamer writer: allow hyperlinks to frames.John MacFarlane1-4/+13
Previously you could link to a header above or below slide level but not TO slide level. This commit changes that. Hypertargets are inserted inside frame titles; technically the reference is to just after the title, but in normal use (where slides are viewed full screen in a slide show), this does not matter. Closes #3220.
2017-03-15OpenDocument writer: use more widely available bullet characters.John MacFarlane1-1/+1
The old characters weren't available in some font sets. These seem to work well on Windows and Linux versions of LibreOffice. Closes #1400.
2017-03-13Removed unused symbol.John MacFarlane1-1/+0
2017-03-13Better handling of \part in LaTeX.John MacFarlane2-10/+17
Closes #1905. Removed stateChapters from ParserState. Now we parse chapters as level 0 headers, and parts as level -1 headers. After parsing, we check for the lowest header level, and if it's less than 1 we bump everything up so that 1 is the lowest header level. So `\part` will always produce a header; no command-line options are needed.
2017-03-13RST writer: convert to PandocMonad, report on unrendered raw items.John MacFarlane2-33/+41
2017-03-13Highlighting: highlighting now returns an Either rather than Maybe.John MacFarlane5-25/+44
This allows us to display error information returned by the skylighting library. Display a warning if the highlighting library throws an error.
2017-03-13Put TEI writer inside PandocMonad. Added warnings for omitted raw elements.John MacFarlane1-118/+135
Also added identifiers on `<div>` elements. These were commented out before, not sure why?
2017-03-12Org reader: interpret more meta value as inlinesAlbert Krewinkel1-4/+9
The values of the following meta variables are now interpreted using org-markup instead of treating them as pure strings: - *keywords*: comma-separated list of inlines - *subtitle*: inline values - *nocite*: inline values; using it multiple times accumulates the values.
2017-03-12Converted DokuWiki writer to use PandocMonad.John MacFarlane1-25/+34
2017-03-12MediaWiki writer: use PandocMonad.John MacFarlane1-23/+29
2017-03-12Issue warning for duplicate header identifiers.John MacFarlane6-8/+46
As noted in the previous commit, an autogenerated identifier may still coincide with an explicit identifier that is given for a header later in the document, or with an identifier on a div, span, link, or image. This commit adds a warning in this case, so users can supply an explicit identifier. * Added `DuplicateIdentifier` to LogMessage. * Modified HTML, Org, MediaWiki readers so their custom state type is an instance of HasLogMessages. This is necessary for `registerHeader` to issue warnings. See #1745.
2017-03-12Improved behavior of `auto_identifiers` when there are explicit ids.John MacFarlane1-1/+2
Previously only autogenerated ids were added to the list of header identifiers in state, so explicit ids weren't taken into account when generating unique identifiers. Duplicated identifiers could result. This simple fix ensures that explicitly given identifiers are also taken into account. Fixes #1745. Note some limitations, however. An autogenerated identifier may still coincide with an explicit identifier that is given for a header later in the document, or with an identifier on a div, span, link, or image. Fixing this would be much more difficult, because we need to run `registerHeader` before we have the complete parse tree (so we can't get a complete list of identifiers from the document by walking the tree). However, it might be worth issuing warnings for duplicate header identifiers; I think we can do that. It is not common for headers to have the same text, and the issue can always be worked around by adding explicit identifiers, if the user is aware of it.
2017-03-12Revert "Shared: export extractIds."John MacFarlane1-20/+0
This reverts commit 0ef1e51211cd35b1ddb54a5fe8bee4247f1e1801.
2017-03-12Shared: export extractIds.John MacFarlane1-0/+20
This will be used to help with #1745.
2017-03-11Markdown writer: fixed bugs in simple/multiline list output.John MacFarlane1-10/+9
* Previously we got overlong lists with `--wrap=none`. This is fixed. * Previously a multiline list could become a simple list (and would always become one with `--wrap=none`). Closes #3384.
2017-03-11Markdown reader: optimized nonindentSpaces.John MacFarlane1-6/+3
Makes the benchmark go from 40 to 36 ms.