summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Templates.hs
Commit message (Collapse)AuthorAge
* Updated copyright notices to -2015. Closes #2111.John MacFarlane2015-04-26
|
* ghc 7.10.1 RC1 requires specifying the type of String literals ↵Mark Wright2015-01-05
| | | | https://ghc.haskell.org/trac/ghc/wiki/Migration/7.10#GHCsaysNoinstanceforFoldable...arisingfromtheuseof...
* getDefaultTemplate: don't fail when called with "fb2".John MacFarlane2014-12-15
| | | | Closes #1660.
* Templates: use ordNum instead of ord.John MacFarlane2014-06-03
| | | | Closes #1022.
* Templates: Fail informatively on template syntax errors.John MacFarlane2014-06-01
| | | | | | | With the move from parsec to attoparsec, we lost good error reporting. In fact, since we weren't testing for end of input, malformed templates would fail silently. Here we revert back to Parsec for better error messages.
* Update copyright notices for 2014, add missing noticesAlbert Krewinkel2014-05-09
|
* Templates: YAML objects resolve to "true" in conditionals.John MacFarlane2014-03-05
| | | | | | | | Closes #1133. Note: If address is a YAML object and you just have $address$ in your template, the word "true" will appear, which may be unexpected. (Previously nothing would appear.)
* Templates: Changed how array variables are resolved.John MacFarlane2013-10-21
| | | | | | | | | | | | | Previously if `foo` is an array (which might be because multiple values were set on the command line), `$foo$` would resolve to the concatenation of the elements of foo. This is rarely useful behavior. It has been changed so that the first value is rendered. Of course, you can still iterate over the values using `$for(foo)$`. This has the result that you can override earlier settings using -V by putting new values later on the command line. That's useful for many purposes.
* Templates: more consistent behavior of `$for$`.John MacFarlane2013-09-08
| | | | | | | | When `foo` is not a list, `$for(foo)$...$endfor$` should behave like $if(foo)$...$endif$. So if `foo` resolves to "", no output should be produced. See pandoc-templates#39.
* Added Text.Pandoc.Compat.Monoid.John MacFarlane2013-08-08
| | | | | This allows pandoc to compile with base < 4.5, where Data.Monoid doesn't export `<>`. Thanks to Dirk Ullirch for the patch.
* Fixed bug retrieving default template for markdown variants.John MacFarlane2013-07-02
|
* Use new flexible metadata type.John MacFarlane2013-06-24
| | | | | | | | | | | | | | | | | | | | | | | | | * Depend on pandoc 1.12. * Added yaml dependency. * `Text.Pandoc.XML`: Removed `stripTags`. (API change.) * `Text.Pandoc.Shared`: Added `metaToJSON`. This will be used in writers to create a JSON object for use in the templates from the pandoc metadata. * Revised readers and writers to use the new Meta type. * `Text.Pandoc.Options`: Added `Ext_yaml_title_block`. * Markdown reader: Added support for YAML metadata block. Note that it must come at the beginning of the document. * `Text.Pandoc.Parsing.ParserState`: Replace `stateTitle`, `stateAuthors`, `stateDate` with `stateMeta`. * RST reader: Improved metadata. Treat initial field list as metadata when standalone specified. Previously ALL fields "title", "author", "date" in field lists were treated as metadata, even if not at the beginning. Use `subtitle` metadata field for subtitle. * `Text.Pandoc.Templates`: Export `renderTemplate'` that takes a string instead of a compiled template.. * OPML template: Use 'for' loop for authors. * Org template: '#+TITLE:' is inserted before the title. Previously the writer did this.
* Revised Text.Pandoc.Templates to accept JSON contexts.John MacFarlane2013-06-24
| | | | | | | | | | | | Currently the library is set up with a shim for association lists, for compatibility, but this can change when the writers are changed. New export: `varListToJSON`. Removed `Empty`. Simplified template type to a newtype.
* Data files changes.John MacFarlane2012-12-29
| | | | | | | | | | * Added `embed_data_files` flag. (not yet used) * Shared no longer exports `findDataFile`. * `readDataFile` now returns a strict bytestring. * Shared now exports `readDataFileUTF8` which returns a string like the old `readDataFile`. * Rewrote modules to use new data file functions and to avoid using functions from Paths_pandoc directly.
* EPUB writer: Rationalized templates.John MacFarlane2012-11-04
| | | | | | | | * Previously there were three different templates involved in epub production. There is now just one template, default.epub or default.epub3. * It can now be overridden using `--template`, just like other templates.
* Preliminary changes for epub3 format.John MacFarlane2012-11-02
| | | | | | * EPUB writer now exports writeEPUB2 and writeEPUB3. * 'epub' output format is epub v2, while 'epub3' is v3.
* Removed need for utf8-string package.John MacFarlane2012-09-25
| | | | | | | | * Depend on text. * Expose Text.Pandoc.UTF8. * Text.Pandoc.UTF8 now exports toString, fromString, toStringLazy, fromStringLazy. * These are used instead of the old utf8-string functions.
* Changed strict to markdown_strict.John MacFarlane2012-08-09
|
* Removed `--strict`, added extensions to writer/reader names.John MacFarlane2012-08-09
| | | | | | | | | | | | * 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`.
* Fixed whitespace errors.John MacFarlane2012-07-26
|
* Use Parsec directly in Biblio and Templates.John MacFarlane2012-07-20
|
* Use Parser as type synonym for Parsec.John MacFarlane2012-07-20
|
* Text.Pandoc.Parsing: Export all Parsec functions used in pandoc code.John MacFarlane2012-07-20
| | | | | No other module directly imports Parsec. This will make it easier to change the parsing backend in the future, if we want to.
* Use Text.Parsec instead of Text.ParserCombinators.Parsec.John MacFarlane2012-07-20
|
* Revert "Removed blaze_html_05 flag -- require blaze >= 0.5 by default."John MacFarlane2012-05-10
| | | | This reverts commit f67a80cea27286ba17b3696198602a6bbdae014d.
* Removed blaze_html_05 flag -- require blaze >= 0.5 by default.John MacFarlane2012-04-24
|
* changes for blaze-html 0.5Mark Wright2012-04-23
|
* Added default.beamer template (separate from default.latex).John MacFarlane2012-01-30
|
* Made `beamer` an output format, removed `pdf` as output format.John MacFarlane2012-01-28
| | | | | | | | | | | Removed `--beamer` option; instead, use `beamer` as output format. There is no longer a `pdf` output format; instead, pandoc tries to produce a pdf if the output file has a `.pdf` extension. (The output format can be latex -- the default for pdf output, latex+lhs, or beamer.) This seems more consistent with the way pandoc currently works (e.g. we have an `html5` output format, not an `--html5` option).
* Removed `beamer` output format; added `--beamer` option.John MacFarlane2012-01-21
|
* pandoc: Output to pdf now works.John MacFarlane2012-01-20
|
* Templates: Removed vestigial remnant of openxml template.John MacFarlane2012-01-19
| | | | Closes #381 (I think).
* Added Docx writer.John MacFarlane2012-01-19
| | | | | | | | | | | * New module `Text.Pandoc.Docx`. * New output format `docx`. * Added reference.docx. * New option `--reference-docx`. The writer includes support for highlighted code blocks and math (which is converted from TeX to OMML using texmath's new OMML module).
* Split html template into html, html5 templates.John MacFarlane2012-01-11
|
* Templates: Tell pandoc where to find default "html5" template.John MacFarlane2012-01-08
|
* Added 'beamer' as an output format.John MacFarlane2011-12-29
| | | | | | | | | Beamer output uses the default LaTeX template, with some customizations via variables. Added `writerBeamer` to `WriterOptions`. Added `--beamer` option to `markdown2pdf`.
* Use blaze-html instead of xhtml for HTML generation.John MacFarlane2011-12-17
| | | | | | | | | | | * This is a breaking API change for `writeHtml`. * It introduces a new dependency on blaze-html. * Pandoc now depends on highlighting-kate >= 0.4, which also uses blaze-html. * The --ascii option has been removed, because of differences in blaze-html's and xhtml's escaping. * Pandoc will no longer transform leading newlines in code blocks to `<br/>` tags.
* Templates: Return empty string for json template.John MacFarlane2011-08-18
| | | | Thanks to Dirk Laurie for pointing out the bug.
* Fix template problem for epub.John MacFarlane2011-07-28
|
* Changed default template naming scheme.John MacFarlane2011-07-22
| | | | | | | | | Instead of latex.template, we now have default.latex. An appropriate extension is added automatically if the value of `--template` has no extension. So, `pandoc --template=special -t latex` looks for `special.latex`, while `pandoc --template=special -t man` looks for `special.man`.
* Added FlexibleInstances pragma.John MacFarlane2011-03-19
| | | | Thanks to Sivaram Gowkana for the patch.
* Removed all dependencies on 'pretty' package.John MacFarlane2010-12-22
|
* Moved s5 writing from S5 module to HTML.John MacFarlane2010-07-22
| | | | | Now s5 is handled in more or less the same way as slidy, as a variant of HTML.
* Comment change in Templates (thanks to Alexander Hirzel).John MacFarlane2010-07-05
| | | | Resolves Issue #245.
* Updated copyright notices.John MacFarlane2010-03-23
|
* Depend on extensible-exceptions, remove CPP in Templates module.fiddlosopher2010-03-19
| | | | | | | It's safe to depend on extensible-exceptions, since this is shipped with GHC 6.10 and 6.12. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1911 788f1e2b-df1e-0410-8736-df70ead52e1b
* Templates: Conditionally import Control.Exception.Extensible if base < 4.fiddlosopher2010-03-18
| | | | git-svn-id: https://pandoc.googlecode.com/svn/trunk@1910 788f1e2b-df1e-0410-8736-df70ead52e1b
* Removed unneeded import.fiddlosopher2010-01-18
| | | | git-svn-id: https://pandoc.googlecode.com/svn/trunk@1822 788f1e2b-df1e-0410-8736-df70ead52e1b
* Made user directory a Maybe in readFile, s5HeaderIncludes, laTeXMathML.fiddlosopher2010-01-18
| | | | | | | 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
* Rename getTemplate -> getDefaultTemplate.fiddlosopher2010-01-18
| | | | | | | (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