aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/HTML.hs
AgeCommit message (Collapse)AuthorFilesLines
2016-10-13Add support for the LineBlock element to writersAlbert Krewinkel1-1/+8
The following markup features are used to output the lines of the `LineBlock` element: - AsciiDoc: a `[verse]` block, - ConTeXt: text surrounded by `\startlines` and `\endlines`, - HTML: `div` with an per-element style setting to interpret the content as pre-wrapped, - Markdown: line blocks if the `line_blocks` extension is enabled, a simple paragraph with hard linebreaks otherwise, - Org: VERSE block, - RST: a line block, and - all other formats: a paragraph, containing hard linebreaks between lines. Custom lua writers should be updated to use the `LineBlock` element.
2016-09-02Remove Compat.MonoidJesse Rosenthal1-1/+1
This was only necessary for GHC versions with base below 4.5 (i.e., ghc < 7.4).
2016-06-22HTML writer: Better support for raw LaTeX environments.John MacFarlane1-12/+41
Previously we just passed all raw TeX through when MathJax was used for HTML math. This passed through too much. With this patch, only raw LaTeX environments that MathJax can handle get passed through. This patch also causes raw LaTeX environments to be treated as math, when possible, with MathML and WebTeX output. Closes #2758.
2016-04-29HTML writer: ensure mathjax link is added when math appears in footnote.John MacFarlane1-3/+2
Previously if a document only had math in a footnote, the MathJax link would not be added. Closes #2881.
2016-02-03HTML writer: don't include alignment attribute for default table columns.John MacFarlane1-2/+5
Previously these were given "left" alignment. Better to leave off alignment attributes altogether. Closes #2694.
2016-01-14HTML writer: harmless code simplification.John MacFarlane1-34/+32
Since the 'math' is only put into the template if stMath is set anyway, there's no need for this conditional.
2015-12-11Implemented SoftBreak and new `--wrap` option.John MacFarlane1-3/+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-20/+47
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-19Merge pull request #2532 from michaelbeaumont/fix-2530John MacFarlane1-5/+3
Interpret pauses correctly for all headers
2015-11-19Merge pull request #2506 from adunning/patch-1John MacFarlane1-3/+0
Remove redundant `center` variable for reveal.js.
2015-11-16HTML writer: Include `example` class for example lists.John MacFarlane1-0/+3
Closes #2524.
2015-11-15Interpret pauses correctly for all headersmichaelbeaumont1-5/+3
Previously, when using headers below the slide level, pauses are left uninterpreted into pauses. In my opinion, unexpected behavior but intentional looking at the code. Fixes #2530
2015-11-09Restored Text.Pandoc.Compat.Monoid.John MacFarlane1-0/+1
Don't use custom prelude for latest ghc. This is a better approach to making 'stack ghci' and 'cabal repl' work. Instead of using NoImplicitPrelude, we only use the custom prelude for older ghc versions. The custom prelude presents a uniform API that matches the current base version's prelude. So, when developing (presumably with latest ghc), we don't use a custom prelude at all and hence have no trouble with ghci. The custom prelude no longer exports (<>): we now want to match the base 4.8 prelude behavior.
2015-11-09Revert "Use -XNoImplicitPrelude and 'import Prelude' explicitly."John MacFarlane1-1/+0
This reverts commit c423dbb5a34c2d1195020e0f0ca3aae883d0749b.
2015-11-09Remove redundant `center` variable for reveal.js.Andrew Dunning1-3/+0
This is no longer needed with the updates to the template in https://github.com/jgm/pandoc-templates/commit/da139313d2e2ba99f4d31be6ea376dabf8c877ff
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-30HTML writer: use width on whole table if col widths sum to < 100%.John MacFarlane1-2/+9
Otherwise some browsers display the table with the columns separated far apart.
2015-10-14Use custom Prelude to avoid compiler warnings.John MacFarlane1-2/+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-10-11HTML reader/writer: better handling of "section" elements.John MacFarlane1-2/+5
Previously `<section>` tags were just parsed as raw HTML blocks. With this change, section elements are parsed as Div elements with the class "section". The HTML writer will use `<section>` tags to render these Divs in HTML5; otherwise they will be rendered as `<div class="section">`. Closes #2438.
2015-08-07Updated readers, writers and README for link attributemb211-11/+12
2015-08-07Updated readers and writers for new image attribute parameter.John MacFarlane1-9/+35
(mb21)
2015-07-21DZSlides: Add `role="note"` for speaker notes.John MacFarlane1-1/+2
Closes #1693.
2015-07-13HTML writer: support speaker notes in dzslides.John MacFarlane1-0/+1
With this change `<div class="notes">` and also `<div class="notes" role="note">` will be output if `-t dzslides` is used. So we can have speaker notes in dzslides too. Thanks to maybegeek.
2015-07-07Fixed email javascript obfuscation with mailto: URLs.John MacFarlane1-2/+2
This fixes a potential security issue. Because single quotes weren't being escaped in the link portion, a specially crafted email address could allow javascript code injection. [Jim'+alert('hi')+'OBrien](mailto:me@example.com) Closes #2280.
2015-05-27Revealjs: allow 'center' to be set to false.John MacFarlane1-0/+3
2015-05-11Don't use sup element for epub footnotes.John MacFarlane1-2/+4
Instead, just use an a element with class `footnoteRef`. This allows more styling options, and provides better results in some readers (e.g. iBooks, where anything inside the a tag breaks popup footnotes). Closes #1995.
2015-04-26Updated copyright notices to -2015. Closes #2111.John MacFarlane1-2/+2
2015-03-14Really fix #1394.John MacFarlane1-5/+6
This closes #1394, which actually wasn't fixed by the earlier commit. This ensures that lists in speaker notes don't add "fragment" classes, which can cause additional keypresses to be needed to advance a slide.
2015-02-25HTML writer: include raw latex blocks if --mathjax specified.John MacFarlane1-1/+8
Closes #1938.
2015-02-04Append newline to the LineBreak of various writersTim Lin1-1/+2
This change improves output formatting of content with a large amount of force line breaks, such as line-blocks. The following writers are affected: * Dokuwiki * HTML * EPUB (via HTML) * LaTeX * MediaWiki * OpenDocument * Texinfo This commit resolves #1924
2015-02-01HTML writer: Add "inline" or "display" class to math spans.John MacFarlane1-57/+60
This allows inline and display math to be styled differently. Closes #1914.
2015-01-29Refactored `if x then [] else y` to `[y | not x]`Konstantin Zudov1-6/+2
2015-01-29Do not ommit missing `alt` attribute on `img` tagKonstantin Zudov1-4/+1
Fixes #1131
2015-01-27Fixed list-style-type for numbered example lists.John MacFarlane1-1/+3
Should be "decimal," not "example." Closes #1902.
2015-01-19Use CPP to avoid unneeded import warning for blaze-markup >= 0.6.3.John MacFarlane1-0/+3
See https://github.com/jgm/pandoc/pull/1888#issuecomment-70470409
2014-12-15HTML writer: put newline btw img and caption paragraph.John MacFarlane1-1/+1
2014-12-15Text.Pandoc.Readers.HTML: Retain display type of MathML outputMatthew Pickering1-2/+4
Closes #1719
2014-10-23HTML writer: Make header attributes work outside top level.John MacFarlane1-4/+14
Previously they only appeared on top level header elements. Now they work e.g. in blockquotes. Closes #1711.
2014-09-25HTML Writer: Don't double render when email-obfuscation=nonempickering1-5/+5
Closes #1625
2014-09-25Add support for KaTeX HTML mathmpickering1-0/+19
Closes #1626
2014-09-25HTML Writer: MathML now outputted with tex annotation.mpickering1-1/+15
Closes #1635
2014-08-12HTML writer: use 'uri' or 'email' class for autolinks.John MacFarlane1-5/+8
This allows them to be styled specially. Closes #1501.
2014-08-09HTML writer: Don't include empty TOC items for slide shows.John MacFarlane1-0/+3
Previously creating a slide with a horizontal rule would result in an empty list item in the TOC. This patch fixes that.
2014-08-04Use texmath 0.7 interface.John MacFarlane1-6/+7
2014-07-19Renamed readTeXMath' to avoid name conflict with texmath 0.6.7Matthew Pickering1-2/+2
Also removed deprecated readTeXMath.
2014-07-15HTML writer: Removed useless clause.John MacFarlane1-4/+0
2014-07-10HTML writer: Deactivate "incremental" inside slide speaker notes.John MacFarlane1-3/+5
Closes #1394.
2014-05-09Update copyright notices for 2014, add missing noticesAlbert Krewinkel1-2/+2
2014-04-26HTML writer: improved detection of image links.John MacFarlane1-1/+5
Previously image links with queries were not recognized, leading to use of an embed tag rather than an img tag.
2014-03-05HTML writer: Add colgroup around col tags.John MacFarlane1-5/+10
Also affects EPUB writer. Closes #877.