aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/HTML.hs
AgeCommit message (Collapse)AuthorFilesLines
2019-03-28HTML writer: Don't add data- prefix to RDFa attributes.John MacFarlane1-2/+19
Closes #5403.
2019-03-01HTML writer: include content under title slides.John MacFarlane1-7/+9
This facilitates real 2D revealjs slideshows, with content under the top-level slide in each stack. It also enables notes on title slides. Closes #4317 and #5237.
2019-03-01Remove license boilerplate.John MacFarlane1-18/+0
The haddock module header contains essentially the same information, so the boilerplate is redundant and just one more thing to get out of sync.
2019-02-10Implement aria roles doc-bibliography, doc-biblioentry, doc-biblioref.John MacFarlane1-2/+10
Note that doc-biblioref is only used when link-citations produces links, since it belongs on links. See #4213.
2019-02-04Add missing copyright notices and remove license boilerplate (#5112)Albert Krewinkel1-2/+2
Quite a few modules were missing copyright notices. This commit adds copyright notices everywhere via haddock module headers. The old license boilerplate comment is redundant with this and has been removed. Update copyright years to 2019. Closes #4592.
2019-02-02HTML5 writer: implement WAI-ARIA roles for (end)notes.John MacFarlane1-12/+25
See #4213.
2019-01-07revealjs writer: fix some section nesting corner cases.John MacFarlane1-6/+13
* Ensure that we don't get > 2 levels of section nesting, even with slide level > 2. * If slide level == N but there is no N-level header, make sure the next header with level > N gets treated as a slide and put in a section, rather than remaining loose. Closes #5168.
2019-01-02Implement task lists (#5139)Mauro Bieg1-2/+20
Closes #3051
2018-11-21HTML writer: use plain `"` instead of `"` outside of attributes.John MacFarlane1-1/+2
2018-11-01HTML writer: use character entities references when possible for HTML5.John MacFarlane1-2/+8
2018-10-04KaTeX: don't use autorenderer.John MacFarlane1-5/+5
We no longer surround formulas with `\(..\)` or `\[..\]` and rely on the autorenderer. Instead, we tell katex to convert the contents of span elements with class "math". Since math has already been identified, this avoids wasted time parsing for LaTeX delimiters. Note, however, that this may yield unexpected results if you have span elements with class "math" that don't contain LaTeX math. Also, use latest version of KaTeX by default (0.9.0). Closes #4946.
2018-09-30Implement `--ascii` (`writerPreferAscii`) in writers, not App.John MacFarlane1-7/+11
Now the `write*` functions for Docbook, HTML, ICML, JATS, Man, Ms, OPML are sensitive to `writerPreferAscii`. Previously the to-ascii translation was done in Text.Pandoc.App, and thus not available to those using the writer functions directly. In addition, the LaTeX writer is now sensitive to `writerPreferAscii` and to `--ascii`. 100% ASCII output can't be guaranteed, but the writer will use commands like `\"{a}` and `\l` whenever possible, to avoid emiting a non-ASCII character. A new unexported module, Text.Pandoc.Groff, has been added to store functions used in the different groff-based writers.
2018-09-27HTML writer: avoid adding extra section nestings for revealjs.John MacFarlane1-1/+1
Previously revealjs title slides at level (slidelevel - 1) were nested under an extra section element, even when the section contained no additional (vertical) content. That caused problems for some transition effects. See hakimel/reveal.js#1947.
2018-09-27HTML writer: omit unknown attributes in EPUB2 output.John MacFarlane1-8/+140
This allows users to include `epub:type` attributes, which will be passed through to epub3 but not epub2.
2018-09-19Markdown reader: distinguish autolinks in the AST.John MacFarlane1-5/+2
With this change, autolinks are parsed as Links with the `uri` class. (The same is true for bare links, if the `autolink_bare_uris` extension is enabled.) Email autolinks are parsed as Links with the `email` class. This allows the distinction to be represented in the URI. Formerly the `uri` class was added to autolinks by the HTML writer, but it had to guess what was an autolink and could not distinguish `[http://example.com](http://example.com)` from `<http://example.com>`. It also incorrectly recognized `[pandoc](pandoc)` as an autolink. Now the HTML writer simply passes through the `uri` attribute if it is present, but does not add anything. The Textile writer has been modified so that the `uri` class is not explicitly added for autolinks, even if it is present. Closes #4913.
2018-09-11HTML writer: always output <dt> element, even if it is emptyAlexander Krotov1-3/+1
Fixes #4883
2018-08-08HTML writer: Don't prefix epub: attributes with data-.John MacFarlane1-0/+1
2018-06-12reveal.js writer and template: reuse mathjax URL...John MacFarlane1-5/+6
...provided by the argument to `--mathjax` or the normal pandoc default, rather than a hard-coded one in the template. Closes #4701.
2018-05-09Restored and undeprecated gladtex for HTML math.John MacFarlane1-1/+8
- Added `GladTeX` constructor to `Text.Pandoc.Options.HTMLMathMethod` [API change, reverts removal in v2.2] - Restored and undeprecated `--gladtex` option, removed in v2.2. Closes #4607.
2018-05-09Fix regression with tex math environments in HTML + MathJax.John MacFarlane1-11/+5
Closes #4639.
2018-05-07HTML writer: Strip links from headers when creating TOC.John MacFarlane1-4/+12
Otherwise the TOC entries will not link to the sections. Closes #4340.
2018-04-25Removed deprecated ancient HTML math methods.John MacFarlane1-25/+0
Removed `--latexmathml`, `--gladtex`, `--mimetex`, `--jsmath`, `-m`, `--asciimathml` options. Removed `JsMath`, `LaTeXMathML`, and `GladTeX` constructors from `Text.Pandoc.Options.HTMLMathMethod` [API change]. Removed unneeded data file LaTeXMathML.js and updated tests. Bumped version to 2.2.
2018-03-30EPUB writer: add epub:type="footnotes" to notes section in EPUB3.John MacFarlane1-0/+5
Closes #4489.
2018-03-18Use NoImplicitPrelude and explicitly import Prelude.John MacFarlane1-0/+2
This seems to be necessary if we are to use our custom Prelude with ghci. Closes #4464.
2018-03-17Work around Monoid/Semigroup-related compiler errors GHC 7.10.John MacFarlane1-13/+12
2018-03-16Monoid/Semiground cleanup relying on custom Prelude.John MacFarlane1-1/+0
2018-02-22Presentations: Use divs to set incremental/non-incrementalJesse Rosenthal1-7/+16
Currently, html and beamer presentations use a list-inside-blockquote convention for setting incremental and all-at-once presentation of lists (or reversing the command-line default). This allows the user to set this on a per-case basis with divs, named `incremental` and `nonincremental` respectively, as in: ::: incremental - snap - crackle - pop ::: Note that the former list-inside-blockquote convention still works so as not to break any existing presentations. Closes: #4381
2018-01-19Conditional import to avoid warning.John MacFarlane1-2/+5
2018-01-19hlint code improvements.John MacFarlane1-6/+7
2018-01-09HTML writer: Fixed footnote backlinks with --id-prefix.John MacFarlane1-1/+1
Closes #4235.
2018-01-05Update copyright notices to include 2018Albert Krewinkel1-2/+2
2017-12-26HTML writer: Use br elements in line blocks...John MacFarlane1-2/+1
instead of relying on CSS. Closes #4162. HTML-based templates have had the custom CSS for div.line-block removed. Those maintaining custom templates will want to remove this too. We still enclose line blocks in a div with class line-block.
2017-12-04Add `empty_paragraphs` extension.John MacFarlane1-5/+9
* Deprecate `--strip-empty-paragraphs` option. Instead we now use an `empty_paragraphs` extension that can be enabled on the reader or writer. By default, disabled. * Add `Ext_empty_paragraphs` constructor to `Extension`. * Revert "Docx reader: don't strip out empty paragraphs." This reverts commit d6c58eb836f033a48955796de4d9ffb3b30e297b. * Implement `empty_paragraphs` extension in docx reader and writer, opendocument writer, html reader and writer. * Add tests for `empty_paragraphs` extension.
2017-12-03Removed unnecessary import.John MacFarlane1-1/+1
2017-12-03HTML writer: export tagWithAttributes.John MacFarlane1-2/+19
This is a helper allowing other writers to create single HTML tags.
2017-11-02Improved support for columns in HTML.John MacFarlane1-5/+2
* Move as much as possible to the CSS in the template. * Ensure that all the HTML-based templates (including epub) contain the CSS for columns. * Columns default to 50% width unless they are given a width attribute. Closes #4028.
2017-11-02Use latest skylighting; ensure no duplicate ids on code lines.John MacFarlane1-3/+11
The line identifiers are built using the code block's identifier as a prefix. If the code block has null identifier, we use "cb1", "cb2", etc. Closes #4031.
2017-11-02Fixed revealjs slide column width issues.John MacFarlane1-2/+7
* Remove "width" attribute which is not allowed on div. * Remove space between `<div class="column">` elements, since this prevents columns whose widths sum to 100% (the space takes up space). Closes #4028.
2017-10-31HTML Writer: consistently use dashed class-namesmb211-3/+3
see #3556
2017-10-29Source code reformatting.John MacFarlane1-2/+2
2017-10-29hlint suggestions.John MacFarlane1-51/+50
2017-10-27Automatic reformating by stylish-haskell.John MacFarlane1-8/+8
2017-10-16HTML writer: don't add data- prefix to unknown attributes beginning with data-.John MacFarlane1-0/+1
Or we'll get data-data-blah.
2017-10-05KaTeX fixes:John MacFarlane1-19/+15
* In Options.HTMLMathMethod, the KaTeX contsructor now takes only one string (for the KaTeX base URL), rather than two [API change]. * The default URL has been updated to the latest version. * The autoload script is now loaded by default.
2017-08-29Add a type sig to satisfy ghc 7.10.3.John MacFarlane1-0/+1
2017-08-28HTML writer: ensure we don't get two style attributes for width & height.John MacFarlane1-2/+8
2017-08-17slidy uses https instead of http (#3848)ickc1-1/+1
grep -rl 'http://www.w3.org/Talks/Tools/Slidy2' . | xargs sed -i 's/http:\/\/www\.w3\.org\/Talks\/Tools\/Slidy2/https:\/\/www\.w3\.org\/Talks\/Tools\/Slidy2/g'
2017-08-14Implement multicolumn support for slide formats.John MacFarlane1-1/+7
The structure expected is: <div class="columns"> <div class="column" width="40%"> contents... </div> <div class="column" width="60%"> contents... </div> </div> Support has been added for beamer and all HTML slide formats. Closes #1710. Note: later we could add a more elegant way to create this structure in Markdown than to use raw HTML div elements. This would come for free with a "native div syntax" (#168). Or we could devise something specific to slides
2017-08-10Slidy writer: use h1 for all slides...John MacFarlane1-1/+5
even if they were originally level 2 headers. Otherwise the built-in table of contents in Slidy breaks. Closes #3566.
2017-07-26Sorted the list of supported HTML5 attributes and removed duplicates. (#3817)Wandmalfarbe1-80/+46