23 lines
6.8 KiB
HTML
23 lines
6.8 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Text.Pandoc.Util.Filter</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
|
window.onload = function () {pageLoad();setSynopsis("mini_Text-Pandoc-Util-Filter.html");};
|
|
//]]>
|
|
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Text.Pandoc.Util.Filter.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">pandoc-slide-filter-0.1.0.0</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">Text.Pandoc.Util.Filter</p></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><a href="#v:attToString">attToString</a> :: Attr -> String</li><li class="src short"><a href="#v:convertToStyle">convertToStyle</a> :: [String] -> [(String, String)] -> [(String, String)]</li><li class="src short"><a href="#v:revealjsSpecialAttrs">revealjsSpecialAttrs</a> :: [String]</li><li class="src short"><a href="#v:revealjsRewriteAttr">revealjsRewriteAttr</a> :: [String] -> [String]</li><li class="src short"><a href="#v:classToRevealAttr">classToRevealAttr</a> :: [String] -> ([String], [String])</li><li class="src short"><a href="#v:toHtml">toHtml</a> :: String -> Inline</li><li class="src short"><a href="#v:toBlockHtml">toBlockHtml</a> :: String -> Block</li><li class="src short"><a href="#v:addToAtt">addToAtt</a> :: Eq a => a -> [a] -> [a]</li><li class="src short"><a href="#v:addToStyle">addToStyle</a> :: String -> [(String, String)] -> [(String, String)]</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a id="v:attToString" class="def">attToString</a> :: Attr -> String <a href="src/Text.Pandoc.Util.Filter.html#attToString" class="link">Source</a> <a href="#v:attToString" class="selflink">#</a></p><div class="doc"><p>converts Attributes to String for usage in HTML</p><p>Also converts <code>width=xxx</code> and <code>height=xxx</code> to the
|
|
corresponding style-attributes</p></div></div><div class="top"><p class="src"><a id="v:convertToStyle" class="def">convertToStyle</a> :: [String] -> [(String, String)] -> [(String, String)] <a href="src/Text.Pandoc.Util.Filter.html#convertToStyle" class="link">Source</a> <a href="#v:convertToStyle" class="selflink">#</a></p><div class="doc"><p>helper function for <code><a href="Text-Pandoc-Util-Filter.html#v:attToString">attToString</a></code>, but can also be used
|
|
if you want to extract styles from kv-pair</p></div></div><div class="top"><p class="src"><a id="v:revealjsSpecialAttrs" class="def">revealjsSpecialAttrs</a> :: [String] <a href="src/Text.Pandoc.Util.Filter.html#revealjsSpecialAttrs" class="link">Source</a> <a href="#v:revealjsSpecialAttrs" class="selflink">#</a></p><div class="doc"><p>revealjs has some special attributes that has to be
|
|
passed to the html, but Pandoc only allows
|
|
<code>key=value</code>-attributes, so we have to abuse
|
|
<code>.class</code> to rewrite them.</p><p>The classes that get rewritten are listed here.</p><p>You probably want <code><a href="Text-Pandoc-Util-Filter.html#v:classToRevealAttr">classToRevealAttr</a></code>, as that
|
|
is a wrapper for splitting the class-attribute</p></div></div><div class="top"><p class="src"><a id="v:revealjsRewriteAttr" class="def">revealjsRewriteAttr</a> :: [String] -> [String] <a href="src/Text.Pandoc.Util.Filter.html#revealjsRewriteAttr" class="link">Source</a> <a href="#v:revealjsRewriteAttr" class="selflink">#</a></p><div class="doc"><p>HTML allows for some attributes (i.e. autoplay)
|
|
for which revealjs offers a special version
|
|
(i.e. only autoplaying on active slide).
|
|
These are the things that get rewritten</p></div></div><div class="top"><p class="src"><a id="v:classToRevealAttr" class="def">classToRevealAttr</a> :: [String] -> ([String], [String]) <a href="src/Text.Pandoc.Util.Filter.html#classToRevealAttr" class="link">Source</a> <a href="#v:classToRevealAttr" class="selflink">#</a></p><div class="doc"><p>revealjs has some special attributes that has to be
|
|
passed to the html, but Pandoc only allows
|
|
<code>key=value</code>-attributes, so we have to abuse
|
|
<code>.class</code> to rewrite them.</p><p>This is a wrapper-function which just splits the list
|
|
into real classes and <code><a href="Text-Pandoc-Util-Filter.html#v:revealjsSpecialAttrs">revealjsSpecialAttrs</a></code></p></div></div><div class="top"><p class="src"><a id="v:toHtml" class="def">toHtml</a> :: String -> Inline <a href="src/Text.Pandoc.Util.Filter.html#toHtml" class="link">Source</a> <a href="#v:toHtml" class="selflink">#</a></p><div class="doc"><p>small wrapper around <code>RawInline (Format "html")</code>
|
|
as this is less line-noise in the filters and the
|
|
intent is more clear.</p></div></div><div class="top"><p class="src"><a id="v:toBlockHtml" class="def">toBlockHtml</a> :: String -> Block <a href="src/Text.Pandoc.Util.Filter.html#toBlockHtml" class="link">Source</a> <a href="#v:toBlockHtml" class="selflink">#</a></p><div class="doc"><p>small wrapper around <code>Raw (Format "html")</code>
|
|
as this is less line-noise in the filters and the
|
|
intent is more clear.</p></div></div><div class="top"><p class="src"><a id="v:addToAtt" class="def">addToAtt</a> :: Eq a => a -> [a] -> [a] <a href="src/Text.Pandoc.Util.Filter.html#addToAtt" class="link">Source</a> <a href="#v:addToAtt" class="selflink">#</a></p><div class="doc"><p>adds a given String to the list if not in there; Does nothing if the
|
|
given String is already present.</p></div></div><div class="top"><p class="src"><a id="v:addToStyle" class="def">addToStyle</a> :: String -> [(String, String)] -> [(String, String)] <a href="src/Text.Pandoc.Util.Filter.html#addToStyle" class="link">Source</a> <a href="#v:addToStyle" class="selflink">#</a></p><div class="doc"><p>adds given String to List of key-value-pairs (like in <code>Attr</code>)
|
|
in the "style"-Key.</p><p>Useful when trying to add CSS-styles directly to (generated) elements</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.3</p></div></body></html> |