aboutsummaryrefslogtreecommitdiff
path: root/src/pandoc.hs
AgeCommit message (Collapse)AuthorFilesLines
2010-07-22Export HTMLSlideVariant in Text.Pandoc.John MacFarlane1-1/+1
2010-07-21Avoid shadowing when compiling with citeproc.John MacFarlane1-4/+4
2010-07-20Made spacing at end of output more consistent.John MacFarlane1-1/+1
Previously some of the writers added spurious whitespace. This has been removed, resolving Issue #232. NOTE: If your application combines pandoc's output with other text, for example in a template, you may need to add spacing. For example, a pandoc-generated markdown file will not have a blank line after the final block element. If you are inserting it into another markdown file, you will need to make sure there is a blank line between it and the next block element.
2010-07-15Added --section-divs option.John MacFarlane1-0/+9
+ Header identifiers now get attached to the headers, unless --section-divs is specified, in which case they are added to enclosing divs. By default, the divs are not added. + Resolves Issue #230, #239.
2010-07-15Added --webtex option for HTML math.John MacFarlane1-3/+15
+ Added --webtex command-line option, with optional parameter. (Defaults to using google charts API.) + Added WebTeX HTMLMathMethod. + Removed MimeTeX HTMLMathMethod. (WebTeX is generic and subsumes it.) + Modified --mimetex option to use WebTeX. + Thanks to lpeterse for the idea and some of the code.
2010-07-13Added a slidy writer.John MacFarlane1-5/+11
Resolves Issue #122.
2010-07-11Moved headerShift from pandoc.hs to Shared.John MacFarlane1-7/+2
2010-07-08Get default stylesheet in EPUB writer, rather than pandoc.hs.John MacFarlane1-10/+7
2010-07-08Added writerUserDataDir to WriterOptions.John MacFarlane1-3/+3
2010-07-08Added writerSourceDirectory to WriterOptions.John MacFarlane1-7/+9
This allows us to remove an argument from the ODT and EPUB writers.
2010-07-05Added writerEPUBMetadata field and --epub-metadata option.John MacFarlane1-0/+12
2010-07-05Removed writerInclude{Before,After} from WriterOptions.John MacFarlane1-8/+0
This is no longer used with the new templating system.
2010-07-05Moved Pandoc prettyprinting code from Shared to new Native writer.John MacFarlane1-5/+1
+ Text.Pandoc.Writers.Native + The function prettyPandoc is now gone. Use writeNative instead.
2010-07-05Added an EPUB writer.John MacFarlane1-1/+19
+ 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-05Made a proper ODT writer.John MacFarlane1-15/+16
+ 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-05-17Added Textile writer module.John MacFarlane1-0/+1
2010-05-06Use new UTF8 module in Shared, ODT, and the executables.John MacFarlane1-29/+22
2010-05-04Convert command-line arguments to UTF8.John MacFarlane1-1/+2
Resolves Issue #234.
2010-03-23Updated copyright notices.John MacFarlane1-2/+2
2010-03-19Changed copyright date range for -v.fiddlosopher1-1/+1
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1914 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-03-18Added --mathml option; removed Text.Pandoc.LaTeXMathML.fiddlosopher1-4/+13
* Added data/MathMLinHTML.js, which is included when no URL is provided for --mathml. This allows MathML to be displayed in better browsers, as text/html. * The module was no longer necessary; its functionality (two lines) was incorporated into pandoc.hs. * Consolidated the two LaTeXMathML.js files into one. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1909 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-03-18Better heuristics for guessing reader to use.fiddlosopher1-6/+9
If argument is an absolute URL without a recognized extension, and no reader is explicitly specified, use HTML. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1908 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-03-18Added plain writer.fiddlosopher1-0/+1
Text.Pandoc.Writers.Markdown now exports a writePlain, which writes plain text without links, pictures, or special formatting (not even markdown conventions). git-svn-id: https://pandoc.googlecode.com/svn/trunk@1907 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-03-18Refactored handler for base-header-level option.fiddlosopher1-11/+15
Now we have a list of "transforms" (Pandoc -> Pandoc). They get applied at the end in a fold. This should make it easier to add new document-transforming options in the future. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1905 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-03-14Added --base-header-level option.fiddlosopher1-6/+28
Thanks to Jérémy Bobbio for the patch that formed the basis of this commit. Closes Debian #563416. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1889 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-03-13Use template variables for include-before/after.fiddlosopher1-6/+8
* These options now imply -s; previously they worked also in fragment mode. * Users can now adjust position of include-before and include-after text in the templates. * Default position of include-before moved back (as it originally was) before table of contents. * Resolves Issue #217. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1883 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-02-21Behave gracefully if HOME is not set.fiddlosopher1-7/+9
If getAppUserDataDirectory raises an error, just use the default data files. Previously pandoc *assumed* HOME was set and would error out if not. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1842 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-02-02Allow absolute URI as parameter (in this case, content is downloaded).fiddlosopher1-1/+8
+ Adds dependency on HTTP. + If a parameter is an absolute URI, pandoc will try to get the content via HTTP. + So, you can do: pandoc -r html -w markdown http://www.fsf.org git-svn-id: https://pandoc.googlecode.com/svn/trunk@1826 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-01-18Made userdir arg of saveDocumentAsODT a Maybe.fiddlosopher1-1/+1
This way it's consistent with other data file retrieval functions. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1823 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-01-18Made user directory a Maybe in readFile, s5HeaderIncludes, laTeXMathML.fiddlosopher1-2/+2
This is more uniform, and calling libraries can always disable searching of user directories for overrides. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1821 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-01-18Rename getTemplate -> getDefaultTemplate.fiddlosopher1-2/+2
(One reason is that getTemplate conflicts with a function in yst.) git-svn-id: https://pandoc.googlecode.com/svn/trunk@1820 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-01-14Added --data-dir option.fiddlosopher1-6/+20
+ This specifies a user data directory. If not specified, will default to ~/.pandoc on unix or Application Data\pandoc on Windows. Files placed in the user data directory will override system default data files. + Added datadir parameter to readDataFile, saveOpenDocumentAsODT, latexMathMLScript, s5HeaderIncludes, and getTemplate. Removed getDefaultTemplate. + Updated documentation. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1809 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-01-02pandoc.hs: warn of deprecated options after --dump-args has exited.fiddlosopher1-5/+9
Otherwise we mess up the wrappers that look at the output of --dump-args. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1779 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31Added --reference-odt option.fiddlosopher1-2/+12
This allows the user to customized the styles used in pandoc-generated ODTs. The user may also put a default reference.odt in the ~/.pandoc directory. We have removed the old data/odt directory and replaced it with a reference.odt. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1760 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31Added needed imports from System.IO when we're using ghc >= 6.12.fiddlosopher1-1/+2
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1754 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31Removed redundant imports (found by ghc 6.12).fiddlosopher1-2/+1
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1750 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31Use System.IO.UTF8 only if ghc < 6.12.fiddlosopher1-1/+6
GHC >= 6.12 (base >= 4.2) uses iconv to convert to unicode Strings. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1748 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31Removed unneeded LANGUAGE pragmas.fiddlosopher1-1/+0
(CPP is enabled globally in the cabal file.) git-svn-id: https://pandoc.googlecode.com/svn/trunk@1747 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31Added --xetex option to pandoc and markdown2pdf.fiddlosopher1-0/+9
If --xetex is specified, pandoc produces latex suitable for processing by xelatex, and markdown2pdf uses xelatex to create the PDF. Resolves Issue #185. This seems better than using latex packages to detect xetex, since not all latex installations will have these. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1737 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31Use $for$ for header-includes.fiddlosopher1-10/+10
Put variables in right order. We've specified that if they use -A, -B, -H multiple times, the text appears in the same order as on the command line. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1722 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31Use $for$ for --css option in HTML writer.fiddlosopher1-8/+1
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1721 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31Don't set "standalone" variable.fiddlosopher1-4/+1
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1717 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31HTML writer changes for templates.fiddlosopher1-1/+1
Note: now a single meta tag is used for multiple authors. Previously one tag per author was used. Fixed title in HTML template to avoid excess blank space. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1703 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31Fixed up LaTeXMathML module not to use TH.fiddlosopher1-3/+10
Instead, we read the script in pandoc.hs, and pass it via variables. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1702 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31Restored writerIncludeBefore, writerIncludeAfter.fiddlosopher1-14/+12
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1700 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31Added 'standalone' variable, use in templates.fiddlosopher1-1/+4
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1697 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31Removed TH dependency from S5 module, removed DefaultTemplates.fiddlosopher1-1/+12
S5 module now exports s5HeaderIncludes, which pandoc.hs includes if writer is s5 and standalone. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1691 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31Use Text.Pandoc.Templates instead of Text.Pandoc.DefaultTemplates.fiddlosopher1-27/+33
(in pandoc.hs and Text.Pandoc) git-svn-id: https://pandoc.googlecode.com/svn/trunk@1689 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31Simplified handling of --css; removed optCSS in pandoc.hs.fiddlosopher1-20/+12
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1686 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31Added -V/--variable option to set custom template variables.fiddlosopher1-0/+13
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1685 788f1e2b-df1e-0410-8736-df70ead52e1b