Live data from Hacker News

BibTeX Tidy

flamingtempura.github.io

1–10 of 33 posts

Re: BibTeX Tidy

#2
I made a really rough script that does a bunch of transformations on bibtex files to have them be ready for use in academic papers:

1. Shorten author lists to 10 authors 2. Abbreviate journal names 3. Remove unneeded IDs and replace with doi links 4. Remove unneeded tags (file, abstract)

https://gist.github.com/joebentley/6e3e4198ea427545738a82021...

Re: BibTeX Tidy

#3
Does it fix incorrect Unicode chars? I've had a huge problem with that recently when for some reason Kbibtex insisted on converting {\"O} into Ö. I believe Jabref fixed it but I've made very bad experiences with Jabref in the past and would prefer not to use it.

Re: BibTeX Tidy

#4

Does it fix incorrect Unicode chars? I've had a huge problem with that recently when for some reason Kbibtex insisted on converting {\"O} into Ö. I believe Jabref fixed it but I've made very bad experiences with Jabref in the past and would prefer not to use it.

This doesn't answer the question, but I think that if you use XeLaTeX you get Unicode support universally "for free", including in bbl files (generated by bibtex, bibtex8 or biber -- which itself is great, even if it has more of a learning cliff than most!)

Re: BibTeX Tidy

#6

Does it fix incorrect Unicode chars? I've had a huge problem with that recently when for some reason Kbibtex insisted on converting {\"O} into Ö. I believe Jabref fixed it but I've made very bad experiences with Jabref in the past and would prefer not to use it.

What do you mean? I tried placing Ö and {\"O} in the author's name of the example and tidied it:

    Click Tidy to clean up the entries below      
    @Book{sweig42,
      Author =  { Stef{\"O}{n} SwÖig },
      title =  { The impossible book },
      publisher =  { Dead Poet Society},
      year =  1942,
      month =        mar
    }
This is the output:

    Click Tidy to clean up the entries below
    @book{sweig42,
     title        = {The impossible book},
     author       = {Stef{\"O}{n} SwÖig},
     year         = 1942,
     month        = mar,
     publisher    = {Dead Poet Society}
    }
And \"O should be Ö, so I guess I do not really understand what is "incorrect" in your use case.

I know that the Zoteroplugin BetterBibTeX converts Ö to {\"O} when exporting as BibTeX, but keeps it as Ö when exporting as BibLaTeX – maybe Kbibtex has similar options?

edit: It actually "fixes" Ö to {\"O} if you tick "Escape special characters" or supply the command line argument `--escape`, which should be the default according to GitHub.

Re: BibTeX Tidy

#7
This is great! Especially nice to be able to remove entire fields.

Relatedly, here are a couple of tools to ensure that references are complete (e.g. updating arXiv papers to their published versions, mostly for computer science papers):

- https://github.com/yuchenlin/rebiber (CLI, web interface)

- https://www.cl.cam.ac.uk/~ga384/bibfix.html (only *ACL papers, web interface with diff, disclaimer: mine)

Re: BibTeX Tidy

#8

I've started using biblint which is nice although can be pretty aggressive in auto-cleaning: https://github.com/Kingsford-Group/biblint

Is there some linter like this vor LaTeX, too?

Re: BibTeX Tidy

#9
post #8

I've started using biblint which is nice although can be pretty aggressive in auto-cleaning: https://github.com/Kingsford-Group/biblint

Is there some linter like this vor LaTeX, too?

Yes, ChkTeX for instance: https://www.nongnu.org/chktex/

It also detects repetitions and some basic English language stuff if I recall correctly.

I've used it for my PhD manuscript, it's quite useful.

Post reply on HN