John MacFarlane
810e3336dc
Improved native writer using Pretty.
...
2-3X speed improvement and more consistent layout.
2011-01-20 08:43:13 -08:00
John MacFarlane
978d949526
Made writeNative sensitive to writerStandalone.
...
The Pandoc (Meta ...) is not written unless standalone is set.
2011-01-19 18:57:25 -08:00
John MacFarlane
e1f3c6058e
Added Text.Pandoc.Readers.Native (readNative).
...
readNative can now read full pandoc documents, block lists, blocks,
inline lists, or inlines. It will interpret
Str "hi"
as if it were
Pandoc (Meta [] [] []) [Plain [Str "hi"]]
This should make testing easier.
2011-01-19 18:36:27 -08:00
John MacFarlane
e647f761ed
Use spaceChar instead of oneOf " \t" in rst reader.
2011-01-19 15:17:51 -08:00
John MacFarlane
1b8a9711b8
Replaced more noneOf/oneOf parsers.
2011-01-19 15:14:23 -08:00
John MacFarlane
a400cfe10f
Replaced uses of oneOf with more efficient parsers.
...
This speeds up the markdown reader.
2011-01-19 15:06:56 -08:00
John MacFarlane
c09518eefd
More small parser rewrites for small performance gains.
2011-01-19 14:59:59 -08:00
John MacFarlane
61f3db612c
Parsing: Rewrote spaceChar for significant speedup in readers.
2011-01-19 14:45:15 -08:00
John MacFarlane
adaae082fc
Fixed problem with inline code in ConTeXt writer.
...
Previously `}` would be rendered '\type{}}'.
Now we check the string for '}' and '{'. If it contains neither,
use \type{}; otherwise use \mono{} with an escaped version of the
string.
Note: There are some issues using the \type!str! form, including
differences btw mkii and mkiv. For now this is a conservative fix.
Perhaps in the future we can use \type!str!. See the discussion on
pandoc-discuss s.v. "Bug in context writer".
2011-01-19 11:53:00 -08:00
John MacFarlane
8f7c119c0f
Removed '--no-citeproc' as alias for '--natbib'.
...
This was confusing, I think, as no-citeproc could be either
natbib or biblatex.
2011-01-16 11:08:56 -08:00
John MacFarlane
281b36470f
Minor code formatting.
2011-01-16 11:08:20 -08:00
John MacFarlane
b6d1f4bc9e
Moved --chapters to before --number-sections in option list.
2011-01-16 09:34:26 -08:00
John MacFarlane
ab20da4be5
Support --chapters for ConTeXt output as well.
2011-01-16 09:08:19 -08:00
John MacFarlane
ece098b9e0
Use <chapter> for top docbook header if template has <book>.
...
Resolves Issue #265 .
2011-01-16 08:59:53 -08:00
John MacFarlane
9721b87c26
Added --chapters option affecting docbook and latex.
...
* Added writerChapters to WriterOptions.
* Added --chapters command-line option.
* --chapters causes top-level headers to be "chapter" instead of
"section" in LaTeX and DocBook.
* Resolves Issue #225 .
2011-01-16 08:58:29 -08:00
John MacFarlane
53eb2c4828
HTML writer: Add ids to <section> tags.
2011-01-15 22:35:25 -08:00
John MacFarlane
a0e19ba8aa
Merge branch 'tests'
2011-01-15 09:25:01 -08:00
John MacFarlane
fd79417825
Fixed the parser for rst+lhs - set stateLiterateHaskell.
2011-01-14 22:38:02 -08:00
John MacFarlane
a5cbcdfe3a
HTML reader: parse simple tables.
...
Resolves Issue #106 . Thanks to Rodja Trappe for the idea
and some sample code.
2011-01-14 20:48:10 -08:00
John MacFarlane
c31d3cc306
HTML reader: parse location tags in pSatisfy.
...
This avoids the need for manual parsing all over the place.
2011-01-14 20:47:32 -08:00
John MacFarlane
9305114b9f
LaTeX writer: Escape strings in \href{..}.
...
Previously strings weren't escaped, so %5D would be interpreted
as a LaTeX comment!
2011-01-14 18:59:50 -08:00
John MacFarlane
5131589be0
Simplified Text.Pandoc.CharacterReferences by using TagSoup entity lookup
2011-01-14 18:28:54 -08:00
John MacFarlane
09e9a86db9
Merge branch 'master' of github.com:jgm/pandoc into tests
2011-01-14 14:46:48 -08:00
John MacFarlane
81403b8d80
LateX writer: In nonsimple tables, put cells in \parbox.
...
Otherwise we can get problems with linebreaks, and cell spacing
isn't right.
Thanks to Jef Allbright for pointing out the problem.
2011-01-14 14:45:04 -08:00
John MacFarlane
ba1d0d3070
Parsing: Fixed bug in grid table parser.
...
Spaces at end of line were not being stripped properly,
resulting in unintended LineBreaks.
2011-01-14 14:16:27 -08:00
John MacFarlane
5da2d1e66c
Merge branch 'master' into tests
2011-01-12 08:13:11 -08:00
John MacFarlane
91510a109f
Improvements to --html5 support:
...
+ <nav> for TOC, <figure> for figures, type attribute in <ol>.
+ Don't add math javascript in html5.
+ Use style attributes instead of deprecated width, align.
+ html template: move <title> after <meta>.
Note: charset needs to be declared before title.
+ slidy and s5 templates: move <title> after <meta>.
+ html template: Added link to html5 shim for IE.
+ Make --html5 have an effect only for 'html' writer (not s5, slidy, epub).
2011-01-11 23:15:30 -08:00
John MacFarlane
e8ad4ba43c
Preliminary support for HTML5.
...
+ Added writerHtml5 writer option.
+ Added --html5 option.
+ Added support for lang in html tag (so you can do
'pandoc -s --V lang=en', for example).
+ Updated html template with conditionals for HTML5.
+ When HTML5 selected, use <header> tag around title in document,
and use <section> tags instead of <div>s if --section-divs
specified.
2011-01-11 21:18:46 -08:00
John MacFarlane
33ff2fed21
Text.Pandoc: Improved readers, writers lists for lhs variants.
...
Now the lhs variants set the needed literate Haskell flag in
parser state and writer options.
2011-01-11 20:23:43 -08:00
Nathan Gass
e8fa72c6a7
Moved test-pandoc.hs to tests directory.
2011-01-11 21:49:49 +01:00
Nathan Gass
f3ee73607f
Removed run prefix from all test functions.
2011-01-11 21:30:19 +01:00
Nathan Gass
a2153acfff
Include lhs tests in existing testGroup structure.
2011-01-11 21:10:36 +01:00
Nathan Gass
e06899ef1f
Add reader groups for markdown and rst reader tests.
2011-01-11 20:41:34 +01:00
Nathan Gass
c0700987ba
Changed test-pandoc to use test-framework and HUnit.
2011-01-10 00:37:46 +01:00
John MacFarlane
3317e9dea8
pandoc: Test standalone' rather than standalone for final newline.
2011-01-07 18:12:20 -08:00
John MacFarlane
d891b2c29d
LaTeX reader: Support simple tables.
2011-01-07 10:15:48 -08:00
John MacFarlane
93c3e27731
pandoc: Add newline to output unless standalone.
...
This avoids output that does not end with a newline, which
is inconvenient when working with many tools.
Updated tests accordingly.
2011-01-06 21:05:28 -08:00
John MacFarlane
c4c336460b
RST writer: blank line after literate Haskell code block.
2011-01-06 21:03:08 -08:00
John MacFarlane
438f32cdfa
test-pandoc: Wrap to 78 columns in lhs writer tests.
2011-01-06 16:54:15 -08:00
John MacFarlane
aea93977f5
Markdown writer: blank line after delimited code block.
2011-01-06 16:53:21 -08:00
John MacFarlane
303ce8a9e5
LaTeX reader: allow spaces btw \\begin or \\end and {.
2011-01-06 09:34:24 -08:00
John MacFarlane
81ea1a59b4
LaTeX reader: Removed unnecessary 'spaces'.
2011-01-06 09:24:56 -08:00
John MacFarlane
1be2ca6c78
HTML reader: Fixed bug in htmlTag for comments.
2011-01-06 00:21:19 -08:00
John MacFarlane
b63a7f7c48
LaTeX reader: Apply macros to non-math; handle ensuremath.
2011-01-05 16:55:26 -08:00
John MacFarlane
18e7a7a495
LaTeX reader: Don't handle \label and \ref specially.
...
Put labels in {} instead of ().
2011-01-05 15:24:20 -08:00
John MacFarlane
1415b6831e
LaTeX reader: Support \L \l accents.
2011-01-05 14:57:06 -08:00
John MacFarlane
23aae79b01
Updated for texmath 0.5.
2011-01-05 14:44:26 -08:00
John MacFarlane
eb83f0e5e4
Fixed macro parsing.
2011-01-05 14:42:47 -08:00
John MacFarlane
e126ab9efc
LaTeX reader: Parse inside arguments when ignoring commands.
2011-01-05 12:25:47 -08:00
John MacFarlane
c3071ff6e9
LaTeX reader: Don't handle \index separately.
...
Instead, just put it in list of commands to ignore.
2011-01-05 12:05:04 -08:00