diff options
author | Jonas Smedegaard <dr@jones.dk> | 2012-05-20 10:54:28 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2012-05-20 10:54:28 +0200 |
commit | a854a180416ffa6e1f45023025924fab3161a993 (patch) | |
tree | fdea58d45f92cc5070ecc75df836421732827753 /src/pandoc.hs | |
parent | b4a6193dca853094ca273f230876a80166f32a1d (diff) |
Imported Upstream version 1.9.3
Diffstat (limited to 'src/pandoc.hs')
-rw-r--r-- | src/pandoc.hs | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/pandoc.hs b/src/pandoc.hs index dab7b4161..a25e7d8d6 100644 --- a/src/pandoc.hs +++ b/src/pandoc.hs @@ -135,6 +135,7 @@ data Opt = Opt , optSlideLevel :: Maybe Int -- ^ Header level that creates slides , optSetextHeaders :: Bool -- ^ Use atx headers for markdown level 1-2 , optAscii :: Bool -- ^ Use ascii characters only in html + , optTeXLigatures :: Bool -- ^ Use TeX ligatures for quotes/dashes } -- | Defaults for command-line options. @@ -187,6 +188,7 @@ defaultOpts = Opt , optSlideLevel = Nothing , optSetextHeaders = True , optAscii = False + , optTeXLigatures = True } -- | A list of functions, each transforming the options data structure @@ -438,6 +440,11 @@ options = (\opt -> return opt { optNumberSections = True })) "" -- "Number sections in LaTeX" + , Option "" ["no-tex-ligatures"] + (NoArg + (\opt -> return opt { optTeXLigatures = False })) + "" -- "Don't use tex ligatures for quotes, dashes" + , Option "" ["listings"] (NoArg (\opt -> return opt { optListings = True })) @@ -689,6 +696,7 @@ defaultReaderName fallback (x:xs) = ".ltx" -> "latex" ".rst" -> "rst" ".lhs" -> "markdown+lhs" + ".db" -> "docbook" ".textile" -> "textile" ".native" -> "native" ".json" -> "json" @@ -803,6 +811,7 @@ main = do , optSlideLevel = slideLevel , optSetextHeaders = setextHeaders , optAscii = ascii + , optTeXLigatures = texLigatures } = opts when dumpArgs $ @@ -917,7 +926,8 @@ main = do lhsExtension sources, stateStandalone = standalone', stateCitations = map CSL.refId refs, - stateSmart = smart || laTeXOutput || writerName' == "context", + stateSmart = smart || (texLigatures && + (laTeXOutput || writerName' == "context")), stateOldDashes = oldDashes, stateColumns = columns, stateStrict = strict, @@ -960,7 +970,8 @@ main = do writerSlideLevel = slideLevel, writerHighlight = highlight, writerHighlightStyle = highlightStyle, - writerSetextHeaders = setextHeaders + writerSetextHeaders = setextHeaders, + writerTeXLigatures = texLigatures } when (writerName' `elem` nonTextFormats&& outputFile == "-") $ |