aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/ConTeXt.hs
AgeCommit message (Collapse)AuthorFilesLines
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
2011-12-30Small tweaks to hyphenatedurl patch.John MacFarlane1-9/+6
Use isURI instead of isAbsoluteURI, as it also matches absolute URIs with '#...' at the end.
2011-12-30ConTeXt_url_hyphenationB. Scott Michel1-6/+13
Deeply scan through the [Inline] associated with a Link and ensure that all URLs are hyphenated using SYB primitives.
2011-12-27Replaced Apostrophe, Ellipses, EmDash, EnDash w/ unicode strings.John MacFarlane1-4/+4
2011-08-20ConTeXt writer: Changed 'descr' to 'description', fixed alignment.John MacFarlane1-2/+2
2011-08-18ConTeXt: Use buffering for footnotes containing code blocks.John MacFarlane1-2/+8
Closes #291.
2011-08-18ConTeXt: Escape # in link URLs.John MacFarlane1-1/+2
Partially addresses #291.
2011-07-19ConTeXt writer: Made \start/stoptyping flush with margin.John MacFarlane1-1/+1
This prevents extra blank lines.
2011-07-16Un-URI-escape image filenames in LaTeX, ConTeXt, RTF, Texinfo.John MacFarlane1-1/+5
Also do this when copying image files into EPUBs and ODTs. Closes #263.
2011-01-26Add support for attributes in inline Code.John MacFarlane1-3/+3
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-26Adjusted writers to use "tex".John MacFarlane1-2/+1
2011-01-26Distinguish latex & context environments; blank line after in writers.John MacFarlane1-3/+1
2011-01-26Bumped version to 1.8; depend on pandoc-types 1.8.John MacFarlane1-3/+8
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-22ConTeXt writer: Ensure cr after \stoptyping.John MacFarlane1-1/+1
2011-01-22ConTeXt writer: Don't add cr at end of inline footnote.John MacFarlane1-1/+1
2011-01-19Fixed problem with inline code in ConTeXt writer.John MacFarlane1-1/+3
Previously `}` would be rendered '\type{}}'. Now we check the string for '}' and '{'. If it contains neither, use \type{}; otherwise use \mono{} with an escaped version of the string. Note: There are some issues using the \type!str! form, including differences btw mkii and mkiv. For now this is a conservative fix. Perhaps in the future we can use \type!str!. See the discussion on pandoc-discuss s.v. "Bug in context writer".
2011-01-16Support --chapters for ConTeXt output as well.John MacFarlane1-3/+6
2010-12-20ConTeXt writer: Updated to use Text.Pandoc.Pretty.John MacFarlane1-73/+71
2010-10-24LaTeX & ConTeXt writers: escape [ and ] as {[} and {]}.John MacFarlane1-0/+2
This avoids unwanted interpretation as optional arguments in some contexts, which caused the brackets to silently disappear!
2010-07-20Made spacing at end of output more consistent.John MacFarlane1-1/+1
Previously some of the writers added spurious whitespace. This has been removed, resolving Issue #232. NOTE: If your application combines pandoc's output with other text, for example in a template, you may need to add spacing. For example, a pandoc-generated markdown file will not have a blank line after the final block element. If you are inserting it into another markdown file, you will need to make sure there is a blank line between it and the next block element.
2010-03-27Implemented @ for sequentially numbered examples.John MacFarlane1-0/+1
Also implemented (@label) for example labels and references.
2010-03-23Updated copyright notices.John MacFarlane1-2/+2
2010-03-16ConTeXt writer: support images in figures.fiddlosopher1-4/+6
Also, DON'T put image in figure (as was done previously) when it's an inline image. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1893 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-03-13Use template variables for include-before/after.fiddlosopher1-7/+1
* These options now imply -s; previously they worked also in fragment mode. * Users can now adjust position of include-before and include-after text in the templates. * Default position of include-before moved back (as it originally was) before table of contents. * Resolves Issue #217. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1883 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-03-07ConTeXt writer: Don't use header in headerless table.fiddlosopher1-2/+4
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1868 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31Removed redundant imports (found by ghc 6.12).fiddlosopher1-1/+0
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1750 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31Context and latex writers - parse title, author, date before body.fiddlosopher1-7/+7
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1729 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31Use $for$ for multiple authors in context, latex, markdown.fiddlosopher1-2/+2
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1723 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31Implemented templates for context writer.fiddlosopher1-47/+28
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1701 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31Removed unneeded writer options; use template variables instead.fiddlosopher1-35/+37
Removed writerIncludeAfter, writerIncludeBefore, writerTitlePrefix, writerHeader. Removed corresponding fields of Options structure in pandoc.hs. The options now set template variables (writerVariables) instead. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1684 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-07Improved syntax for markdown definition lists.fiddlosopher1-4/+5
Definition lists are now more compatible with PHP Markdown Extra. Resolves Issue #24. + You can have multiple definitions for a term (but still not multiple terms). + Multi-block definitions no longer need a column before each block (indeed, this will now cause multiple definitions). + The marker no longer needs to be flush with the left margin, but can be indented at or two spaces. Also, ~ as well as : can be used as the marker (this suggestion due to David Wheeler.) + There can now be a blank line between the term and the definitions. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1656 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-11-28Better looking simple tables. Resolves Issue #180.fiddlosopher1-6/+4
* Markdown reader: simple tables are now given column widths of 0. * Column width of 0 is interpreted as meaning: use default column width. * Writers now include explicit column width information only for multiline tables. (Exception: RTF writer, which requires column widths. In this case, columns are given equal widths, adding up to the text width.) * Simple tables should now look better in most output formats. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1631 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-01-24Moved all haskell source to src subdirectory.fiddlosopher1-0/+302
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1528 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-11-29Moved everything from src into the top-level directory.fiddlosopher1-297/+0
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1104 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-11-22+ Changed \useurl to \useURL in ConTeXt output.fiddlosopher1-1/+1
+ Changed links from red to blue in ConTeXt output. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1087 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-11-18More improvements to ConTeXt writer:fiddlosopher1-79/+100
+ writer options are now in state, so they don't have to be passed as a parameter + state also keeps track of ordered list level, so the right default numbering scheme can be used + extra blank line after \stopitemize + removed definitions of ltxenum and ltxitem from the preamble + both kinds of lists are now generated using \start-stopitemize, with appropriate options + in the case of bulleted lists, no options need be specified, because defaults are given in the preamble + test suite updated accordingly git-svn-id: https://pandoc.googlecode.com/svn/trunk@1084 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-11-17ConTeXt writer:fiddlosopher1-2/+4
+ Don't use \(sub)+subject if header level > 5. + Modified tests to conform to new treatment of level 4 and 5 headers. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1083 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-11-17Modified ConTeXt writer to use \subsubsubsubsection etc.,fiddlosopher1-4/+2
since these are supported (up to at least sub x 5). git-svn-id: https://pandoc.googlecode.com/svn/trunk@1082 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-11-17Adjusted formatting of LaTeX and ConTeXt footnotes:fiddlosopher1-3/+3
- in ConTeXt, % is not needed at end of line before note, since space is gobbled. - beginning of footnote indented four spaces. - this required an additional parameter in wrappedTeX and wrapTeXIfNeeded, in Text.Pandoc.Shared. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1080 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-11-16ConTeXt writer: Use itemize options, not sym{}, to produce orderedfiddlosopher1-14/+28
lists with custom numbering styles. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1079 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-11-16New, "official" definition of blockquote environment in ConTeXt header.fiddlosopher1-1/+1
Also, use blank line after \startblockquote to balance blank line at the end. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1078 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-11-15Changes to ConTeXt writer:fiddlosopher1-121/+135
+ PrettyPrint module now used for output. + Text wrapping now provided, using wrapTeXIfNeeded. + Better treatment of footnotes: footnotes are always on lines by themselves. + Use \subject, \subsubject, ... or \section, \subsection, ... for headings, depending on whether --number-sections option is selected. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1072 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-11-03Reverted back to state as of r1062. The template haskell changesfiddlosopher1-0/+248
are more trouble than they're worth. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1064 788f1e2b-df1e-0410-8736-df70ead52e1b