aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Shared.hs
AgeCommit message (Collapse)AuthorFilesLines
2011-01-11Preliminary support for HTML5.John MacFarlane1-0/+2
+ 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.
2010-12-26normalize: Don't reduce [Space] to [].John MacFarlane1-4/+1
2010-12-26Improved 'normalize'.John MacFarlane1-41/+44
Now normalizeInlines is split into consolidateInlines and removeEmptyInlines. We need to remove empties before consolidating.
2010-12-25Improved normalize.John MacFarlane1-0/+15
2010-12-24Use functions from Text.Pandoc.Generic instead of processWith(M).John MacFarlane1-4/+5
2010-12-22Shared: Removed unneeded prettyprinting functions:John MacFarlane1-75/+0
wrapped, wrapIfNeeded, wrappedTeX, wrapTeXIfNeeded, hang'.
2010-12-22Shared: Removed BlockWrapper, wrappedBlocksToDoc.John MacFarlane1-13/+1
These are no longer needed with the new Pretty module.
2010-12-21Shared: Made splitBy take a test instead of an element.John MacFarlane1-6/+6
2010-12-19Shared: Use stringify to simplify inlineListToIdentifier.John MacFarlane1-28/+11
2010-12-17Added new prettyprinting module.John MacFarlane1-0/+3
* Added Text.Pandoc.Pretty. This is better suited for pandoc than the 'pretty' package. One advantage is that we now get proper wrapping; Emph [Inline] is no longer treated as a big unwrappable unit. Previously we only got breaks for spaces at the "outer level." We can also more easily avoid doubled blank lines. Performance is significantly better as well. * Removed Text.Pandoc.Blocks. Text.Pandoc.Pretty allows you to define blocks and concatenate them. * Modified markdown, RST, org readers to use Text.Pandoc.Pretty instead of Text.PrettyPrint.HughesPJ. * Text.Pandoc.Shared: Added writerColumns to WriterOptions. * Markdown, RST, Org writers now break text at writerColumns. * Added --columns command-line option, which sets stColumns and writerColumns. * Table parsing: If the size of the header > stColumns, use the header size as 100% for purposes of calculating relative widths of columns.
2010-12-15Support multiple bibliography files with natbib and biblatex output.Nathan Gass1-2/+2
2010-12-14Added 'normalize' to Text.Pandoc.Shared.John MacFarlane1-1/+53
2010-12-13Added support to write natbib or biblatex citations in latex output.Nathan Gass1-0/+10
2010-12-13Fixed inlineListToIdentifier to treat '\160' as ' '.John MacFarlane1-1/+3
2010-12-07Rewrote normalizeSpaces (mostly aesthetic reasons).John MacFarlane1-14/+11
2010-11-27Added 'stringify' to Text.Pandoc.Shared.John MacFarlane1-0/+10
2010-11-20Citation related changes.John MacFarlane1-12/+0
* Don't look for bibliography in ~/.pandoc. Reason: doing this requires a read + parse of the bibliography even when the document doesn't use citations. This is a big performance drag on regular pandoc invocations. * Only look for default.csl if the document contains references. Reason: avoids the need to read and parse csl file when the document contains no references anyway. * Removed findFirstFile from Shared.
2010-11-19Shared: Added findFirstFile, findDataFile, refactored readDataFile.John MacFarlane1-5/+24
2010-10-26Added support for MathJax for displaying math in HTML.John MacFarlane1-0/+1
Added --mathjax option. Added MathJax to HTMLMathMethod. Supported MathJax in HTML writer. Resolves Issue #259.
2010-07-15Added --section-divs option.John MacFarlane1-0/+2
+ 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-1/+1
+ 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-4/+11
Resolves Issue #122.
2010-07-11Merge branch 'atlists'. Added auto-numbered example lists.John MacFarlane1-0/+1
2010-07-11Moved headerShift from pandoc.hs to Shared.John MacFarlane1-0/+8
2010-07-11Slight code cleanup on substitute function.John MacFarlane1-4/+4
2010-07-08Added writerUserDataDir to WriterOptions.John MacFarlane1-0/+2
2010-07-08Added writerSourceDirectory to WriterOptions.John MacFarlane1-0/+2
This allows us to remove an argument from the ODT and EPUB writers.
2010-07-06Changed order of functions in Shared.John MacFarlane1-26/+26
2010-07-05Don't allow colon in autogenerated HTML identifiers.John MacFarlane1-2/+2
They have a special meaning in XML (e.g. in EPUB).
2010-07-05Added writerEPUBMetadata field and --epub-metadata option.John MacFarlane1-0/+2
2010-07-05Removed writerInclude{Before,After} from WriterOptions.John MacFarlane1-4/+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-52/+0
+ Text.Pandoc.Writers.Native + The function prettyPandoc is now gone. Use writeNative instead.
2010-07-05Moved parsing functions from Text.Pandoc.Shared to new module.John MacFarlane1-507/+3
+ Text.Pandoc.Parsing
2010-05-08Made KeyTable a map instead of an association list.John MacFarlane1-6/+16
* 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-07Use explicit imports from Data.Generics.John MacFarlane1-1/+1
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-06Use new UTF8 module in Shared, ODT, and the executables.John MacFarlane1-11/+5
2010-03-28Shared: Fixed uniqueIdent so it behaves as described in README.John MacFarlane1-33/+34
Previously some characters that are illegal in HTML identifiers, such as '<', were being allowed in header identifiers. The logic has now been fixed. Thanks to Xyne for reporting.
2010-03-27Implemented @ for sequentially numbered examples.John MacFarlane1-5/+28
Also implemented (@label) for example labels and references.
2010-03-23Shared: Export unescapeURI.John MacFarlane1-2/+9
2010-03-23Shared: Rewrote uri and emailAddress to return original text + escaped URI.John MacFarlane1-12/+17
2010-03-23Shared: enamed stringToURI -> escapeURI.John MacFarlane1-4/+4
2010-03-23Better definition of stringToURI.John MacFarlane1-14/+6
Now it escapes all characters that aren't allowed in a URI. %, ?, /, and other characters that are allowed in a URI are left alone. Unicode high characters are UTF-8 encoded.
2010-03-23Updated copyright notices.John MacFarlane1-2/+2
2010-03-23Fixed treatment of unicode characters in URIs.John MacFarlane1-1/+17
* Added stringToURI to Shared. This is used in the HTML writer for all URIs. It properly URI-encodes high characters (> 127), leaving everything else (including symbols and spaces) the same. * Modified unsanitaryURI to allow UTF8 characters in a URI. (First, we convert the URI to URI-encoded octets, then we pass through parseURIReference.) This resolves gitit Issue #99. Previously '[abc](http://gitit.net/测试)' would not be rendered as a link when --sanitize was selected.
2010-03-18Added --mathml option; removed Text.Pandoc.LaTeXMathML.fiddlosopher1-0/+1
* 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-16Shared: Export uniqueIdent, don't allow tilde in identifier.fiddlosopher1-1/+4
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1894 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-01-18Made user directory a Maybe in readFile, s5HeaderIncludes, laTeXMathML.fiddlosopher1-4/+6
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-14Added --data-dir option.fiddlosopher1-6/+6
+ 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-02Changed default of writerXeTeX to False.fiddlosopher1-1/+1
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1790 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31Removed redundant imports (found by ghc 6.12).fiddlosopher1-1/+1
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1750 788f1e2b-df1e-0410-8736-df70ead52e1b