Skip to content

Commit

Permalink
Honor uppercase for cref output
Browse files Browse the repository at this point in the history
  • Loading branch information
lierdakil committed May 26, 2015
1 parent 9eda052 commit ce37700
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/References/Refs.hs
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,14 @@ replaceRefsLatex prefix opts cits =
texcit =
RawInline (Format "tex") $
if useCleveref opts then
"\\cref{"++listLabels prefix "" "," "" cits++"}"
cref++"{"++listLabels prefix "" "," "" cits++"}"
else
listLabels prefix "\\ref{" ", " "}" cits
p | useCleveref opts = []
| otherwise = getRefPrefix opts prefix cap (length cits - 1)
cap = isFirstUpper $ getLabelPrefix . citationId . head $ cits
cref | cap = "\\Cref"
| otherwise = "\\cref"

listLabels :: String -> String -> String -> String -> [Citation] -> String
listLabels prefix p sep s =
Expand Down

1 comment on commit ce37700

@arve0
Copy link

@arve0 arve0 commented on ce37700 May 26, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! 😄

Please sign in to comment.