aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/ConTeXt.hs
AgeCommit message (Collapse)AuthorFilesLines
2015-12-22ConTeXt writer: set default layout based on margin-left, etc.John MacFarlane1-0/+10
This sets up `\setuplayout` based on the variables `margin-left`, `margin-right`, `margin-bottom`, and `margin-top`, if no layout is given.
2015-12-19Fix language code for Czech (cs not cz)John MacFarlane1-1/+0
Closes #2597.
2015-12-11Implemented SoftBreak and new `--wrap` option.John MacFarlane1-1/+7
Added threefold wrapping option. * Command line option: deprecated `--no-wrap`, added `--wrap=[auto|none|preserve]` * Added WrapOption, exported from Text.Pandoc.Options * Changed type of writerWrapText in WriterOptions from Bool to WrapOption. * Modified Text.Pandoc.Shared functions for SoftBreak. * Supported SoftBreak in writers. * Updated tests. * Updated README. Closes #1701.
2015-11-19Merge branch 'new-image-attributes' of https://github.com/mb21/pandoc into ↵John MacFarlane1-9/+32
mb21-new-image-attributes * Bumped version to 1.16. * Added Attr field to Link and Image. * Added `common_link_attributes` extension. * Updated readers for link attributes. * Updated writers for link attributes. * Updated tests * Updated stack.yaml to build against unreleased versions of pandoc-types and texmath. * Fixed various compiler warnings. Closes #261. TODO: * Relative (percentage) image widths in docx writer. * ODT/OpenDocument writer (untested, same issue about percentage widths). * Update pandoc-citeproc.
2015-11-09Revert "Use -XNoImplicitPrelude and 'import Prelude' explicitly."John MacFarlane1-1/+0
This reverts commit c423dbb5a34c2d1195020e0f0ca3aae883d0749b.
2015-11-08Use -XNoImplicitPrelude and 'import Prelude' explicitly.John MacFarlane1-0/+1
This is needed for ghci to work with pandoc, given that we now use a custom prelude. Closes #2503.
2015-10-18LaTeX and ConTeXt writers: support lang attribute on divs and spansmb211-16/+27
For LaTeX, also collect lang and dir attributes on spans and divs to set the lang, otherlangs and dir variables if they aren’t set already. See #895.
2015-09-26Support bidirectional text output with XeLaTeX, ConTeXt and HTMLmb211-9/+24
closes #2191
2015-08-20`lang` variable is now in BCP47 formatmb211-4/+36
strings are converted for LaTeX and ConTeXt output, closes #1614
2015-08-07Updated readers, writers and README for link attributemb211-5/+4
2015-08-07Updated readers and writers for new image attribute parameter.John MacFarlane1-7/+31
(mb21)
2015-07-01ConTeXt: use `\goto` for internal links.John MacFarlane1-7/+2
2015-07-01ConTeXt writer: Added a % at end for `\reference` to avoid spurious space.John MacFarlane1-2/+2
2015-05-28ConTeXt writer: Add reference anchors to Div with ids.John MacFarlane1-1/+7
This is useful for pandoc-citeproc linked citations.
2015-04-26Updated copyright notices to -2015. Closes #2111.John MacFarlane1-2/+2
2015-01-05ghc 7.10.1 RC1 requires specifying the type of String literals ↵Mark Wright1-1/+1
https://ghc.haskell.org/trac/ghc/wiki/Migration/7.10#GHCsaysNoinstanceforFoldable...arisingfromtheuseof...
2014-09-18ConTeXt writer: add function toLabelMark Szepieniec1-7/+17
This function can be used to sanitize reference labels so that they do not contain any of the illegal characters \#[]",{}%()|= . Currently only Links have their labels sanitized, because they are the only Elements that use passed labels.
2014-08-12ConTeXt writer: improved autolink detection.John MacFarlane1-1/+1
It previously failed in some cases with escaped special characters.
2014-05-09Update copyright notices for 2014, add missing noticesAlbert Krewinkel1-2/+2
2014-04-30ConTeXt writer: Improved autolinks.John MacFarlane1-11/+5
Closes #1270.
2013-11-30ConTeXt writer: Don't hardcode figure/table placement.John MacFarlane1-4/+4
Instead, let this be set in the template, using `\setupfloat`. Thanks to Aditya Mahajan for the suggestion.
2013-11-22ConTeXt writer: Use setupcaption to separate style from content.John MacFarlane1-1/+1
Instead of adding 'nunumber' every time we place a figure... Closes #1067.
2013-08-10Use query instead of queryWith.John MacFarlane1-2/+2
2013-08-08Preliminary support for new Div and Span elements in writers.John MacFarlane1-0/+2
Currently these are "transparent" containers, except in HTML, where they produce div and span elements with attributes.
2013-07-01Created Text.Pandoc.Writers.Shared, improved metaToJSON.John MacFarlane1-2/+2
* Text.Pandoc.Writers.Shared contains shared functions used only in writers. * metaToJSON now takes a WriterOptions parameter, and will return an empty object if standalone is not specified.
2013-06-29Metadata changes: Variables now completely shadow metadata.John MacFarlane1-2/+2
Previously if you set a value both in metadata and with a variable, they'd be combined into a list. Now the variable replaces the value in document metadata. If many variables with the same name are set, a list is created. Shared: metaToJSON now has an argument for a variable list.
2013-06-28ConTeXt writer: Properly handle tables without captions.John MacFarlane1-2/+4
The old output only worked in MkII. This should work in MkIV as well. Closes #837.
2013-06-27Writers: Use defField for defaults.John MacFarlane1-5/+5
This way explicitly specified fields not overridden. Fixes a problem e.g. with specifying a documentclass via the command line using -V.
2013-06-24Use new flexible metadata type.John MacFarlane1-20/+16
* 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.
2013-02-18ConTeXt writer: now sensitive to 'unnumbered' class in headers.John MacFarlane1-7/+10
In this case \title, \subject are used instead of \chapter, \section.
2013-02-12Shared: Changed type of Element.John MacFarlane1-1/+1
Sec now includes a field for Attr rather than just String (the identifier). Note, this is an API change.
2013-01-15Use 'fig:' instead of '\SOH' in title to indicate figure.John MacFarlane1-2/+2
Revises 1a4b47e93368bfbd31daccdfedbd9527ee740201
2013-01-14Implemented Ext_implicit_figures.John MacFarlane1-1/+2
* In markdown reader, add a '\1' character to the beginning of the title of an image that is alone in its paragraph, if implicit_figures extension is selected. * In writers, check for Para [Image alt (src,'\1':tit)] and treat it as a figure if possible. * Updated tests. This is a bit of a hack, but it allows us to make implicit_figures an extension of the markdown reader, rather than the writers.
2013-01-09Added Attr field to Header.John MacFarlane1-1/+1
Previously header ids were autogenerated by the writers. Now they are generated (unless supplied explicitly) in the markdown parser, if the `header_identifiers` extension is selected. In addition, the textile reader now supports id attributes on headers.
2013-01-07Implemented tight lists in context, latex writers.John MacFarlane1-11/+15
2013-01-06Don't put the text of an autolink in Code font.John MacFarlane1-2/+6
2013-01-05Support --toc-depth in context writer.John MacFarlane1-0/+6
2012-07-26Moved WriterOptions and associated types Shared -> Options.John MacFarlane1-0/+1
2012-07-26Fixed whitespace errors.John MacFarlane1-23/+23
2012-06-27ConTeXt writer: don't escape `&`,`^`,`<`,`>`.John MacFarlane1-6/+2
Simplified escapes for `}` and `{` to `\{` and `\}`. Thanks to Aditya Mahajan.
2012-06-26Don't escape `_` as `\letterunderscore{}` in ConTeXt.John MacFarlane1-1/+0
2012-05-31Escape `%` as `\letterpercent{}` not `\letterpercent ` in ConTeXt.John MacFarlane1-1/+1
2012-05-29ConTeXt writer: ensure space after `\stopformula`.John MacFarlane1-1/+1
2012-05-11Added writerTeXLigatures to WriterOptions, `--no-tex-ligatures` option.John MacFarlane1-10/+14
This is useful for those who want to use advanced OpenType features with xelatex/lualatex.
2012-04-29ConTeXt writer: Fixed escaping of `%`.John MacFarlane1-2/+2
* In text, `%` needs to be escaped as `\letterpercent`, not `\%` * Inside URLs, `%` needs to be escaped as `\%` Thanks to jmarca and adityam for the fix. Closes #492.
2012-03-07Set mainlang variable in context writer.John MacFarlane1-0/+2
This parallels behavior of latex writer. Mainlang is the last of a comma-separated list of languages in lang.
2011-12-30Fixed layout bug in ConTeXt and LaTeX writers.John MacFarlane1-2/+2
This was a regression introduced by the recent internal links changes.
2011-12-30Added support for internal links in ConTeXt writer.John MacFarlane1-30/+15
Based on a patch by B. Scott Michel. Also simplified use of \hyphenateurl. We no longer try to go within an Inline list to find URLs. This is resource-heavy, and the main use case is autolinks, which can be readily recognized.
2011-12-30ConTeXt writer: Add section labels and internal links as in HTML.B. Scott Michel1-21/+71
Add the ability to refer to internal links to the ConTeXt writer, just like the HTML writer can. The 'hierarchicalize' function generates unique names for sections, which can be used for references in ConTeXt, just as they can be in HTML. The ConTeXt writer adds these unique identifiers to each \section and does special processing of the Link target to see if it starts with a '#' (hash symbol), which is the tip-off that the link is an internal link.
2011-12-30ConTeXt writer: Made `--toc` work even without `--number-sections`.John MacFarlane1-2/+2