@@ -151,7 +151,13 @@ blockToConTeXt (CodeBlock _ str) =
151151 -- blankline because \stoptyping can't have anything after it, inc. '}'
152152blockToConTeXt (RawBlock "context" str) = return $ text str <> blankline
153153blockToConTeXt (RawBlock _ _ ) = return empty
154−blockToConTeXt (Div _ bs) = blockListToConTeXt bs
154+blockToConTeXt (Div (ident,_,_) bs) = do
155+ contents <- blockListToConTeXt bs
156+ if null ident
157+ then return contents
158+ else return $
159+ ("\\reference" <> brackets (text $ toLabel ident) <> braces empty)
160+ $$ contents
155161blockToConTeXt (BulletList lst) = do
156162 contents <- mapM listItemToConTeXt lst
157163 return $ ("\\startitemize" <> if isTightList lst