@@ -395,14 +395,24 @@ inlineToLaTeX (Cite cits lst) = do
395 Biblatex -> citationsToBiblatex cits
395 Biblatex -> citationsToBiblatex cits
396 _ -> inlineListToLaTeX lst
396 _ -> inlineListToLaTeX lst
398−inlineToLaTeX (Code _ str) = do
398+inlineToLaTeX (Code (_,classes,_) str) = do
399− st <- get
399+ opts <- gets stOptions
400− if writerListings (stOptions st)
401+ _ | writerListings opts -> listingsCode
401− then do
402+ | writerHighlight opts && not (null classes) -> highlightCode
403+ | otherwise -> rawCode
404+ where listingsCode = do
405+ inNote <- gets stInNote
402− when (stInNote st) $ modify $ \s -> s{ stVerbInNote = True }
406+ when inNote $ modify $ \s -> s{ stVerbInNote = True }
403− let chr = ((enumFromTo '!' '~') \\ str) !! 0
407+ let chr = ((enumFromTo '!' '~') \\ str) !! 0
404− return $ text $ "\\lstinline" ++ [chr] ++ str ++ [chr]
408+ return $ text $ "\\lstinline" ++ [chr] ++ str ++ [chr]
410+ case highlightLaTeX True ("",classes,[]) str of
412+ Just h -> modify (\st -> st{ stHighlighting = True }) >>
405− else return $ text $ "\\texttt{" ++ stringToLaTeX False str ++ "}"
415+ $ text $ "\\texttt{" ++ stringToLaTeX False str ++ "}"
406inlineToLaTeX (Quoted SingleQuote lst) = do
416inlineToLaTeX (Quoted SingleQuote lst) = do
407 contents <- inlineListToLaTeX lst
417 contents <- inlineListToLaTeX lst
408 csquotes <- liftM stCsquotes get
418 csquotes <- liftM stCsquotes get