@@ -1148,14 +1148,22 @@ inlineToLaTeX (Cite cits lst) = do
11481148 Biblatex -> citationsToBiblatex cits
11491149 _ -> inlineListToLaTeX lst
11501150
1151−inlineToLaTeX (Code (_,classes,_) str) = do
1151+inlineToLaTeX (Code (_,classes,kvs) str) = do
11521152 opts <- gets stOptions
11531153 inHeading <- gets stInHeading
11541154 inItem <- gets stInItem
11551155 let listingsCode = do
1156− let listingsopt = case getListingsLanguage classes of
1157− Just l -> "[language=" ++ mbBraced l ++ "]"
1158− Nothing -> ""
1156+ let listingsopts = (case getListingsLanguage classes of
1157+ Just l -> (("language", mbBraced l):)
1158+ Nothing -> id) $
1159+ [(k,v) | (k,v) <- kvs
1160+ , k `notElem` ["exports","tangle","results"]]
1161+ let listingsopt = if null listingsopts
1162+ then ""
1163+ else "[" ++
1164+ intercalate ", "
1165+ (map (\(k,v) -> k ++ "=" ++ v)
1166+ listingsopts) ++ "]"
11591167 inNote <- gets stInNote
11601168 when inNote $ modify $ \s -> s{ stVerbInNote = True }
11611169 let chr = case "!\"'()*,-./:;?@" \\ str of