John MacFarlane
7b6273362a
pandoc.cabal: use cpphs if embed_data_files and darwin.
2017-02-12 19:59:47 +01:00
John MacFarlane
1e694805a1
stack.yamls: Use lts-8.0.
2017-02-12 19:16:53 +01:00
John MacFarlane
79561920c8
Comment out instruction to use cpphs in macos stack.yaml.
...
I don't think this is still needed. If the Travis build fails,
we can try adjusting the CPP to make it more compatible.
2017-02-12 18:24:31 +01:00
Albert Krewinkel
64ad6ff8d9
Merge pull request #3438 from ilabdsf/org-anchor-links
...
Org anchor links
2017-02-12 16:50:36 +01:00
Alexander Krotov
9e3f5a5147
Do not strip # from Org anchor links
...
Links with # are perfectly valid according to http://orgmode.org/manual/Internal-links.html#Internal-links
2017-02-12 17:09:44 +03:00
Alexander Krotov
48f809384a
Add Org writer unit tests
2017-02-12 17:09:07 +03:00
John MacFarlane
48c78713c8
Rename logMessagesToJSON -> encodeLogMessages.
2017-02-11 22:58:22 +01:00
John MacFarlane
cf26bc5f68
RST reader: Support .. line-block
directive.
...
This is deprecated but may still be in older documents.
2017-02-11 22:47:05 +01:00
John MacFarlane
2759960204
RST reader/writer: properly handle table captions.
...
Currently the support for the `.. table` directive is a bit
limited; we don't yet support the `widths` field. But at least
you can have a proper captioned table.
2017-02-11 22:37:07 +01:00
John MacFarlane
510a6ee059
RST reader: Initial support of .. table directive.
...
This allows adding captions to tables.
2017-02-11 22:21:49 +01:00
John MacFarlane
1a23bc65b8
Fixed small bug in RST list parsing.
...
See #3432 . Previously the parser didn't handle properly this
case:
* - a
- b
* - c
- d
2017-02-11 20:55:13 +01:00
John MacFarlane
92a5445aa1
Logging: export logMessagesToJSON.
...
Use a deterministic order for fields.
2017-02-11 20:13:33 +01:00
John MacFarlane
a6c649cfc8
Added --log option to save log messages in JSON format to a file.
...
See #3392 .
2017-02-11 09:59:54 +01:00
John MacFarlane
e0d21dbb82
Class.report: Save all log messages in state.
...
Verbosity level only affects which are printed to stdout.
(Exception: DEBUG messages are only printed, never saved to
state.)
2017-02-11 09:06:49 +01:00
John MacFarlane
31f5c02743
HTML writer: report when not rendering raw inline/block.
2017-02-11 00:20:45 +01:00
John MacFarlane
76c55466d3
Use new warnings throughout the code base.
2017-02-11 00:14:44 +01:00
John MacFarlane
8ad7e2c21f
Logging: added ToJSON instance and showLogMessage.
...
This gives us the possibility of both machine-readable
and human-readable output for log messages.
See #3392 .
2017-02-10 22:06:07 +01:00
John MacFarlane
5e1249481b
Added Text.Pandoc.Logging (exported module).
...
This now contains the Verbosity definition previously
in Options, as well as a new LogMessage datatype that
will eventually be used instead of raw strings for
warnings.
This will enable us, among other things, to provide
machine-readable warnings if desired.
See #3392 .
2017-02-10 20:59:54 +01:00
John MacFarlane
c76eec97d4
LaTeX reader: Improved messages for skipped environments.
2017-02-10 10:00:23 +01:00
John MacFarlane
29b1ed0b84
LaTeX reader: Improved warning messages for unknown commands.
2017-02-10 08:36:04 +01:00
John MacFarlane
a84a360f7a
HTML reader: Added warnings for ignored material.
...
See #3392 .
2017-02-10 08:18:08 +01:00
John MacFarlane
87507e1b9c
LaTeX reader: Issue warnings when skipping unknown latex commands.
...
See #3392 .
2017-02-09 22:21:07 +01:00
John MacFarlane
0a4ba91994
Reverted deferred media bag code.
...
This was not actually being used. Since it adds considerable
complexity, it's best not to include it unless we are
actually going to use it.
The original thought was that we could do all loading in the
readers, always deferred and thus costless. This was supposed
to eliminate the need to traverse trees loading resources in
the docx, epub, odt writers and in PDF and SelfContained.
(It would also have the side effect that --extract-media could
be used with all input formats. This wasn't an intended side
effect, and it could be debated whether it's desirable, since
--extract-media was originally designed to extract the media
contained in a docx or odt or epub container.)
However, we never actually took the step of moving all of this
work to the readers, for a couple of reasons. The main reason
is that we'd still need to fetch resources in the docx,
epub, odt, pdf and self-contained writers, since the Pandoc AST might
have been built programatically and hence not generated by a reader.
So it's not clear that doing lazy loading in the readers would have
any real advantage.
I'm still not completely sure about this --- if we change our
minds it would be easy to undo this commit.
@jkr comments welcome.
2017-02-09 21:26:24 +01:00
John MacFarlane
6949d74e01
LaTeX reader: support \lstinputlisting
.
...
Closes #2116 .
2017-02-08 00:07:53 +01:00
John MacFarlane
e4d7bed51c
RST reader: Improved admonition support.
...
* We no longer add an "admonition" class, we just use the
class for the type of admonition, "note" for example.
* We put the word corresponding to the label in a paragraph
inside a div at the beginning of the admonition with class
"admonition-title".
* This is about as close as we can get to RST's own output.
See #223 .
2017-02-07 23:18:56 +01:00
John MacFarlane
857d35fce4
Refactored some files formerly in LaTeX reader.
...
* Export readFileFromDirs from Class.
* Export insertIncludedFile from Parsing.
Simplified code in LaTeX/RST readers.
2017-02-07 22:33:05 +01:00
John MacFarlane
1ecc48e9f9
Moved readFileFromDirs to Text.Pandoc.Class.
...
This can be used in several different modules, not just
LaTeX reader.
2017-02-07 21:42:35 +01:00
John MacFarlane
9db98550df
Refactored include file handling in LaTeX reader.
2017-02-07 19:16:56 +01:00
John MacFarlane
f10dd380bb
Makefile: make version overridable.
2017-02-07 19:01:21 +01:00
John MacFarlane
4ae0cddb92
Use latest pandoc-citeproc dev in stack builds.
2017-02-07 15:07:48 +01:00
John MacFarlane
e07e83f831
Update dev version of pandoc-citeproc in stack.yaml.
2017-02-07 10:42:18 +01:00
John MacFarlane
0d9cac7ed6
Use latest dev version of pandoc-citeproc.
2017-02-07 09:30:44 +01:00
John MacFarlane
47a16065c4
Removed --parse-raw and readerParseRaw.
...
These were confusing.
Now we rely on the +raw_tex or +raw_html extension with latex
or html input.
Thus, instead of
--parse-raw -f latex
we use
-f latex+raw_tex
and instead of
--parse-raw -f html
we use
-f html+raw_html
2017-02-06 23:33:23 +01:00
John MacFarlane
d1c16c4785
default.beamer changes (Thomas Hodgson):
...
- Use dvipsnames options when colorlinks specified (otherwise
we get an error for 'maroon')
- Added titegraphic and logo variables.
2017-02-06 17:04:55 +01:00
John MacFarlane
c604371aa4
Fix import
2017-02-06 17:03:03 +01:00
John MacFarlane
12d96508c6
Merge pull request #245 from twsh/titlegraphiclogo
...
Add options for title graphic and logo
2017-02-06 17:02:18 +01:00
John MacFarlane
f082ddb7aa
Merge pull request #244 from twsh/dvipsnames
...
Added dvipsnames option for colorlinks
2017-02-06 17:01:09 +01:00
Thomas Hodgson
017c194995
Add options for title graphic and logo
...
Allow specification of a title graphic and/or logo for Beamer.
2017-02-06 15:26:18 +00:00
Thomas Hodgson
99cc5cd850
Added dvipsnames option for colorlinks
...
This defines Maroon, among other colours.
2017-02-06 14:34:41 +00:00
John MacFarlane
4cdb1a0891
Changed year on copyright message.
2017-02-06 14:53:31 +01:00
John MacFarlane
37e579581a
Consolidated file arguments into Opt.
2017-02-06 14:52:16 +01:00
John MacFarlane
67dc15771d
Further refactoring of App.
...
Moved option parsing code into App.
pandoc.hs is now a 2-liner.
2017-02-06 14:46:48 +01:00
John MacFarlane
fc8208e8bc
Use unicode-math by default in default.latex template.
...
mathspec will be used in xelatex if the `mathspec` variable is
set; otherwise unicode-math will be used.
Thanks to Václav Haisman.
2017-02-06 10:50:36 +01:00
John MacFarlane
1ae92a53c0
Merge pull request #234 from wilx/master-use-unicode-math
...
Use `unicode-math`.
2017-02-06 10:42:56 +01:00
John MacFarlane
6cb1e19d03
Removed another redundant import.
2017-02-06 08:58:39 +01:00
Vaclav Haisman
b2aa9f0d0e
LaTeX: Add missing $endif$ after rebase.
2017-02-06 07:48:29 +01:00
Vaclav Haisman
6205ac4b94
LaTeX: Don't load fontspec
before unicode-math
...
The `unicode-math` package loads `fontspec` so explict loading of
`fontspec` before `unicode-math` is not necessary.
2017-02-06 07:48:29 +01:00
Vaclav Haisman
1e03774d34
Use unicode-math
.
...
Use `mathspec` with only XeLaTeX on request.
2017-02-06 07:48:29 +01:00
John MacFarlane
b4ccb70893
Fix an unneeded import warning.
2017-02-05 23:12:58 +01:00
John MacFarlane
c93ecfc3c5
Handle language in inline code with --listings.
...
Closes #3422 .
2017-02-05 22:22:42 +01:00