Commit graph

513 commits

Author SHA1 Message Date
John MacFarlane
95b0f28831 Updated tests for euro-related template changes. 2012-03-07 13:29:03 -08:00
John MacFarlane
210d186f9c Updated tests for context template changes. 2012-03-03 08:38:40 -08:00
John MacFarlane
8a218dc0d5 Fixed LaTeX writer tests for last patch. 2012-03-03 06:34:38 -08:00
John MacFarlane
f59e33dd1a LaTeX reader: Add ", " to suffix...
if it doesn't start w space or punctuation.  Otherwise we
get no space between the year and the suffix in author-date styles.
2012-02-10 21:48:42 -08:00
John MacFarlane
df3f3ddb6e LaTeX reader: use raw latex as fallback for Cites.
This way you can still get the raw latex back, even if you don't
process with citeproc.  Previously, cites were not visible at all
unless you specified --biblio on the command line and converted
them using citeproc, or used --natbib or --biblatex.
2012-02-06 12:42:12 -08:00
John MacFarlane
be8bddcaf3 Improvements to LaTeX reader:
* Handle \ps
* Ignore ignorable commands in a uniform way.
* Handle \P
* handleIncludes skips \verb commands.
2012-02-04 22:28: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
d4c2f02e08 Updated citation tests with en-dashes. 2012-01-30 10:03:01 -08:00
John MacFarlane
3a0b3df007 Put date in YYYY-MM-DD format if possible for HTML, docx metadata.
Added normalizeDate to Text.Pandoc.Shared.
2012-01-28 15:54:34 -08:00
John MacFarlane
663cfc2fbd Docbook writer: Use sect1, sect2, etc. instead of section. 2012-01-27 11:32:02 -08:00
John MacFarlane
3a8afc119a Depend on highlighting-kate 0.5.
This uses styleToCss instead of styleToHtml.
2012-01-25 11:29:42 -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
83bb1de3f5 Improved citation tests. 2012-01-13 00:02:38 -08:00
John MacFarlane
5b7c209373 Markdown reader: Fix parsing of consecutive lists.
Pandoc previously behaved like Markdown.pl for consecutive
lists of different styles. Thus, the following would be parsed
as a single ordered list, rather than an ordered list followed
by an unordered list:

    1. one
    2. two

    - one
    - two

This patch makes pandoc behave more sensibly, parsing this as
two lists.  Any change in list type (ordered/unordered) or in
list number style will trigger a new list. Thus, the following
will also be parsed as two lists:

    1. one
    2. two

    a. one
    b. two

Since we regard this as a bug in Markdown.pl, and not something
anyone would ever rely on, we do not preserve the old behavior
even when `--strict` is selected.
2012-01-02 17:04:59 -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
3cf60c7306 Support for math in RST reader and writer.
Inline math uses the :math:`...` construct.

Display math uses

  .. math:: ...

or if multilin

  .. math::

     ...

These seem to be supported now by rst2latex.py.
2011-12-31 11:40:47 -08:00
John MacFarlane
661d0646d0 Updated context tests. 2011-12-30 18:22:09 -08:00
John MacFarlane
3f981022a6 Updated latex tests. 2011-12-30 16:28:33 -08:00
John MacFarlane
83680430b3 Updated ConTeXt tests. 2011-12-30 13:05:04 -08:00
John MacFarlane
a4f719abcf Unicode reference ID in biblio test. 2011-12-29 23:11:25 -08:00
John MacFarlane
6c7bffb544 Updated tests for changes to HTML note back references. 2011-12-29 22:11:14 -08:00
John MacFarlane
ea39a607ed Added 'beamer' as an output format.
Beamer output uses the default LaTeX template, with some
customizations via variables.

Added `writerBeamer` to `WriterOptions`.

Added `--beamer` option to `markdown2pdf`.
2011-12-29 13:26:04 -08:00
John MacFarlane
012405e8c3 Preserve attributes in highlighted HTML.
The container element will have the classes, id, and
key-value attributes you specified in the delimited code
block.

