Commit graph

176 commits

Author SHA1 Message Date
John MacFarlane
4cf3aaecde Test for base 4.4.0 instead of 4.5.0 for argument/filename encoding. 2012-06-25 14:27:22 -07:00
John MacFarlane
cc39c313c5 Don't encode/decode file paths if base >= 4.5.
Prior to base 4.5 (and perhaps earlier - check), filepaths and command
line arguments were treated as unencoded lists of bytes, not unicode
strings, so we had to work around that by encoding and decoding
them.  This commit adds CPP checks for base 4.5 that disable the
encoding/decoding.

Fixes a bug with multilingual filenames when pandoc was compiled
with ghc 7.4. Closes #540.
2012-06-24 10:58:15 +02:00
Jonas Smedegaard
61f8dd4da8 Add support for Slideous output. 2012-05-24 10:31:18 +02:00
John MacFarlane
b2340cd874 Added 'zenburn' highlight style from highlighting-kate.
Depend on h-k 0.5.0.6.
2012-05-17 18:54:41 -07:00
John MacFarlane
5f889b9396 Added writerTeXLigatures to WriterOptions, --no-tex-ligatures option.
This is useful for those who want to use advanced OpenType features
with xelatex/lualatex.
2012-05-11 23:00:46 -07:00
John MacFarlane
c77e0c5d77 Input files with .db extension treated as docbook by default. 2012-04-14 21:56:16 -07:00
John MacFarlane
d4d9504950 Changed -V so that you can specify a key without a value.
Such keys get the value `true`.
2012-03-09 10:45:01 -08:00
John MacFarlane
9766b532f3 Added beamer+lhs as output format. 2012-03-09 10:32:32 -08:00
John MacFarlane
9ef7ecd47c Print texmath version in --version output. 2012-02-11 16:21:37 -08:00
John MacFarlane
bec9485d93 Re-added the --ascii option.
Now it is implemented in pandoc.hs, not in the HTML writer.
2012-02-05 14:58:55 -08:00
John MacFarlane
550b931c3c Text.Pandoc.XML: Export fromEntities.
Remove old 'deEntities' from pandoc.hs.
2012-02-05 14:37:33 -08:00
John MacFarlane
ce9f5f36c8 pandoc: Treat html5+lhs as an html format. 2012-02-05 09:58:16 -08:00
John MacFarlane
75485c2f11 Complete rewrite of LaTeX reader.
* The new reader is more robust, accurate, and extensible.
  It is still quite incomplete, but it should be easier
  now to add features.

* Text.Pandoc.Parsing: Added withRaw combinator.

