Commit graph

6976 commits

Author SHA1 Message Date
Albert Krewinkel
7a0729ea09 Org reader: move parser state into separate module
The org reader code has become large and confusing.  Extracting smaller
parts into submodules should help to clean things up.
2016-05-11 19:13:42 +02:00
John MacFarlane
fd9ec835ec Merge pull request #2907 from tarleb/org-fixes
Org fixes (reader and writer)
2016-05-09 10:17:56 -07:00
Albert Krewinkel
d32878b84b Org writer: print empty table rows
Empty table rows should not be dropped from the output, so row-height is
always set to be at least 1.
2016-05-09 19:06:24 +02:00
Albert Krewinkel
10a809f126 Org reader: fix inline-LaTeX regression
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-09 19:06:04 +02:00
John MacFarlane
c1b19b17c4 Merge pull request #2906 from roblabla/feature-mediaWikiTableHeaderSpaces
Allow spaces before '!' in MediaWiki table header
2016-05-09 09:37:12 -07:00
roblabla
acd492c7f4 Allow spaces before '!' in MediaWiki table header 2016-05-09 17:54:40 +02:00
John MacFarlane
21d1a3b57c Merge pull request #2898 from tarleb/org-table-refactoring
Org reader: table parsing code refactoring and fixes
2016-05-05 16:22:56 -07:00
John MacFarlane
f7a5c17a63 Merge pull request #2900 from tarleb/org-symbol-fix
Org reader: fix spacing after LaTeX-style symbols
2016-05-05 13:20:09 -07:00
Albert Krewinkel
405c3e9c36 Org reader: fix spacing after LaTeX-style symbols
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-04 23:16:23 +02:00
Albert Krewinkel
2d825603c6 Org reader: fix handling of empty table cells, rows
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-04 16:02:03 +02:00
Albert Krewinkel
a51e4e8215 Org reader: refactor rows-to-table conversion
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-04 16:01:22 +02:00
Albert Krewinkel
d5e4bc179c Org reader: stop padding short table rows
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-04 15:48:07 +02:00
John MacFarlane
cc9a9c7150 Added docbook5 templates, test files to pandoc.cabal. 2016-05-01 23:02:22 -07:00
John MacFarlane
52f94cff48 Bump version to 1.17.1.
We need a minor version bump because of the addition
of `writerDocbook5` to `WriterOptions`.
2016-05-01 22:48:49 -07:00
John MacFarlane
87dcceecbb README: Added docbook5 as output format. 2016-05-01 22:47:57 -07:00
John MacFarlane
bc56988ead Added docbook5 template. 2016-05-01 22:45:27 -07:00
John MacFarlane
ee4e863225 Merge pull request #2890 from bcdevices/docbook5-writer
Docbook5 write support
2016-05-01 22:43:38 -07:00
Jesse Rosenthal
99eac312fe Binary fmts throw PandocError on zip-archive fail
Commit 91dc3342 made `readDocx` throw PandocError if there was an
unarchiving error. This extends that fix to `readOdt` and `readEPUB`.
2016-05-01 18:27:20 -04:00
John MacFarlane
1fbe79db05 LaTeX writer: use {} around options containing special chars.
Closes #2892.
2016-05-01 11:20:26 -07:00
Jesse Rosenthal
91dc334249 Docx Reader: Throw PandocError on unzip failure
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-05-01 12:17:12 -04:00
Ivo Clarysse
fd36e6b64a Docbook5 writer: Properly handle ulink/link 2016-04-29 16:06:55 -07:00
Ivo Clarysse
987ec3a752 Write out Docbook 5 namespace 2016-04-29 15:43:15 -07:00
John MacFarlane
aa4a1d527a HTML writer: ensure mathjax link is added when math appears in footnote.
Previously if a document only had math in a footnote,
the MathJax link would not be added.

Closes #2881.
2016-04-29 14:54:54 -07:00
Ivo Clarysse
271cb4d845 Add docbook5 writer support 2016-04-29 14:00:46 -07:00
John MacFarlane
32f1b0a5f1 Revert "LaTeX writer: Add \strut to fix multiline tables"
This reverts commit 4c684561ee.

See
https://groups.google.com/d/msg/pandoc-discuss/u6J-_aCProU/UufN3IYRAgAJ

