# Subgroups in Bibliography

**URL:** <https://discourse.citationstyles.org/t/subgroups-in-bibliography/1494>\
**Category:** CSL Usage\
**Created:** [November 29, 2018, 10:03am UTC](https://discourse.citationstyles.org/t/subgroups-in-bibliography/1494 "2018-11-29T10:03:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![walter](https://avatars.discourse-cdn.com/v4/letter/w/85e7bf/32.png) [@walter](https://discourse.citationstyles.org/u/walter)\
**Post date:** [November 29, 2018, 10:03am UTC](https://discourse.citationstyles.org/t/subgroups-in-bibliography/1494/1 "2018-11-29T10:03:14Z")

</div>

Hi,

I would like to edit the style so, that I am able to have two groups below bibliography like:

References

_a list of articles_

Additional Literature

_a list of books_

Is this possible?

---

<div class="post-metadata">

**Author:** ![Denis\_Maier](https://avatars.discourse-cdn.com/v4/letter/d/8491ac/32.png) [@Denis\_Maier](https://discourse.citationstyles.org/u/Denis_Maier)\
**Post date:** [November 30, 2018, 1:28pm UTC](https://discourse.citationstyles.org/t/subgroups-in-bibliography/1494/2 "2018-11-30T13:28:51Z")

</div>

No, at the moment this is not supported. I’d also love to see something like that coming.

That being said, I am not sure if a feature like this should be part of CSL itself, or if it is a question of how different applications use CSL. Subdivided bibliographies defined by a citation style don’t make much sense to me. Subdividing bibliographies should perhaps better be done by your reference manager.

In the meantime, you could do something like this: For all items that should end up in the first bibliography section add a field “bibgroup: 1” in Zotero’s extra field, then “bibgroup: 2”, and so on. You can then use this field to sort your bibliography. In the end, you will have to add the headings manually. (Or you use dummy references for that.) Note however, that this is totally hackish and not really supported. At least in Zotero it should work though, at least at the moment. (I have not checked if it also works with other programs, e.g. pandoc.)

---

<div class="post-metadata">

**Author:** ![Sebastian\_Karcher](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/sebastian_karcher/32/176_2.png) [@Sebastian\_Karcher](https://discourse.citationstyles.org/u/Sebastian_Karcher)\
**Post date:** [December 4, 2018, 2:28pm UTC](https://discourse.citationstyles.org/t/subgroups-in-bibliography/1494/3 "2018-12-04T14:28:47Z")

</div>

If the subgroups are defined by item types as your example suggests, you don’t even need the extra field. You can simply define a sort macro along the lines of

```auto
<choose>
  <if type="book">
    <text value="1">
  </if
  <else-if type="article-journal">
    <text value="2">
  </else-if>
  <else>
    <text value="3">
  </else>
</choose>

```

and use that as the sort key
