Expand month abbreviations.
This is done by bibtex2html, but not bib2bib.
This commit is contained in:
parent
f1f98effa3
commit
e9c58e4948
|
@ -50,6 +50,7 @@ bibEntryContext = Context $ \key _ item ->
|
||||||
Nothing -> empty
|
Nothing -> empty
|
||||||
Just val -> case key of
|
Just val -> case key of
|
||||||
"author" -> return $ StringField $ formatAuthors val
|
"author" -> return $ StringField $ formatAuthors val
|
||||||
|
"month" -> return $ StringField $ expandMonth val
|
||||||
_ -> return $ StringField $ latexToHtml val
|
_ -> return $ StringField $ latexToHtml val
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
@ -99,6 +100,22 @@ formatAuthor = intercalate " "
|
||||||
. reverse
|
. reverse
|
||||||
. (splitOn ",")
|
. (splitOn ",")
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
expandMonth :: String -> String
|
||||||
|
expandMonth mon = case mon of
|
||||||
|
"jan" -> "January"
|
||||||
|
"feb" -> "February"
|
||||||
|
"mar" -> "March"
|
||||||
|
"apr" -> "April"
|
||||||
|
"may" -> "May"
|
||||||
|
"jun" -> "June"
|
||||||
|
"jul" -> "July"
|
||||||
|
"aug" -> "August"
|
||||||
|
"sep" -> "September"
|
||||||
|
"oct" -> "October"
|
||||||
|
"nov" -> "November"
|
||||||
|
"dec" -> "December"
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
-- Inefficient...
|
-- Inefficient...
|
||||||
trimSpace :: String -> String
|
trimSpace :: String -> String
|
||||||
|
|
Loading…
Reference in New Issue