aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Shared.hs
AgeCommit message (Collapse)AuthorFilesLines
2012-09-26Shared: Count \r as space in removeLeading/TrailingSpace.John MacFarlane1-1/+1
2012-09-23Revert "More intelligent handling of text encodings."John MacFarlane1-3/+3
This reverts commit 7272735b3d413a644fd9ab01eeae8ae9cd5a925b.
2012-09-23More intelligent handling of text encodings.John MacFarlane1-3/+3
Previously, UTF-8 was enforced for both input and output. The new system: * For input, UTF-8 is tried first; if an error is raised, the locale encoding is tried. * For output, the locale encoding is always used.
2012-08-15Moved renderTags' from HTML reader & SelfContained to Shared.John MacFarlane1-0/+22
Improved removal of markdown="1" attribute in Markdow reader.
2012-08-09Removed `--strict`, added extensions to writer/reader names.John MacFarlane1-2/+3
* The `--strict` option has been removed. * Instead of using `--strict`, one can now use `strict` instead of `markdown` as an input or output format name. * The `--enable` and `--disable` optinos have been removed. * It is now possible to enable or disable specific extensions by appending them (with '+' or '-') to the writer or reader name. For example `pandoc -f markdown-footnotes+hard_line_breaks`. * The lhs extensions are now implemented this way, too; you can use either `+lhs` or `+literate_haskell`.
2012-08-09Added safeRead to Text.Pandoc.Shared.John MacFarlane1-1/+12
2012-07-26Moved WriterOptions and associated types Shared -> Options.John MacFarlane1-128/+0
2012-07-26Fixed whitespace errors.John MacFarlane1-9/+9
2012-07-24Slightly more efficient normalizeSpaces.John MacFarlane1-6/+5
2012-07-24Added fields to WriterOptions.John MacFarlane1-0/+8
writerEpubStylesheet, writerEpubFonts, writerReferenceODT, writerReferenceDocx. These can now be removed as extra parameters to the writers.
2012-07-19Provide Data.Default instances for ParserState and WriterOptions.John MacFarlane1-1/+5
Now you can use def (which is re-exported by Text.Pandoc) instead of defaultParserState or defaultWriterOptions. For now, these are still defined too, so existing code need not change. Closes #546.
2012-05-24Add support for Slideous output.Jonas Smedegaard1-1/+2
2012-05-11Added writerTeXLigatures to WriterOptions, `--no-tex-ligatures` option.John MacFarlane1-0/+2
This is useful for those who want to use advanced OpenType features with xelatex/lualatex.
2012-02-04Complete rewrite of LaTeX reader.John MacFarlane1-1/+23
* The new reader is more robust, accurate, and extensible. It is still quite incomplete, but it should be easier now to add features. * Text.Pandoc.Parsing: Added withRaw combinator. * Markdown reader: do escapedChar before raw latex inline. Otherwise we capture commands like \{. * Fixed latex citation tests for new citeproc. * Handle \include{} commands in latex. This is done in pandoc.hs, not the (pure) latex reader. But the reader exports the needed function, handleIncludes. * Moved err and warn from pandoc.hs to Shared. * Fixed tests - raw tex should sometimes have trailing space. * Updated lhs-test for highlighting-kate changes.
2012-01-28Put date in YYYY-MM-DD format if possible for HTML, docx metadata.John MacFarlane1-0/+17
Added normalizeDate to Text.Pandoc.Shared.
2012-01-27Shared: Added splitStringWithIndices.John MacFarlane1-4/+17
This is like splitWithIndices, but it is sensitive to distinctions between wide, combining, and regular characters.
2012-01-26Added --atx-headers option.John MacFarlane1-0/+2
2012-01-25Added --slide-level option to override default.John MacFarlane1-0/+2
This allows users to select a slide level below the first header level with content. Note that content under sections above the slide level will not appear in slides (either in beamer or in HTML slide shows). This is primarily useful for creating documents that can be made into both slides and handouts (which contain additional content outside the slides).
2011-12-29Added 'beamer' as an output format.John MacFarlane1-0/+2
Beamer output uses the default LaTeX template, with some customizations via variables. Added `writerBeamer` to `WriterOptions`. Added `--beamer` option to `markdown2pdf`.
2011-12-27Added `--highlight-style` and `--no-highlight` options.John MacFarlane1-0/+3
2011-12-27Replaced Apostrophe, Ellipses, EmDash, EnDash w/ unicode strings.John MacFarlane1-4/+0
2011-12-22Added writerHighlight to WriterOptions.John MacFarlane1-0/+2
2011-12-22Removed writerAscii in WriterOptions.John MacFarlane1-2/+0
No longer needed or used.
2011-12-02Shared: Removed unescapeURI, modified escapeURI.John MacFarlane1-17/+8
escapeURI now only escapes space characters, leaving unicode characters as they are, instead of converting them to octets and URL-encoding them, as before. This gives more readable URIs. User agents now do the percent-encoding themselves. URIs are no longer unescaped at all on conversion to markdown, asciidoc, rst, org. Closes #349.
2011-10-01Added dzslides output option.John MacFarlane1-0/+1
* Added DZSlides to HTMLSlideVariant. * Added support for dzslides in HTML writer. * Added dzslides template.
2011-07-22Deprecated `--xetex` option - it is no longer needed.John MacFarlane1-0/+1
Deprecated `writerXeTeX` and the `--xetex` option. The latex writer now produces a file that can be processed by latex, pdflatex, lualatex, or xelatex, so this option isn't needed. The option is still neded in markdown2pdf, however, which has been modified to take some options that aren't in pandoc.
2011-07-19Added unexported Text.Pandoc.MIME.John MacFarlane1-451/+1
Moved getMimeType from Text.Pandoc.Shared to Text.Pandoc.MIME, so we won't have an API change.
2011-07-17Added getMimeType to Text.Pandoc.Shared.John MacFarlane1-2/+452
2011-02-06Added --ascii option.John MacFarlane1-0/+2
Currently supported only in HTML writer.
2011-02-05Make writerSectionDivs default to False.John MacFarlane1-1/+1
2011-02-04Shared: Minor refactoring.John MacFarlane1-1/+4
2011-02-04normalize: Normalize spaces too.John MacFarlane1-5/+10
In normal form, Space elements only occur to separate two non-Space elements. So, we never have [Space], or [, ..., Space].
2011-01-29Shared: Fixed bug in normalize revealed by tests!John MacFarlane1-4/+5
2011-01-28Add possibility to use listings package for code blocks andJosef Svenningsson1-0/+2
inline code in the LaTeX writer.
2011-01-28Shared: Make 'normalize' more generic.John MacFarlane1-1/+1
Now it can transform an Inline, [Inline], Block, [Block], or Pandoc.
2011-01-26Add support for attributes in inline Code.John MacFarlane1-4/+4
Additional related changes: * URLs in Code in autolinks now use class "url". * Require highlighting-kate 0.2.8.2, which omits the final <br/> tag, essential for inline code.
2011-01-26Bumped version to 1.8; depend on pandoc-types 1.8.John MacFarlane1-7/+4
The old TeX, HtmlInline and RawHtml elements have been removed and replaced by generic RawInline and RawBlock elements. All modules updated to use the new raw elements.
2011-01-16Added --chapters option affecting docbook and latex.John MacFarlane1-0/+2
* Added writerChapters to WriterOptions. * Added --chapters command-line option. * --chapters causes top-level headers to be "chapter" instead of "section" in LaTeX and DocBook. * Resolves Issue #225.
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