Generating headlines before reference types in sorted bibliography (CSL)

135 views Asked by At

Recently I have found a tip that allows for sorting CSL-generated bibliography by reference type in PDF output. In my example, I applied this tip accordingly:

<macro name="sort-key">
<choose>
  <if type="book chapter report" match="any">
    <text value="1"/>
  </if>
  <else-if type="article-journal article-magazine article-newspaper" match="any">
    <text value="2"/>
  </else-if>
  <else-if type="webpage post-weblog" match="any">
    <text value="3"/>
  </else-if>
  <else-if type="software" match="any">
    <text value="4"/>
  </else-if>
  <else-if type="motion-picture" match="any">
    <text value="5"/>
  </else-if>    
  <else>
    <text value="6"/>
  </else>
</choose>
</macro>

...

<bibliography et-al-min="5" et-al-use-first="1" entry-spacing="0" hanging-indent="true">
  <sort>
    <key macro="sort-key"/>
    <key macro="author-bibliography"/>
    <key variable="title"/>
  </sort>

...
</bibliography>

Still, I have a question: is it possible, in such a sorted bibliography, to attribute named headlines to the following reference types without having to produce a Word output and putting the headlines directly? I use the newest Pandoc with pdflatex output and couldn't find any accurate solutions on the Web. While I acknowledge that it is possible to use the multiple-bibliography.lua filter, this is not the case because I'd like to print output using one bibliography file, with headlines added before each text value.

0

There are 0 answers