@@ -183,13 +183,6 @@ convertWithOpts opts = do
183183 Nothing -> return Nothing
184184 Just fp -> Just <$> UTF8.readFile fp
185185
186− let mathMethod =
187− case (optKaTeXJS opts, optKaTeXStylesheet opts) of
188− (Nothing, _) -> optHTMLMathMethod opts
189− (Just js, ss) -> KaTeX js (fromMaybe
190− (defaultKaTeXURL ++ "katex.min.css") ss)
191−
192−
193186 -- --bibliography implies -F pandoc-citeproc for backwards compatibility:
194187 let needsCiteproc = isJust (lookup "bibliography" (optMetadata opts)) &&
195188 optCiteMethod opts `notElem` [Natbib, Biblatex] &&
@@ -368,7 +361,7 @@ convertWithOpts opts = do
368361 maybe return (addStringAsVariable "epub-cover-image")
369362 (optEpubCoverImage opts)
370363 >>=
371− (\vars -> case mathMethod of
364+ (\vars -> case optHTMLMathMethod opts of
372365 LaTeXMathML Nothing -> do
373366 s <- UTF8.toString <$> readDataFile "LaTeXMathML.js"
374367 return $ ("mathml-script", s) : vars
@@ -428,7 +421,7 @@ convertWithOpts opts = do
428421 , writerVariables = variables
429422 , writerTabStop = optTabStop opts
430423 , writerTableOfContents = optTableOfContents opts
431− , writerHTMLMathMethod = mathMethod
424+ , writerHTMLMathMethod = optHTMLMathMethod opts
432425 , writerIncremental = optIncremental opts
433426 , writerCiteMethod = optCiteMethod opts
434427 , writerNumberSections = optNumberSections opts
@@ -642,8 +635,6 @@ data Opt = Opt
642635 , optExtractMedia :: Maybe FilePath -- ^ Path to extract embedded media
643636 , optTrackChanges :: TrackChanges -- ^ Accept or reject MS Word track-changes.
644637 , optFileScope :: Bool -- ^ Parse input files before combining
645− , optKaTeXStylesheet :: Maybe String -- ^ Path to stylesheet for KaTeX
646− , optKaTeXJS :: Maybe String -- ^ Path to js file for KaTeX
647638 , optTitlePrefix :: Maybe String -- ^ Prefix for title
648639 , optCss :: [FilePath] -- ^ CSS files to link to
649640 , optIncludeBeforeBody :: [FilePath] -- ^ Files to include before
@@ -719,8 +710,6 @@ defaultOpts = Opt
719710 , optExtractMedia = Nothing
720711 , optTrackChanges = AcceptChanges
721712 , optFileScope = False
722− , optKaTeXStylesheet = Nothing
723− , optKaTeXJS = Nothing
724713 , optTitlePrefix = Nothing
725714 , optCss = []
726715 , optIncludeBeforeBody = []
@@ -1455,18 +1444,11 @@ options =
14551444 (OptArg
14561445 (\arg opt ->
14571446 return opt
1458− { optKaTeXJS =
1459− arg <|> Just (defaultKaTeXURL ++ "katex.min.js")})
1447+ { optHTMLMathMethod = KaTeX $
1448+ fromMaybe defaultKaTeXURL arg })
14601449 "URL")
14611450 "" -- Use KaTeX for HTML Math
14621451
1463− , Option "" ["katex-stylesheet"]
1464− (ReqArg
1465− (\arg opt ->
1466− return opt { optKaTeXStylesheet = Just arg })
1467− "URL")
1468− "" -- Set the KaTeX Stylesheet location
1469−
14701452 , Option "" ["gladtex"]
14711453 (NoArg
14721454 (\opt -> return opt { optHTMLMathMethod = GladTeX }))