aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2016-05-20Org writer: add :PROPERTIES: drawer supportAlbert Krewinkel1-2/+21
This allows header attributes to be added to org documents in the form of `:PROPERTIES:` drawers. All available attributes are stored as key/value pairs. This reflects the way the org reader handles `:PROPERTIES:` blocks. This closes #1962.
2016-05-20Org reader: add :PROPERTIES: drawer supportAlbert Krewinkel1-28/+56
Headers can have optional `:PROPERTIES:` drawers associated with them. These drawers contain key/value pairs like the header's `id`. The reader adds all listed pairs to the header's attributes; `id` and `class` attributes are handled specially to match the way `Attr` are defined. This also changes behavior of how drawers of unknown type are handled. Instead of including all unknown drawers, those are not read/exported, thereby matching current Emacs behavior. This closes #1877.
2016-05-19Merge pull request #2927 from tarleb/org-attr-htmlJohn MacFarlane2-84/+106
Org reader support for ATTR_HTML statements
2016-05-19Org reader: add support for ATTR_HTML attributesAlbert Krewinkel1-7/+28
Arbitrary key-value pairs can be added to some block types using a `#+ATTR_HTML` line before the block. Emacs Org-mode only includes these when exporting to HTML, but since we cannot make this distinction here, the attributes are always added. The functionality is now supported for figures. This closes #1906.
2016-05-19Org reader: use custom `anyLine`Albert Krewinkel1-3/+10
Additional state changes need to be made after a newline is parsed, otherwise markup may not be recognized correctly. This fixes a bug where markup after certain block-types would not be recognized. E.g. `/emph/` in the following snippet was not parsed as emphasized. foo # comment /emph/
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