Commit graph

7771 commits

Author SHA1 Message Date
John MacFarlane
7caaa5b2b6 Fix display math with --webtex in markdown output.
Closes #3298.
2016-12-11 17:00:58 +01:00
John MacFarlane
0c029e8258 Moved make_osx_package.sh to osx/ directory. 2016-12-10 22:58:05 +01:00
John MacFarlane
35ff12a569 Updated MANUAL date and man page. 2016-12-10 11:29:58 +01:00
John MacFarlane
abc874be2a Updated changelog. 2016-12-10 11:29:53 +01:00
John MacFarlane
00e83be0cf Version to 1.19.1 2016-12-10 11:29:48 +01:00
John MacFarlane
9b9ec99ee8 We no longer need the MathMLInHTML.js shim from 2004! 2016-12-09 21:18:02 +01:00
Jesse Rosenthal
8ced8cbc6e Docx reader: Ensure one-row tables don't have header.
Tables in MS Word are set by default to have special first-row
formatting, which pandoc uses to determine whether or not they have a
header. This means that one-row tables will, by default, have only a
header -- which we imagine is not what people want. This change
ensures that a one-row table is not understood to be a header only.

Note that this means that it is impossible to produce a header-only
table from docx, even though it is legal pandoc. But we believe that
in nearly all cases, it will be an accidental (and unwelcome) result

Closes #3285.
2016-12-08 07:01:01 -05:00
John MacFarlane
a09f60180f Small tweaks to release checklist. 2016-12-08 12:08:41 +01:00
John MacFarlane
f3cb472f31 Makefile: use stack. 2016-12-08 11:46:40 +01:00
John MacFarlane
1fde7a340b Set PANDOC_VERSION environment variable for filters.
Closes #2640.
2016-12-08 11:09:40 +01:00
John MacFarlane
6708c6a7fc Removed debug trace from HTML reader. 2016-12-08 11:06:50 +01:00
John MacFarlane
afa675b71e Really fixed bash completion this time!
Closes #2749.
2016-12-07 21:18:44 +01:00
John MacFarlane
d5bfa27035 Improved bash-completion for filenames with spaces. 2016-12-07 19:28:24 +01:00
John MacFarlane
b0733190b0 Fixed bash completion for filenames with spaces.
Closes #2749.
2016-12-07 17:37:27 +01:00
John MacFarlane
a197341252 MANUAL: better docs on how to create a custom reference.docx. 2016-12-07 15:39:06 +01:00
John MacFarlane
7ce622475c HTML reader: Understand style=width: as well as width in col.
Closes #3286.
2016-12-07 15:21:01 +01:00
John MacFarlane
65c0e527f8 Fixed tests with dynamic linking.
Closes #2709.
2016-12-07 15:05:30 +01:00
John MacFarlane
0e9c96d28a RST reader: print warnings when keys, substitition, notes not found.
Previously the parsers failed and we got raw text.
Now we get a link with an empty URL, or empty inlines in
the case of a note or substitution.
2016-12-07 13:03:56 +01:00
John MacFarlane
7fbfcb03d8 RST reader: fix hyperlink aliases.
`link <google_>`_

    .. _google: https://google.com

is really a reference link.

Closes #3283.
2016-12-07 12:54:25 +01:00
John MacFarlane
97274c9991 Fixed some bad regressions in HTML table parser.
This regression leads to the introduction of empty rows
in some circumstances.

Closes #3280.
2016-12-06 23:20:28 +01:00
John MacFarlane
41627ed62c Man writer: Ensure that periods are escaped at beginning of line.
Closes #3270.
2016-12-05 00:50:17 +01:00
John MacFarlane
33b4bc8371 Pretty: Added afterBreak.
This makes it possible to insert escape codes for content
that needs escaping at the beginning of a line.
2016-12-05 00:49:53 +01:00
Albert Krewinkel
bfa734c402
LaTeX writer: Fix unnumbered headers when used with --top-level
Fix interaction of top-level divisions `part` or `chapter` with
unnumbered headers when emitting LaTeX.  Headers are ensured to be
written using stared commands (like `\subsection*{}`).

Fixes: #3272
2016-12-04 21:15:52 +01:00
John MacFarlane
85e8afe942 LaTeX template: use correct separator for pdfkeywords.
Needs a comma not a semicolon.

Thanks to Wandmalfarbe.
2016-12-04 21:09:58 +01:00
John MacFarlane
7ace7dd66b Markdown writer: Fixed incorrect word wrapping.
Previously pandoc would sometimes wrap lines too early
due to this bug.

