keflavich / tex_compact_bib

Tool to make really compact bibs in TeX
18 stars 8 forks source link

Keep links to bibliography and links to DOI? #3

Open gabrielastro opened 5 months ago

gabrielastro commented 5 months ago

Hello!

Thanks a lot for this very helpful file! I get

pdfTeX warning (dest): name{cite.Smith+2000} has been referenced but does not e
xist, replaced by a fixed one

and the clickable links in the document point to "page 0", as hovering reveals, instead of to the bibliography.

Also, in the compact bibliography, is there a way of keeping the DOI links (to the published paper or at least the arXiv version), as for instance with yahapj? I am using bibtex and pdflatex, by the way, and my bibfile entries are from NASA ADS.

A few more small things:

In any case, thanks a lot!

gabrielastro commented 5 months ago

A few more things:

Could maybe @aschmiedeke (who worked on #2) help? Thanks!

keflavich commented 5 months ago

These are some reasonably suggestions. You're right about "et alium" being silly, but I do plan to coauthor a paper with some: image

I don't know bibtex well enough to just quickly make these changes, but if I get around to re-learning it and hacking more, I can try for some of these. Otherwise, PRs are welcome if you come up with any fixes.

gabrielastro commented 5 months ago

:smile: I am sure you will have blooming success! Oops, I should have checked my Latin… "alius" it would be.

Thanks for your prompt answer! Unfortunately, I know no bibtex so cannot really help. I see that @lmytime has a fork with what looks like some improvements, so maybe he would be able to help!

By the way, \usepackage{microtype} also helps a bit to save space, as I saw recommended on a forum.

lmytime commented 5 months ago

Hi @gabrielastro , I make some improvements for self-use. It can keep links to the bibliography but I do not keep DOI items. I can help with these when I have spare time.

gabrielastro commented 5 months ago

Thank you very much! Indeed, I see now that the links to the bibliography work, which is a very nice improvement. (@keflavich, maybe you could pull this?) Please let me know whenever you have had time for the other points.

keflavich commented 5 months ago

@lmytime I'd be happy to merge in changes if you want to make a pull request. If you prefer to keep your fork independent, though, that's fine - maybe we should at least add links to it in the README here?

lmytime commented 4 months ago

@keflavich I re-hacked the .bst file from the newest version AAS template and improved a lot. Almost all files have been replaced. So it could not be better if you add a link to my repository: https://github.com/lmytime/tex_compact_bib But if you prefer, I can make a pull request.

@gabrielastro I have included many suggestions you listed above. Please check my repository. Also, you can check the .bst file. I made many detailed comments for each code I changed from the original AAS .bst file. You can search MLi and tune any if you want.

keflavich commented 4 months ago

@lmytime I linked you from the README: https://github.com/keflavich/tex_compact_bib/blob/master/README.rst

gabrielastro commented 4 months ago

@lmytime Thanks a lot for your improvements and for the helpful comments in the .bst files! (Sorry for the delay but I was and am travelling.) It is really good. Two things:

gabrielastro commented 4 months ago

Two more items for @lmytime (I wanted to add it to your fork but apparently one cannot):

gabrielastro commented 3 months ago

One more thing (for @lmytime, @aschmiedeke, @keflavich, or anyone else who understands .bst files well enough): The style of ApJ, on which tex_compact_bib is based, is to sort alphabetically by first author, then by co-author(s)'(s) name(s), and then by year. (A&A, for comparison, sorts by first author's name and then directly by year and not by the name(s) of further author(s).) This leads to papers in tex_compact_bib style that in general seem to be sorted randomly for a given author, which looks strange especially for several "et al." papers. I am not sure how difficult it would be to:

gabrielastro commented 3 months ago

To fix the extra dot, to simplify the "arXiv" entries, and to add \ after "et al.", one can do for now:

sed -i 's/}\./}/g; s/, arXiv e-prints//g; s/{et~al\.} /et~al.\\ /g' main.bbl

This thus fixes most of the issues above (and no guarantees but it does seem robust to long names, line breaks, etc.). In case this can be of use to anyone…

To do this with Overleaf, you need to add the .bbl file to the project and in your document to include it and comment out the bibliography:

% \bibliography{papers.bib}
\input{main.bbl}

Of course, if you add or remove references, do not forget to un-/-uncomment those lines, re-run sed, and re-upload the .bbl file. (I get the .bbl file by downloading the project on my computer with git and compiling locally.) By the way, the .bbl file added by hand to Overleaf will not get overwritten, just shadowed, by Overleaf's version when compiling with an active \bibliography{} command.

lmytime commented 3 months ago

Thanks @gabrielastro , I will consider including your suggestion when I have time.