summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/HTML.hs
Commit message (Collapse)AuthorAge
* Update dates in copyright noticesAlbert Krewinkel2017-05-13
| | | | | This follows the suggestions given by the FSF for GPL licensed software. <https://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html>
* HTML line block: Use class instead of style attribute.John MacFarlane2017-04-25
| | | | | | | | | We now issue `<div class="line-block">` and include a default definition for `line-block` in the default templates, instead of hard-coding a `style` on the div. Closes #1623.
* Add original classes to JS obfuscated links (#3554)Timm Albers2017-04-04
| | | | | | | HTML links containing classes originally now preserve them when using javascript email obfuscation. Fixes #2989
* Add class to footnote back referencesTimm Albers2017-04-03
| | | | | The HTML writer now also adds the class footnoteBack to back references of footnotes. This allows for easier CSS styling.
* Allow dynamic loading of syntax definitions.John MacFarlane2017-03-30
| | | | | | | | | | | | | | | | | See #3334. * Add writerSyntaxMap to WriterOptions. * Highlighting: added parameter for SyntaxMap to highlight. * Implemented --syntax-definition option. TODO: [ ] Figure out whether we want to have the xml parsing depend on the dtd (it currently does, and fails unless the language.dtd is found in the same directory). [ ] Add an option to read a KDE syntax highlighting theme as a custom style. [ ] Add tests.
* Highlighting: highlighting now returns an Either rather than Maybe.John MacFarlane2017-03-13
| | | | | | | This allows us to display error information returned by the skylighting library. Display a warning if the highlighting library throws an error.
* HTML writer: info message if 'lang' is unspecified.John MacFarlane2017-03-09
| | | | Closes #3486.
* HTML writer: fallback to basename rather than Untitled.John MacFarlane2017-03-09
|
* HTML writer: only issue warning for missing title if --standalone.John MacFarlane2017-03-04
|
* HTML writer: Render SmallCaps as span with smallcaps class.John MacFarlane2017-03-04
| | | | | | | | | Rather than using a style attribute directly. This gives the user more flexibility in styling small caps in CSS. See #1592.
* Stylish-haskell automatic formatting changes.John MacFarlane2017-03-04
|
* HTML writer: issue warning if no title specified and template used.John MacFarlane2017-03-04
| | | | See #3473.
* Special-case .stretch class for images in reveal.js.John MacFarlane2017-02-23
| | | | | | | | Now in reveal.js, an image with class `stretch` in a paragraph by itself will stretch to fill the whole screen, with no caption or figure environment. Closes #1291.
* Use lazy loading for reveal.js slide shows.John MacFarlane2017-02-20
| | | | | | | | * In HTML writer, with reveal.js we use data-src instead of src for images. * In SelfContained, we also load resources from data-src. Closes #2283.
* HTML writer: report when not rendering raw inline/block.John MacFarlane2017-02-11
|
* HTML and DocBook writers: fix internal links with writerIdentifierPrefix opt ↵Mauro Bieg2017-02-03
| | | | | (#3398) closes #3397
* `--mathml` and MathML in HTMLMathMethod longer take an argument.John MacFarlane2017-01-30
| | | | | The argument was for a bridge javascript that used to be necessary in 2004. We have removed the script already.
* HTML: export separate functions for slide formats.John MacFarlane2017-01-27
| | | | | | writeS5, writeSlideous, writeRevealJs, writeDZSlides, writeSlidy. Removed writerSlideVariant from WriterOptions.
* HTML writer: export writeHtmlStringForEPUB.John MacFarlane2017-01-27
| | | | Options: Remove writerEPUBVersion.
* Provide explicit separate functions for HTML 4 and 5.John MacFarlane2017-01-25
| | | | | | | | | * Text.Pandoc.Writers.HTML: removed writeHtml, writeHtmlString, added writeHtml4, writeHtml4String, writeHtml5, writeHtml5String. * Removed writerHtml5 from WriterOptions. * Renamed default.html template to default.html4. * "html" now aliases to "html5"; to get the old HTML4 behavior, you must now specify "-t html4".
* Removed writerHighlight; made writerHighlightStyle a Maybe.John MacFarlane2017-01-25
| | | | | | API change. For no highlighting, set writerHighlightStyle to Nothing.
* Revert "Added page breaks into Pandoc."John MacFarlane2017-01-25
| | | | This reverts commit f02a12aff638fa2339192231b8f601bffdfe3e14.
* Removed writerIgnoreNotes.John MacFarlane2017-01-25
| | | | | | | | | Instead, just temporarily remove notes when generating TOC lists in HTML and Markdown (as we already did in LaTeX). Also export deNote from Text.Pandoc.Shared. API change in Shared and Options.WriterOptions.
* Refactored math conversion in writers.John MacFarlane2017-01-25
| | | | | | | | | | | * Remove exported module `Text.Pandoc.Readers.TeXMath` * Add exported module `Text.Pandoc.Writers.Math` * The function `texMathToInlines` now lives in `Text.Pandoc.Writers.Math` * Export helper function `convertMath` from `Text.Pandoc.Writers.Math` * Use these functions in all writers that do math conversion. This ensures that warnings will always be issued for failed math conversions.
* Fix rebasing errors.Jesse Rosenthal2017-01-25
|
* Unify Errors.Jesse Rosenthal2017-01-25
|
* Implement Errors in PandocMonadJesse Rosenthal2017-01-25
| | | | | | | | | | | | | | | Errors can be thrown purely with `throwError`. At the moment there are only three kinds of errors: 1. PandocFileReadError FilePath (for problems reading a file from the filesystem) 2. PandocShouldNeverHappenError String (for stuff that should never happen but we need to pattern-match anyway) 3. PandocSomeError String (a grab bag of everything else) Of course, we need to subdivide the third item in this list.
* Convert all writers to use PandocMonad.Jesse Rosenthal2017-01-25
| | | | | | | | | | | | | | | Since PandocMonad is an instance of MonadError, this will allow us, in a future commit, to change all invocations of `error` to `throwError`, which will be preferable for the pure versions. At the moment, we're disabling the lua custom writers (this is temporary). This requires changing the type of the Writer in Text.Pandoc. Right now, we run `runIOorExplode` in pandoc.hs, to make the conversion easier. We can switch it to the safer `runIO` in the future. Note that this required a change to Text.Pandoc.PDF as well. Since running an external program is necessarily IO, we can be clearer about using PandocIO.
* Adds support for pagebreaks (when it makes sense)Hubert Plociniczak2017-01-25
| | | | | | | Update all writers to take into account page breaks. A straightforwad, far from complete, implementation of page breaks in selected writers. Readers will have to follow in the future as well.
* HTML writer: don't process pars with empty RawInline, fixes #1040 (#3327)Mauro Bieg2016-12-24
|
* Options: Removed writerStandalone, made writerTemplate a Maybe.John MacFarlane2016-11-30
| | | | | | | | Previously setting writerStandalone = True did nothing unless a template was provided in writerTemplate. Now a fragment will be generated if writerTemplate is Nothing; otherwise, the specified template will be used and standalone output generated. [API change]
* Updated renderHtml import in HTML writer to avoid deprecated function.John MacFarlane2016-11-27
|
* reveal.js: don't change slide title to level 1 header.John MacFarlane2016-10-25
| | | | | | This also affects other HTML slide show formats. Closes #2221.
* Add support for the LineBlock element to writersAlbert Krewinkel2016-10-13
| | | | | | | | | | | | | | | | | 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.
* Remove Compat.MonoidJesse Rosenthal2016-09-02
| | | | | This was only necessary for GHC versions with base below 4.5 (i.e., ghc < 7.4).
* HTML writer: Better support for raw LaTeX environments.John MacFarlane2016-06-22
| | | | | | | | | | | | 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.
* HTML writer: ensure mathjax link is added when math appears in footnote.John MacFarlane2016-04-29
| | | | | | | Previously if a document only had math in a footnote, the MathJax link would not be added. Closes #2881.
* HTML writer: don't include alignment attribute for default table columns.John MacFarlane2016-02-03
| | | | | | | Previously these were given "left" alignment. Better to leave off alignment attributes altogether. Closes #2694.
* HTML writer: harmless code simplification.John MacFarlane2016-01-14
| | | | | Since the 'math' is only put into the template if stMath is set anyway, there's no need for this conditional.
* Implemented SoftBreak and new `--wrap` option.John MacFarlane2015-12-11
| | | | | | | | | | | | | | | | 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.
* Merge branch 'new-image-attributes' of https://github.com/mb21/pandoc into ↵John MacFarlane2015-11-19
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Updated readers, writers and README for link attributemb212015-08-07
| |
| * Updated readers and writers for new image attribute parameter.John MacFarlane2015-08-07
| | | | | | | | (mb21)
* | Merge pull request #2532 from michaelbeaumont/fix-2530John MacFarlane2015-11-19
|\ \ | | | | | | Interpret pauses correctly for all headers
| * | Interpret pauses correctly for all headersmichaelbeaumont2015-11-15
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge pull request #2506 from adunning/patch-1John MacFarlane2015-11-19
|\ \ \ | | | | | | | | Remove redundant `center` variable for reveal.js.
| * | | Remove redundant `center` variable for reveal.js.Andrew Dunning2015-11-09
| | | | | | | | | | | | This is no longer needed with the updates to the template in https://github.com/jgm/pandoc-templates/commit/da139313d2e2ba99f4d31be6ea376dabf8c877ff
* | | | HTML writer: Include `example` class for example lists.John MacFarlane2015-11-16
| |/ / |/| | | | | | | | Closes #2524.
* | | Restored Text.Pandoc.Compat.Monoid.John MacFarlane2015-11-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Revert "Use -XNoImplicitPrelude and 'import Prelude' explicitly."John MacFarlane2015-11-09
|/ / | | | | | | This reverts commit c423dbb5a34c2d1195020e0f0ca3aae883d0749b.