@@ -701,7 +701,7 @@ inlineListToLaTeX lst =
701701 ("\\\\[" ++ show (length lbs) ++
702702 "\\baselineskip]") : fixBreaks rest
703703 fixBreaks (y:ys) = y : fixBreaks ys
704−
704+
705705isQuoted :: Inline -> Bool
706706isQuoted (Quoted _ _) = True
707707isQuoted _ = False
@@ -750,10 +750,11 @@ inlineToLaTeX (Cite cits lst) = do
750750
751751inlineToLaTeX (Code (_,classes,_) str) = do
752752 opts <- gets stOptions
753+ inHeading <- gets stInHeading
753754 case () of
754− _ | writerListings opts -> listingsCode
755+ _ | writerListings opts && not inHeading -> listingsCode
755756 | writerHighlight opts && not (null classes) -> highlightCode
756− | otherwise -> rawCode
757+ | otherwise -> rawCode
757758 where listingsCode = do
758759 inNote <- gets stInNote
759760 when inNote $ modify $ \s -> s{ stVerbInNote = True }