#Superfluous comma

42 messages · Page 1 of 1 (latest)

formal lake
#

Why is the comma inserted after the name?

#bibliography("bib.yaml")

#let vgl(entry) = {
  return [(vgl. #cite(entry, form: "author") #cite(entry, form: "year"))]
}

#vgl(<harry>)
// Output: (vgl. J. K. Rowling, 2003)
wintry patio
#

Adjacent citations are merged together. This is really a misuse of cite, and the correct way would be to pick a citation style that already looks like what you want (or edit the CSL).

#

But @tranquil obsidian may want to weigh in

formal lake
#

Thanks! What if my regular citation style is (Author Year) and I explicitly want (vgl. Author Year) in the Text?

wintry patio
formal lake
#

So, can I define my own style, e.g. "vgl" in a CSL and use #cite(<harry>, form="vgl")?

wintry patio
#

Arguably it's a bit clunky that customization has to happen in CSL, but it is what it is.

formal lake
#

Good to know, thanks. It might make sense to not only have supplement (which is basically a suffix) but also something like prefix

formal lake
#

Also, stating in the docs that the possible form values are defined in the CSL might be helpful, though it might seem obvious to some people.

tranquil obsidian
#

CSL doesn't really have a concept that maps 1-1 on this

#

The forms are built into hayagriva, our CSL processor

formal lake
#

Huh, then what would be the most idiomatic solution for my use case?

tranquil obsidian
#

I think maybe the terms form and style are intermingled here?

#

You can define your own CSL style and do #set cite(style: "mystyle.csl")

formal lake
#

Sorry for mixing up the terms. However, the point still stands: How can I have a regular #cite which outputs (Author Year) and a nice way to get (vgl. Author Year)?

wintry patio
#

By doing what was described in the last message

formal lake
#

But @tranquil obsidian just wrote that form is not defined in the CSL? I'm confused

wintry patio
#

The default form is what the CSL spits out

#

What you want to change is the style, not the form

#

(I didn't notice that you wrote form earlier)

formal lake
#

I still don't see how I can have both version of citation in one CSL file (since form is apparently not customizable) and use them convienently in the text

wintry patio
#

You can't have them both in one CSL file. You would use two different ones

formal lake
#

So everytime I want vgl. in my text I have to switch the entire cite style?

next pike
#

You could also let vgl(..args) = [vgl. #cite(..args)]

wintry patio
#

Well, it would be as easy as #let citev = cite.with(style: "vgl.csl")

wintry patio
next pike
#

oh, well then yeah I guess

wintry patio
#

(I meant to add an extra letter at the end)

formal lake
wintry patio
#

I can't type today

formal lake
#

Alright. Thank you very much everyone 🙂

#

(The automatic comma between adjacent cites still bugs me for some reason)

#

If I want a comma, I write a comma

wintry patio
formal lake
#

Ooh, that is interesting!

wintry patio
#

Its to be able to merge them like [1-3, 6, 9] etc

formal lake
#

Makes sense, I guess

#

Much appreciated, @wintry patio 🙂