Skip to content

Commit

Permalink
LaTeX reader: fixed \cite so it is a NormalCitation not AuthorInText.
Browse files Browse the repository at this point in the history
  • Loading branch information
jgm committed Jun 29, 2016
1 parent a349814 commit 3429fa6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Text/Pandoc/Readers/LaTeX.hs
Expand Up @@ -559,8 +559,8 @@ inlineCommands = M.fromList $
src <- unescapeURL <$> braced
mkImage options src)
, ("enquote", enquote)
, ("cite", citation "cite" AuthorInText False)
, ("Cite", citation "cite" AuthorInText False)
, ("cite", citation "cite" NormalCitation False)
, ("Cite", citation "Cite" NormalCitation False)
, ("citep", citation "citep" NormalCitation False)
, ("citep*", citation "citep*" NormalCitation False)
, ("citeal", citation "citeal" NormalCitation False)
Expand Down
2 changes: 1 addition & 1 deletion tests/Tests/Readers/Org.hs
Expand Up @@ -431,7 +431,7 @@ tests =
{ citationId = "Coffee"
, citationPrefix = []
, citationSuffix = []
, citationMode = AuthorInText
, citationMode = NormalCitation
, citationNoteNum = 0
, citationHash = 0}
in (para . cite [citation] $ rawInline "latex" "\\cite{Coffee}")
Expand Down
2 changes: 1 addition & 1 deletion tests/latex-reader.native
Expand Up @@ -260,7 +260,7 @@ Pandoc (Meta {unMeta = fromList [("author",MetaList [MetaInlines [Str "John",Spa
,HorizontalRule
,Header 1 ("latex",[],[]) [Str "LaTeX"]
,BulletList
[[Para [Cite [Citation {citationId = "smith.1899", citationPrefix = [], citationSuffix = [Str "22-23"], citationMode = AuthorInText, citationNoteNum = 0, citationHash = 0}] [RawInline (Format "latex") "\\cite[22-23]{smith.1899}"]]]
[[Para [Cite [Citation {citationId = "smith.1899", citationPrefix = [], citationSuffix = [Str "22-23"], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 0}] [RawInline (Format "latex") "\\cite[22-23]{smith.1899}"]]]
,[Para [RawInline (Format "latex") "\\doublespacing"]]
,[Para [Math InlineMath "2+2=4"]]
,[Para [Math InlineMath "x \\in y"]]
Expand Down

0 comments on commit 3429fa6

Please sign in to comment.