aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2016-05-19Org reader: refactor block attribute handlingAlbert Krewinkel2-83/+77
A parser state attribute was used to keep track of block attributes defined in meta-lines. Global state is undesirable, so block attributes are no longer saved as part of the parser state. Old functions and the respective part of the parser state are removed.
2016-05-17EPUB reader: unescape URIs in spine.John MacFarlane1-2/+4
This should fix #2924. Testing on the epub that caused the problem originally would be welcome.
2016-05-17LaTeX writer: Don't escape underscore in labels.John MacFarlane1-1/+1
Previously they were escaped as ux5f. Closes #2921.
2016-05-12Merge pull request #2894 from sid-kap/rst-code-classJohn MacFarlane1-6/+8
Add class option for code block in RST reader
2016-05-11Merge pull request #2913 from jlduran/strut-minipage-tablesJohn MacFarlane1-2/+2
Retake on strut with \minipage inside tables
2016-05-11Merge pull request #2912 from tarleb/org-export-settingsJohn MacFarlane2-159/+320
Org reader: basic support for export settings
2016-05-11Org reader: parse but ignore export optionsAlbert Krewinkel1-2/+35
All known export options are parsed but ignored.
2016-05-11Org reader: add support for sub/superscript export optionsAlbert Krewinkel2-3/+57
Org-mode allows to specify export settings via `#+OPTIONS` lines. Disabling simple sub- and superscripts is one of these export options, this options is now supported.
2016-05-11Org reader: move parser state into separate moduleAlbert Krewinkel2-158/+232
The org reader code has become large and confusing. Extracting smaller parts into submodules should help to clean things up.
2016-05-11Retake on strut with \minipage inside tablesJose Luis Duran1-2/+2
Reimplement on 4c684561ee0665b014e887ae559b7020e4e9f2d3 The problem with 4c68456 was a space between the cell contents and the `\strut` that affected the alignment.
2016-05-09Avoid lazy foldl in LaTeX writer.John MacFarlane1-4/+5
2016-05-09Merge pull request #2907 from tarleb/org-fixesJohn MacFarlane2-5/+10
Org fixes (reader and writer)
2016-05-09Org writer: print empty table rowsAlbert Krewinkel1-1/+1
Empty table rows should not be dropped from the output, so row-height is always set to be at least 1.
2016-05-09Org reader: fix inline-LaTeX regressionAlbert Krewinkel1-4/+9
The last fix for whitespace handling of inline LaTeX commands was incorrect, preventing correct recognition of inline LaTeX commands which contain spaces. This fix ensures that only trailing whitespace is cut off.
2016-05-09Allow spaces before '!' in MediaWiki table headerroblabla1-1/+1
2016-05-05Merge pull request #2898 from tarleb/org-table-refactoringJohn MacFarlane1-59/+59
Org reader: table parsing code refactoring and fixes
2016-05-04Org reader: fix spacing after LaTeX-style symbolsAlbert Krewinkel1-5/+7
The org-reader was droping space after unescaped LaTeX-style symbol commands: `\ForAll \Auml` resulted in `∀Ä` but should give `∀ Ä` instead. This seems to be because the LaTeX-reader treats the command-terminating space as part of the command. Dropping the trailing space from the symbol-command fixes this issue.
2016-05-04Org reader: fix handling of empty table cells, rowsAlbert Krewinkel1-13/+17
This fixes Org mode parsing of some corner cases regarding empty cells and rows. Empty cells weren't parsed correctly, e.g. `|||` should be two empty cells, but would be parsed as a single cell containing a pipe character. Empty rows where parsed as alignment rows and dropped from the output. This fixes #2616.
2016-05-04Org reader: refactor rows-to-table conversionAlbert Krewinkel1-25/+25
This refactores the codes conversing a list table lines to an org table ADT. The old code was simplified and is now slightly less ugly.
2016-05-04Org reader: stop padding short table rowsAlbert Krewinkel1-24/+20
Emacs Org-mode doesn't add any padding to table rows. The first row (header or first body row) is used to determine the column count, no other magic is performed. The org reader was padding rows to the length of the longest table row. This was done due to a misunderstanding of how Org handles tables. This feature reflected how Org-mode handles tables when pressing <TAB>. The Org exporter however, which is what the reader should implement, doesn't do any of this. So this was a mis-feature that made the reader more complex and reduced comparability. It was hence removed.
2016-05-01Merge pull request #2890 from bcdevices/docbook5-writerJohn MacFarlane3-6/+19
Docbook5 write support
2016-05-01Add class option for code block in RST readerSidharth Kapur1-6/+8
According to http://docutils.sourceforge.net/docs/ref/rst/directives.html#code, the code directive supports the ":class:" option.
2016-05-01Binary fmts throw PandocError on zip-archive failJesse Rosenthal2-3/+7
Commit 91dc3342 made `readDocx` throw PandocError if there was an unarchiving error. This extends that fix to `readOdt` and `readEPUB`.
2016-05-01LaTeX writer: use {} around options containing special chars.John MacFarlane1-4/+9
Closes #2892.
2016-05-01Docx Reader: Throw PandocError on unzip failureJesse Rosenthal1-4/+5
Previously, readDocx would error out if zip-archive failed. We change the archive extraction step from `toArchive` to `toArchiveOrFail`, which returns an Either value.
2016-04-29Docbook5 writer: Properly handle ulink/linkIvo Clarysse1-1/+3
2016-04-29Write out Docbook 5 namespaceIvo Clarysse3-7/+10
2016-04-29HTML writer: ensure mathjax link is added when math appears in footnote.John MacFarlane1-3/+2
Previously if a document only had math in a footnote, the MathJax link would not be added. Closes #2881.
2016-04-29Add docbook5 writer supportIvo Clarysse3-3/+11
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 MacFarlane18-36/+36
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.