aboutsummaryrefslogtreecommitdiff
path: root/Text/Pandoc
AgeCommit message (Collapse)AuthorFilesLines
2008-09-12Changed list parser so that only the starting list marker matters:fiddlosopher1-45/+34
1. one - two (b) three produces an ordered list with 1., 2., 3. This is the behavior of Markdown.pl. Modified README to document the new behavior. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1438 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-09-08Use Data.List's 'intercalate' instead of custom 'joinWithSep'.fiddlosopher13-50/+44
+ Removed joinWithSep definition from Text.Pandoc.Shared. + Replaced joinWithSep with intercalate + Depend on base >= 3, since in base < 3 intercalate is not included. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1428 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-09-08Fixed haddock bug in Text/Pandoc/LaTexMathML.hs.fiddlosopher1-1/+1
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1427 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-09-06LaTeX reader: Refactored math parsers, limited support for eqnarray.fiddlosopher1-3/+10
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1426 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-09-06LaTeX reader: Removed specialEnvironment parser.fiddlosopher1-7/+0
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1425 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-09-06LaTeX reader: minor improvements.fiddlosopher1-7/+9
+ parse '{}', if present, after \textless, \textgreater, \textbar, \textbackslash, \ldots. + Parse unescaped special characters verbatim rather than changing them to spaces. This way arguments of unknown commands will appear in braces. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1424 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-09-06LaTeX reader: Fixed regression in list parsingfiddlosopher1-3/+3
(introduced by recent changes to unknownCommand). git-svn-id: https://pandoc.googlecode.com/svn/trunk@1423 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-09-06LaTeX reader: improvements in raw LaTeX parsing.fiddlosopher1-20/+41
+ "loose punctuation" (like {}) parsed as Space + Para elements must contain more than Str "" and Space elements + Added parser for "\ignore" command used in literate haskell. + Reworked unknownCommand and rawLaTeXInline: when not in "parse raw" mode, these parsers simply strip off the command part and allow the arguments to be parsed normally. So, for example, \blorg{\emph{hi}} will be parsed as Emph "hi" rather than Str "{\\emph{hi}}". git-svn-id: https://pandoc.googlecode.com/svn/trunk@1420 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-09-06MediaWiki writer: print class attributes in <pre> for code blocks, if any.fiddlosopher1-1/+1
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1419 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-09-06Changed Float to Double in definition of Table element.fiddlosopher8-15/+15
(Double is more efficient in GHC.) Truncate width in opendocument output to 2 decimal places. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1418 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-09-04Reworked Text.Pandoc.ODT to use zip-archive instead of calling external 'zip'.fiddlosopher3-116/+68
+ Removed utf8-string and xml-light modules, and unneeded content.xml. + Removed code for building reference.odt from Setup.hs. The ODT is now built using template haskell in Text.Pandoc.ODT. + Removed copyright statements for utf8-string and xml modules, since they are no longer included in the source. + README: Removed claim that 'zip' is needed for ODT production. + Removed dependency on 'zip' from debian/control. + Text.Pandoc.Shared: Removed withTempDir, added inDirectory. + Added makeZip to Text.Pandoc.TH. + pandoc.cabal: Added dependencies on old-time, zip-archive, and utf8-string. Added markdown2pdf files to extra-sources list. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1417 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-09-02Modified Text.Pandoc.Biblio to fit new citeproc API.fiddlosopher1-5/+5
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1416 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-27Removed PDF writer from core pandoc, restored markdown2pdf.fiddlosopher1-134/+0
+ Added markdown2pdf. + Removed Text/Pandoc/PDF.hs. + Removed references to PDF writer from Main.hs. + Removed references to PDF writer from pandoc.cabal. + Added markdown2pdf.1 to list of man pages in Setup.hs. + Added markdown2pdf.1.md man page source. + Added reference to markdown2pdf(1) in pandoc man page. + Added markdown2pdf to WRAPPERS in Makefile. + Removed mention of pdf writer from README; added markdown2pdf. + Added remarks on markdown2pdf dependencies to README.Debian. + Added markdown2pdf to web/index.txt.in. + Use markdown2pdf for pdf web demos. + Put markdown2pdf back into debian control and rules. + Added markdown2pdf to macports Portfile. + Added markdown2pdf to freebsd package. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1415 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-26LaTeX reader: Parse "code" environments as verbatim (lhs).fiddlosopher1-15/+9
Refactored parsers for verbatim environments. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1414 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-14Simplified and improved UTF8 handling:fiddlosopher5-95/+1
+ Removed utf8-string cabal configuration flag. + Instead, we just include System.IO.UTF8 and Codec.Binary.UTF8.String from utf8-string package in the source tree, avoiding a dependency on utf8-string and avoiding crufty custom UTF8 code. (The old Text.Pandoc.UTF8 had problems with the getContents function.) + Removed lots of CPP directives that are no longer needed. + In Setup.hs, use '-i..' in running RunTests.hs, so the local UTF8 code will be found. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1411 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-14PDF writer: Close output file handle after waitForProcess.fiddlosopher1-1/+2
It should be closed automatically, but perhaps this fails on Windows, especially when the process is interrupted? git-svn-id: https://pandoc.googlecode.com/svn/trunk@1410 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-13Support for display math; changed ASCIIMathML -> LaTeXMathML:fiddlosopher17-77/+91
Resolves Issue #47. + Added a DisplayMath/InlineMath selector to Math inlines. + Markdown parser yields DisplayMath for $$...$$. + LaTeX parser yields DisplayMath when appropriate. Removed mathBlock parsers, since the same effect is achieved by the math inline parsers, now that they handle display math. + Writers handle DisplayMath as appropriate for the format. + Changed -m option to use LaTeXMathML rather than ASCIIMathML. LaTeXMathML is closer to LaTeX in its display of math, and supports many non-math LaTeX environments. + Modified HTML writer to print raw TeX when LaTeXMathML is being used instead of suppressing it. + Removed ASCIIMathML files from data/ and added LaTeXMathML. + Replaced ASCIIMathML with LaTeXMathML in source files. + Modified README and pandoc man page source. + Modified web page. + Added --latexmathml option (kept --asciimathml as a synonym for backwards compatibility) + Modified tests accordingly; added new tests for display math. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1409 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-12Don't expose Text.Pandoc.Biblio module unless citeproc option is selected.fiddlosopher1-8/+1
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1408 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-12Small haddock documentation fix. (Andrea Rossato)fiddlosopher1-2/+2
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1407 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-12Patches to Text.Pandoc.Biblio for new citeproc API.fiddlosopher1-13/+10
(Andrea Rossato) git-svn-id: https://pandoc.googlecode.com/svn/trunk@1406 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-11Parse raw ConTeXt environments as TeX in markdown reader.fiddlosopher2-13/+37
Resolves Issue #73. Also made some structural changes to parsing of raw LaTeX environments. Previously there was a special block parser for LaTeX environments. It returned a Para element containing the raw TeX inline. This has been removed, and the raw LaTeX environment parser is now used in the rawLaTeXInline parser. The effect is exactly the same, except that we can now handle consecutive LaTeX and ConTeXt environments not separated by spaces. This new flexibility is required by the example in Issue #73: \placeformula \startformula L_{1} = L_{2} \stopformula API change: The LaTeX reader now exports rawLaTeXEnvironment' (which returns a string) rather than rawLaTeXEnvironment (which returns a block element). This is more likely to be useful in other applications. Added test cases for raw ConTeXt environments to markdown-reader-more.txt. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1405 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-11ODT writer: Use '/', even on Windows, as path separator in xlink attributefiddlosopher1-4/+4
for images. Otherwise OpenOffice can't find the image files. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1403 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-10Allow newline before URL in markdown link references. Resolves Issue #81.fiddlosopher1-6/+4
Added tests for this issue in new "markdown-reader-more" tests. Changed RunTests.hs to run these tests. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1401 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-10Man writer: don't escape " as \".fiddlosopher1-1/+1
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1399 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-10Debian packaging changes:fiddlosopher1-1/+1
+ Updated README.Debian with information on the changes to markdown2pdf. + Made latex and zip required dependencies, since they are now required for 'odt' and 'pdf' targets of pandoc. + Fixed typo in warning message. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1396 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-10Added Text.Pandoc.PDF module, 'pdf' as new output option.fiddlosopher1-104/+98
The module calls pdflatex to produce the PDF, and is basically shell scripting in haskell. But this is better than the existing markdown2pdf script, which is limited to POSIX. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1394 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-10Use 'bracket' to improve withTempDir Text.Pandoc.Shared.fiddlosopher2-5/+146
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1393 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-09Removed unneeded space after "\\item" in LaTeX and ConTeXt output.fiddlosopher2-2/+2
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1384 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-08Added Text.Pandoc.UTF8 as a backup for when utf8-string is not present.fiddlosopher4-8/+84
+ Added Text.Pandoc.UTF8 + Changed flag name from utf8 to utf8-string + Changed CPP MACRO from _UTF8 to _UTF8STRING + Import IO functions from Text.Pandoc.UTF8 when utf8-string not available. + Removed utf8-string dependency from debian/control. + Removed pandoc.cabal.ghc66; we no longer support GHC 6.6 + Modified INSTALL instructions git-svn-id: https://pandoc.googlecode.com/svn/trunk@1383 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-06Small improvements to citation parsing in markdown reader.fiddlosopher1-4/+4
(Don't allow blank lines inside citations.) git-svn-id: https://pandoc.googlecode.com/svn/trunk@1382 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-05Allow parsing of multiline citations.fiddlosopher1-2/+2
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1381 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-05Text/Pandoc/Biblio.hs - made getRefs point-free.fiddlosopher1-1/+1
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1380 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-04Added support for Cite to Markdown reader, and conditional support for ↵fiddlosopher5-2/+127
citeproc module. + The citeproc cabal configuration option sets the _CITEPROC macro, which conditionally includes code for handling citations. + Added Text.Pandoc.Biblio module. + Made highlighting option default to False. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1376 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-04Added Cite element to definition and writers.fiddlosopher11-8/+41
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1375 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-03Improved configuration options and CPP macros.fiddlosopher4-3/+17
+ Now all macros that serve as flags start with a single _. + Added message to '-v' output about UTF-8 support. + Made highlighting the default. If the highlighting-kate library is not present, cabal will deselect the option (unless it was explicitly set). + Add UTF8 support to test function in Text.Pandoc.Shared. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1374 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-03Added 'utf8' configuration flag to pandoc.cabal.fiddlosopher1-4/+8
This makes it possible to compile pandoc without utf8, using '-f-utf8' at configuration time. Utf-8 support is still the default. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1373 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-03Improvements to ODT writer (for windows compatibility):fiddlosopher1-18/+18
+ use Data.ByteString (not Data.ByteString.Char8, which writes in text mode) + use runProcess (with a working directory) instead of runCommand + only create Pictures directory if there are pictures git-svn-id: https://pandoc.googlecode.com/svn/trunk@1372 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-02Improved template handling:fiddlosopher6-20/+62
+ Split template haskell functions into new module, Text.Pandoc.TH + Distinguish contentsOf and binaryContentsOf; the former uses text mode in Windows, while the latter uses binary mode git-svn-id: https://pandoc.googlecode.com/svn/trunk@1368 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-01Removed superfluous copyFile from Text/Pandoc/ODT.hs.fiddlosopher1-1/+0
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1367 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-01Fixes to make haddock work with template haskell:fiddlosopher3-3/+29
+ Added CPP, TemplateHaskell, FlexibleInstances to cabal file "Extensions" field + Added #ifndef __HADDOCK__ cpp declarations in the files using template haskell. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1366 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-01Use </> with contentsOf to ensure that paths are portable.fiddlosopher2-3/+4
Do not use hardcoded '/' characters! git-svn-id: https://pandoc.googlecode.com/svn/trunk@1364 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-01ODT writer: Don't use pathname in invoking "zip", as that causes problems ↵fiddlosopher1-7/+5
in windows. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1363 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-01Added pragma to HTML writer to avoid deprecation warning for use of "start" ↵fiddlosopher1-0/+1
attribute. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1362 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-01Added pragma to Text/Pandoc/Shared.hs to get rid of "orphan instance" warnings.fiddlosopher1-0/+1
(These are caused by the Lift instance for ByteString.) git-svn-id: https://pandoc.googlecode.com/svn/trunk@1361 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-01Don't use OverloadedStrings in ODT writer.fiddlosopher1-7/+3
Remove version dependency from bytestring. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1359 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-01Depend on bytestring-0.9.0.1 and provide a ByteString instance for IsString ↵fiddlosopher1-1/+5
manually, in Text/Pandoc/ODT.hs. Upgrading to 0.9.1.0 causes problems unless every package has been built with that version, so for now we stick with 0.9.0.1. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1358 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-01Simplified build process using template haskell.fiddlosopher3-0/+211
+ Text/Pandoc/ASCIIMathML.hs, Text/Pandoc/DefaultHeaders.hs, and Text/Pandoc/Writers/S5.hs are no longer built in Setup.hs from templates in the templates/ directory. + Instead, they use template haskell to read data at compile time from the relevant files in data/. + Setup.hs is back to the default simple configuration. + Removed old templates and Extra-Tmp-Files field from pandoc.cabal. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1357 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-01Use template haskell to store reference.odt as blob in pandoc.fiddlosopher2-4/+19
+ Added contentsOf to Text.Pandoc.Shared. + Use this to get contents of reference.odt at compile time in Text.Pandoc.ODT + Added bytestring and template-haskell dependencies to pandoc.cabal. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1355 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-07-31Compatibility fixes for CPP, Cabal, and haddock:fiddlosopher2-6/+6
+ Use CPP in "Extensions" field in pandoc.cabal. + Removed use of backslash string continuations in source files. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1350 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-07-31Use utf8-string's System.IO.UTF8 to replace Text.Pandoc.UTF8.fiddlosopher2-46/+0
+ removed Text/Pandoc/UTF8.hs + removed UTF8.hs notice from debian/copyright + adjusted main.hs, Text/Pandoc.hs, and Text/Pandoc/ODT.hs to use System.IO.UTF8 instead of Text.Pandoc.UTF8 + Added dependency on utf8-string to pandoc.cabal git-svn-id: https://pandoc.googlecode.com/svn/trunk@1347 788f1e2b-df1e-0410-8736-df70ead52e1b