inukshuk / jekyll-scholar

jekyll extensions for the blogging scholar
MIT License
1.13k stars 101 forks source link

bibliography query by key #319

Closed gkthiruvathukal closed 3 years ago

gkthiruvathukal commented 3 years ago

Hi:

I have a long bibliography. Four of my entries are books that I'd like to feature on my publications list. I could not figure out any way to query entries by key. Most of us don't publish more than one book a year, so I used this (not so glamorous) workaround:

<div class="publications">
{% bibliography -q @book[year=2016] %}
</div>

<div class="publications">
{% bibliography -q @book[year=2012] %}
</div>

<div class="publications">
{% bibliography -q @book[year=2002] %}
</div>

<div class="publications">
{% bibliography -q @book[year=2000] %}
</div>

Does anyone know the correct way to use the citation key in a query? I tried using it (in the square brackets, e.g. @book[ChristopherThiruvathukalHPJava]) but it did not seem to work.

I'm hopeful that I am running the current versions of everything (including jekyll-scholar and ruby-bibtex). Any/all input would. be appreciated.

Not sure whether this will be helpful, but here is one of my BibTeX entries for the 2000 book:

@book{ChristopherThiruvathukalHPJava,
  abbr           = {Book},
  html           = {https://ecommons.luc.edu/cs_facpubs/3/},
  pdf            = {https://ecommons.luc.edu/cs_facpubs/3/},
  abstract       = {Threading and concurrency are crucial to building high-performance  Java applications -- but they have a reputation for complexity. High Performance Java   Computing thoroughly demystifies these advanced development techniques. It delivers     practical programming solutions, proven design patterns, and a rigorously-tested code   library -- everything developers need to build optimized Java software for technical,   business, and E-commerce applications. Start by understanding how threading and         concurrency can be used to solve a wide variety of performance problems, enabling the   construction of more powerful networked applications. Master the Java 2 Threads         classes, including daemon threads, thread control, scheduling, and more. Review the key problems of parallelism -- including deadlocks, race conditions, and synchronization -- and discover proven techniques for avoiding or resolving them. Finally, master advanced techniques for building optimized concurrent code, including Java monitors, parallel    execution of subroutines in shared memory, and parallelizing loops.},
  author         = {Thomas W. Christopher and George K. Thiruvathukal},
  title          = {High-Performance Java Platform Computing: Threads and Networking},
  publisher      = {Prentice Hall PTR and Sun Microsystems Press},
  year           = {2000}
}
inukshuk commented 3 years ago

You can use the reference tag to render a given reference by key.