@@ -115,10 +115,14 @@ stringyMetaAttribute = try $ do
115115 attrValue <- anyLine <|> ("" <$ newline)
116116 return (attrName, attrValue)
117117
118+-- | Parse a set of block attributes. Block attributes are given through
119+-- lines like @#+CAPTION: block caption@ or @#+ATTR_HTML: :width 20@.
120+-- Parsing will fail if any line contains an attribute different from
121+-- those attributes known to work on blocks.
118122blockAttributes :: PandocMonad m => OrgParser m BlockAttributes
119123blockAttributes = try $ do
120124 kv <- many stringyMetaAttribute
121− guard $ all (attrCheck . fst) kv
125+ guard $ all (isBlockAttr . fst) kv
122126 let caption = foldl' (appendValues "CAPTION") Nothing kv
123127 let kvAttrs = foldl' (appendValues "ATTR_HTML") Nothing kv
124128 let name = lookup "NAME" kv
@@ -134,8 +138,12 @@ blockAttributes = try $ do
134138 , blockAttrKeyValues = kvAttrs'
135139 }
136140 where
137− attrCheck :: String -> Bool
138− attrCheck x = x `elem` ["NAME", "LABEL", "CAPTION", "ATTR_HTML", "RESULTS"]
141+ isBlockAttr :: String -> Bool
142+ isBlockAttr = flip elem
143+ [ "NAME", "LABEL", "CAPTION"
144+ , "ATTR_HTML", "ATTR_LATEX"
145+ , "RESULTS"
146+ ]
139147
140148 appendValues :: String -> Maybe String -> (String, String) -> Maybe String
141149 appendValues attrName accValue (key, value) =