Commit graph

1593 commits

Author SHA1 Message Date
John MacFarlane
9ecb9b5def DocBook reader improvements. 2012-04-14 17:33:56 -07:00
John MacFarlane
d339b29967 Added skeleton of basic docbook reader. 2012-04-14 16:44:21 -07:00
John MacFarlane
e37c4526b2 Markdown reader: Allow lists as list items.
So, for example:

1.  * x
    * y
2.  * z
    * w
2012-04-13 11:12:18 -07:00
John MacFarlane
d28ad2b0f1 Markdown: don't recognize references inside delimited code blocks.
Previously pandoc would produce incorrect results on this:

    ~~~
    [not a link]: /url
    ~~~

    [not a link]

because it would recognize "not a link" as a reference link
definition on the first pass.  This fix causes the first pass
to skip delimited code blocks.
2012-04-12 09:52:28 -07:00
John MacFarlane
dbbc932f24 Markdown writer: don't force delimited code blocks to be flush left.
Fixes bug with delimited code blocks inside lists etc.
2012-04-11 09:02:32 -07:00
John MacFarlane
a388024a57 Small simplification of blank parser in LaTeX reader. 2012-04-11 08:52:16 -07:00
John MacFarlane
a4388279de LaTeX reader: Parse 'dimension' arguments to unknown commands.
e.g. `\parindent0pt`
2012-04-10 18:56:08 -07:00
John MacFarlane
54c9d4348a LaTeX reader: Control sequences can't be followed by a letter.
This fixes a bug where `\begingroup` was parsed as `\begin`
followed by `group`.
2012-04-10 18:25:18 -07:00
John MacFarlane
66f8dc14b7 Docx writer: Fixed multi-paragraph list items.
Previously they each got a list marker.
Closes #457.
2012-04-07 17:08:52 -07:00
John MacFarlane
4fce1a63b1 LaTeX reader: Handle \bgroup, \egroup, \begingroup, \endgroup. 2012-04-07 16:16:43 -07:00
John MacFarlane
ecbe9f763c Textile reader: Implemented literal escapes with == and <notextile>.
Closes #473.
2012-04-05 13:52:12 -07:00
John MacFarlane
f25dcacedf LaTeX writer: don't use eurosym package unless document has a €. 2012-04-03 18:49:05 -07:00
John MacFarlane
0afd33e4c5 Markdown writer: don't replace empty alt in image with "image".
Previously `<img src="empty.png" alt=""/>` would be translated as
`![image](empty.png)`; now it becomes `![](empty.png)` as one might
naturally expect.
2012-04-03 18:28:08 -07:00
John MacFarlane
2f535ceda3 Avoid repeated id in section and header in HTML slides.
Previously pandoc would use the same id attribute for the
div or section and the header inside it; now the id is omitted
from the header if the div or section has it.
2012-03-29 11:10:10 -04:00
John MacFarlane
6b46c2dfd1 Properly handle citations nested in other inline elements.
Closes #460.

Note:  processBiblio is a mess.  It should be rewritten for
clarity and efficiency.
2012-03-27 12:16:02 -04:00
John MacFarlane
7bc4dc37b2 Added PDF metadata (title,author) in LaTeX standalone + PDF output.
Closes #459.
2012-03-25 12:10:43 -07:00
Greg Maslov
4a1ba8ce49 Oops! Forgot to munch whitespace / ignore body after directive. 2012-03-25 05:03:35 -04:00
Greg Maslov
618dc294f9 Add parsing support for the rST default-role directive. 2012-03-24 21:48:54 -04:00
John MacFarlane
3c4e1ff063 RST reader: allow :math:... even when not followed by blank or \.
This does not implement the complex rule described at
http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#inline-markup-recognition-rules,
but it should be good enough for most purposes.

Closes #453.
2012-03-24 16:11:56 -07:00
John MacFarlane
d7f2b5d0f5 RST reader: '\ ' is null, not escaped space. 2012-03-24 16:03:46 -07:00
John MacFarlane
9352750cb2 RST writer: Better handling of inline formatting.
* `hi*there*hi` now gets rendered properly as `hi\ *there*\ hi`
* Unnecessary '\ ' are avoided around :math:, :sub:, :sup:
* Implemented most of the rules in
  http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#inline-markup-recognition-rules,
  though some unnecessary '\ ' may be inserted when unicode quotes
  are used.