* Markdown reader: do escapedChar before raw latex inline.
  Otherwise we capture commands like \{.

* Fixed latex citation tests for new citeproc.

* Handle \include{} commands in latex.
  This is done in pandoc.hs, not the (pure) latex reader.
  But the reader exports the needed function, handleIncludes.

* Moved err and warn from pandoc.hs to Shared.

* Fixed tests - raw tex should sometimes have trailing space.

* Updated lhs-test for highlighting-kate changes.
2012-02-04 09:56:43 -08:00
John MacFarlane
928b1380f3 Change copyright date. 2012-01-31 08:59:19 -08:00
John MacFarlane
8f1bfec7b9 Added --epub-embed-font option.
* This can be repeated for multiple fonts.
* Added parameter for fonts to embed to writeEPUB.
* Added ttf, otf to Mime types in Text.Pandoc.MIME.
2012-01-30 13:09:52 -08:00
John MacFarlane
8abe08d6d4 Made beamer an output format, removed pdf as output format.
Removed `--beamer` option; instead, use `beamer` as output format.
There is no longer a `pdf` output format; instead, pandoc tries
to produce a pdf if the output file has a `.pdf` extension.
(The output format can be latex -- the default for pdf output,
latex+lhs, or beamer.)

This seems more consistent with the way pandoc currently works
(e.g. we have an `html5` output format, not an `--html5` option).
2012-01-28 11:41:26 -08:00
John MacFarlane
5fc6669be6 Added --atx-headers option. 2012-01-26 23:55:37 -08:00
John MacFarlane
1470aad04b Reorganized --help output to match order of options in man page. 2012-01-25 22:45:49 -08:00
John MacFarlane
60bf741d68 Added --slide-level option to override default.
This allows users to select a slide level below the first
header level with content.

Note that content under sections above the slide level will not appear
in slides (either in beamer or in HTML slide shows).

This is primarily useful for creating documents that can be made
into both slides and handouts (which contain additional content
outside the slides).
2012-01-25 17:51:52 -08:00
John MacFarlane
29086d4a96 Slight edits to a couple error messages. 2012-01-21 15:13:12 -08:00
John MacFarlane
e721c7428e Removed beamer output format; added --beamer option. 2012-01-21 14:49:26 -08:00
John MacFarlane
e6e4311ddd pandoc: Better error checking. 2012-01-21 14:18:36 -08:00
John MacFarlane
194bdadc57 Improved deprecation warnings for --html5, --offline. 2012-01-21 09:55:37 -08:00
John MacFarlane
09b7ae4073 pandoc: Removed deprecated --xetex option. 2012-01-21 09:54:11 -08:00
John MacFarlane
a75a0762af pandoc: Check for latex program earlier. 2012-01-21 09:34:47 -08:00
John MacFarlane
58f9b3bc38 pandoc: Added optLaTeXProgram. 2012-01-21 00:50:21 -08:00
John MacFarlane
4d98815edd Refactored error reporting in pandoc.hs. 2012-01-20 22:12:03 -08:00
John MacFarlane
d7b67f48cd PDF: Use string instead of special TeXProgram type. 2012-01-20 21:36:04 -08:00
John MacFarlane
b4a6c02343 PDF: Better error message. 2012-01-20 19:52:56 -08:00
John MacFarlane
ce3653e39d pandoc: Output to pdf now works. 2012-01-20 19:39:18 -08:00
John MacFarlane
c9c78344b1 PDF: Removed TeXError type, just return a bytestring. 2012-01-20 19:11:35 -08:00
John MacFarlane
ba81cda7f1 Added Docx writer.
* New module `Text.Pandoc.Docx`.
* New output format `docx`.
* Added reference.docx.
* New option `--reference-docx`.

The writer includes support for highlighted code blocks
and math (which is converted from TeX to OMML using
texmath's new OMML module).
2012-01-19 12:10:49 -08:00
John MacFarlane
da8425598a New treatment of dashes in --smart mode.
* `---` is always em-dash, `--` is always en-dash.
* pandoc no longer tries to guess when `-` should be en-dash.
* A new option, `--old-dashes`, is provided for legacy documents.

Rationale: The rules for en-dash are too complex and
language-dependent for a guesser to work reliably.  This
change gives users greater control.  The alternative of
using unicode isn't very good, since unicode em- and en-
dashes are barely distinguishable in a monospace font.
2012-01-01 13:48:28 -08:00
John MacFarlane
600c22e7bf Unescape entities in citation refId.
Closes #357.

The refIds coming from citeproc contain XML numeric
entities, and these don't match with the citation keys
parsed by pandoc.  Solution is to unescape them.
2011-12-29 23:11:42 -08:00
John MacFarlane
31fb776c32 DZSlides: Added dzslides/template.html.
This is the unaltered file from the dzslides repository.
Pandoc now reads it, looking for the core part, and includes
this in the new dzslides template via the 'dzslides-core'
variable.

When dzslides is updated, you can just put the new
template.html in your `~/.pandoc/dzslides` directory,
and things should work -- provided the core part can
be identified as everything from

    <!-- {{{{ dzslides core

to the end of the file.

This should make it a bit easier to keep up to date.
2011-12-29 17:41:06 -08:00
John MacFarlane
cd190be09e Made --version informative about versions of dependencies. 2011-12-29 14:17:10 -08:00
John MacFarlane
763a9610cd Better formatting for list of highlighting languages. 2011-12-29 14:03:39 -08:00
John MacFarlane
0aa6269b04 Added "beamer" a few places where we test for latex. 2011-12-29 13:58:13 -08:00
John MacFarlane
f74c40b460 Don't use --smart automatically with man output.
Previously pandoc used smart mode automatically when `man`
output was selected.
2011-12-29 13:54:21 -08:00
John MacFarlane
febbf5d818 Better formatting of input/output formats in --help. 2011-12-29 13:53:25 -08:00
John MacFarlane
cdb01e6d54 Made html5 and html5+lhs output formats.
Deprecated the `--html5`/`-5` flag. Use the output format
instead.
2011-12-29 13:39:03 -08:00
John MacFarlane
16629bf1ce Added --highlight-style and --no-highlight options. 2011-12-27 23:46:47 -08:00
John MacFarlane
fca95bf43c Removed highlighting flag. Highlighting support is now standard. 2011-12-22 13:24:43 -08:00
John MacFarlane
f61e09cb9a Added writerHighlight to WriterOptions. 2011-12-22 13:12:08 -08:00
John MacFarlane
89c962a18c Use blaze-html instead of xhtml for HTML generation.
* This is a breaking API change for `writeHtml`.
* It introduces a new dependency on blaze-html.
* Pandoc now depends on highlighting-kate >= 0.4, which
  also uses blaze-html.
* The --ascii option has been removed, because of differences
  in blaze-html's and xhtml's escaping.
* Pandoc will no longer transform leading newlines in code
  blocks to `<br/>` tags.
2011-12-17 22:46:03 -08:00
John MacFarlane
fb5f9a90f1 New slidy directory for "self-contained." 2011-12-03 22:10:18 -08:00
John MacFarlane
41eded5dd2 pandoc.hs : changed a couple writerName to writerName'.
This fixes a bug in which `pandoc --self-contained` would only
work properly if `-t html` were specified explicitly.
2011-11-23 20:15:24 -08:00
John MacFarlane
db1c16e856 Set --standalone implicitly when non-text output format.
(ODT, EPUB).  This restores pandoc's previous behavior.
You can again do `pandoc test.txt -o test.odt` and get a standalone
ODT file.

Resolves #351.
2011-11-22 14:22:22 -08:00
John MacFarlane
af085e0c60 Added --self-contained, integrated into src/pandoc.hs.
--offline is now a deprecated synonym for --self-contained.

TODO: Documentation, remove old S5 module.
2011-11-21 15:24:28 -08:00
John MacFarlane
fc1c17b174 Added an asciidoc writer (partial).
Still TODO:

- documentation in README
- add default.asciidoc to templates/
- lists
- tables
- proper escaping
- footnotes with blank lines - print separately at end?
  currently they are just ignored.
- fix header (date gives weird result on pandoc README)
2011-11-16 19:14:55 -08:00