aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/Docbook.hs
AgeCommit message (Collapse)AuthorFilesLines
2016-09-06DocBook writer: include an anchor element when a div or span has an id.John MacFarlane1-2/+9
This closes #3102. Note that DocBook does not have a class attribute, but at least this provides an anchor for internal links.
2016-06-07Docbook writer: Declare xlink namespace in Docbook5 outputIvo Clarysse1-1/+1
2016-04-29Docbook5 writer: Properly handle ulink/linkIvo Clarysse1-1/+3
2016-04-29Write out Docbook 5 namespaceIvo Clarysse1-4/+7
2016-04-29Add docbook5 writer supportIvo Clarysse1-3/+7
2015-12-11Implemented SoftBreak and new `--wrap` option.John MacFarlane1-2/+4
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-7/+28
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-14Use custom Prelude to avoid compiler warnings.John MacFarlane1-1/+0
- The (non-exported) prelude is in prelude/Prelude.hs. - It exports Monoid and Applicative, like base 4.8 prelude, but works with older base versions. - It exports (<>) for mappend. - It hides 'catch' on older base versions. This allows us to remove many imports of Data.Monoid and Control.Applicative, and remove Text.Pandoc.Compat.Monoid. It should allow us to use -Wall again for ghc 7.10.
2015-08-07Updated readers, writers and README for link attributemb211-12/+16
2015-08-07Updated readers and writers for new image attribute parameter.John MacFarlane1-4/+21
(mb21)
2015-05-20DocBook writer: add id to para if in Div with id element.John MacFarlane1-0/+8
This makes the writer work properly with linked bibliographic items with pandoc-citeproc. Closes jgm/pandoc-citeproc#132.
2015-04-26Updated copyright notices to -2015. Closes #2111.John MacFarlane1-2/+2
2015-02-25Docbook writer: don't print empty id attributes.John MacFarlane1-1/+2
Thanks to Steve Horne for reporting.
2014-08-04Merge pull request #1486 from Aelve/minorJohn MacFarlane1-15/+15
Very minor cleanup and readability changes
2014-08-04Use texmath 0.7 interface.John MacFarlane1-7/+8
2014-08-04Add PatternGuards pragmas.Artyom Kazak1-1/+1
2014-08-04Use `stripPrefix` where appropriate.Artyom Kazak1-14/+14
2014-07-19Renamed readTeXMath' to avoid name conflict with texmath 0.6.7Matthew Pickering1-2/+2
Also removed deprecated readTeXMath.
2014-05-09Update copyright notices for 2014, add missing noticesAlbert Krewinkel1-2/+2
2014-05-03DocBook writer: Small tweaks to last commit.John MacFarlane1-9/+3
* Use isTightList from Shared. * Adjust writer test, since isTightList is a bit different from what was used before. Closes #1250.
2014-05-03Distinguish tight and loose lists in Docbook outputNeil Mayhew1-8/+18
Determined by the first block of the first item being Plain.
2014-04-12Improve handling of hard line breaks in Docbook writerNeil Mayhew1-3/+16
* Use a <literallayout> for the entire paragraph, not just for the newline character * Don't let LineBreaks inside footnotes influence the enclosing paragraph
2013-11-19Docbook writer: Hierarchicalize block content in metadata.John MacFarlane1-2/+3
Previously headers just disappeared from block-level metadata when it was used in templates. Now we apply the 'hierarchicalize' transformation. Note that a block headed by a level-2 header will turn into a `<sect1>` element.
2013-11-01TexMath: Export readTeXMath', which attends to display/inline.John MacFarlane1-2/+2
Deprecate readTeXMath, and use readTeXMath' in all the writers. Require texmath >= 0.6.5.
2013-08-18Adjusted writers and tests for change in parsing of div/span.John MacFarlane1-1/+1
Textile, MediaWiki, Markdown, Org, RST will emit raw HTML div tags for divs. Otherwise Div and Span are "transparent" block containers.
2013-08-10Adjustments for new Format newtype.John MacFarlane1-4/+5
2013-08-08Preliminary support for new Div and Span elements in writers.John MacFarlane1-0/+3
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-27Writers: Use defField for defaults.John MacFarlane1-2/+2
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-17/+23
* 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-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-28DocBook writer: for linebreak, but newline in literallayout.John MacFarlane1-1/+1
Closes #725.
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-06Don't put the text of an autolink in Code font.John MacFarlane1-1/+1
2012-09-29Renamed removedLeadingTrailingSpace to trim.John MacFarlane1-2/+2
Also removeLeadingSpace to triml, removeTrailingSpace to trimr.
2012-09-06Made --id-prefix work in DocBook as well as HTML.John MacFarlane1-1/+1
Closes #607.
2012-08-04Don't include empty captions in figures.John MacFarlane1-3/+6
Closes #581.
2012-07-26Moved WriterOptions and associated types Shared -> Options.John MacFarlane1-0/+1
2012-07-26Fixed whitespace errors.John MacFarlane1-33/+33
2012-01-31Support `--mathml` flag in docbook.John MacFarlane1-2/+28
2012-01-27Docbook writer: Use sect1, sect2, etc. instead of section.John MacFarlane1-9/+11
2011-12-27Replaced Apostrophe, Ellipses, EmDash, EnDash w/ unicode strings.John MacFarlane1-4/+0
2011-12-26Updated highlighting for highlighting-kate 0.4.John MacFarlane1-1/+1
Text.Pandoc.Highlighting now exports just one new function, 'highlight', and reexports all the other functions from highlighting-kate that are used in the writers. This should make it easy to switch highlighting engines if that is ever desired.
2011-10-25HTML reader now recognizes DocBook block and inline tags.John MacFarlane1-1/+2
It was always possible to include raw DocBook tags in a markdown document, but now pandoc will be able to distinguish block from inline tags and behave accordingly. Thus, for example, <sidebar> hello </sidebar> will not be wrapped in `<para>` tags.
2011-07-24Docbook writer: Use programlisting for code blocks.John MacFarlane1-3/+3
Instead of screen, as before.