Commit graph

93 commits

Author SHA1 Message Date
John MacFarlane
48729f9715 Ms writer improvements:
- added some variables to the default template.
- cleaner output for images (stringify alt text).
2017-04-04 17:21:02 +02:00
John MacFarlane
b474a23296 MANUAL: document highlighting support in ms. 2017-04-02 23:10:42 +02:00
John MacFarlane
420e3eb26e Allow a theme file as argument to --highlight-style.
Also include a sample, `default.theme`, in `data/`.
2017-04-01 22:27:00 +02:00
John MacFarlane
80d093843b Allow dynamic loading of syntax definitions.
See #3334.

* Add writerSyntaxMap to WriterOptions.
* Highlighting: added parameter for SyntaxMap to highlight.
* Implemented --syntax-definition option.

TODO:

[ ] Figure out whether we want to have the xml parsing
    depend on the dtd (it currently does, and fails unless
    the language.dtd is found in the same directory).
[ ] Add an option to read a KDE syntax highlighting theme
    as a custom style.
[ ] Add tests.
2017-03-30 22:36:36 +02:00
John MacFarlane
831e1c5edd Added JATS writer.
* New module Text.Pandoc.Writer.JATS exporting writeJATS.
* New output format `jats`.
* Added tests.
* Revised manual.
2017-03-30 01:16:34 +02:00
John MacFarlane
e3472f0df5 MANUAL: document that html4 is technically XHTML 1.0 transitional. 2017-03-27 21:14:18 +02:00
John MacFarlane
604c824d38 Update date on MANUAL 2017-03-26 17:19:56 +02:00
John MacFarlane
a7ae4b1ee2 Ms writer: support --toc, date, abstract. 2017-03-24 17:25:09 +01:00
John MacFarlane
f0abbe7533 Allow creation of pdf via groff ms and pdfroff.
pandoc -t ms -o output.pdf input.txt
2017-03-23 21:24:01 +01:00
John MacFarlane
48c88d566d Add space_in_atx_header extension.
This is enabled by default in pandoc and GitHub markdown but not the
other flavors.

This requirse a space between the opening #'s and the header
text in ATX headers (as CommonMark does but many other implementations
do not).  This is desirable to avoid falsely capturing things ilke

    #hashtag

or

    #5

