New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent month normalization for entry.bibtex #82
Comments
Just for context, the reason we're parsing the months is mostly for reasons of sorting (see #69 #72 #74 #77 for example) by date, so if you do not rely on this you're probably fine with switching off month parsing. I'll take a look to see why switching off month parsing didn't work and report back. You're also right that month parsing in BibTeX is supposed to set the month to symbol not a string. Meanwhile, you can also add additional keys to your bibtex file (like month_string or something like that) and those keys should be exposed to your template. (But this obviously involves additional overhead). |
If you install version 4.3.6 it should pull in a version of BibTeX-Ruby which prints the month macros correctly (i.e., |
(Oh, and PRs are much appreciated of course) |
That was very quick! Thank you. The new version works for me as described. It addresses the immediate issue of the quoted month macros and broken |
Hi, thanks for Jekyll-Scholar!
I want to display the raw bibtex entry in the Details pages via
entry.bibtex
, but it seems the month field is being modified.I understand that it's best for some normalization to take place, such as
@string
replacement and filtering out certain fields (like "month_numeric" and maybe "abstract"), but months (like "August") are getting replaced with abbreviations (like "aug"). Now, if the abbreviations were outside of quotes or braces (e.g.month = aug,
), then it would be the string macro for the month, and that's not the worst outcome, but it is inside braces in my case, so it's just the string "aug".Here's the relevant part of the bibtex entry:
And here's the result when I use
entry.bibtex
in Jekyll:I tried adding this to _config.yml to override the default, but it did nothing:
The best situation for me is to have
entry.bibtex
be the original bibtex entry without any normalization (except string replacements and/or filtering, though I believe these two things are already configurable). The normalized version should then be available from entry.month, so that Jekyll-Scholar can use it.Is this currently possible? In general I'd be happy to provide a PR with a fix, but I'm new to Ruby. I see the
entry.bibtex
object is created in liquidify() of utilities.rb, but I'm guessing bibtex-ruby itself doesn't store the original bibtex source after parsing it, so maybe it's not even available to jekyll-scholar?The text was updated successfully, but these errors were encountered: