summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/RTF.hs
Commit message (Collapse)AuthorAge
* Improved warnings when image size can't be determined.John MacFarlane2015-05-09
| | | | Closes #1834.
* ImageSize: make imageSize return an Either, not a Maybe.John MacFarlane2015-05-09
| | | | | This will give us better error reporting options. This is part of a fix for #1834.
* Updated copyright notices to -2015. Closes #2111.John MacFarlane2015-04-26
|
* Text.Pandoc.Writers.RTF: Add blankline at end of outputMatthew Pickering2014-12-15
| | | | Closes #1732
* RTF writer: Improved image embedding.John MacFarlane2014-07-30
| | | | Use calculated sizes.
* RTF writer: refactored image embedding, using fetchItem'.John MacFarlane2014-07-30
|
* Renamed readTeXMath' to avoid name conflict with texmath 0.6.7Matthew Pickering2014-07-19
| | | | Also removed deprecated readTeXMath.
* RTF writer: Avoid extra paragraph tags in metadata.John MacFarlane2014-07-13
| | | | Closes #1421.
* Update copyright notices for 2014, add missing noticesAlbert Krewinkel2014-05-09
|
* RTF writer: Fixed tables cells containing paragraphs.John MacFarlane2014-03-24
| | | | This moves \intbl after \pard.
* TexMath: Export readTeXMath', which attends to display/inline.John MacFarlane2013-11-01
| | | | | Deprecate readTeXMath, and use readTeXMath' in all the writers. Require texmath >= 0.6.5.
* Use isURI instead of isAbsoluteURI.John MacFarlane2013-10-16
| | | | It allows fragments identifiers.
* Use walk, walkM in place of bottomUp, bottomUpM when possible.John MacFarlane2013-08-10
| | | | They are significantly faster.
* Adjustments for new Format newtype.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.
* 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.
* Fixed regression with RTF table of contents.John MacFarlane2013-06-25
|
* 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.
* RTF writer: Properly handle characters above the 0000-FFFF range.John MacFarlane2013-05-02
| | | | Uses surrogate pairs. Thanks to Hiromi Ishii for the patch.
* RTF writer: Added writeRTFWithEmbeddedImages.John MacFarlane2013-01-18
| | | | | | | * RTF writer: Export writeRTFWithEmbeddedImages instead of rtfEmbedImage. * Text.Pandoc: Use writeRTFWithEmbeddedImages for RTF. * Moved code for embedding images in RTF out of pandoc.hs.
* 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 --toc-depth (and --toc!) for RTF writer.John MacFarlane2013-01-05
|
* Moved WriterOptions and associated types Shared -> Options.John MacFarlane2012-07-26
|
* Fixed whitespace errors.John MacFarlane2012-07-26
|
* Use catch from Control.Exception to avoid warnings.John MacFarlane2012-07-24
|
* Replaced Apostrophe, Ellipses, EmDash, EnDash w/ unicode strings.John MacFarlane2011-12-27
|
* Un-URI-escape image filenames in LaTeX, ConTeXt, RTF, Texinfo.John MacFarlane2011-07-16
| | | | | | Also do this when copying image files into EPUBs and ODTs. Closes #263.
* RTF writer: Embed images when possible.John MacFarlane2011-01-28
| | | | | | * Resolves Issue #275. * PNG and JPEG supported. * Export rtfEmbedImage.
* Add support for attributes in inline Code.John MacFarlane2011-01-26
| | | | | | | | 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.
* Bumped version to 1.8; depend on pandoc-types 1.8.John MacFarlane2011-01-26
| | | | | | | 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.
* Updated copyright notices.John MacFarlane2010-03-23
|
* Use template variables for include-before/after.fiddlosopher2010-03-13
| | | | | | | | | | | | * 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
* RTF writer: fixed headerless tables.fiddlosopher2010-03-11
| | | | git-svn-id: https://pandoc.googlecode.com/svn/trunk@1877 788f1e2b-df1e-0410-8736-df70ead52e1b
* Modified RTF writer to use new templates.fiddlosopher2009-12-31
| | | | | | | Also changed treatment of multiple authors: they now occupy multiple paragraphs rather than using a line break. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1734 788f1e2b-df1e-0410-8736-df70ead52e1b
* Changed Meta author and date types to Inline lists instead of Strings.fiddlosopher2009-12-31
| | | | | | | | | | | | Meta [Inline] [[Inline]] [Inline] rather than Meta [Inline] [String] String. This is a breaking change for libraries that use pandoc and manipulate the metadata. Changed .native files in test suite for new Meta format. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1699 788f1e2b-df1e-0410-8736-df70ead52e1b
* Removed unneeded writer options; use template variables instead.fiddlosopher2009-12-31
| | | | | | | | | 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
* Added optional section numbering in HTML output.fiddlosopher2009-12-08
| | | | | | | | | | | | This involves a change to the Element data structure, including a section number as well as an id and title for each section. Section numbers are lists of integers; this should allow different numbering schemes to be used in the future. Currently [1,2,3] -> 1.2.3. Resolves Issue #150. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1658 788f1e2b-df1e-0410-8736-df70ead52e1b
* Improved syntax for markdown definition lists.fiddlosopher2009-12-07
| | | | | | | | | | | | | | | | | | | 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
* Better looking simple tables. Resolves Issue #180.fiddlosopher2009-11-28
| | | | | | | | | | | | | | | * 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
* HTML writer: wrap sections in divs. Resolves Issue #70.fiddlosopher2009-04-25
| | | | | | | | | | | | | | | | | | | | + hierarchicalize has been rationalized; it builds a hierarchical representation of the document from the headers, and simultaneously gives each section a unique identifier based on the heading title. + Identifiers are now attached to the divs rather than to the headers themselves. + Table of content backlinks go to the beginning of the table, rather than to the section reference that was clicked. This seems better. + Code for constructing identifiers has been moved to Text.Pandoc.Shared from the HTML writer, since it is now consumed only by hierarchicalize. + In --strict mode, pandoc just prints bare headings, as before (unless --toc has been specified). + In s5 output, it does not wrap sections in divs, as that seems to confuse the s5 javascript. + Test suite updated accordingly. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1562 788f1e2b-df1e-0410-8736-df70ead52e1b
* Moved all haskell source to src subdirectory.fiddlosopher2009-01-24
| | | | git-svn-id: https://pandoc.googlecode.com/svn/trunk@1528 788f1e2b-df1e-0410-8736-df70ead52e1b
* Moved everything from src into the top-level directory.fiddlosopher2007-11-29
| | | | git-svn-id: https://pandoc.googlecode.com/svn/trunk@1104 788f1e2b-df1e-0410-8736-df70ead52e1b
* Reverted back to state as of r1062. The template haskell changesfiddlosopher2007-11-03
| | | | | | | are more trouble than they're worth. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1064 788f1e2b-df1e-0410-8736-df70ead52e1b
* Use template haskell to avoid the need for templates:fiddlosopher2007-11-03
| | | | | | | | | | | | | | | | | | + Added library Text.Pandoc.Include, with a template haskell function $(includeStrFrom fname) to include a file as a string constant at compile time. + This removes the need for the 'templates' directory or Makefile target. These have been removed. + The base source directory has been changed from src to . + A new 'data' directory has been added, containing the ASCIIMathML.js script, writer headers, and S5 files. + The src/wrappers directory has been moved to 'wrappers'. + The Text.Pandoc.ASCIIMathML library is no longer needed, since Text.Pandoc.Writers.HTML can use includeStrFrom to include the ASCIIMathML.js code directly. It has been removed. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1063 788f1e2b-df1e-0410-8736-df70ead52e1b
* Major code cleanup in all modules. (Removed unneeded imports,fiddlosopher2007-08-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | reformatted, etc.) More major changes are documented below: + Removed Text.Pandoc.ParserCombinators and moved all its definitions to Text.Pandoc.Shared. + In Text.Pandoc.Shared: - Removed unneeded 'try' in blanklines. - Removed endsWith function and rewrote functions to use isSuffixOf instead. - Added >>~ combinator. - Rewrote stripTrailingNewlines, removeLeadingSpaces. + Moved Text.Pandoc.Entities -> Text.Pandoc.CharacterReferences. - Removed unneeded functions charToEntity, charToNumericalEntity. - Renamed functions using proper terminology (character references, not entities). decodeEntities -> decodeCharacterReferences, characterEntity -> characterReference. - Moved escapeStringToXML to Docbook writer, which is the only thing that uses it. - Removed old entity parser in HTML and Markdown readers; replaced with new charRef parser in Text.Pandoc.Shared. + Fixed accent bug in Text.Pandoc.Readers.LaTeX: \^{} now correctly parses as a '^' character. + Text.Pandoc.ASCIIMathML is no longer an exported module. git-svn-id: https://pandoc.googlecode.com/svn/trunk@835 788f1e2b-df1e-0410-8736-df70ead52e1b
* Major change in the way ordered lists are handled:fiddlosopher2007-08-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + The changes are documented in README, under Lists. + The OrderedList block element now stores information about list number style, list number delimiter, and starting number. + The readers parse this information, when possible. + The writers use this information to style ordered lists. + Test suites have been changed accordingly. Motivation: It's often useful to start lists with numbers other than 1, and to have control over the style of the list. Added to Text.Pandoc.Shared: + camelCaseToHyphenated + toRomanNumeral + anyOrderedListMarker + orderedListMarker + orderedListMarkers Added to Text.Pandoc.ParserCombinators: + charsInBalanced' + withHorizDisplacement + romanNumeral RST writer: + Force blank line before lists, so that sublists will be handled correctly. LaTeX reader: + Fixed bug in parsing of footnotes containing multiple paragraphs, introduced by use of charsInBalanced. Fix: use charsInBalanced' instead. LaTeX header: + use mathletters option in ucs package, so that basic unicode Greek letters will work properly. git-svn-id: https://pandoc.googlecode.com/svn/trunk@834 788f1e2b-df1e-0410-8736-df70ead52e1b
* + Added support for superscript, subscript, andfiddlosopher2007-07-22
| | | | | | | | | | | | | | strikeout to all writers. (Thanks to Bradley Kuhn for the patches for strikeout, here slightly modified.) + Refactored character escaping using the new functions escapeStringUsing and backslashEscapes. + Added state to LaTeX writer, which now keeps track of what packages need to be included in the preamble, based on the content of the document. (Thus, e.g., ulem is only required if you use strikeout.) git-svn-id: https://pandoc.googlecode.com/svn/trunk@755 788f1e2b-df1e-0410-8736-df70ead52e1b
* Added support for --toc to RTF writer.fiddlosopher2007-07-09
| | | | git-svn-id: https://pandoc.googlecode.com/svn/trunk@657 788f1e2b-df1e-0410-8736-df70ead52e1b