LyXShow bibtex citation number in LyX

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
yohell
Posts: 2
Joined: Wed Nov 10, 2010 11:55 pm

Show bibtex citation number in LyX

Post by yohell »

Is there any way to display finallised bibtex citations in the LyX GUI? Like for example "...when the structure of DNA was determined [1]." or ideally "...when the structure of DNA was determined [WC53#1]."

My problem is this:
I've just written a thesis in LyX and handed it off to the printers. It's got a lot of citations. Now I want to collect pdfs for all cited papers in one directory, and name the files on the form

[bibtex-key].[unsrt-citation-number].pdf

(e.g. BTK+10.117.pdf). This makes all the papers conveniently accessible both from jabref and from just reading the actual book, meaning that for a given citation in the text, I won't have to skip over to the bibliography, find the reference, figure out what the bibtex key would be, and find the file in the directory. Instead I could just type

$ evince *.117.pdf

I guess I could just do it programmatically by parsing the .lyx file and renaming the pdfs accordingly, but my gut tells me this is too useful a feature to not already to exist in LyX.

So who's right, my gut that says this feature exists, or my eyes that insist that it doesn't?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

yohell
Posts: 2
Joined: Wed Nov 10, 2010 11:55 pm

Re: Show bibtex citation number in LyX

Post by yohell »

Apologies for double posting.

I wrote an ugly hack that takes care of the downloading / file naming for most of my citations. If anyone wants to use it they're very much welcome.

Use it like so:
$ perl getpdfs.pl pdf/ thesis.lyx thesis.bib

and it will populate pdf/ with pdfs named as in my post above, plus a bunch of other files that you can disregard/delete. They're there for checkpointing, meaning that if the hack doesn't do what you want, you can poke around with them and search/replace or change urls and whatever, and rerun it and see if it works better.

Disclaimer: The program *should* behave, but I've put as little effort as I can into it and I've done little to no error checking. In other words: I won't be held responsible if it breaks your stuff.
Attachments
getpdfs.gz
Ugly pdf download hack, worked for most of *my* citations and did not break any of *my* stuff. Use at your own risk.
(2.14 KiB) Downloaded 279 times
Post Reply