summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/ConTeXt.hs
Commit message (Collapse)AuthorAge
* ConTeXt writer: fix whitespace at line beginning in line blocks.John MacFarlane2016-03-18
| | | | | | | | | Add a `\strut` after `\crlf` before space. Closes #2744, #2745. Thanks to @c-foster. This uses the fix suggested by @c-foster. Mid-line spaces are still not supported, because of limitations of the Markdown parser.
* ConTeXt writer: set default layout based on margin-left, etc.John MacFarlane2015-12-22
| | | | | | This sets up `\setuplayout` based on the variables `margin-left`, `margin-right`, `margin-bottom`, and `margin-top`, if no layout is given.
* Fix language code for Czech (cs not cz)John MacFarlane2015-12-19
| | | | Closes #2597.
* Implemented SoftBreak and new `--wrap` option.John MacFarlane2015-12-11
| | | | | | | | | | | | | | | | 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.
* Merge branch 'new-image-attributes' of https://github.com/mb21/pandoc into ↵John MacFarlane2015-11-19
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Updated readers, writers and README for link attributemb212015-08-07
| |
| * Updated readers and writers for new image attribute parameter.John MacFarlane2015-08-07
| | | | | | | | (mb21)
* | Revert "Use -XNoImplicitPrelude and 'import Prelude' explicitly."John MacFarlane2015-11-09
| | | | | | | | This reverts commit c423dbb5a34c2d1195020e0f0ca3aae883d0749b.
* | Use -XNoImplicitPrelude and 'import Prelude' explicitly.John MacFarlane2015-11-08
| | | | | | | | | | | | | | This is needed for ghci to work with pandoc, given that we now use a custom prelude. Closes #2503.
* | LaTeX and ConTeXt writers: support lang attribute on divs and spansmb212015-10-18
| | | | | | | | | | 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.
* | Support bidirectional text output with XeLaTeX, ConTeXt and HTMLmb212015-09-26
| | | | | | | | closes #2191
* | `lang` variable is now in BCP47 formatmb212015-08-20
|/ | | | strings are converted for LaTeX and ConTeXt output, closes #1614
* ConTeXt: use `\goto` for internal links.John MacFarlane2015-07-01
|
* ConTeXt writer: Added a % at end for `\reference` to avoid spurious space.John MacFarlane2015-07-01
|
* ConTeXt writer: Add reference anchors to Div with ids.John MacFarlane2015-05-28
| | | | This is useful for pandoc-citeproc linked citations.
* 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...
* ConTeXt writer: add function toLabelMark Szepieniec2014-09-18
| | | | | | | | 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.
* ConTeXt writer: improved autolink detection.John MacFarlane2014-08-12
| | | | It previously failed in some cases with escaped special characters.
* Update copyright notices for 2014, add missing noticesAlbert Krewinkel2014-05-09
|
* ConTeXt writer: Improved autolinks.John MacFarlane2014-04-30
| | | | Closes #1270.
* ConTeXt writer: Don't hardcode figure/table placement.John MacFarlane2013-11-30
| | | | | Instead, let this be set in the template, using `\setupfloat`. Thanks to Aditya Mahajan for the suggestion.
* ConTeXt writer: Use setupcaption to separate style from content.John MacFarlane2013-11-22
| | | | | | Instead of adding 'nunumber' every time we place a figure... Closes #1067.
* Use query instead of queryWith.John MacFarlane2013-08-10
|
* Preliminary support for new Div and Span elements in writers.John MacFarlane2013-08-08
| | | | | Currently these are "transparent" containers, except in HTML, where they produce div and span elements with attributes.
* Created Text.Pandoc.Writers.Shared, improved metaToJSON.John MacFarlane2013-07-01
| | | | | | | * 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.
* Metadata changes: Variables now completely shadow metadata.John MacFarlane2013-06-29
| | | | | | | | | 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.
* ConTeXt writer: Properly handle tables without captions.John MacFarlane2013-06-28
| | | | | | | The old output only worked in MkII. This should work in MkIV as well. Closes #837.
* Writers: Use defField for defaults.John MacFarlane2013-06-27
| | | | | | | This way explicitly specified fields not overridden. Fixes a problem e.g. with specifying a documentclass via the command line using -V.
* 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.
* ConTeXt writer: now sensitive to 'unnumbered' class in headers.John MacFarlane2013-02-18
| | | | | In this case \title, \subject are used instead of \chapter, \section.
* Shared: Changed type of Element.John MacFarlane2013-02-12
| | | | | | | Sec now includes a field for Attr rather than just String (the identifier). Note, this is an API change.
* Use 'fig:' instead of '\SOH' in title to indicate figure.John MacFarlane2013-01-15
| | | | Revises 1a4b47e93368bfbd31daccdfedbd9527ee740201
* Implemented Ext_implicit_figures.John MacFarlane2013-01-14
| | | | | | | | | | | | * 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.
* Added Attr field to Header.John MacFarlane2013-01-09
| | | | | | | | | | 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.
* Implemented tight lists in context, latex writers.John MacFarlane2013-01-07
|
* Don't put the text of an autolink in Code font.John MacFarlane2013-01-06
|
* Support --toc-depth in context writer.John MacFarlane2013-01-05
|
* Moved WriterOptions and associated types Shared -> Options.John MacFarlane2012-07-26
|
* Fixed whitespace errors.John MacFarlane2012-07-26
|
* ConTeXt writer: don't escape `&`,`^`,`<`,`>`.John MacFarlane2012-06-27
| | | | | | Simplified escapes for `}` and `{` to `\{` and `\}`. Thanks to Aditya Mahajan.
* Don't escape `_` as `\letterunderscore{}` in ConTeXt.John MacFarlane2012-06-26
|
* Escape `%` as `\letterpercent{}` not `\letterpercent ` in ConTeXt.John MacFarlane2012-05-31
|
* ConTeXt writer: ensure space after `\stopformula`.John MacFarlane2012-05-29
|
* Added writerTeXLigatures to WriterOptions, `--no-tex-ligatures` option.John MacFarlane2012-05-11
| | | | | This is useful for those who want to use advanced OpenType features with xelatex/lualatex.
* ConTeXt writer: Fixed escaping of `%`.John MacFarlane2012-04-29
| | | | | | | * 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.
* Set mainlang variable in context writer.John MacFarlane2012-03-07
| | | | | This parallels behavior of latex writer. Mainlang is the last of a comma-separated list of languages in lang.
* Fixed layout bug in ConTeXt and LaTeX writers.John MacFarlane2011-12-30
| | | | | This was a regression introduced by the recent internal links changes.
* Added support for internal links in ConTeXt writer.John MacFarlane2011-12-30
| | | | | | | | 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.
* ConTeXt writer: Add section labels and internal links as in HTML.B. Scott Michel2011-12-30
| | | | | | | | | | | | 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.