pcooksey / bibtex-js

BibTeX-js can parse a BibTeX-file and render it as part of an HTML file. This way, you can easily add a list of publications to your private homepage or display a list of recommended publications for a seminar. The way the entries are display can be customized using a simple template system and CSS.
MIT License
268 stars 67 forks source link

Provide way to define section/group header type and classes #31

Closed j-4 closed 6 years ago

j-4 commented 6 years ago

Currently, section/group headers are hard coded to start with <H1>. However, my homepage layout requires these headers to be <H3> or less to fit into the hierarchy. Is it possible to provide a way to specify the header type as well as extra header styles? It seems that these headers are actually the only (?) part of the framework, that cannot be specified by a html style.

Maybe instead of/in addition to specifying a div for every section, the header can be directly specified in the bibtex_structure?

<div class="bibtex_structure">
  <div class="sections bibtextypekey">
    <div class="section @article" title="Refereed Articles"></div>
  </div>
</div>

->

<div class="bibtex_structure">
  <div class="sections bibtextypekey">
    <h3 class="section @article custom-title-class">Refereed Articles</h3>
  </div>
</div>

It seems that you are able to get a header hierarchy of sections and groups, no idea how this would work with my suggestion above though.

pcooksey commented 6 years ago

Yes, I completely agree that it should be provided in the bibtex_structure. Fixed in commits: bf15038f740da194b16c090f5b1ae1feb72808cb and e88bdee59ff0ef099eb691ebc3f2e24f26e12909

I've updated the wiki pages to reflect the changes so it should all be up to date.

  1. Custom group headers
  2. Academic Style

Note: there were some major changes to the academic style in order to have custom headers so you will have to change some html. For html code for the cost of flexibility.

j-4 commented 6 years ago

Thanks a lot, u r awesome :+1: