Commit graph

7110 commits

Author SHA1 Message Date
John MacFarlane
2649a0d836 Improved documentation of templates.
Note that there's no docx template.
Closes #2797.
2016-03-21 15:34:09 -07:00
Jesse Rosenthal
a8a2d4f224 Fix stdin handling for file-scope
Regardless of input type, we should use default handling if we are
dealing with stdin. In other words, there should be no file-scope if
there are no files. This was an issue with pandoc json, which could be
piped on stdin, but which was read by default with `--file-scope`.
2016-03-21 17:02:07 -04:00
John MacFarlane
08c625cff0 Fixed link to TEI in README. 2016-03-20 15:23:33 -07:00
John MacFarlane
44428ca64d Changelog formatting. 2016-03-20 13:11:35 -07:00
John MacFarlane
5f91f06fd9 Clarify and shorten description of file-scope in changelog. 2016-03-20 13:04:25 -07:00
Mauro Bieg
44f95484a4 LaTeX Writer: fix polyglossia to babel env mapping
allow for optional argument in square brackets, closes #2728
2016-03-20 19:17:30 +01:00
John MacFarlane
b0dc933a21 Fixed changelog. 2016-03-20 10:16:36 -07:00
John MacFarlane
b53036ba3f Fixed changelog formatting. 2016-03-20 09:57:32 -07:00
John MacFarlane
7e6c70e585 Fixed Chris Forster's name. 2016-03-20 09:54:14 -07:00
John MacFarlane
c7df80e0c3 Removed strip commands from make-windows-installer.bat. 2016-03-20 09:01:52 -07:00
John MacFarlane
128409f387 Don't hardcode pandoc version in osx/distribution.xml.
Instead, create it from a template, distribution.xml.in.
2016-03-19 18:53:43 -07:00
John MacFarlane
06bfac1095 Fixed version in osx/distribution.xml. 2016-03-19 18:32:39 -07:00
John MacFarlane
1f5c1b9fc9 make_osx_package.sh: Add quotes around env variable. 2016-03-19 18:13:27 -07:00
John MacFarlane
2e2298abf3 Fixed typo in deb, osx stack.yaml. 2016-03-19 15:33:18 -07:00
John MacFarlane
ad3a7bfe4d texmath-0.8.5 in extra-deps in stack.full.yaml. 2016-03-19 15:32:12 -07:00
John MacFarlane
f939c210ea Build vs pandoc-citeproc 0.9.1.1. 2016-03-19 14:55:48 -07:00
John MacFarlane
a2706ee075 Build pandoc-citeproc 0.9.1 for binary pkgs. 2016-03-19 14:51:17 -07:00
John MacFarlane
6a4c17642c Build binary packages with with latest texmath. 2016-03-19 14:45:25 -07:00
John MacFarlane
33bad8de18 Depend on most recent aeson, highlighting-kate.
These aren't in stackage yet.
2016-03-19 14:19:13 -07:00
John MacFarlane
3dadc1b1bd Use lts-5.8 resolver. 2016-03-19 14:16:08 -07:00
John MacFarlane
3336783906 Updated man page. 2016-03-19 14:14:53 -07:00
John MacFarlane
8aef9573c5 Updated changelog. 2016-03-19 14:14:42 -07:00
John MacFarlane
3af753de47 Merge pull request #2637 from mb21/latex-figure-label
LaTeX writer: figure label
2016-03-19 13:56:14 -07:00
John MacFarlane
3aa7bd1b7c Added institute variable in LaTeX and Beamer templates. 2016-03-19 13:48:06 -07:00
John MacFarlane
9a2326c397 Rebuilt man page. 2016-03-18 22:54:03 -07:00
John MacFarlane
9d669014a1 Updated changelog. 2016-03-18 22:50:14 -07:00
John MacFarlane
976e7e2054 ConTeXt writer: fix whitespace at line beginning in line blocks.
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-18 16:36:56 -07:00
John MacFarlane
e821b05125 LaTeX writer: Avoid double toprule in headerless table with caption.
Closes #2742.
2016-03-18 16:16:18 -07:00
John MacFarlane
8d1c01809e README: document that --toc works with docx.
Closes #2787.
2016-03-18 14:54:09 -07:00
Jesse Rosenthal
28c7617f19 Docx reader: Handle alternate content
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-18 09:38:26 -04:00
Jesse Rosenthal
7f4a40474c Docx reader: Add test for enumerated headers.
We don't want them to turn into a list.
2016-03-16 12:56:17 -04:00
Jesse Rosenthal
855c8b43f0 Docx reader: Don't make numbered heads into lists.
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-16 12:50:32 -04:00
Jesse Rosenthal
09b4f294bf pandoc.hs: Also use filescope for json files.
JSON files have metadata and list structure, so they can't be simply
catted, but they're useful as intermediate build files in large projects.
2016-03-15 13:08:34 -04:00
Jesse Rosenthal
c7c4ee46f8 README: Add description of --file-scope option. 2016-03-15 12:52:51 -04:00
Jesse Rosenthal
5c055b4cf3 Introduce file-scope parsing (parse-before-combine)
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-15 12:52:51 -04:00
Jesse Rosenthal
68fd333ec4 Add a general ByteStringReader with warnings.
Have docx reader use it.
2016-03-12 17:08:20 -05:00
Jesse Rosenthal
ee03e954d0 Add readDocxWithWarnings
The regular readDocx just becomes a special case.
2016-03-12 17:08:20 -05:00
Jesse Rosenthal
102ba9ecb8 Docx Reader: Add state to the parser, for warnings
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-12 17:08:20 -05:00
John MacFarlane
a485c42d78 Fixed behavior of base tag.
+ 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 19:59:55 -08:00
John MacFarlane
06a57b27a1 Merge pull request #2771 from mb21/docx-alt-text
Docx Writer: handle image alt text
2016-03-10 08:57:31 -08:00
mb21
139fa54d48 Docx Writer: handle image alt text
closes #2754
2016-03-10 08:56:08 +01:00
John MacFarlane
2b55b76ebe Markdown reader: Improved pipe table parsing.
Fixes #2765.
Added test case.
2016-03-09 11:46:00 -08:00
John MacFarlane
54a68616d7 Markdown reader: Clean up pipe table parsing. 2016-03-09 10:11:32 -08:00
John MacFarlane
6e950a8eb5 Markdown reader: allow + separators in pipe table cells.
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-09 08:44:31 -08:00
John MacFarlane
4ed64835cb Markdown reader: don't cross line boundary parsing pipe table row.
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-09 08:33:13 -08:00
John MacFarlane
6bfaa5ad15 DokuWiki writer: use $$ for display math. 2016-03-08 10:08:14 -08:00
Jesse Rosenthal
0b9c54d9f3 Docx reader: update feature checklist.
The feature checklist in the source code was out of date. Update.
2016-03-08 00:36:13 -05:00
John MacFarlane
928a05073f Stack-based appveyor setup. 2016-03-07 09:16:39 -08:00
John MacFarlane
0510396a9b Merge pull request #2760 from ickc/master
Very Minor update on the documentation
2016-03-06 20:43:21 -08:00
ickc
846fa87046 Update README 2016-03-06 20:24:02 -08:00