@@ -135,6 +135,7 @@ data Opt = Opt
135 , optSlideLevel :: Maybe Int -- ^ Header level that creates slides
135 , optSlideLevel :: Maybe Int -- ^ Header level that creates slides
136 , optSetextHeaders :: Bool -- ^ Use atx headers for markdown level 1-2
136 , optSetextHeaders :: Bool -- ^ Use atx headers for markdown level 1-2
137 , optAscii :: Bool -- ^ Use ascii characters only in html
137 , optAscii :: Bool -- ^ Use ascii characters only in html
138+ , optTeXLigatures :: Bool -- ^ Use TeX ligatures for quotes/dashes
140-- | Defaults for command-line options.
141-- | Defaults for command-line options.
@@ -187,6 +188,7 @@ defaultOpts = Opt
187 , optSlideLevel = Nothing
188 , optSlideLevel = Nothing
188 , optSetextHeaders = True
189 , optSetextHeaders = True
189 , optAscii = False
190 , optAscii = False
191+ , optTeXLigatures = True
192-- | A list of functions, each transforming the options data structure
194-- | A list of functions, each transforming the options data structure
@@ -438,6 +440,11 @@ options =
438 (\opt -> return opt { optNumberSections = True }))
440 (\opt -> return opt { optNumberSections = True }))
439 "" -- "Number sections in LaTeX"
441 "" -- "Number sections in LaTeX"
443+ , Option "" ["no-tex-ligatures"]
445+ (\opt -> return opt { optTeXLigatures = False }))
446+ "" -- "Don't use tex ligatures for quotes, dashes"
441 , Option "" ["listings"]
448 , Option "" ["listings"]
443 (\opt -> return opt { optListings = True }))
450 (\opt -> return opt { optListings = True }))
@@ -804,6 +811,7 @@ main = do
804 , optSlideLevel = slideLevel
811 , optSlideLevel = slideLevel
805 , optSetextHeaders = setextHeaders
812 , optSetextHeaders = setextHeaders
806 , optAscii = ascii
813 , optAscii = ascii
814+ , optTeXLigatures = texLigatures
809 when dumpArgs $
817 when dumpArgs $
@@ -918,7 +926,8 @@ main = do
918 lhsExtension sources,
926 lhsExtension sources,
919 stateStandalone = standalone',
927 stateStandalone = standalone',
920 stateCitations = map CSL.refId refs,
928 stateCitations = map CSL.refId refs,
929+ stateSmart = smart || (texLigatures &&
921− stateSmart = smart || laTeXOutput || writerName' == "context",
930+ (laTeXOutput || writerName' == "context")),
922 stateOldDashes = oldDashes,
931 stateOldDashes = oldDashes,
923 stateColumns = columns,
932 stateColumns = columns,
924 stateStrict = strict,
933 stateStrict = strict,
@@ -961,7 +970,8 @@ main = do
961 writerSlideLevel = slideLevel,
970 writerSlideLevel = slideLevel,
962 writerHighlight = highlight,
971 writerHighlight = highlight,
963 writerHighlightStyle = highlightStyle,
972 writerHighlightStyle = highlightStyle,
964− writerSetextHeaders = setextHeaders
973+ writerSetextHeaders = setextHeaders,
974+ writerTeXLigatures = texLigatures
967 when (writerName' `elem` nonTextFormats&& outputFile == "-") $
977 when (writerName' `elem` nonTextFormats&& outputFile == "-") $