Closes #3512.
2017-03-20 21:55:30 +01:00
Albert Krewinkel
f2f6851713 Lua filters (#3514)
* Add `--lua-filter` option.  This works like `--filter` but takes pathnames of special lua filters and uses the lua interpreter baked into pandoc, so that no external interpreter is needed.  Note that lua filters are all applied after regular filters, regardless of their position on the command line.
* Add Text.Pandoc.Lua, exporting `runLuaFilter`.  Add `pandoc.lua` to data files.
* Add private module Text.Pandoc.Lua.PandocModule to supply the default lua module.
* Add Tests.Lua to tests.
* Add data/pandoc.lua, the lua module pandoc imports when processing its lua filters.
* Document in MANUAL.txt.
2017-03-20 15:17:03 +01:00
John MacFarlane
f5f6ff2c75 MANUAL: document --abbreviations.
Closes #256.
2017-03-16 22:23:35 +01:00
John MacFarlane
d5086e7bd7 Docx writer: Support 9 levels of headers.
Closes #1642.
2017-03-13 21:48:00 +01:00
John MacFarlane
cf0a1b2034 MANUAL: Small clarification in YAML metadata section. 2017-03-12 10:08:34 +01:00
Jakob Voß
69e1b959e0 Clarify that meta-json contains transformed values (#3491)
Make clear that template variable `meta-json` does not contain plain text values or JSON output format but field values transformed to the selected output format.
2017-03-07 14:31:15 +01:00
John MacFarlane
37152f9351 Document that html5 output is polyglot compatible. 2017-03-04 10:12:33 +01:00
John MacFarlane
c7e2c718eb Removed --epub-stylesheet; use --css instead.
* Removed writerEpubStylesheet in WriterOptions.
* Removed `--epub-stylesheet` option.
* Allow `--css` to be used with epub.
* Allow multiple stylesheets to be used.
* Stylesheets will be taken both from `--css` and from
  the `stylesheet` metadata field (which can contain either
  a file path or a list of them).

Closes #3472, #847.
2017-02-27 21:29:16 +01:00
John MacFarlane
377c27befe --self-contained: don't incorporate elements with data-external="1".
You can leave an external link as it is by adding the attribute
data-external="1" to the element.  Pandoc will then not try to
incorporate its content when `--self-contained` is used.  This is
similar to a feature already supported by the EPUB writer.

Closes #2656.
2017-02-26 22:48:02 +01:00
Mauro Bieg
2d6b834cdb MANUAL.txt explain --webtex SVG url (#3471) 2017-02-26 11:37:57 +01:00
Roland Hieber
699d289cc5 Add sourcefile and outputfile template variables (#3439)
Closes #3431.
2017-02-25 23:15:56 +01:00
John MacFarlane
3a1a50a45f Make --ascii work with DocBook output too. 2017-02-25 13:35:34 +01:00
John MacFarlane
4739620afe Special-case .stretch class for images in reveal.js.
Now in reveal.js, an image with class `stretch` in a paragraph
by itself will stretch to fill the whole screen, with no
caption or figure environment.

Closes #1291.
2017-02-23 21:16:45 +01:00
John MacFarlane
c2e4ea10b3 MANUAL: Document that content above slide-level will be omitted...
in slide shows.  See #3460, #2265.
2017-02-22 14:04:30 +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
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
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
Thenaesh Elango
942189056d Allow user to specify User-Agent (#3421)
This commit enables users to specify the User-Agent
header used when pandoc requests a document from
a URL. This is done by setting an environment variable.
For instance, one can do:
USER_AGENT="..." ./pandoc -f html -t markdown http://example.com

Signed-off-by: Thenaesh Elango <thenaeshelango@gmail.com>
2017-02-05 11:28:39 +01:00
Joachim Breitner
ed4f84e84b Manual: Mention limitations of Literate Haskell Support (#3413)
This fixes #3410.
2017-02-03 21:38:28 +01:00
Mauro Bieg
5cd475be70 HTML and DocBook writers: fix internal links with writerIdentifierPrefix opt (#3398)
closes #3397
2017-02-03 09:53:43 +01:00
John MacFarlane
7018003811 --mathml and MathML in HTMLMathMethod longer take an argument.
The argument was for a bridge javascript that used to be necessary
in 2004.  We have removed the script already.
2017-01-30 11:31:50 +01:00
John MacFarlane
5e2754f515 Make epub an alias for epub3, not epub2. 2017-01-30 10:19:30 +01:00
John MacFarlane
ae8ac926a4 Merge branch 'typeclass' 2017-01-29 22:13:03 +01:00
John MacFarlane
6af01bae97 Updated authors and date in MANUAL 2017-01-29 21:07:55 +01:00
John MacFarlane
b6c1d491f5 Split writeDocbook into writeDocbook4, writeDocbook5.
Removed writerDocbookVersion in WriterOptions.
Renamed default.docbook template to default.docbook4.
Allow docbook4 as an output format.
But alias docbook = docbook4.
2017-01-26 22:40:57 +01:00
John MacFarlane
190943e1fd EPUB writer: split writeEPUB into writeEPUB2, writeEPUB3.
Also include explicit epub2 output format in CLI tool.
2017-01-26 22:09:21 +01:00
John MacFarlane
e02e3aa10c Removed duplicate name in authors 2017-01-25 17:07:43 +01:00
John MacFarlane
0bcc81c0b1 Removed writerTeXLigatures.
Make `smart` extension work in LaTeX/ConTeXt writers instead.

Instead of `-t latex --no-tex-ligatures`, do `-t latex-smart`.
2017-01-25 17:07:42 +01:00
John MacFarlane
4f6e6247f9 Made smart extension default for pandoc markdown.
Updated tests.
2017-01-25 17:07:42 +01:00
John MacFarlane
412ed3f132 Make the smart extension affect the Markdown writer.
Thus, to "unsmartify" something that has been parsed as
smart by pandoc, you can use `-t markdown+smart`, and
straight quotes will be produced instead of curly quotes,
etc.

Example:

    % pandoc -f latex -t markdown+smart
    ``hi''---ok
    ^D
    "hi"---ok
2017-01-25 17:07:42 +01:00
John MacFarlane
5bf9125770 Removed readerOldDashes and --old-dashes option, added old_dashes extension.
API change.  CLI option change.
2017-01-25 17:07:42 +01:00
John MacFarlane
6f8b967d98 Removed readerSmart and the --smart option; added Ext_smart extension.
Now you will need to do

    -f markdown+smart

instead of

    -f markdown --smart

This change opens the way for writers, in addition to readers,
to be sensitive to +smart, but this change hasn't yet been made.

API change. Command-line option change.

Updated manual.
2017-01-25 17:07:42 +01:00
John MacFarlane
8165014df6 Removed --normalize option and normalization functions from Shared.
* Removed normalize, normalizeInlines, normalizeBlocks
  from Text.Pandoc.Shared.  These shouldn't now be necessary,
  since normalization is handled automatically by the Builder
  monoid instance.

* Remove `--normalize` command-line option.

* Don't use normalize in tests.

* A few revisions to readers so they work well without normalize.
2017-01-25 17:07:41 +01:00
John MacFarlane
87170e2af4 Removed deprecated --no-wrap option. 2017-01-25 17:07:41 +01:00
John MacFarlane
767638a54e Removed deprecated --chapters option. 2017-01-25 17:07:41 +01:00
John MacFarlane
ce1664cf2b Simplified reference-docx/reference-odt to reference-doc.
* Text.Pandoc.Options.WriterOptions: removed writerReferenceDocx
  and writerReferenceODT, replaced them with writerReferenceDoc.
  This can hold either an ODT or a Docx. In this way, writerReferenceDoc
  is like writerTemplate, which can hold templates of different
  formats. [API change]

* Removed `--reference-docx` and `--reference-odt` options.

* Added `--reference-doc` option.
2017-01-25 17:07:41 +01:00
John MacFarlane
70aa7b0485 Added --fail-if-warnings option. 2017-01-25 17:07:40 +01:00
John MacFarlane
63dc6bd025 Added a --quiet option to suppress warnings.
Use this also in Tests.Old.
2017-01-25 17:07:40 +01:00
John MacFarlane
46b1c31925 Add breezeDark to the list of highlighting styles. 2017-01-19 15:59:57 +01:00
John MacFarlane
1dc4b3925d Clarify that blank space is needed around footnotes.
Closes #3352.
2017-01-15 10:51:49 +01:00