Commit graph

1962 commits

Author SHA1 Message Date
John MacFarlane
5765ac2523 Slight code cleanup on substitute function. 2010-07-11 12:22:18 -07:00
John MacFarlane
da7931f35f Cleaned up EPUB writer. 2010-07-09 10:58:24 -07:00
John MacFarlane
ba819c118f Adjusted epub css. (No more highlighting styles.) 2010-07-09 10:35:12 -07:00
John MacFarlane
0bfbabba81 EPUB writer: don't put multiple copies of same image in epub. 2010-07-08 18:22:43 -07:00
John MacFarlane
8af979311a Get default stylesheet in EPUB writer, rather than pandoc.hs. 2010-07-08 17:51:13 -07:00
John MacFarlane
bf43da01c9 Added writerUserDataDir to WriterOptions. 2010-07-08 17:31:55 -07:00
John MacFarlane
d67ec663ba Added writerSourceDirectory to WriterOptions.
This allows us to remove an argument from the ODT and EPUB
writers.
2010-07-08 17:16:30 -07:00
John MacFarlane
8417820498 Updated PROFILING instructions. 2010-07-08 08:48:07 -07:00
John MacFarlane
1cd99f9880 Addendum to the fix to issue #242.
The previous fix resulted in bird tracks being included in
both html and html+lhs renderings of literate haskell sections
when pandoc was compiled without highlighting support. This change make
pandoc without highlighting behave like pandoc with highlighting: the
bird tracks are used only if html+lhs output is specified.
2010-07-07 10:28:25 -07:00
John MacFarlane
6a68dbe5ae Changed order of functions in Shared. 2010-07-06 23:17:06 -07:00
John MacFarlane
cbac17cfd2 Documented grid tables in README.
Resolves Issue #43.
2010-07-06 23:05:58 -07:00
John MacFarlane
73b4cc0897 Minor comment change. 2010-07-06 21:23:25 -07:00
John MacFarlane
7d687684aa Allow language-neutral table captions.
+ Captions may now begin simply with ':', instead of 'Table:'
+ Captions may now appear either above or below the table.
+ Resolves Issue #227.
2010-07-06 21:02:26 -07:00
John MacFarlane
6a8fa53f6c More refactoring of grid table code. 2010-07-05 23:43:07 -07:00
John MacFarlane
ba19dff8af Minor reformatting. 2010-07-05 20:41:42 -07:00
John MacFarlane
869946114e Moved generic grid table functions from RST reader -> Parsing.
Here they can be used by the Markdown reader as well.
2010-07-05 14:34:48 -07:00
John MacFarlane
bd0320962e Comment change in Templates (thanks to Alexander Hirzel).
Resolves Issue #245.
2010-07-05 00:11:02 -07:00
John MacFarlane
10e284aaf4 Version bump to 1.6, due to removed functions. 2010-07-05 00:06:28 -07:00
John MacFarlane
306c474562 Don't allow colon in autogenerated HTML identifiers.
They have a special meaning in XML (e.g. in EPUB).
2010-07-05 00:06:28 -07:00
John MacFarlane
162b869aac Documented EPUB writer and --epub-{stylesheet,metadata} options. 2010-07-05 00:06:27 -07:00
John MacFarlane
efd7167ace Made -Wall clean. 2010-07-05 00:06:27 -07:00
John MacFarlane
6a7b16eb4d Removed links (internal and external). 2010-07-05 00:06:27 -07:00
John MacFarlane
f895ee2e48 Process user-supplied EPUB metadata.
Read a sequence of elements from the file.
Ignore anything that's not valid Dublin Core.
If title, language, uuid not supplied, supply them.
2010-07-05 00:06:27 -07:00
John MacFarlane
e3dcf8e3bf Added writerEPUBMetadata field and --epub-metadata option. 2010-07-05 00:06:27 -07:00
John MacFarlane
15cc99c617 Removed writerInclude{Before,After} from WriterOptions.
This is no longer used with the new templating system.
2010-07-05 00:06:27 -07:00
John MacFarlane
3548bf6d9c Moved Pandoc prettyprinting code from Shared to new Native writer.
+ Text.Pandoc.Writers.Native
+ The function prettyPandoc is now gone.  Use writeNative instead.
2010-07-05 00:06:27 -07:00
John MacFarlane
998fd098d0 Moved parsing functions from Text.Pandoc.Shared to new module.
+ Text.Pandoc.Parsing
2010-07-05 00:06:27 -07:00
John MacFarlane
f1114733a6 Added an EPUB writer.
+ New writer module Text.Pandoc.Writers.EPUB
+ Stylesheet in epub.css
+ --epub-stylesheet command-line option.
+ New utility module Text.Pandoc.UUID to generate
  random UUIDs for EPUBs.
2010-07-05 00:06:27 -07:00
John MacFarlane
ff4d94e054 Made a proper ODT writer.
+ Transformed the old Text.Pandoc.ODT module into a proper
  writer module, Text.Pandoc.Writers.ODT.
+ Instead of saveOpenDocumentAsODT, we now have writeODT, which
  takes a Pandoc document and produces a bytestring.
  saveOpenDocumentAsODT has been removed.
+ To extract the images and insert them into the ODT, we now use
  processPandocM on the Pandoc document rather than a custom XML parser.