Previously these were stripped off.
2011-12-28 22:04:38 -08:00
John MacFarlane
3122959064 Highlighting: Add language as class name.
This restores behavior of 1.8.2.1. Adjusted tests.
2011-12-27 22:24:31 -08:00
John MacFarlane
70b4ec95e4 Updated tests. 2011-12-27 18:08:06 -08:00
John MacFarlane
a579e2c892 Replaced Apostrophe, Ellipses, EmDash, EnDash w/ unicode strings. 2011-12-27 15:45:34 -08:00
John MacFarlane
fca95bf43c Removed highlighting flag. Highlighting support is now standard. 2011-12-22 13:24:43 -08:00
John MacFarlane
1cefff6319 Updated s5 tests. 2011-12-20 11:37:32 -08:00
John MacFarlane
bfa5ca01bc HTML writer: Use <del> for strikeout. 2011-12-18 11:08:04 -08:00
John MacFarlane
8306f6e9c6 Added blank comment after directives in rst template.
Closes #321.
2011-12-04 22:54:47 -08:00
John MacFarlane
bdec07bac9 Shared: Removed unescapeURI, modified escapeURI.
escapeURI now only escapes space characters, leaving unicode characters
as they are, instead of converting them to octets and URL-encoding them,
as before.  This gives more readable URIs.  User agents now do the
percent-encoding themselves.

URIs are no longer unescaped at all on conversion to markdown, asciidoc,
rst, org.

Closes #349.
2011-12-02 19:39:30 -08:00
John MacFarlane
c6456ef8a4 Fixed test for style type meta in highlighted html+lhs. 2011-12-02 19:10:31 -08:00
John MacFarlane
c8333b5d1b Made author/date more consistent in HTML templates.
Authors are now h2, date h3. (Instead of h3/h4, as in the past.)
2011-12-01 18:57:41 -08:00
John MacFarlane
4d5ddbce8b Mardkown writer tests: Use setext headers for levels 1-2. 2011-11-24 11:14:45 -08:00
John MacFarlane
1b6d0f2e1d Changed paths in s5 tests. 2011-11-24 11:13:14 -08:00
John MacFarlane
bea0fdf6e6 AsciiDoc: Don't use Roman numerals in ordered lists.
AsiiDoc doesn't support them.
2011-11-18 21:26:25 -08:00
John MacFarlane
1561d51cc5 Renamed to AsciiDoc. Fixed display math and escapes.
AsciiDoc does not seem to have consistent escaping rules.
2011-11-18 21:09:49 -08:00
John MacFarlane
c552aa24cf Merge branch 'asciidoc' 2011-11-18 19:53:56 -08:00
John MacFarlane
679e94e53d Updated tests for correct col width. 2011-11-18 19:50:45 -08:00
John MacFarlane
4c122be58a Updated asciidoc test.
The test output still contains some mistakes.
2011-11-18 19:46:12 -08:00
John MacFarlane
43c6c1d845 Updated ieee.csl and mhra.csl in test directory. 2011-11-18 13:41:40 -08:00
John MacFarlane
5ba1e92440 Updated chicago-author-date.csl.
The old version did not work properly for edited volumes
with no author.
2011-11-18 13:36:27 -08:00
John MacFarlane
f6a0e75389 Supported tables in asciidoc, added table tests. 2011-11-18 13:19:22 -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
John MacFarlane
1da1d4ec24 Updated writer tests for new version of texmath. 2011-11-12 13:25:02 -08:00
John MacFarlane
d74e8d14a5 Markdown citations: don't strip off initial space in locator.
Previously `[@item1 and nowhere else]` yielded the locator ", and nowhere
else", or, with the new citeproc-hs, "and nowhere else".
Now it yields " and nowhere else".
2011-11-09 13:18:01 -08:00
John MacFarlane
6a51897f33 Fixed markdown-citations.ieee.txt to use em-dashes for citation ranges.
This is a new feature in citeproc-hs.
2011-11-09 12:57:47 -08:00
John MacFarlane
821286a6f3 Update templates to use Content-Style-Type meta tag.
Closes #337.
2011-11-08 11:54:10 -08:00
John MacFarlane
c335b6cbd8 HTML slides: only add id to div/section if --section-divs selected. 2011-10-02 23:19:03 -07:00
John MacFarlane
072df3f5dd Simplified slide creation in HTML writer.
A horizontal rule now gets transformed into an empty H1 header
before 'hierarchicalize' is called.

If the document that does not begin with an H1 header, an
empty one is provided.

This avoids the need for kludgy raw HTML.

Also, the 'titleslide' class is added to any section containing
just a title:

----

----
2011-10-02 11:49:56 -07:00