Closes #3277.
2016-12-04 17:13:06 +01:00
Anthony Geoghegan
733b1f3ae2 Minor spelling typos in the manual (#3273)
* Fix spelling typos:

 * hightlight
 * respecitively
 * codeblock – inconsistent with rest of document using “code block”

* Use consistent case for proper nouns.

For example: “ASCII”, “Unicode”, “Latin”, “JavaScript”, “CSS”.
2016-12-03 21:17:27 +01:00
John MacFarlane
3dacf5b5e7 More cosmetic changes to changelog. 2016-12-01 01:07:05 +01:00
John MacFarlane
ddb5a0a68a Reformatting changelog. 2016-12-01 01:00:25 +01:00
John MacFarlane
4e6edd2d0d Update date in manual and man page. 2016-11-30 21:03:17 +01:00
John MacFarlane
e8a9de3f68 Updated changelog. 2016-11-30 17:07:59 +01:00
John MacFarlane
aedd604842 Use pandoc-citeproc 0.10.3 release in stack.yamls for binary pkgs. 2016-11-30 17:03:37 +01:00
John MacFarlane
fb8a2540bd Options: Removed writerStandalone, made writerTemplate a Maybe.
Previously setting writerStandalone = True did nothing unless
a template was provided in writerTemplate.  Now a fragment
will be generated if writerTemplate is Nothing; otherwise,
the specified template will be used and standalone output
generated.  [API change]
2016-11-30 15:34:58 +01:00
John MacFarlane
ac312caabd Updated changelog. 2016-11-30 14:56:36 +01:00
John MacFarlane
478e15dc3b Removed unused import. 2016-11-30 14:53:22 +01:00
ickc
fdc5674045 travis: use language generic (#3267) 2016-11-30 12:46:50 +01:00
John MacFarlane
804bba1b64 stack.yaml - use texmath 0.9 release. 2016-11-30 12:43:23 +01:00
John MacFarlane
ac83d4b806 Use new module from texmath to lookup MS font codepoints.
+ Removed Text.Pandoc.Readers.Docx.Fonts
+ Moved its code to texmath; we now use (from texmath 0.9)
  Text.TeXMath.Unicode.Fonts
+ Use texmath 0.9 (currently from git).
+ Updated epub tests because texmath now handles more mathml.
2016-11-30 00:43:55 +01:00
John MacFarlane
fd2cac80ec Updated changelog. 2016-11-27 22:30:54 +01:00
John MacFarlane
e2a452ba4a Shared.fetchItem: Better handling of protocol-relative URL.
If URL starts with `//` and there is no "base URL" (as there
would be if a URL were used on the command line), then default
to http:.

Closes #2635.
2016-11-27 21:19:26 +01:00
John MacFarlane
ea916432ac Updated renderHtml import in HTML writer to avoid deprecated function. 2016-11-27 21:18:58 +01:00
Albert Krewinkel
1fc07ff4da Refactor top-level division selection (#3261)
The "default" option is no longer represented as `Nothing` but via a new
type constructor, making the `Maybe` wrapper superfluous.

The default behavior of using heuristics can now be enabled explicitly
by setting `--top-level-division=default`.

API change (`Text.Pandoc.Options`): The `Division` type was renamed to
`TopLevelDivision`. The `Section`, `Chapter`, and `Part` constructors
were renamed to `TopLevelSection`, `TopLevelChapter`, and
`TopLevelPart`, respectively. An additional `TopLevelDefault`
constructor was added, which is now also the new default value of the
`writerTopLevelDivision` field in `WriterOptions`.
2016-11-27 20:31:04 +01:00
John MacFarlane
08bf8f2e9d Updated stack.yaml to use lts 7.9 + latest pandoc-citeproc dev. 2016-11-27 20:24:23 +01:00
John MacFarlane
92a78d7d79 Version to 1.19. 2016-11-27 17:49:54 +01:00
John MacFarlane
aa67b34da4 Update changelog. 2016-11-27 17:49:36 +01:00
John MacFarlane
5222572033 HTML reader: improved table parsing.
We now check explicitly for non-1 rowspan or colspan
attributes, and fail when we encounter them. Previously
we checked that each row had the same number of cells,
but that could be true even with rowspans/colspans.
And there are cases where it isn't true in tables that
we can handle fine -- e.g. when a tr element is empty.
So now we just pad rows with empty cells when needed.

Closes #3027.
2016-11-26 22:28:28 +01:00
John MacFarlane
7b4a12a532 Revert "Open Document writer: set first level of blockquotes to not use indent (#2757)"
This reverts commit fee0b913c5.

The previous commit did not provide a good way to get increased
indentation for nested block quotes.

Rolling it back for now. @jjsheets feel free to submit something
that handles multiple levels of block quote smoothly, if you like.
2016-11-26 22:03:57 +01:00
Jeff Sheets
fee0b913c5 Open Document writer: set first level of blockquotes to not use indent (#2757)
* Open Document writer: set first level of blockquotes to not use indent
Nested blockquotes start using indents like before. Quotation style is
still in use, so the style's indent settings take effect on the first
level of blockquotes.

* Removed list construction to improve pull request to fix #2747
2016-11-26 21:50:20 +01:00
hubertp-lshift
5219599a77 [Tex] Remove invalid inlines in sections (#3218)
Latex doesn't like when hypertargets or images are
put in the options list of the section. They are not
lost since they were actually duplicated and present
also in the second argument list.

Note on the implementation:
I had to inline the definiton of 'foldMap' since it is
not implemented in every version of Haskell that Pandoc
supports.
2016-11-26 21:47:51 +01:00
hubertp-lshift
015dead0bb [odt] Infer table's caption from the paragraph (#3224)
ODT's reader always put empty captions for the parsed
tables. This commit
1) checks paragraphs that follow the table definition
2) treats specially a paragraph with a style named 'Table'
3) does some postprocessing of the paragraphs that combines
 tables followed immediately by captions

The ODT writer used 'TableCaption' style name for the caption
paragraph. This commit follows the open office approach which
allows for appending captions to table but uses a built-in style
named 'Table' instead of 'TableCaption'. Any users of odt format
(both writer and reader) are therefore required to change the
style's name to 'Table', if necessary.
2016-11-26 21:45:56 +01:00
Albert Krewinkel
baa25362a4 Allow to overwrite top-level division type heuristics (#3258)
Pandoc uses heuristics to determine the most resonable top-level
division type when emitting LaTeX or Docbook markup.  It is now possible
to overwrite this implicitly set top-level division via the
`top-level-division` command line parameter.

API change (`Text.Pandoc.Options`): the type of the
`writerTopLevelDivision` field in of the `WriterOptions` data type is
altered from `Division` to `Maybe Division`. The field's default value
is changed from `Section` to `Nothing`.

Closes: #3197
2016-11-26 21:43:46 +01:00