2012-03-24 15:53:57 -07:00
Peter Wang
d74f3e1f28 Texinfo writer: retain directories in image paths. 2012-03-21 09:20:30 +11:00
John MacFarlane
29c8f1554b PDF: Run latex at least two times.
This ensures that the PDFs will have hyperlinked bookmarks
(PDF table of contents that can be displayed in the sidebar).
2012-03-19 09:25:33 -07:00
John MacFarlane
1db909e49b Fixed bug parsing LaTeX tables with one column.
Thanks to Steven Solie for finding the bug.
2012-03-19 08:18:32 -07:00
John MacFarlane
60fb915351 Use {} around ctable caption. Closes #445. 2012-03-12 11:06:49 -07:00
Sergei Trofimovich
e838cca4e6 fix doc generation failure against haddock-2.10.0
$ cabal configure --haddock-option=-v3
$ cabal haddock -v3
    Creating interface...
     100% (  2 /  2) in 'Text.Pandoc.Readers.Native'
    Checking module Text.Pandoc.Readers.HTML...
    Creating interface...
      50% (  4 /  8) in 'Text.Pandoc.Readers.HTML'
    Checking module Text.Pandoc.Readers.Textile...
    Creating interface...
    haddock: internal error: lexical error
    /usr/bin/haddock returned ExitFailure 1

Patch changes UTF-8 spaces to ASCII spaces.

It's a known haddock issue:
    http://www.haskell.org/pipermail/haskell-cafe/2012-March/099870.html

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
2012-03-12 10:40:08 +03:00
John MacFarlane
a768844751 Fixed lstlisting environment in LaTeX reader.
Closes #443.
2012-03-10 12:33:55 -08:00
John MacFarlane
5f013051e2 Made man writer more robust.
Previously it assumed that inlines weren't normalized.
2012-03-09 13:39:19 -08: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
4a17d661ff EPUB reader: convert e.g. en_US from locale to en-US in language. 2012-03-09 09:25:24 -08:00
John MacFarlane
7a5f51eb95 Merge pull request #438 from michaelt/patch-2
Fix initial `Str "."` after `LineBreak` as well?
2012-03-07 12:50:56 -08:00
John MacFarlane
45aed51628 Merge pull request #437 from michaelt/patch-1
escape initial dot in code lines
2012-03-07 10:50:08 -08:00
John MacFarlane
8a8d4a8abc Set mainlang variable in context writer.
This parallels behavior of latex writer.  Mainlang is the last
of a comma-separated list of languages in lang.
2012-03-07 10:09:17 -08:00
Michael Thompson
2d1703e8a0 Fix initial Str "." after LineBreak as well? 2012-03-07 12:27:46 -05:00
Michael Thompson
698eb059b7 escape initial dot in code lines 2012-03-07 11:35:18 -05:00
John MacFarlane
30cafd913a Fixed ployglossia support in LaTeX template for multiple langs.
\setmainlanguage will now just use the last of a comma-separated
list of languages.
2012-03-05 09:07:14 -08:00
John MacFarlane
40133e8a7d Use <q> tags for Quoted items for HTML5 output.
The quote style can be changed by modifying the template
or including a css file. A default quote style is included.
2012-03-03 08:29:01 -08:00
John MacFarlane
e6a03cdd4b EPUB writer: Use extensible exceptions. 2012-03-03 08:16:16 -08:00
John MacFarlane
940b603548 Use \textasciitilde for ~ in LaTeX writer. 2012-03-03 06:33:24 -08:00
John MacFarlane
53e6bf36a9 Fixed bug in LaTeX string escaper (with ~). 2012-03-02 07:49:55 -08:00
John MacFarlane
c5fb21d524 Support "minted" as a LaTeX verbatim block.
Closes #431.
2012-02-27 11:37:54 -08:00
John MacFarlane
bf4e59bc46 LaTeX reader: correctly handle \^{}. 2012-02-25 09:55:38 -08:00
John MacFarlane
14984a7130 LaTeX reader: Fixed accents.
\~{a}, \c{c}.
2012-02-25 09:24:39 -08:00
François Gannaz
a922bd6d8e Added support for markdown-extra tables in the markdown parser
Only tables whose lines begin with a "|" are supported.
There are 2 warnings about unused variables when compiling.
2012-02-21 22:00:10 +01:00
John MacFarlane
c468272e34 HTML writer: Don't escape contents of EQ tags with --gladtex.
This fixes a regression from 1.8.x.  Closes #428.
2012-02-21 09:00:30 -08:00
John MacFarlane
24e3a65167 LaTeX math environment fixes. Closes #423.
`aligned` is now used instead of the nonexistent `aligned*`.
`multline` instead of the nonexistent `multiline`.
2012-02-19 21:11:07 -08:00
John MacFarlane
1ab21530b4 PDF: run latex 3 times if --toc specified.
Closes #424.
2012-02-19 19:11:40 -08:00
John MacFarlane
5914ae1ea3 Don't escape < in <style> tags with --self-contained.
Closes #422: highlighting lost using `--self-contained`.
2012-02-17 10:44:46 -08:00
John MacFarlane
7376d26c36 Add TableNormal style to tables.
Needs testing with Word.
2012-02-14 17:41:11 -08:00