diff options
Diffstat (limited to 'src/pandoc.hs')
-rw-r--r-- | src/pandoc.hs | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/pandoc.hs b/src/pandoc.hs index a8a70a1b4..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 })) @@ -804,6 +811,7 @@ main = do , optSlideLevel = slideLevel , optSetextHeaders = setextHeaders , optAscii = ascii + , optTeXLigatures = texLigatures } = opts when dumpArgs $ @@ -918,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, @@ -961,7 +970,8 @@ main = do writerSlideLevel = slideLevel, writerHighlight = highlight, writerHighlightStyle = highlightStyle, - writerSetextHeaders = setextHeaders + writerSetextHeaders = setextHeaders, + writerTeXLigatures = texLigatures } when (writerName' `elem` nonTextFormats&& outputFile == "-") $ |