aboutsummaryrefslogtreecommitdiff
path: root/src/pandoc.hs
AgeCommit message (Collapse)AuthorFilesLines
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
2009-12-31Removed unneeded writer options; use template variables instead.fiddlosopher1-21/+20
Removed writerIncludeAfter, writerIncludeBefore, writerTitlePrefix, writerHeader. Removed corresponding fields of Options structure in pandoc.hs. The options now set template variables (writerVariables) instead. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1684 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31Added and documented --template option.fiddlosopher1-2/+16
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1683 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31Use legacy-header variable for custom header.fiddlosopher1-12/+16
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1682 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31Changed --print-default-header to --print-default-template.fiddlosopher1-4/+4
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1679 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31Added writerTemplate and writerVariables to writerOptions.fiddlosopher1-0/+2
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1678 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31Renamed headers -> templates.fiddlosopher1-8/+8
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1677 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-05Added --id-prefix option.fiddlosopher1-1/+11
This adds a prefix to all automatically generated HTML identifiers, which helps prevent duplicate identifiers when you're generating a fragment (say a blog post). Added writerIdentifierPrefix to WriterOptions. Resolves Issue #41. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1650 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-05Changed --default-code-classes -> --indented-code-classes.fiddlosopher1-6/+6
Also changed stateDefaultCodeClasses -> stateIndentedCodeClasses. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1643 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-01Added --default-code-classes option.fiddlosopher1-1/+12
This specifies classes to use for indented code blocks. Thanks to buttock for the (slightly modified) patch. Resolves Issue #87. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1637 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-06-06Make --smart default for man output format.fiddlosopher1-1/+1
Otherwise we have trouble dividing lists of endlines into sentences. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1579 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-05-02Made pandoc -v more explicit about compiler options.fiddlosopher1-9/+6
Resolves Issue #139. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1574 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-05-01pandoc.hs: Make --strict compatible with --standalone, --toc.fiddlosopher1-2/+1
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1572 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-04-08Fixed regression with --preserveTabs.fiddlosopher1-3/+8
Brought back optPreserveTabs. The trick of setting tabStop to 0 to mean "preserve tabs" had a bad side effect: strings of 0 spaces were interpreted as indentation. So, with --preserve-tabs, unindented paragraphs were treated as code. Resolves Issue #138. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1559 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-02-26Don't return an error status on --help or --version.fiddlosopher1-4/+4
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1551 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-02-24Removed plugin support.fiddlosopher1-16/+3
Plugins will probably be added in a later version, but for now we want to avoid the heavy GHC API dependency. Also, plugins are very slow with the current system. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1548 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-01-31Moved tabFilter to Shared.fiddlosopher1-22/+5
Removed optPreserveTabs; instead, tabstop of 0 means preserve tabs. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1532 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-01-31Renamed Main.hs -> pandoc.hs.fiddlosopher1-0/+681
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1531 788f1e2b-df1e-0410-8736-df70ead52e1b