Workflow help with Citations and Bibliography

Hello, I’m new to JabRef, new to LibreOffice, and new to temporary Citations. I am trying to set up Scrivener as my text editor and I’m using temporary citations. It does have LaTeX (which I’m also new to and learning). The workflow right now is type in Scrivener using temporary citations. Compile into an .odt file and open in LibreOffice. Connect to JabRef and convert the temporary citations. Then add bibliography using the push button in JabRef. I’m using version 5.7. Windows OS. I have downloaded and installed the APAish.layout from github (although it does not show up in the drop down menu under Select Style. (It is in the Preferences >> Custom Export Formats >>APAish). It does not show up in the preview entry box correctly.
Here are my problems…

  1. some of my webpages entries don’t have authors, how can I tell JabRef to ‘think’ - if there is no Author Entry, use Institution instead to generate the in-text citation based on the citationkey. I’m having [ , 2022] as citations bc there is no author for the webpage. For exampled- allot of my webpages are USDA APHIS - so institution.
  2. When the bibliography is placed into LibreOffice, it is not formatted into APA format. I’m wondering if I did something wrong with the download, but followed the instructions on the github.
    a. can I get rid of the bold?
    b. Can I get it to number the citations?

This is an example of reference section: The url isn’t being printed out, and I would like USDA to be listed in the front before the date.
(2022a). African Swine Fever (ASF), .

(2022d). African Swine Fever (ASF) – Situation report 18, .

(2022c). Animal Health Status of Regions, .

Thank you for your help. I’ve looked in other forums but cannot find how to change this. I’ve already updated the entries, and the citation keys to how I like them, but can’t figure out how to do this.

The BibTex source looks like this for example, for webpage.
citationkey = {Web_pagec},
title = {African swine fever},
url = {African swine fever - WOAH - World Organisation for Animal Health},
year = {2022},
organization = {World Organisation for Animal Health},

Thanks for the enthusiasm :slight_smile:

  1. what “github”? Could you provide a link?

  2. JabRef currently has two different citation style implementations:

    A) JStyles
    B) CSL

    The entry preview is CSL and unfortunately the CSL styles do not yet work with LibreOffice/OpenOffice, unless you copy paste the data. Refers to Support Citation Style Language (CSL) Styles in LibreOffice/OpenOffice - University Project · Issue #8893 · JabRef/jabref · GitHub. JStyles DO work with LibreOffice out of the box, but there is no APA style available…

I personally lack detailed knowledge about custom export formats and how they could be adapted to fit your workflow. If push comes to shove, you would need to write your own Jstyle. If so, the Export-Filter-Editor would help a lot.

Since Scrivener has compatibility with LaTeX and you seem to want to learn how to use it anyway, then another way would be to skip the transformation to LibreOffice and directly work with LaTeX. JabRef can export the citation to the following programs, which all can read/write to .tex files:

  • texmaker
  • emacs
  • lyx/kyle
  • texstudio
  • vim
  • winedt

About institutions: You could put all the institutions into the “author” field and add a comment to the entry that author = institution, so that you know.

I tried this, but then in the reference, it printed out Author AND Institution, so it showed up twice. Why I was thinking if there is a way to say, if this is empty, then use this scenario.

These suggestions came from the Scrivener Forums.
I installed this in LibreOffice: GitHub - teertinker/JabRef_LibreOffice_Converter: A LibreOffice extension that converts JabRef references to plain text code and vice versa so that you can use your references with MS Office.
Here are the layout files: GitHub - JabRef/ Collection of .layout files
But I’m now wondering that they aren’t the same as the jstyles? And maybe that’s why it’s not working?

I just read this: Custom export filters - JabRef But I honestly don’t understand the workflow that it is explaining. I added the layout files as stated here and thought that would be enough, but now I’m wondering if I have to add the jstyles as well.
I saw the link to the export filter editor… is that an add on? I don’t think I fully understand what this is or how to implement it.

I’m trying :slight_smile: It’s just moving slow. I need simple, step by step workflow instructions to do this until I learn what it is i’m actually doing, if that makes sense. I’m trying to write a proposal for my PhD Thesis… After a week of trying to figure out citations, I want to curl up and think about just going back to word… which stinks for doing equations, math type writing IMO.

I can only post 2 links at a time :slight_smile:

The other forum just posted this:
If you need help with the jstyle file I can make one fairly easily. What format do you want your citations and bibliography entries to look like? I prefer author-year and always show the DOI and URL:

(Weber et al., 1988)

Weber, Max C., Simmel, Georg & Star, Susan (1988): Economy and Society. Journal of Sociology pp.45-69 (36).

General Author-Year with DOIs & URLs


AuthorSeparator=“, "
AuthorLastSeparator=” & "
EtAlString=" et al."
CitationSeparator=“; "
InTextYearSeparator=" "
YearSeparator=" "

