# How to specify the order of fields of each entry when saving?

**URL:** <https://discourse.jabref.org/t/how-to-specify-the-order-of-fields-of-each-entry-when-saving/3030>\
**Category:** Help\
**Created:** [November 6, 2021, 10:29am UTC](https://discourse.jabref.org/t/how-to-specify-the-order-of-fields-of-each-entry-when-saving/3030 "2021-11-06T10:29:12Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![gaochenyi](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/gaochenyi/32/1110_2.png) [@gaochenyi](https://discourse.jabref.org/u/gaochenyi)\
**Post date:** [November 6, 2021, 10:29am UTC](https://discourse.jabref.org/t/how-to-specify-the-order-of-fields-of-each-entry-when-saving/3030/1 "2021-11-06T10:29:12Z")

</div>

Hi, I have been using JabRef v3.8.2 on macOS Sierra (10.12.6) for a long time. Recently I upgrade macOS to Big Sur (11.5.1) and I find JabRef v3.8.2 can not be used, thus I upgrade JabRef as well.

I find JabRef v5.3 stores entries in a different format, it changes the order of fields. For example, in my old file stored by v3.8.2, an article entry reads

```auto
@Article{keys,
  author = {Author},
  title = {Title},
  journal = {Journal},
  year = {2021},
  volume = {11},
  number = {6},
  pages = {1},
}

```

But in the file stored by v5.3, it reads

```auto
@Article{keys,
  author = {Author},
  title = {Title},
  number = {6},
  pages = {1},
  volume = {11},
  journal = {Journal},
  year = {2021},
}

```

I understand the difference in the order of fields of an entry does not affect the output when using BibTeX or BibLaTeX, but I am still wondering if there is a way to specify the order of fields of each entry when saving?

PS. It seems the file format changes quite a bit from v3.8.2 to v5.3, thus `git diff` on my database file reports many changes (though most of them is just reordering of fields in each entry).

---

<div class="post-metadata">

**Author:** ![ThiloteE](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/thilotee/32/1008_2.png) [@ThiloteE](https://discourse.jabref.org/u/ThiloteE)\
**Post date:** [November 6, 2021, 12:16pm UTC](https://discourse.jabref.org/t/how-to-specify-the-order-of-fields-of-each-entry-when-saving/3030/2 "2021-11-06T12:16:39Z")

</div>

I think the options in `library>library properties>Save sort order` relate to this

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/jabref/original/2X/c/cf7af8325d8225463a3e911b0571668d67d9f962.png)

Take care, there seems to be a bug around that makes that the selected save order will switch between `Keep original order` and `Use current table sort order` in an odd manner ([Save sort order switching between "Keep original order" and "Use current table sort order" · Issue #8198 · JabRef/jabref · GitHub](https://github.com/JabRef/jabref/issues/8198)) but there is already a fix in the making and should be published soon in one of the development versions you can find here [index - powered by h5ai v0.29.0 (https://larsjung.de/h5ai/)](https://builds.jabref.org/main/)

Edit: Please backup your data before using a development version. Better safe than sorry

---

<div class="post-metadata">

**Author:** ![gaochenyi](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/gaochenyi/32/1110_2.png) [@gaochenyi](https://discourse.jabref.org/u/gaochenyi)\
**Post date:** [November 6, 2021, 12:48pm UTC](https://discourse.jabref.org/t/how-to-specify-the-order-of-fields-of-each-entry-when-saving/3030/3 "2021-11-06T12:48:18Z")

</div>

Thank you! But I am concerned with the **order of fields** in each entry rather than the **order of entries** , thus I am afraid the option ‘save sort order’ does not help here.

---

<div class="post-metadata">

**Author:** ![ThiloteE](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/thilotee/32/1008_2.png) [@ThiloteE](https://discourse.jabref.org/u/ThiloteE)\
**Post date:** [November 6, 2021, 1:20pm UTC](https://discourse.jabref.org/t/how-to-specify-the-order-of-fields-of-each-entry-when-saving/3030/4 "2021-11-06T13:20:13Z")

</div>

Oh no, my bad 😨 I honestly thought it was that. No idea then.

---

<div class="post-metadata">

**Author:** ![Siedlerchr](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/siedlerchr/32/216_2.png) [@Siedlerchr](https://discourse.jabref.org/u/Siedlerchr)\
**Post date:** [November 6, 2021, 4:57pm UTC](https://discourse.jabref.org/t/how-to-specify-the-order-of-fields-of-each-entry-when-saving/3030/5 "2021-11-06T16:57:23Z")

</div>

Have you tried the Customize Entry types? There you can change the order of the fields. I just don’t remember if this also affects the saving…

Regarding the fields order @koppor also somewhere has an issue about this

---

<div class="post-metadata">

**Author:** ![gaochenyi](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/gaochenyi/32/1110_2.png) [@gaochenyi](https://discourse.jabref.org/u/gaochenyi)\
**Post date:** [April 14, 2022, 1:43pm UTC](https://discourse.jabref.org/t/how-to-specify-the-order-of-fields-of-each-entry-when-saving/3030/6 "2022-04-14T13:43:54Z")

</div>

Sorry for the late reply. I have tried ‘Options’ → ‘Custom entry types’ and changed the order of fields for the type ‘Article’. But after clicking ‘Apply’, the order of fields loses.

Maybe current JabRef version lacks the feature of specifying order of fields in each entry when saving/exporting bib files?

PS: I have updated JabRef to stable-5.5.

---

<div class="post-metadata">

**Author:** ![Siedlerchr](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/siedlerchr/32/216_2.png) [@Siedlerchr](https://discourse.jabref.org/u/Siedlerchr)\
**Post date:** [April 14, 2022, 7:11pm UTC](https://discourse.jabref.org/t/how-to-specify-the-order-of-fields-of-each-entry-when-saving/3030/7 "2022-04-14T19:11:14Z")

</div>

Ah now I understand your issue, no, that is not possible. The serialization order (when writing) of the fields in an entry type is always the same, for the same reason as you state in your original question, to avoid problems with git or other version control systems.

The format has changed over time, unfortunately we did not really document it…

> <https://github.com/JabRef/user-documentation/issues/227>
>
> JabRef changed the format of groups (and maybe more) during its releases. It sho…uld be written, what the differences in the bibtex files are and how on can go back and froth from 2.9.2, 3.8.2 (latest release in debian), 4.3.1 (latest published release), 5.0 alpha.
> 
> For instance, users report:
> 
> \> JabRef-2.9.2 loads on the 64-bit desktop but does not display the keyword
> groups. It lacks the button to re-generate the groups that is found on
> 3.8.2.
> \> Upgrading from 2.9.2 to 3.8.2 worked once. When I made a group change, saved the file, and tried re-start 3.8.2 it again failed.
> 
> Maybe, code of JabRef has to be adapted. Maybe, we need to update the 3.8.2 version (or even the 2.9.2 version).
> 
> Refs https://github.com/JabRef/jabref/issues/1495
> 
> JabRef 3.8.1, 2.9.2 are used in the wild: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=895440#44

---

<div class="post-metadata">

**Author:** ![Siedlerchr](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/siedlerchr/32/216_2.png) [@Siedlerchr](https://discourse.jabref.org/u/Siedlerchr)\
**Post date:** [April 14, 2022, 7:13pm UTC](https://discourse.jabref.org/t/how-to-specify-the-order-of-fields-of-each-entry-when-saving/3030/8 "2022-04-14T19:13:57Z")

</div>

Ah here ist the draft blog post I was searching [Add blog post on changes of our .bib serialization by koppor · Pull Request #47 · JabRef/blog.jabref.org · GitHub](https://github.com/JabRef/blog.jabref.org/pull/47)

---

<div class="post-metadata">

**Author:** ![ThiloteE](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/thilotee/32/1008_2.png) [@ThiloteE](https://discourse.jabref.org/u/ThiloteE)\
**Post date:** [April 14, 2022, 8:56pm UTC](https://discourse.jabref.org/t/how-to-specify-the-order-of-fields-of-each-entry-when-saving/3030/9 "2022-04-14T20:56:41Z")

</div>

@gaochenyi, f you have trouble **finding** the fields you can go to `Options > customize entry types` and only show the fields that you use regularly and remove the others:

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/jabref/original/2X/e/eda93523d3e159ec92cdd6812bb134b576c272cb.png)

Hope that will help 🤔

---

<div class="post-metadata">

**Author:** ![gaochenyi](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/gaochenyi/32/1110_2.png) [@gaochenyi](https://discourse.jabref.org/u/gaochenyi)\
**Post date:** [April 15, 2022, 3:41am UTC](https://discourse.jabref.org/t/how-to-specify-the-order-of-fields-of-each-entry-when-saving/3030/10 "2022-04-15T03:41:27Z")

</div>

OK, I would be fine with the slightly changed format. Thanks for the explanation. @Siedlerchr

Also thanks for the kindly reminder. @ThiloteE