+ Handle the case where the image is remote (or not found) by
  converting the Image element into an Emph with the label.
+ Plumbing in pandoc.hs changed slightly to accomodate this, and to
  allow other writers that live in the IO monad.
2010-07-05 00:06:26 -07:00
John MacFarlane
ee51124412 Use unicode for smart punctuation in plain, markdown, rst formats. 2010-06-30 18:53:35 -07:00
John MacFarlane
163b0c0f8a Let markdown2pdf recognize citeproc options. 2010-06-30 18:34:14 -07:00
John MacFarlane
d0be7ca8cb Add birdtracks to lhs in HTML when compiled wo -fhighlighting.
Resolves Issue #242.  Previously the bird tracks would be
stripped off when pandoc was not compiled with highlighting support,
even if -t html+lhs was specified.

Thanks to Nicholas Wu for pointing out the problem.
2010-06-28 19:49:07 -07:00
John MacFarlane
d073b16892 Added Textile writer module. 2010-05-17 21:52:45 -07:00
John MacFarlane
b5bda7569e Made KeyTable a map instead of an association list.
* This affects the RST and Markdown readers.
* The type for stateKeys in ParserState has also changed.
* Pandoc, Meta, Inline, and Block have been given Ord instances.
* Reference keys now have a type of their own (Key), with its
  own Ord instance for case-insensitive comparison.
2010-05-08 10:29:40 -07:00
John MacFarlane
91f52e2229 Use explicit imports from Data.Generics.
Otherwise we have a conflict with the 'empty' symbol,
introduced in syb >= 0.2.  Thanks to ddssff for pointing
out the problem. Resolves Issue #237.
2010-05-07 11:28:38 -07:00
John MacFarlane
7d20ffe3e0 UTF8: Modified readFile and getContents to strip BOM if present. 2010-05-06 23:04:44 -07:00
John MacFarlane
fb201a5b46 Updated man page and README.
Pandoc no longer respects locale, even when compiled by GHC 6.12.
2010-05-06 22:32:06 -07:00
John MacFarlane
d6dd5fff7b No longer need to set LANG in RunTests. 2010-05-06 22:30:32 -07:00
John MacFarlane
1cc11e6086 Use new UTF8 module in Shared, ODT, and the executables. 2010-05-06 22:28:28 -07:00
John MacFarlane
7be82b4536 Added Text.Pandoc.UTF8 for portable UTF8 string IO. 2010-05-06 20:27:10 -07:00
John MacFarlane
f20c4ae928 Convert command-line arguments to UTF8.
Resolves Issue #234.
2010-05-04 23:36:03 -07:00
John MacFarlane
d253955a7e Changed rawLaTeXInline to accept '\section', '\begin', etc.
Use new rawLaTeXInline' in LaTeX reader, and export rawLaTeXInline
for use in markdown reader.

Fixes bug wherein '\section{foo}' was not recognized as raw TeX
in markdown document.
2010-04-26 23:17:34 -07:00
John MacFarlane
4aaa1991fd Man writer: convert math to unicode when possible.
(As in other writers.)
2010-04-26 23:04:29 -07:00
John MacFarlane
c243e5b67b Use texmath's parser in TexMath module.
* This replaces a lot of custom parser code, and expands
  the tex -> unicode conversion.
* The behavior has also changed: if the whole formula can't
  be converted, the whole formula is left in raw TeX.
  Previously, pandoc converted parts of the formula to unicode
  and left other parts in raw TeX.
* Added (but not yet exported) readTeXMath', which returns a Maybe.
* Updated tests
2010-04-25 20:30:27 -07:00
John MacFarlane
b3669e139c RunTests: use UTF8 no matter what the locale. 2010-04-25 20:19:39 -07:00
John MacFarlane
2afa967ade Removed parsec < 3 restriction. 2010-04-23 22:43:47 -07:00
John MacFarlane
0d5065c1e7 Added 'threaded' flag.
+ GHC lacks a threaded runtime on some architectures.
  Provide a 'threaded' flag that can be disabled for compiling
  on these architectures.
+ Removed '-threaded' from pandoc's ghc-options.  '-threaded'
  is only needed for markdown2pdf, due to its use of readProcess.
2010-04-20 22:59:38 -07:00
John MacFarlane
5d9d7f32ca In parsing smart quotes, leave unicode curly quotes alone.
Resolves Issue #143.
2010-04-10 12:05:26 -07:00
John MacFarlane
54316a0159 Removed obsolete markdown2pdf script. 2010-04-10 11:20:52 -07:00
John MacFarlane
7d8c8c7880 Removed 'library' Cabal flag.
Reason: starting with Cabal 1.8, installing pandoc with '-library
+executable' did not work, since the build-depends in the Library
stanza were ignored. The problem could be solved by repeating the
build-depends in the Executable stanza, but this seems non-ideal
(and might lead to errors later on).  The '-library' option isn't
so useful anyway, since to compile pandoc in the first place, you
need a large number of Haskell libraries installed, and in this
case, why balk at another? It was chiefly intended for packagers,
but packagers will need to use a chroot environment anyway, and
they can then simply copy the executable and not the library.

Thanks to Jim Pryor for calling the problem to my attention
in connection with an arch linux package.
2010-04-10 11:16:48 -07:00