Skip to content
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

add option to hide missing fields #24

Open
twhiteaker opened this issue Aug 19, 2018 · 2 comments
Open

add option to hide missing fields #24

twhiteaker opened this issue Aug 19, 2018 · 2 comments

Comments

@twhiteaker
Copy link

If an item like page numbers for a journal article is missing from the BibTeX file, that item shows up in red letters as "missing" in the rendered output. Is there a way to hide missing fields entirely? In this example, both the "missing" and the "pp." preceding the page numbers would not be included in the rendered output. I know some fields are missing in the file but there's nothing I can do about it to fix the file, and red "missing" makes my page look less professional.

@twhiteaker
Copy link
Author

To clarify, if one item doesn't have page numbers, then the desired behavior is to leave the page number part of the citation out. But the page number part would still be displayed for those items that do have page numbers. This applies to any field; I'm just using page numbers as an example.

@andrei91ro
Copy link

I faced the same issue but simply modified the source code to prevent it from adding the missing string.
The modification is around line 62 in the definition of the function bib2html.

      return itemStr.replace(/undefined[,.]?/g,
                 ''); //this is what I added
                 //'<span class="undefined">missing<\/span>'); // this is what I removed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants