aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
AgeCommit message (Collapse)AuthorFilesLines
2016-04-29Add docbook5 writer supportIvo Clarysse2-3/+9
2016-04-27Revert "LaTeX writer: Add `\strut` to fix multiline tables"John MacFarlane1-2/+1
This reverts commit 4c684561ee0665b014e887ae559b7020e4e9f2d3. See https://groups.google.com/d/msg/pandoc-discuss/u6J-_aCProU/UufN3IYRAgAJ This should fix uneven spacing issues in multiline tables.
2016-04-26Merge pull request #2735 from mb21/patch-1John MacFarlane1-1/+1
LaTeX Writer: fix polyglossia to babel env mapping
2016-04-26Merge pull request #2829 from adunning/patch-1John MacFarlane1-7/+17
LaTeX writer: Add missing languages.
2016-04-26Merge pull request #2876 from shosti/org-code-indentJohn MacFarlane1-4/+20
Ignore leading space in org code blocks
2016-04-26LaTeX writer: ignore --incremental unless -t beamer.John MacFarlane1-1/+2
Closes #2843.
2016-04-26Ignore leading space in org code blocksEmanuel Evans1-4/+20
Fixes #2862 Also fix up tab handling for leading whitespace in code blocks.
2016-04-15Docx Reader: parse `moveTo` and `moveFrom`Jesse Rosenthal1-2/+2
`moveTo` and `moveFrom` are track-changes tags that are used when a block of text is moved in the document. We now recognize these tags and treat them the same as `insert` and `delete`, respectively. So, `--track-changes=accept` will show the moved version, while `--track-changes=reject` will show the original version.
2016-04-10Markdown reader: Fix pandoc title blocks with lines ending in 2 spaces.John MacFarlane1-19/+23
Closes #2799. Also added -s to markdown-reader-more test.
2016-04-10Markdown + HTML readers: be more forgiving about unescaped &.John MacFarlane1-10/+15
We are now more forgiving about parsing invalid HTML with unescaped `&` as raw HTML. (Previously any unescaped `&` would cause pandoc not to recognize the string as raw HTML.) Closes #2410.
2016-04-01LaTeX writer: Add missing languages.Andrew Dunning1-7/+17
Updates the list from the hyphenation files at <http://mirror.ctan.org/language/hyph-utf8/tex/generic/hyph-utf8/loadhyph/>.
2016-03-30Recognize `la-x-classic` as Classical Latin.Andrew Dunning1-0/+2
This allows one to access the hyphenation patterns at <http://mirrors.ctan.org/language/hyph-utf8/tex/generic/hyph-utf8/patterns/tex/hyph-la-x-classic.tex>, using its private language tag.
2016-03-26EPUB writer: set 'navpage' variable on nav page.John MacFarlane1-1/+2
This allows templates to treat it differently.
2016-03-25Removed two superfluous lines.John MacFarlane1-2/+0
2016-03-24LaTeX writer: better positioning for hypertarget in figures.John MacFarlane1-16/+23
Closes #2813.
2016-03-24LaTeX writer: Fixed position of label in figures.John MacFarlane1-3/+3
Partially addresses #2813. This isn't perfect, because now the hypertarget is in the wrong place -- when you link to the figure, the screen is positioned with the caption at the top, and most of the figure off screen. So this needs a bit more tweaking.
2016-03-22Updated copyright dates to include 2016.John MacFarlane17-34/+34
2016-03-22Fixed bug in Markdown raw HTML parsing.John MacFarlane1-1/+1
This was a regression, with the rewrite of `htmlInBalanced` (from `Text.Pandoc.Readers.HTML`) in 1.17. It caused newlines to be omitted in raw HTML blocks. Closes #2804.
2016-03-20LaTeX Writer: fix polyglossia to babel env mappingMauro Bieg1-1/+1
allow for optional argument in square brackets, closes #2728
2016-03-19Merge pull request #2637 from mb21/latex-figure-labelJohn MacFarlane1-19/+24
LaTeX writer: figure label
2016-03-18ConTeXt writer: fix whitespace at line beginning in line blocks.John MacFarlane1-1/+11
Add a `\strut` after `\crlf` before space. Closes #2744, #2745. Thanks to @c-foster. This uses the fix suggested by @c-foster. Mid-line spaces are still not supported, because of limitations of the Markdown parser.
2016-03-18LaTeX writer: Avoid double toprule in headerless table with caption.John MacFarlane1-7/+10
Closes #2742.
2016-03-18Docx reader: Handle alternate contentJesse Rosenthal1-14/+37
Some word functions -- especially graphics -- give various choices for content so there can be backwards compatibility. This follows the largely undocumented feature by working through the choices until we find one that works. Note that we had to split out the processing of child elems of runs into a separate function so we can recurse properly. Any processing of an element *within* a run (other than a plain run) should go into `childElemToRun`.
2016-03-16Docx reader: Don't make numbered heads into lists.Jesse Rosenthal1-6/+8
Word uses list numbering styles to number its headings. We only call something a numbered list if it does not also heave a heading style.
2016-03-15Introduce file-scope parsing (parse-before-combine)Jesse Rosenthal1-0/+2
Traditionally pandoc operates on multiple files by first concetenating them (around extra line breaks) and then processing the joined file. So it only parses a multi-file document at the document scope. This has the benefit that footnotes and links can be in different files, but it also introduces a couple of difficulties: - it is difficult to join files with footnotes without some sort of preprocessing, which makes it difficult to write academic documents in small pieces. - it makes it impossible to process multiple binary input files, which can't be catted. - it makes it impossible to process files from different input formats. This commit introduces alternative method. Instead of catting the files first, it parses the files first, and then combines the parsed output. This makes it impossible to have links across multiple files, and auto-identified headers won't work correctly if headers in multiple files have the same name. On the other hand, footnotes across multiple files will work correctly and will allow more freedom for input formats. Since ByteStringReaders can currently only read one binary file, and will ignore subsequent files, we also changes the behavior to automatically parse before combining if using the ByteStringReader. If we use one file, it will work as normal. If there is more than one file it will combine them after parsing (assuming that the format is the same). Note that this is intended to be an optional method, defaulting to off. Turn it on with `--file-scope`.
2016-03-12Add readDocxWithWarningsJesse Rosenthal1-6/+15
The regular readDocx just becomes a special case.
2016-03-12Docx Reader: Add state to the parser, for warningsJesse Rosenthal1-6/+19
In order to be able to collect warnings during parsing, we add a state monad transformer to the D monad. At the moment, this only includes a list of warning strings (nothing currently triggers them, however). We use StateT instead of WriterT to correspond more closely with the warnings behavior in T.P.Parsing.
2016-03-10Fixed behavior of base tag.John MacFarlane1-17/+11
+ If the base path does not end with slash, the last component will be replaced. E.g. base = `http://example.com/foo` combines with `bar.html` to give `http://example.com/bar.html`. + If the href begins with a slash, the whole path of the base is replaced. E.g. base = `http://example.com/foo/` combines with `/bar.html` to give `http://example.com/bar.html`. Closes #2777.
2016-03-10 Docx Writer: handle image alt textmb211-2/+2
closes #2754
2016-03-09Markdown reader: Improved pipe table parsing.John MacFarlane1-15/+15
Fixes #2765. Added test case.
2016-03-09Markdown reader: Clean up pipe table parsing.John MacFarlane1-8/+8
2016-03-09Markdown reader: allow `+` separators in pipe table cells.John MacFarlane1-6/+4
We already allowed them in the header, but not in the body rows, for some reason. This gives compatibility with org-mode tables.
2016-03-09Markdown reader: don't cross line boundary parsing pipe table row.John MacFarlane1-1/+7
Previously an emph element could be parsed across the newline at the end of the pipe table row. I thought this would help with #2765, but it doesn't.
2016-03-08DokuWiki writer: use $$ for display math.John MacFarlane1-1/+4
2016-03-08Docx reader: update feature checklist.Jesse Rosenthal1-5/+3
The feature checklist in the source code was out of date. Update.
2016-02-28LaTeX reader: handle interior `$` characters in math.John MacFarlane1-4/+12
e.g. `$$\hbox{$i$}$$`. Partially addresses #2743.
2016-02-26Docx Reader: Get rid of Modifiable typeclass.Jesse Rosenthal3-198/+169
The docx reader used to use a Modifiable typeclass to combine both Blocks and Inlines. But all the work was in the inlines. So most of the generality was wasted, at the expense of making the code harder to understand. This gets rid of the generality, and adds functions for Blocks and Inlines. It should be a bit easier to work with going forward.
2016-02-23Make protocol-relative URIs work again.John MacFarlane1-2/+4
Closes #2737.
2016-02-21Markdown reader: use htmlInBalanced for rawVerbatimBlock.John MacFarlane1-7/+5
This should give better performance. See #2730.
2016-02-20Fixed some linter warnings.John MacFarlane1-3/+3
2016-02-20Merge pull request #2646 from tarleb/org-figure-with-no-nameJohn MacFarlane1-3/+3
Prefix even empty figure names with "fig:"
2016-02-20Merge pull request #2668 from monofon/fix/yaml-metadata-block-bottom-lineJohn MacFarlane1-1/+1
Markdown writer: Use hyphens for yaml metadata block bottom line
2016-02-20Merge pull request #2691 from tarleb/org-image-file-linksJohn MacFarlane1-29/+29
Org reader: Refactor link-target processing
2016-02-20HTML reader: rewrote htmlInBalanced.John MacFarlane1-10/+39
This version avoids an exponential performance problem with `<script>` tags, and it should be faster in general. Closes #2730.
2016-02-18LaTeX writer: clean up options parser.Jesse Rosenthal1-3/+4
Make sure that we require the closing bracket.
2016-02-18LaTeX writer: treat memoir template with `article` opt as articleJesse Rosenthal1-6/+21
We currently treat all memoir templates as books. This means that pandoc will infer the `--chapters` argument, even if the `article` iption is set for memoir. This commit makes pandoc treats the document as an article if there is an article option (i.e., `\documentclass[12pt,article]{memoir}`). Note that this refactors out the parsec parsers for document class and options, to make it a little clearer what's going on.
2016-02-16HTML reader: properly handle an empty cell in a simple table.John MacFarlane1-0/+1
Closes #2718.
2016-02-09Removed `tex_math_single_backslash` from `markdown_github` options.John MacFarlane1-1/+0
Closes #2707.
2016-02-05Custom writer: Pass attributes parameter to CaptionedImage.John MacFarlane1-2/+2
Closes #2697.
2016-02-04Markdown reader: Fixed bug with smart quotes around tex math.John MacFarlane1-2/+2
Previously smart quotes were incorrect in the following: '$\neg(x \in x)$'. (because of the following period). This commit fixes the problem, which was introduced by commit 4229cf2d92faf5774fe1a3a9c89a5de885cf75cd.