Commit graph

11212 commits

Author SHA1 Message Date
John MacFarlane
159863e8da LaTeX reader: use combining characters when needed for accents.
For example, there is no unicode code point corresponding to
\"{X}, so we use a combining accent.
2018-08-17 22:11:31 -07:00
John MacFarlane
4ec02053bb Docx writer: properly handle display math in spans.
Closes #4826.  This isn't a complete solution, since other
nestings of display math may still cause problems, but it should
work for what is by far the most common case.

Note that this also involves an API change: `isDisplayMath`
is now exported from Text.Pandoc.Writers.Shared.
2018-08-17 21:25:14 -07:00
Marc Schreiber
175da00295 Add support for latex mintinline (#4365) 2018-08-17 20:57:36 -07:00
Joe Hermaszewski
822a071bb2 Haddock Writer: Use proper format for latex math in haddock (#4571).
Inline math in `\(..\)`, display math in `\[..\]`, tex is now used.
Previously we'd "fake it with unicode" and fall back to tex when
that didn't work.  But as of
3f50b95532
haddock supports latex math.
2018-08-17 20:50:45 -07:00
John MacFarlane
1b66865763 LaTeX reader: fix siunitx unit commands...
...they should only be recognized in siunitx contexts.

For example, `\l` outside of an siunitx context should be l-slash,
not l (for liter)!

Closes #4842.
2018-08-17 15:22:47 -07:00
John MacFarlane
723b60b42e Add latest hs-bibutils to stack.yaml. 2018-08-17 09:22:24 -07:00
John MacFarlane
7f76b6886e stack.lts11.yaml - use git head for pandoc-citeproc. 2018-08-16 23:27:38 -07:00
John MacFarlane
385a0619ff Revert "appveyor.yml: use regular stack.yaml, not stack.lts11.yaml."
This reverts commit 0a93d33566.
2018-08-16 23:26:43 -07:00
John MacFarlane
0a93d33566 appveyor.yml: use regular stack.yaml, not stack.lts11.yaml. 2018-08-16 22:04:21 -07:00
John MacFarlane
0d9c0b1b5b stack.yaml: use lts 12.6 and latest git pandoc-citeproc. 2018-08-16 22:03:44 -07:00
John MacFarlane
58dcdb0e56 LaTeX reader: fix double unnumbered class.
The `unnumbered` class was being included twice for
starred sections.

Closes #4838.
2018-08-16 21:28:20 -07:00
John MacFarlane
2bc352f305 TEI template: improve publicationStmt.
Add support for publisher, address, pubPlace, and date variables.
2018-08-16 21:19:03 -07:00
John MacFarlane
0910e92187 TEI improvements.
- Ensure that title element is always present, even if empty.
- Put author tags in the template, rather than adding them in
  the writer.

Closes #4839.
2018-08-16 21:06:49 -07:00
John MacFarlane
fe312b0a7a LaTeX writer/template: be sensitive to filecolor variable.
`linkcolor` only affects internal links, and `urlcolor` only
affects linked URLs.  For external links, the option to use is
`filecolor`.

Closes #4822.
2018-08-16 20:48:51 -07:00
John MacFarlane
13dea94a91 Markdown reader: Use "tex" instead of "latex" for raw tex-ish content.
We can't always tell if it's LaTeX, ConTeXt, or plain TeX.
Better just to use "tex" always.

Also changed:

ConTeXt writer: now outputs raw "tex" blocks as well as "context".
(Closes #969).

RST writer: uses ".. raw:: latex" for "tex" content.
(RST doesn't support raw context anyway.)

Note that if "context" or "latex" specifically is desired,
you can still force that in a markdown document by using
the raw attribute (see MANUAL.txt):

    ```{=latex}
    \foo
    ```

Note that this change may affect some filters, if they assume that raw
tex parsed by the Markdown reader will be RawBlock (Format "latex").
In most cases it should be trivial to modify the filters to accept
"tex" as well.
2018-08-15 10:25:12 -07:00
Cyril Roelandt
2ae8272754 Support "toc-title" in the beamer template. (#4835)
It is a bit awkward to have a title for every frame, but not for the one
that holds the table of contents. Allow users to specify a title if they
wish.
2018-08-15 09:58:17 -07:00
John MacFarlane
e44815a9ee Bump version to 2.3, because of breaking API change to Macro. 2018-08-14 11:54:04 -07:00
John MacFarlane
dae3a09433 ODT reader: deal gracefully with missing <office:font-face-decls/>.
This allows pandoc to parse ODT document produced by KDE's Calligra.
Closes #4336.
2018-08-14 11:52:14 -07:00
John MacFarlane
c27ce1e70e LaTeX reader: handle parameter patterns for \def.
For example:  `\def\foo#1[#2]{#1 and #2}`.

Closes #4768.  Also fixes #4771.

API change:  in Text.Pandoc.Readers.LaTeX.Types,
new type ArgSpec added.  Second parameter of Macro
constructor is now `[ArgSpec]` instead of `Int`.
2018-08-14 00:03:55 -07:00
John MacFarlane
919c50162c RST writer: render Divs with admonition classes as admonitions.
Also omit Div with class "admonition-title". These are generated
by the RST reader and should be omitted on round-trip.

Closes #4833.
2018-08-13 11:17:26 -07:00
John MacFarlane
c3f17cb0d7 RST writer: use .. container for generic Divs, instead of raw HTML. 2018-08-13 11:00:28 -07:00
John MacFarlane
91cc2492fa Makefile: ghc options to speed compilation for 'make quick'. 2018-08-13 09:30:06 -07:00
John MacFarlane
6d14f53bd9 LaTeX reader: Allow % characters in URLs.
This affects `\href` and `\url`.  Closes #4832.
2018-08-12 16:46:48 -07:00
Alexander Krotov
81131ef5d1 Muse reader: don't allow digits after closing marker in lightweight markup
This change makes reader more compatible with Emacs Muse
2018-08-12 21:20:07 +03:00
Albert Krewinkel
acf6df1aef
Lua: cleanup Lua utils, remove unused functions. 2018-08-12 12:28:06 +02:00
John MacFarlane
fb3ee947aa MANUAL: more detail on customization in syntax highlighting section. 2018-08-11 16:31:35 -07:00
John MacFarlane
49cfcc9c74 Travis: use more compiler warnings. 2018-08-10 22:39:27 -07:00
John MacFarlane
b3c9d94fe0 Avoid non-exhaustive pattern match. 2018-08-10 22:31:49 -07:00
John MacFarlane
1e0439710b Avoid incomplete pattern patch. 2018-08-10 22:10:07 -07:00
John MacFarlane
55047b4919 Makefile: add some warnings to GHCOPTS. 2018-08-10 16:16:00 -07:00
John MacFarlane
65aea82a04 Avoid non-exhaustive pattern match. 2018-08-10 15:56:43 -07:00
John MacFarlane
6003c596d7 Avoid non-exhaustive pattern match. 2018-08-10 15:44:20 -07:00
John MacFarlane
84e0b90519 Avoid non-exhaustive pattern match. 2018-08-10 15:34:10 -07:00
John MacFarlane
7a1ec21faa Avoid non-exhaustive pattern matches. 2018-08-10 15:22:10 -07:00
John MacFarlane
0ae79275a9 Avoid non-exhaustive pattern match. 2018-08-10 15:17:49 -07:00
John MacFarlane
7bc879268c Avoid non-exhaustive pattern match. 2018-08-10 15:13:19 -07:00
John MacFarlane
e055f1b21e Avoid non-exhaustive pattern match. 2018-08-10 15:05:25 -07:00
John MacFarlane
ec89628984 Avoid a non-exhaustive pattern match. 2018-08-10 14:59:59 -07:00
John MacFarlane
9752dcd61a HTML writer: Don't prefix epub: attributes with data-. 2018-08-08 09:53:13 -07:00
John MacFarlane
6728049225 Bump to 2.2.3.2, update man page, changelog. 2018-08-07 09:30:34 -07:00
John MacFarlane
b76203ccf1 Markdown reader: Properly handle boolean values in YAML metadata.
This fixes a regression in 2.2.3, which cause boolean values to
be parsed as MetaInlines instead of MetaBool.

Note also an undocumented (but desirable) change in 2.2.3:
numbers are now parsed as MetaInlines rather than MetaString.

Closes #4819.
2018-08-07 09:26:58 -07:00
John MacFarlane
030e8969c7 Bump to 2.2.3.1, update man page and changelog. 2018-08-06 21:37:15 -07:00
John MacFarlane
94c3753c08 Fix parsing of embedded mappings in YAML metadata.
This fixes a regression in 2.2.3 which caused embedded mappings
(e.g. mappings in sequences) not to work in YAML metadata.

Closes #4817.
2018-08-06 12:32:04 -07:00
John MacFarlane
788ecf06f6 Update README.md. 2018-08-05 16:53:09 -07:00
John MacFarlane
d8a614d7bb Bump to 2.2.3, update changelog and man page. 2018-08-05 12:40:56 -07:00
John MacFarlane
581a3514ca RST reader: improve parsing of inline interpreted text roles.
* Use a Span with class "title-reference" for the default
  title-reference role.
* Use B.text to split up contents into Spaces, SoftBreaks, and Strs
  for title-reference.
* Use Code with class "interpreted-text" instead of Span and Str for
  unknown roles.  (The RST writer has also been modified to round-trip
  this properly.)
* Disallow blank lines in interpreted text.
* Backslash-escape now works in interpreted text.
* Backticks followed by alphanumerics no longer end interpreted text.

Closes #4811.
2018-08-05 09:56:43 -07:00
John MacFarlane
f7dc3e7487 Added test case for #4669 to repository. 2018-08-05 09:21:45 -07:00
Kirill Müller
5866892a9d Describe required space as breaking change (#4808) 2018-08-04 12:17:10 -07:00
Francesco Occhipinti
74a35b123c RST writer: allow images to be directly nested within links, closes #4810 (#4814) 2018-08-03 12:13:18 -07:00
Mauro Bieg
f83bdb1ac5 Better error message on -t pdf -o out.pdf (#4815)
closes #1155 (again)
2018-08-03 12:04:38 -07:00