diff options
author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2007-07-22 16:05:38 +0000 |
---|---|---|
committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2007-07-22 16:05:38 +0000 |
commit | 6bb6dd2bfd526fff9a469fddd9515aec268bfe15 (patch) | |
tree | 0a6fc064c44a055e86714473b202d1d64a7d5fe6 /src/Text/Pandoc/Writers/ConTeXt.hs | |
parent | d03ec5a4a243a80856b53fa0cdf222d8dfdb1dd7 (diff) |
+ Added support for superscript, subscript, and
strikeout to all writers. (Thanks to Bradley Kuhn
for the patches for strikeout, here slightly modified.)
+ Refactored character escaping using the new functions
escapeStringUsing and backslashEscapes.
+ Added state to LaTeX writer, which now keeps track of what
packages need to be included in the preamble, based on the
content of the document. (Thus, e.g., ulem is only required
if you use strikeout.)
git-svn-id: https://pandoc.googlecode.com/svn/trunk@755 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'src/Text/Pandoc/Writers/ConTeXt.hs')
-rw-r--r-- | src/Text/Pandoc/Writers/ConTeXt.hs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/ConTeXt.hs b/src/Text/Pandoc/Writers/ConTeXt.hs index 8e35ea9d5..2cf2b136b 100644 --- a/src/Text/Pandoc/Writers/ConTeXt.hs +++ b/src/Text/Pandoc/Writers/ConTeXt.hs @@ -192,6 +192,15 @@ inlineToConTeXt (Emph lst) = do inlineToConTeXt (Strong lst) = do contents <- inlineListToConTeXt lst return $ "{\\bf " ++ contents ++ "}" +inlineToConTeXt (Strikeout lst) = do + contents <- inlineListToConTeXt lst + return $ "\\overstrikes{" ++ contents ++ "}" +inlineToConTeXt (Superscript lst) = do + contents <- inlineListToConTeXt lst + return $ "\\high{" ++ contents ++ "}" +inlineToConTeXt (Subscript lst) = do + contents <- inlineListToConTeXt lst + return $ "\\low{" ++ contents ++ "}" inlineToConTeXt (Code str) = return $ "\\type{" ++ str ++ "}" inlineToConTeXt (Quoted SingleQuote lst) = do contents <- inlineListToConTeXt lst @@ -206,7 +215,7 @@ inlineToConTeXt Ellipses = return "\\ldots{}" inlineToConTeXt (Str str) = return $ stringToConTeXt str inlineToConTeXt (TeX str) = return str inlineToConTeXt (HtmlInline str) = return "" -inlineToConTeXt (LineBreak) = return "\\hfil\\break\n" +inlineToConTeXt (LineBreak) = return "\\crlf\n" inlineToConTeXt Space = return " " inlineToConTeXt (Link text (src, _)) = do next <- get |