We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

Webinar on the Citation Style Language CSL

00:00

Formal Metadata

Title
Webinar on the Citation Style Language CSL
Author
Contributors
License
CC Attribution - ShareAlike 3.0 Germany:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor and the work or content is shared also in adapted form only under the conditions of this
Identifiers
Publisher
Release Date
Language

Content Metadata

Subject Area
Genre
Abstract
Recording of the webinar on the Citation Style Language: Learn How to Create and Modify CSL Citation Styles from November, 4th 2015. The seminar was led by two core contributors to the CSL project, Sebastian Karcher and Rintze Zelle and organized by the Mannheim University Library.
Keywords
Computer animation
Transcript: English(auto-generated)
I welcome everybody and sorry for the delay also. I welcome everybody here to the citation style language webinar. My name is Philipp Zumstein and I'm here together with my colleague Konstantin Bayer at the Mannheim University Library in Germany. And we are now also connected to Sebastian Karker who is presenting the webinar.
He has also support from Vrintse Zelle who is giving support by chatting. Sebastian is a political scientist at Northwestern University and one of the core contributors as well as Vrintse Zelle of CSL.
Many of you may also know him under his nickname Adam Smith. Maybe before we start I should just mention some small things. So for the participants we have muted the microphone. So let us just know if you want to ask something in the mic.
Then we can unmute you. Besides from that you can use and you should also use all the time to chat to ask questions. You can write your questions at all the times and we either can answer them immediately or we may collect them and answer them later. Finally we are recording the webinar so completely
and we will put the video then afterwards online. And now please Sebastian start. Okay. Thank you Philipp and thank you all for tuning in.
Yeah, so this is the CSL webinar and we will be working with the CSL visual editor to create and modify citation styles. Thank you for the university at Mannheim for hosting this, for Philipp and Constantine for putting it together.
And I'd say let's get going right away. First I want to give you a two-minute version of the history of CSL and where we are, where you are. CSL is about nine years old. I think the first thing started in 2006,
originally intended as a citation language for what was then OpenOffice. And then the first implementation was in Zotero in 2007. And then Mendeley I think was the next major implementation that follows in 2009.
And then since then we are proud to have become somewhat of an industry standard. So almost any new product that comes out and there are a lot is using the citation style language.
We have a full list on our web page which is citationstyles.org. And last time it was 27, but it's changing so quickly. Who knows? We actually have, if you look in the participants list, we have our friends from RepMe who is one of the newer, larger projects using CSL styles listening in today.
So welcome to you guys. So editing CSL styles. I have, and you can see that at the top left of your meeting note, a link list. It says CSL webinar links and you should ideally have that open.
And I have links for you to follow along. The idea is that this webinar will work in a way where you will be able to follow along and try out things as I present them. You'll get by far the best sense if you actually do things
rather than passively listening to me. So the first thing you want to open is actually the CSL editor itself. And unless I'm hearing protests from other people, I'm going to assume that you can see my screen and you will now see the find and edit CSL citation style welcome screen.
And there are various, this is your welcome screen that kind of gives you a quick introduction to the editor. I actually will want to start you with the visual editor itself and then come back to the search functions later on.
If I click on the visual editor, I'll get something like this. And what exactly you get here depends on if you've used this before or not. The citation style might be different, but this is the general outline that you see.
And you see there is a lot of stuff here on the left that's kind of confusing as you use it the first time. So the first thing that I actually would like to do is to get what I call the bare bones style for us all to work with. And I'll show this twice so that you can all follow along. So you go to this link that's bare bones CSL style,
open it in a new window preferably, and then you select everything here from the top to style. If you have trouble selecting, you can also click on raw and then select all. And you go to the visual editor, click on code editor.
Now this actually shows us the life code of the CSL style. Delete what we currently have, so you should now have an entirely empty screen and paste our new style.
All right, let's go back to the visual editor. Much simpler, much more orderly here on the left. Let's look at what our citation style currently actually does. The entirety of what it does is it prints the title of the,
in this case, three works that I have, I'm sorry, four works that I have as example citations. So that's kind of the most basic thing we can do. And with that, I want to introduce you to the various elements of the visual editor.
There are three main panels in the editor. You have the window here on the left that gives you the basic structure of a CSL style. Now for those of you who are a little more into the technical details, CSL is an XML language,
which means that it consists of a hierarchical level of notes. So you have a top level and then you have embedded in that more and more different level notes. And these are represented here on the left.
So in the most basic style, what we would have is we would have the style itself, and then we would have the citation and we would have a biography. And each of these has a layout element and in our very simple style that has only one sub element, namely the title. So this is our structure here on the left.
Then we have the actual output here on the top. And you're seeing that occasionally as I hover over it, it turns blue. That's going to be very convenient because as I click on this,
it will take me to the right place on the left. I'm in the bibliography now, so it opens this on the left, which as my styles become more complicated will be incredibly useful. And then I have where the actual action takes place here on the bottom right,
where I can change what is displayed and how it is displayed. There are a couple of other things to look at. You'll probably notice that you, if you've just started using it, don't have the same set of example citations that I have.
You can select which items are in your citations here under example citations. So, for example, I now have under citation one, I have three different works, a journal article, a book or a book chapter. And you can just check or uncheck whatever you want. And then you have up to three different full citations, three different citations.
This will become clearer as we go on, are displayed. So this is the first one starting with Virgo is citation one. And the second one starting with shaping is citation two. All right. So let's change something.
And so the most simple thing we can do is just we have something here and we want to change its styling. Like say we want all our titles in italics. It's as easy as selecting this here by clicking on it here in the top right panel or by clicking on it in our structure.
And then we have the text formatting here. And I can just click the eye for italics. And you see that all my titles are now in italics. Great.
Note that this applies only to the titles in the bibliography. The title in the inline citation is actually separate. I could do the same thing there, but I could also for odd reasons, let's say, decide we want to do all of those in quotation marks.
And it's just as easy. I click on the quotation marks. So I first click on the title here or on the title there and I click on the quotation mark icon and you see there now in quotation marks. So that gives us a good start.
But now we may be a little dissatisfied with our boring citations because they just contain titles. So let's add stuff to this. If we want to add stuff, we typically start at the highest level.
So we click layout here. And then we click the plus sign, the add note sign here. And then we get this long list of things. We'll cover most of these here today. And the most basic one is text.
Text is just telling CSL to print something. And now we want to print something new. And let's say we want to print journal and book titles for those items that have them. So we click on text. And now I have various options here under type.
I can text, print various things. I can check text macros, which we'll briefly mention later. I can text terms, which is any label that is defined in CSL. For example, addition would be a typical term. We can text a value, which is just any free text string,
any word or sentence you want to text. And most importantly, perhaps, we can text variables, which is the things that are stored in our reference manager's data. You see suddenly lots of text appeared here.
Why? Well, because the default it gives me starts alphabetically and the abstract is the first thing. What we want now is we said we wanted maybe the journal or the book title. And you see here all the variables that exist in CSL. And the journal and the book title are in a variable that's called
the journal title. For those of you, and I'll go back to this later on, but in my linked list, I actually have the mapping of variables in the reference manager, variables in CSL or Zotero and Mandalay,
which are the only two lists that I'm aware of existing. So you don't have to know all of this by heart. You can look this up. And now you actually see that for some of the items, I have a journal title or, in this case, a book title.
Two of the items don't. The reason for that is simple. Those are already the book titles. There is no container. I think container is the element in which something smaller is published, so in which a chapter or an article is published. And obviously, that doesn't exist for a book, so we only get that container title for books.
Now, you immediately see we are having another problem. They're just kind of attached together in an ugly fashion, and that's, of course, very unsatisfactory. So we will want to get some spacing between the title and our container title.
How do we do that? Well, there's various ways of doing this. The most simple way is to work with what we call affixes. You can attach any text before or after any element. Just to highlight that, I can't do completely silly things, right? I can actually write words here,
and you see them appearing up here in my bibliography, but what I want here is just some type of punctuation and probably a space. So I'm going to do a period and a space here, and I have currently the container title selected,
so I'm telling it before the container title, insert a period and a space. And you see now this is looking a lot more decent here. We have actually a space and some punctuation in our citation.
As you are working with affixes, my recommendation is to be very consistent in putting spaces only in one of the two. So if you're working on a citation style, you should decide beforehand, okay, I'm going to put all of my spaces in the prefix.
The reason for that is that if you mix them, you can easily, as you move elements around, if I'm going to go to the title and now include a period in the suffix, you already see problems appearing. I have two periods here, and then if I add a space here,
I get this ugly period, space, period thing, and that I really want to avoid. So as much as possible, if you're going to put spaces into prefix or suffix field, it would be consistent throughout the style. Put them all in the prefix field, which is what I would usually do,
or put them all in the suffix field. Great. So let's look at some maybe slightly more complicated things. Let's maybe add a date to this. We typically have dates for citations.
So same idea. I go to the top level. I click plus, but now you see there's actually a separate category for date down here. So I click date, and there's various ways in which I can enter date,
but there is this very neat function in CSL that actually gives me pre-formatted date. I don't have to tell it in which language or in which order or anything. You can see that up here in the Virgo citation. It already gives me the full date, and then I can select which parts I want. So I can have the whole date.
I can have just year and month, or I can just have the year, and I can also display it in different forms. So I could also do the numeric date. And again, how exactly that looks depends on the language that you're going to be using for the style. In our case, for a lot of citations, we just want the year. So let's go with that, and we're good.
Well, we're kind of good. We, again, have this problem that the date is attached immediately to the previous item. So I'm going to, again, put some spacing in between here,
and that's starting to look better. But now the date at the end may be something I like, but may also be something I'm not happy with, and I may want the date in a different position. And another of the nice features of the CSL editor is that I can just move items around here on the left.
So I can take the date and just move it up a level, and it's now between title and the container title where that applies. The nice thing that you'll have noticed is because I've been consistent with where I put my spacing, although I moved the item around,
I still have the nice spaces and periods between all of my elements. So that's kind of where your consistency pays up. Even as you move items around, they work nicely. All right.
Now, a typical situation we have is that we may not want to treat, say, titles exactly the same if they are from the book or if they are from an article or a chapter. We often want to distinguish what type of title you're dealing with,
and the way this citation style language handles that is with conditionals. So let's look at how that works. Conditionals. Again, we go to our top level,
and I'm just going to highlight this briefly because this is invisible. I've been entirely working on the bibliography so far. Our citations are unchanged apart from that one little quotation mark thing I added in the beginning. So for my conditionals, I again go to the top level.
Now I add my note. So I add a conditional, and now nothing happens, but it tells me what to do. I have to add another note, and that's an if note. So if something is the case,
and now I can select the conditions here. So I have an if any or an if all condition, so a Boolean or or a Boolean and for those who are comfortable with those terms at the top here, and then I can select between various options.
The two most common options is testing for the document type or testing whether a specific variable, so, for example, a title or an author or something, is absent or present. Now, sticking with the document type, we had said we want to distinguish between books
and book titles and other titles. So if the document type is book, I want to do something specific, and I could add another condition here now. So, for example, I want to treat reports just like books.
So I would add that here, but nothing happened so far. Well, why didn't nothing happen? Because while I have an if condition here, I don't actually tell CSL to do anything yet. How do we do that?
Well, we can actually move now our title into the if condition. See what happens when we do that. Okay, let's see what happens. We have the title of the books now, but the title is missing for everything else.
For our journal article and for our chapter, we no longer have a title. Why not? Well, we have a conditional. We say, if we have a book or a report, print the variable in this way, but otherwise, there is no condition, so it doesn't print anything. Because of that, in many cases,
you will want to add a second element to these conditionals. You have two choices here. You have an else if, meaning you're going to specify another condition. So I could, for example, now say, if this is a court case, for example, just print it,
or I just do else, which is in all other cases, which is what I'm going to use for simplicity's sake now. I'm going to add the else here. Still not giving me anything. Well, I actually have to tell it what to do here. So I now do my text.
I, again, want to do a variable. I want the variable to be the title. And now you see I have my title appearing
for journal articles in chapters two, and it's formatted differently. I'm going to highlight this by also putting quotes around it. So we now have the titles in quotes, and we have the titles of books in italics. But notice how this has messed with our positioning. If I add a new item by default in the structure,
by default, it always gets placed at the bottom. But I wanted our titles to be at the top, which is a little finicky. There it is. So I can just, again, drag the entire conditional node with everything that I've done right now up here.
And now I have something that actually starts looking like a citation. Yeah, I'm going to take a brief moment here to make sure that everyone is still with me. Are there any questions if you'd like me to repeat something?
So in code form, remember the structure that we have here?
And this is going to be reflected exactly in the code form. So if I look on the code editor, I go down here to the bibliography. So this is the part I've been working on. We have this layout element,
and then we first have the conditional element. That's all this here. We have the if and the text and the else and the text. Then we have the date element and the text element. And then because it's XML, we always have to close our elements. So that's one of the things that you typically run into problems with
as you start hand coding and that the visual editor takes care of you. Great. So there's one obvious thing missing still, and that's giving credit where credit is due.
We want, obviously, authors for our citations. Same idea. Add them at the top level. Click a plus. And now authors are obviously names, so that part is pretty obvious.
And author elements in CSL may look a little confusing in the beginning. They actually have a top-level names node, and then we need to enable that and assign a variable to it. So we want an author here. Well, that's looking good.
We have lots of authors showing up because we have physicists. But then to do anything with this except for just printing the authors, we need to add another node below that, and that's the name now in the singular node.
And now you see here we have all these options. So we can actually, because authors is super important, we can put them in bold or do whatever we want with it. Perhaps most interesting is, though, how do we influence how the authors are displayed?
You see here currently I have the authors just as first name, last name. If we are in a bibliography like we are here, most commonly that's actually not what we would want. We would want them in some type of last name first form.
And now we have all these options here, and they may be a little confusing. One of the nice things that the visual editor offers you is you can actually have it explain to you any option that you may not understand. So you can hover over this and it will pop up a bubble that tells me what this option is doing,
and this happens to be just what I want, right? It specifies whether they're in their sort order, meaning with their last names first, or in their natural order with their first names first. And if this is empty, they're not in their sort order.
And I'm now going to flip this around. I'm going to turn them all into their sort order. What you see here is now I have them in last name, comma, first name format. Another thing that I may commonly want to do is I may want to not use full first names, but just initials.
And in this case, I would enable the initialize with condition and see how this has already gone to initials, right? And right now I'm initializing with nothing, right? I put them immediately together, but I can also initialize with periods or with periods
and spaces which would then affect how people with two initials are displayed. All right. Well, you're still missing an author here. What's going on here? Well, this is an edited volume, so it doesn't have authors.
It has editors. And CSL doesn't know that if we don't have an author, we want to start the citation, the reference entry, with our editors. We need to tell it.
And the way we do that is we again go to the top level, to the names level, and now we're adding an element that's called substitute. It's, again, what the editor does a really nice job of is always telling you things that are kind of weird. What are they going to do? And so the substitute element does exactly that.
It's going to tell CSL, if I don't have an author, what should be the next thing I should try right here? So we're going to do that and then again add a note, and we want some type of group or person, so names.
And then we need to enable the names here at the bottom and now we want editors here. Now note, and this is one of the cool things about substitute,
is this automatically assumes all the formatting that I have given to name here is inherited, as we say in programming, at the substitute level. So I don't have to go through all that stuff again. It's already in our sort ordering and it's already printed in bold, et cetera.
Still something missing though, right? Because we said these are editors and almost always when we are doing citations, we want to have editors distinguished from authors. They don't get quite the same credit if you will.
And for that we have an element that we call label, very intuitively I think. The label actually, yeah, and you see that appearing here. And it now says editors.
And now this is a place where it definitely wants some type of prefix. And a good example of what I can do with prefixes and suffixes is I can just put something in parentheses. So I've now inserted a space and an open parentheses in the prefix and a close parentheses in the suffix field. And now it says editors right up here.
And then of course I can also choose different forms. And these are all programmed in the CSL language as default. So for example, I can use the short form and then we have the EDS for editors. Great, now this is starting to look like a citation,
but typically of course we would want our names up front. And again, very simple. Just take my entire node and try to drag it up here.
And there we go. Looking nice, but still I'm having a problem here, right? We have, again, two elements that are immediately attached together
and that's kind of unfortunate. So I want to show you another feature of CSL that allows you to group two variables together and then tell CSL what type of delimiter to put between them. And this is something, as you're going to work more on this,
this is something that we encourage you to use much more than actually putting those affixes on individual elements. Use what we call groups. Okay, again, I'm going to my top level.
Pressing the plus, I'm going to add a group. Okay, right now that's not doing anything. Right, it's just what we call an empty group and you see very unhappy here. So we have to place something in the group. Well, let's first put the group up here.
Yep, still unhappy. Now we want to put something in the group. We said, well, maybe we want to put names and then our whole conditional for the title here in the group and then we can tell it what we want between those. So we put the names in here and then we put the conditional
and remember this has our whole title element in it. If I scroll down here, nothing has changed. So we still need to do something. So I'm going to click on my group. You see groups have actually a very limited set of options and one key one is this delimiter here,
which you have a relatively few elements in CSL and particularly for groups, you're going to use that a lot. And the delimiter tells me exactly between each two elements of the group, I'm going to put this delimiter.
So I'm going to use a colon space here now and you see I'm immediately getting the colon and the space between those two elements. Just to highlight what I could do, I could now drag the date into this group also
and notice that I get the colon space automatically here, but I also get the space period that I've put into the date affix and to the date prefix in this case earlier on so that I would have to correct. And probably I don't want two colons in my citation, so I'm going to drag the date out again.
And it's not at the end. That's fine. Okay. Well, one other thing that you may have noticed is that we have, because physicists work in large groups, this very, very odd, giant citation here.
And what we typically do, as you all know, we put some type of restriction on the number of authors that we display. So we use et al. You probably saw that we can actually set et al
in our name settings. But where we recommend you set it is for the entire bibliography at once. That's what you will find in almost all citation styles that we currently have. So you click on bibliography here. These are all the settings for the bibliography itself.
And here you can actually set et al. And you have two key settings here. Et al. min is starting at how many authors will I start applying the et al. rules. So I'm going to use some reasonable figure here.
I want to see up to a certain number of authors. But yeah, so seven. So what would seven mean? Seven means up to six authors will get fully displayed. But once I get to seven or more authors, the et al. settings will hit in. So let's check this out.
And notice how this has now gone to one author and et al. And the reason is that the default for this next variable for this et al. use first is one, unless I set it explicitly. So et al. use first means how many authors. Once my et al. condition has kicked in, how many authors am I going to display?
This is currently, as I said, set to one. But I can set this to any value that's at least one below the et al. min value. So I'm going to do five here. And so you see I see five authors and then et al. And then obviously I can play with these numbers
to get anything I want. And that's your basic functions of the citation style editor window. There is still stuff to explore, but all the basics you should now be able to do.
Take a quick moment in case you have any questions.
Great. Everyone seems happy. All right. When we conceived the CSL editor, and the history of this is that Mendeley and Columbia University got together and got a grant for it and got it developed.
But then they solicited a lot of input from various people working with CSL. And one of the things that we all said is that, well, we have so many styles already. People really shouldn't be doing what we are doing now, shouldn't be starting from scratch and adding element by element by element.
They should really start with existing styles. And that's one of the things that most work perhaps has gone into and that works really neatly. And the first way we can do this is,
well, we already know we have a style that we know is very similar to what we want, and we're just going to modify this. And a good example that you may actually come across is that a while ago we moved our APA style implementation so that it presents the URL for the DOI
instead of just the DOI at the end of the citation because that's what APA now recommends, though doesn't require. Well, let's say you have an old-fashioned user who really prefers the old style.
You can just click here. And this is a search by name, so I could search for any other style that I know exists before. So I could type in Chicago, and it would list me all the different Chicago versions that we have, et cetera, et cetera. Now with APA, you see this is massively more complicated.
So if I were to click through my settings here, this would be a nightmare to find. But this is where the clicking on elements becomes really cool. You see how as I go around here,
the different elements become highlighted, and so I can just click on what I want to change, and it automatically takes me both to the right place in my tree on the left and to the right place here on the bottom. And I can see what we actually did to convert the DOI
is we just put this in the prefix, and that's obviously very easy to change.
So I just changed the prefix. Now I just got the question, and this very good question. What happens to the work on the bare bones style? Well, I wasn't careful, and it's all gone. So that's the thing to pay attention to as you change things here.
The visual editor, you shouldn't entirely rely on it, but it tends to remember things from your last session. But as soon as you start editing a new citation style, it will forget everything it did before.
So good point. You will actually want to save your work. How do you save your work? Well, you go to style, go on save style. And now this is actually an important warning.
If you want to have a modified version of the APA style, you want to save this under a different title so that your reference manager, you know the difference between the implemented one and your modified version, but also that your reference manager doesn't overwrite
your modified version when it updates citation styles. So I'm going to go to info here, which is where all kind of the naming of this style takes place. And I'm going to call this, and you can make up whatever you want here. And I'm going to call it old fashioned. And now if I'm going to save,
it actually tells me the new label that it's going to implement for that style. The Zotero.org here that you see, that's kind of a legacy that currently all our styles have an ID that starts with Zotero. We hope to change that,
but it doesn't affect using it with any other reference manager. Think of this just as an internal ID. And you click okay. And then you get this save window. Currently the save window has a flash dependency
for reasons I don't quite understand. So the save button will only work if you have flash enabled. Presumably all of you have, because else you couldn't be on this conference call, I guess. Then you have instructions for different reference managers, how to get them back in, or you can save to disk.
And then you can see the label that we just saw, minus the URL part is now also the file name, and I can save it, and I can then later implement it in my reference manager or reference managers of choice.
Great. A quick word on the macro down here, and that's the one thing that I didn't really mention earlier on, because it's leading us a little bit far. But what macros essentially are, is they're both a way to clean up your code,
and it's a way to simplify your code. So if you think you're going to do something several times, so authors, for example, they may appear for different item types or so. You just define it once in a macro, and then the next time you want to print the authors
exactly as you have specified them before, you don't have to go through the all names, names, substitute, label, et cetera, and that both means you can clean up your code.
If you look at this in the code editor for a style like APA, you're going to have this huge selection of macros. This is all macros, macros, macros here, but then if you get to actual bibliography, that's a very manageable set of items,
so it's very nice and clean, and you see this is kind of a style where we put a lot of effort into having it clean, so you see a lot of groups and delimiters between the elements, and you can quickly rearrange them. And all the complex stuff is going on up here in the macros.
All right. Now to the perhaps more likely situation that you have a style that you want to create,
but you have no idea what other style looks like. You want to publish in a journal that isn't supported yet, for example, or some user or a patron or yourself are required by your university
or the professor to use a specific style. Then we have this search by example panel, and it actually tells you what to do here, right? So you have example citations here on the left, and you'll recognize these citations
because these are the elements that we used in the visual editor and that we are going to use in the visual editor again. So here's our Virgo Laser article. You'll recognize what else did we have?
We have the book here, the Shaping the Body politics. We have the chapter here, et cetera. So what we'll have to do is we have these citations, and they're by default in APA style here, citation and bibliography, and we want to put them into the format of the style
that we're going to work with. And I have down here author instructions for a random journal that someone requested that we currently don't have, so that's BioSocieties. And so this gives you a list of references.
We're just going to quickly check how this is supposed to look in the text. So this is a very simple out-of-date citation. This may already be something like what we want. And then my default approach is that I always start working with a book chapter, but you can also do this with journal articles or books, et cetera.
Book chapters are particularly complex, which is why they're a good thing to compare styles on. Okay, so have a look at this. This is a very straightforward citation. And now comes the part that's perhaps most often misunderstood.
What we see a lot of people doing now is you just paste the example in here, and then you search. And then in this case, it's actually going to put out something eventually.
But you see here you have like 9% down there, and it's not similar at all. Well, the problem is that you can't just paste the sample citation from your author instruction. You have to actually use the original citation,
so in this case, the chapter by Maris, and get it into this format. So I think I can just convert this. And so there's various ways of doing this. You can do it with two screens. What I always do is just paste them below each other,
and then make sure they look the same and go element by element. So we have last name initial. That looks good. Space here in parentheses. That looks good. And now we don't have a period after the date.
Now title looks good. Moving on, we have the in, but we now have a colon after the in. So I'm comparing the APA citation up here to the citation that I copied from the author's guide down here.
And again, the copying isn't strictly necessary. This is just for me to have them quickly side by side. For the initials, I see here the initials actually do not have a space next to each other. I'm going to remove that. And then there is not an ampersand, but a written out and between two authors.
The editors here is lowercase. There is no comma. This looks different, but if you recall from the author's guide, the book title was actually in italics.
That just didn't copy. So that's the same, but our page numbers aren't actually here, but at the end of our citation.
And again, they are with label with a DP, 184, and I can look here on the left, right, to 213. Okay. This helpfully highlights things as I include them in my citation here on the left.
So I can kind of double check, and obviously we want to remove now the sample thing I copied. The author date citation is actually already in the right format. That might not always be the case. There could be a comma here, or you could be looking at an entirely different style where you would have numbers in the text or so.
And now I can search. And what this will give me is a list of a lot of styles that are very, very similar to what I need. So you see here, this is telling me a 97% match, which means there are only a couple of things that I'll need to fix.
And as you do this more, you'll get an eye for this. For example, here there is the parentheses around the year that are missing. Here you have the quotation marks, and you have the in that's wrong, and so on.
So you can now look at various of these styles and check out the other item types and what looks good. You can also, as you become more experienced, kind of get a sense of which styles might be good matches. So, for example, what I generally think is that the Harvard styles
of the UK universities often have kind of odd features to them. So I don't like working for them for journal styles. So I would probably pick one of these journal styles for political studies
or for history of human sciences and work with them. And so if I click on, say, the political studies, I click on view style, and I can go back to the list. So those things are saved. And I can look at my output, and I can kind of see journal articles look pretty good too. Again, I'll probably need to modify this a little bit,
but this looks fine. As I do this, I obviously prefer styles I've worked with before. And just because I know it better, and it follows my own kind of coding preferences.
Question is, match value is only for the inserted document type. Yes. So we talked about this to the CSL people when they developed, to the Mendeley people or the independent developer, rather, as we developed it, and they felt it was going to be too complex to match on multiple items
at once. So you can do two things. You can do either just do it for one item type and then kind of manually eyeball it for the other item types, or you can do it for multiple item types. So we could kind of note down the first 10 journals and then also do the same thing for journal article.
The problem there is that because we have so many styles, especially if you're kind of generally typical style formats such as this one, chances that there are overlap between the most similar styles for chapters and the most similar styles for journal articles are very small.
So you would kind of be stuck at having to decide anyway. So I usually just match on ones and then kind of look at the top five or 10 styles and kind of manually eyeball, which has the best matching other item types.
And again, book chapter has the advantage. Using book chapter has the advantage that it by far has the most variables moving around, right? You have the in, you have the to, book title and the chapter title. You have the editors in there. You have the publisher in there. So a lot of typical elements are already present in the citation
and fixing them, which involves moving stuff around is most techniques. So that's what I usually do. Also a note, the matching is... I'm just going to go back.
So you see here, right, this has perfect match and 97% match. So one is for the citation, one is for the bibliography. The actual matching percentage that these are ranked by is the average of these two, which for all the date styles
doesn't necessarily make a lot of sense, right? Because if I had a style that was 100% correct here and maybe only 95% correct here because I have a comma missing, that would be a trivially easy change, but it would actually rank lower than these 100%, 97% matches.
So keep that in mind. And if you have, for example, author date styles or if you have numerical styles, it's worth the same matching with different formats. So I could, for example, try the same thing without the comma here
and with a good chance I would get a different set of results. Might as well try this out. Yeah, so see how this now gives me... These aren't actually any better, so in this case it makes no difference,
but see how the top suggestions it gives me are entirely different. There's no overlap between what I had previously because, again, the citation part is counted just as much
as the bibliography part, even though it's much shorter. And as you go into numerical styles, that becomes even more of an issue because there, you know, whether you have it in superscript in a single number or in square brackets or in parentheses is like 30% of the citations.
So there that will make even more of a difference. All right. Let's say we decided we're going to work with the political studies style. And then, you know, if you have two screens,
this is a very useful thing to look at. So you would have the author instructions up on one screen and your example bibliography and citations up here. And now I would just start to go back and forth and modify things.
The first thing that I would actually modify is the title of the journal, right? This was BioSocieties. And now when I save it, as we've seen previously, when I'm going to save it later on,
then it's going to automatically give me the right title and give me the right style ID. If I were planning on submitting this, I would want to also fill in some other things. I would want to fill in the ISSNs. I would want to fill in the documentation. But this is for kind of housekeeping, and it's mainly important if you plan on sharing this style with us,
which is one of the last things I'm going to talk about today. For your purposes, these things don't actually do something in how this style formats items. All right. So what do we recall? The first thing we recall is we did not want to have quotation marks
around our title. We've already seen how to do this, right? They're highlighted here. We don't want them. Uncheck them here. And there we go. Notice you just added a macro which is used in multiple places. This is exactly what I had been talking about earlier with the macros.
One of the nice things about the macros is I make this change once, and it applies to every place where someone wrote, in this case, text macro title. So very convenient, but I do have to be a little bit mindful of the fact that this...
will change the citation in different, in different places. So I want to make sure that my change is mounted in all the places. In this case, this looks great, right? I wanted to change it in the title and in the, for journal articles and for channels.
All right, what other things did we say? We said the in we wanted to change, right? So the in was, if I recall that correctly, was uppercased. Now casing is text case, very easy.
And what we want in this case is just capitalized first. And then it had a suffix right after this. Notice how there is already a space here. And I want to make sure that I put the colon that's in this style before the space, right?
Now I may want to take a look back at my instructions, right, so in capitalized colon, but I want to period here. And this now has a comma. Yeah, there.
All right, now I need to find out where that comma comes from. Presumably it would be in a group somewhere. I can't find it.
All right, and so this is one of the, one of these cases where my tree here on the left will become helpful.
So I can look at this group, for example, which encompasses all of these items. So that might have to delimiter, that's not the case. And oh, I have an idea. Or it could be, I found this earlier on.
So it looks like if I look at the code here, it looks like it should be here. And I don't know why the comma doesn't show up.
If Rinsa is still around, is he faster than me?
I'm getting help here, I think. No, the title doesn't end on a comma, right? We have the comma here everywhere. I'm gonna cheat now.
So obviously once you're used to it, it's actually often easier to read the code than this looks right, this looks right,
this looks right, let's mark the title. Okay, I give up. There it is, I think that's where it is.
I'm gonna try deleting it in here. Did that work? Yeah, it totally works. Okay, well, so I saw the question.
And so now I'd have to go back here
and I found by looking at the code that this is, that the suffix was somewhere around, was here in this group was the suffix, there we go. And now I can change it from the comma
to the period that I want it. And now you see I've got the period. And then the last thing that I remember is that we had a colon in front of the page numbers for the journal article and not the comma. And this in this case is very easy because it just gives me the prefix right here.
That's the colon and this is it. And then this time I won't forget, I would go to style, I would save style. And now the nice thing is because I've edited the title already, it will automatically put the right ID
and save it under the right file name. And I think this is, and there we go.
Language, now let me read the question. Okay, so the question is, we wanna have a style that's in Spanish instead of English.
And the things that that affects is, right, do we have editos or do we have whatever, however, editores or directores is changed in Spanish? Do we have and or do we have e, what we would have in Spanish? And one of the things where CSL is actually,
like many open source projects is really strong is in internationalization because it's, we can kind of draw on our large international group of users to supply those translations for us. So CSL actually works in, I don't know the exact number,
but in more than 30 different languages. And where I changed this is in the global formatting options. So you notice how this style, because it was for a specific journal, actually has what we call a locale. So this is under global formatting options all the way down, default locale,
has what we call a default locale set. So no matter what your general preferences for the language of your reference manager and of your citations is, this style will always display with English localization, but very easy to change.
If I just remove this, this will stay in English because the default, the basic locale on which the visual editor built is also English, although it might be US English, couple of small differences. But if we want to, for example, have that in Spanish,
we look, we would just put in two, nope, that's the wrong one. It's Espanol, we would put in the language code here
and you can either just use the two lowercase letters. Those are ISO language codes. So it's yes for Spanish, FR for French, D for German. There is a whole list of all the ones that we have.
Maybe Rince can, great. Rince just for everyone, posted the whole set of languages that we have support and that will also give you the corresponding language codes. So we can just do the two letter language codes and for Spanish, that's perfectly fine,
but there are actually a couple of differences. So we could do Spanish from Spain, or I think we have a separate Chilean version or something like that in there that has a couple of differences that are more complicated, but for some reason that didn't, is it not SP?
It's Spanish from Spain, that's it. Yeah, so look this up, it's sensitive. And now we see this has switched to the E and Eridores doesn't have an accent, so that's the same.
But if I, for example, switch this to something like German, you'll see the German Herausgeber here and the German one, if I switch this to French. And it does have the accent and we have the word.
And you get the sense, and this affects all the terms that we're using, so if we were, for example, to addition or any of the other various terms that are available, those would all get auto translated. In your reference managers of choice,
and I only know this for Zotero and Mendeley, in your reference manager of choice, you can, in Zotero, select the language in your word processor add-on for all styles that don't have a default locale set. So we have a bunch of generic styles,
CSL, generic styles like Chicago Manual, Vancouver, APA. And for those, you can decide on the language in the word processor. Mendeley actually has this implemented that not only can you change the language for styles
without a default locale, but you can actually overwrite the default locale for styles. But the effect is relatively similar. You can actually choose your language for styles without setting the default locale.
Now, Sebastian is asking, can we force, can CSL processes auto-format links? And that's not currently possible. So the idea is that you would turn something into a clickable link.
And yeah, the answer is that it's not possible in the site proc JS's and the implementations that I currently know. I believe it is possible for the site proc
that's implemented in Pandoc that does that automatically. Pandoc is like a little tool that lets you convert files into all types of different formats, like PDFs or text or whatever. They, I think, have that implemented.
I guess, yeah. I don't know how much the plans are. I think one position would be that this is something that might be nicer to put into post-processing. So if you send an article to a journal, of course, that's one of the things that they do automatically. You give them the DOI and they run it
through their publishing system and it turns into a publishable DOI. Clickable URLs also in Word, I think you can just run auto-formatting over the created bibliography with the settings
to make things clickable. I don't know exactly what that's called. That will automatically make those clickable, but it's not something that the site procs themselves, or, well, the most common site proc, which is the JavaScript site proc that's also underlying this guy, is useful.
Okay, and I suppose with that, I'm actually at kind of the end of my basic stuff anyway and so I can answer more general questions if there are any more now. Or anything you would want me to repeat, do again.
We still have about 10 minutes time, a little bit more if we want to compensate for time lost in the beginning.
Wait a moment, I can keep talking, of course. There's never an end to how much can be said. So one thing that often confuses people as they added styles is if you search by name,
so there's, if you have a journal like this, you see this label, free biotech is the journal, and then it says, same as Springer basic author date.
And this is what we call a dependent style. So if you look at the style, and if you look at the code, it's actually, you see it doesn't have any information on how to format things. The only thing that it does is this link to another style,
what we will call the independent or parent style. And so if you wanted to change how this looks, you would actually follow the link to this style. So you would go back and follow the link to this style and modify that. So again, this is what we call the dependent styles.
And the idea is here that people may not actually know that free biotech follows, the style we call Springer author basic. So we make it easier for people to find the style for the journal they want to publish. We actually, Brinson might know the exact numbers, but roughly we have about 1100 different styles
in the available for CSL currently. And we have on top of that about 7,000 dependent styles and Brinson just pasted the link to the exact current count.
I'm still, again, you're not interrupting me, but I will keep talking as long as I'm not getting questions. One other thing that I should point to,
or a couple of other things that I should point to, if you go back to the web link list, so I mentioned the field maps for Zotero and for Mendeley. If you want to look at the exact specifications
of what does variables do, how do they work exactly? The CSL specifications is both the official and the comprehensive specification of the language. So you can look at any detail of the language.
Everything that CSL can do is defined there. If you get more into this, I have on my block written up a little bit of advice that's mostly oriented to people who are actually coding in the XML themselves, but you can apply the same advice to the visual editor.
And that mainly concerns in how to use macros, how to use group efficiently to write styles that are clean, that are robust. And by robust, I mean, how well do they cope with missing variables and things like that. And then the last thing, of course,
is if you have a style that you think will be useful to other people, and that certainly includes anything that is for a journal or for a university or anything, we have guidelines for how to contribute to open source projects. I mean, if you look at them,
there are very detailed step-by-step instructions. Don't let the fact that they're relatively long. Until the day we just try to make them as explicit as possible so that someone who has never seen or worked with GitHub
or has any experience contributing to open source projects will just have to read those and follow through. And if you run into any problems, both Rensa and I and often Philip too will be there to help you out. And yeah, of course, if you do create something,
it's great for us to make this more styles available. And it's kind of cool for you to have created something that then hundreds of thousands of other people have access to and thousands of other people. So yeah, you're open source contributing.
All right. Maybe you can mention where one can get more help if there are maybe also other questions
kind of after this webinar and what possibilities are there to reach out for more help. Great, yes, thank you. So yeah, as you do this yourself, you'll probably have a very good chance you'll run into snags.
And the main place that we do help people is the Zotero forums. Again, the history of that is Zotero were the first folks to implement CSL. So that's since we don't wanna run our own forum, where help takes place. And that includes if you're working with a different reference manager,
as long as you're having CSL issues or questions, you can ask them there. The only thing that we do ask is that unless you tell us otherwise, we're gonna assume that you're using Zotero. So please do mention I'm using papers, I'm using Mendeley and then describe your CSL issue because they are, well, they're very similar
and it is a standard. So mostly the issues are exactly the same. There are slight differences between the two. So it can be a huge waste of time if you're trying to troubleshoot something in Zotero that's actually a problem in Mendeley.
Yeah, so the Zotero forums would be the main place to get help. And so as you're contributing, I think Rensa gives you a nice example of how that might work.
Yeah, so ideally, please don't email us because Rensa and I are doing this as a kind of extensive hobby. And so we just can't do email support for the CSL, understand?
Okay, great. And we're at 10.30. Apparently I spoke a little faster to make up for this time yesterday. So unless there are further questions, I'm gonna thank you all for sticking around and to thank again, Philip and Konstantin
for putting this together. Yeah, Sebastian, thank you very much for the nice presentation here also in the English and for there to be a very on time now. You can now work further in the morning.
Here it's in the evening and we can think about what to do in the evening. So thank you very much for giving this presentation here in the webinar and I think all of us enjoyed it really to see the information and how to do the coding,
the styling of the citation styles. Thank you.