default=\begin{author}\format[Authors(LastFirst,Fullname,sep=, ,LastSep= & ,EtAl= et al.,inf,9),]{\author} \end{author}\begin{year}(\year\uniq): \end{year}\begin{title}\format[RemoveLatexCommands]{\title}. \end{title}in: \begin{journal}\format[RemoveLatexCommands]{\journal} \end{journal}\begin{volume}(\format[RemoveLatexCommands]{\volume}).\end{volume}\begin{URL} <\URL\format[RemoveLatexCommands]{\empty}> \end{URL}

Hi @Amalthya — I’m @nontroppo from the Scrivener forums. Yes, I also misunderstood the difference between layout files and jstyles and first linked to layouts before changing the link to jstyles. You need jstyles for the LibreOffice formatting for the moment (I am really hoping CSL styles will work soon, that will be much better for the future).

I’ve read through the documentation and there seems to be a conditional rule that can be used, so if author is empty then use institution or something like that. I can have a test and see if I can get it to work, although I am not a JabRef user so I can only allocate a bit of nerdling time to it…

The editor is a GUI that runs in Windows / Linux to make jstyles. But although it seems to work for basic styles, I doubt it can handle conditional fields (at least I didn’t see how in my brief test using a Linux VM, my main OS is macOS which is not supported by the editor…)


I was able to add the APAish layout file like this:

You can export your library and the entries you used in your paper via File --> Export --> Export selected entries --> ..., then at the bottom right you can choose APAish as file format. Most importantly, the file you export has to end with .rtf.

So you could update the intext citations with a simple jstyle e.g. author-date
and when you are done with your paper, for the bibliography at the end, you could export all the entries that you used into LibreOffice via copy/paste from the rtf file. You would need to keep track of the citations that you used in your paper manually.

Of course, this workflow is very bothersome. Not only does it require a lot of work by the user, but also, the APAish layoutfile is quite old by now (from 2009 i believe) and by no means perfect.

Ideally, an APA JStyle would exist, alas, there is not. Why? Nobody bothered to create the style file. Why? Because JabRef traditionally is/was used by users of LaTeX and LaTeX already had this, so JabRef did not need APA. LibreOffice joined that party a little later. Maybe too late. Looking back, JStyles have not gained enough traction, which is one of the reasons we are looking to transition to CSL: JabRef maintainers do not have enough time to keep up with maintenance of Jstyles.

1 Like

Thanks for joining into the discussion. The jstyles are basically normal layout files with some extra open/LibreOffice config stuff. The same layout-format is used for the Custom Preview Layout as well. In fact, JabRef the layout stuff is some kind of JabRef-Template-Engine.
As @ThiloteE mentioned previously, the transition to CSL is on our Roadmap. Would also make a nice student project (we occasionally have collabs with universities).

1 Like

Here is a jstyle that is vaguely APAish that can replace author with the content of the note field if author is empty. The rule to insert the note field ONLY if author doesn’t exist: \begin{!author}\note \end{!author} — BUT the conditional rules only apply to the bibliography references, not the in-text citations. So I think the only way to solve your problem is to fill the empty author field with whatever suits you best. You can remove the institution field from the database ref so you don’t get repeated text, although at least for the following style institution is not printed out at all…

APAish Author-Year with DOIs & URLs

ReferenceHeaderParagraphFormat="Heading 1"

AuthorSeparator=", "
AuthorLastSeparator=" & "
EtAlString=" et al."
CitationSeparator="; "
InTextYearSeparator=" "
YearSeparator=" "

default=\begin{author}\format[Authors(LastFirst,Fullname,sep=\, ,LastSep= & ,EtAl= et al.,inf,9)]{\author}\end{author}\begin{!author}\note\end{!author}\begin{year} (\year\uniq)\end{year}\begin{title} \format[RemoveLatexCommands]{\title}\end{title}\begin{journal} <i>\format[RemoveLatexCommands]{\journal}</i>\end{journal}\begin{volume} <i>\format[RemoveLatexCommands]{\volume}</i>\end{volume}\begin{number}(\number)\end{number}\begin{pages} pp.\pages\end{pages}\begin{doi} doi:\format[DOIStrip]{\doi}\end{doi}\begin{!doi&&url} from: \format[RemoveLatexCommands]{\url}\end{!doi&&url}

The layout format is quite straightforward and flexible but the in-text rules are much more limited. The documentation for these styles is excellent, even given so few people use them…

1 Like

@iandol Nice to see you here!!! Thank you for all your input. Any everyone else answering back. I appreciate the help.
So what I’m gathering is:

  • that jstyles =! layout
  • I need to install the export-filter-editor to add new jstyles
  • It might just work if I use the institution as the author instead. But what was happening was that it was abbreviating it. So USDA APHIS was becoming [APHIS, U. 2002}. Is there a work around to this? Would it be easier?

Last, and I know this is asking allot, but can anyone write a step procedure (workflow) for installing the editor and adding a new jstyle?