This should fix uneven spacing issues in multiline tables.
2016-04-27 17:25:45 -07:00
John MacFarlane
ece215ed7d Merge pull request #2735 from mb21/patch-1
LaTeX Writer: fix polyglossia to babel env mapping
2016-04-26 23:09:02 -07:00
John MacFarlane
cc0527bf31 Merge pull request #2829 from adunning/patch-1
LaTeX writer: Add missing languages.
2016-04-26 23:08:15 -07:00
John MacFarlane
cc82851a6a Merge pull request #2876 from shosti/org-code-indent
Ignore leading space in org code blocks
2016-04-26 23:07:29 -07:00
John MacFarlane
1985164816 LaTeX writer: ignore --incremental unless -t beamer.
Closes #2843.
2016-04-26 21:50:37 -07:00
Emanuel Evans
1bfe39e24c
Ignore leading space in org code blocks
Fixes #2862

Also fix up tab handling for leading whitespace in code blocks.
2016-04-26 10:29:59 -07:00
John MacFarlane
a0fae92847 Require texmath 0.8.6.2.
Closes several texmath-related bugs:  #2775, #2310, #2310.

This fixes issues with sub/superscript positioning and
matrix column alignment in docx.
2016-04-20 15:05:41 -07:00
John MacFarlane
b8ce756b41 rtack.yaml: use data-default 0.6.0. 2016-04-18 15:33:30 -07:00
John MacFarlane
e053865746 Allow data-default 0.6.0. 2016-04-18 15:00:00 -07:00
Jesse Rosenthal
5c24e66c16 Docx Reader: Tests for track-changes moving 2016-04-16 08:39:25 -04:00
Jesse Rosenthal
a385ee1d4f Docx Reader: parse moveTo and moveFrom
`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-15 14:09:18 -04:00
John MacFarlane
4b49f923cb Markdown reader: Fix pandoc title blocks with lines ending in 2 spaces.
Closes #2799.

Also added -s to markdown-reader-more test.
2016-04-10 09:13:53 -07:00
John MacFarlane
773bbb8fc7 Markdown + HTML readers: be more forgiving about unescaped &.
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-10 07:39:36 -07:00
John MacFarlane
cb8b1c2655 README - improved documentation of --columns option. 2016-04-08 15:00:14 -07:00
Andrew Dunning
9765ef2ce6 LaTeX writer: Add missing languages.
Updates the list from the hyphenation files at <http://mirror.ctan.org/language/hyph-utf8/tex/generic/hyph-utf8/loadhyph/>.
2016-04-01 16:47:33 +01:00
John MacFarlane
676b800993 Merge pull request #2828 from adunning/patch-1
Recognize `la-x-classic` as Classical Latin.
2016-03-30 09:59:54 -07:00
Andrew Dunning
0c37a7c488 Recognize la-x-classic as Classical Latin.
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-30 14:15:47 +01:00
John MacFarlane
32ecd195bd Use texmath >= 0.8.6.1.
This fixes behavior of roots, e.g. `\sqrt[3]{x}`.
See #2824.
2016-03-29 22:57:37 -07:00
John MacFarlane
53fb682e77 stack.full.yaml: build local zip-archive, texmath. 2016-03-28 16:22:00 -07:00
John MacFarlane
d3f76150fa stack.full.yaml: also include local cmark-hs. 2016-03-27 12:33:41 -07:00
John MacFarlane
f74498cb47 EPUB writer: set 'navpage' variable on nav page.
This allows templates to treat it differently.
2016-03-26 13:14:50 -07:00
John MacFarlane
4d5450d493 Travis: use -fno-warn-unused-do-bind -Wall -Werror. 2016-03-25 12:04:27 -07:00
John MacFarlane
9f664ee6cf Add --pedantic to stack build on travis.
This turns on -Wall, -Werror.
-Werror is already there for cabal builds, but for some reason
travis isn't failing when errors occur.
2016-03-25 09:14:54 -07:00
John MacFarlane
9742c48647 Removed two superfluous lines. 2016-03-25 09:05:38 -07:00
John MacFarlane
90abe3216b Updated changelog. 2016-03-24 22:24:15 -07:00
John MacFarlane
f47b369f37 LaTeX writer: better positioning for hypertarget in figures.
Closes #2813.
2016-03-24 16:44:33 -07:00