Once I actually understand what is going on, then I can find more work arounds. Would it just be easier for me to figure out LaTeX, use a LaTeX editor?

Ian, can I just write in Scrivener and transfer to LaTeX and do the citations that way- is that what you were talking about with Pandoc? Since JabRef does talk directly to one of the LaTeX editors, or at least that’s what I thought the documentation said.

Glad I’m figuring this out on a little 10 page proposal :slight_smile: :grin:
Thanks again!


It might just work if I use the institution as the author instead. But what was happening was that it was abbreviating it. So USDA APHIS was becoming [APHIS, U. 2002}. Is there a work around to this? Would it be easier?

  1. Jstyles are a superset of layout files. They have additional commands for LO/OO.
  2. No, you can edit the jstyles also with a text editor, the editor is just a bit more handy in creating a new one. Adding a new style is simple. Just put in a folder somewhere on your system and add it through the dialog in the LO/OO panel
  3. You have to put institutions/corporate authors in an extra pair of curly braces
    e.g. {JabRef Developers}
1 Like

Save the jstyle text above to a new file called APAish.jstyle. The jstyle is loaded from the [Select style] button in the LibreOffice panel in Jabref:
Screenshot 2022-08-22 at 15.33.11 copy

The GUI editor I don’t think is really required, but as it is just an exe you can run directly after downloading it. On Linux the GUI has many bugs so it isn’t easy to use…

Yes, Scrivener can handle a LaTeX workflow in several ways. It can (1) compile LaTeX markup directly using the non-academic LaTeX template as a foundation. (2) compile to MultiMarkDown which converts to LaTeX. (3) compile to Pandoc markdown which converts to multiple outputs including LaTeX. My published sample Scrivener workflow: Scrivomatic uses Scrivener’s styles to automagically generate Pandoc markdown to multiple output formats including LaTeX (sample outputs here).

I don’t recommend (1) unless you are truly committed to LaTeX from now to forever, and even then I think Markdown offers many advantages to those who only ever export to LaTeX. (2) or (3) are much more flexible. But LaTex or MMD or Pandoc require more initial effort and some understanding of workflows than compiling just to ODT and then using the JabRef GUI and some manual tweaking. LaTeX in particular, while amazingly powerful, can be frustrating and finding solutions to problems can require lots of esoteric detective work.

So my advice really is persevere with Scrivener → LibreOffice+JabRef for the moment[1]. Try to use styles when you can in Scrivener (like use strong emphasis styles rather than bold/italic RTF formatting) to maximise the flexibility to switch to a different compile output in the future. When you have a bit of time and space to learn a tool, learn Pandoc. Pandoc can be run via Scrivener directly, can generate bibliographies using CSL in any output (e.g. I even use it to make bibliographies automagically in my plain text emails!)[2], but can also instruct LaTeX to make bibliographies using BibLaTeX as second option.

[1] When/if JabRef does allow CSL styles for LibreOffice, that will make this workflow much more flexible. JabRef is of course free software and you can’t expect the features you personally need will be implemented, but it is obvious this is really high-quality software with a great and active community, and they have prioritised this feature so lets hope!
[2] i.e. you don’t need LaTeX for good bibliographic output, its main benefit is high-quality typesetting.

1 Like

I tried that, and I tried putting a second pair on just for good measure, and it didn’t work. Still giving me APHIS. U, 2020 as the citation. Now I’m wondering if when I was following all the other instructions, I somehow messed with something in the preferences?

I made the webpage entry bc I didn’t have an option for that and as you can see, I use allot of USDA webpages.

Thank you. I was able to save the file and select it in JabRef. That was easy enough. But now the font and letter size are different for different citations in the LibreOffice.

I really don’t understand why technology hates me so much :slight_smile: This seems like it should be cut and dry.
Back to the drawing board.
Thanks you for all your help, both of you.
I guess I just need to play around with it, but at this point, i’m not sure if all this is worth it just to use scrivener.

Hm, I don’t see this, but can you check the styles applied to each of those citations, are they the same?

You probably can easily fix this with LibreOffice’s find and replace that can find and replace formatting…

Yeah, one was sitka text 12pt (the whole document is in this), and one was calibri 10pt. I checked it in scrivener and it was all the same there.
I just changed it manually in libre office, recompiled to see what happens, and it did it again, only on the OTHER reference in the same spot :slight_smile: HAHAHA. so I just changed it. It did it in a couple other places as well. That’s really not a big deal, I can go through and correct that. But the good news is that I’m making progress with the in text citations showing the name. hehe. Slowly but surely.

AAHHH, I think I’m getting it. I opened up the default jstyle and under layout there is no electronic version- which was why it wasn’t giving me a url in the bib. Ok, so now i’m going to try and update yours @iandol I need to have Retrieved from: and not just from:
And they need to be alphabetized, and a space between them. so… now I get to look up how to write this code :slight_smile: one thing leads to another, but i finally feel like a made a break through.