Testing and rendering title-short

Hi everyone,

An issue has come up on the Zotero forums that we’ve traced back to a
possible misunderstanding of the operation of the title-short variable, and
need some guidance.

Here’s the forum thread (the text of my diagnostic note is in this mail,
below):

Okay, here’s what’s happening.

The title-short variable is used in the subsequent reference. Currently,
title-short is set from the Short Title field, so if that field is empty,
you get nothing in the output. They style can be fixed by testing for
variable=“title-short”, and rendering “title” if it is not available.

However …

This behaviour is arguably wrong on the CSL 1.0.1 specification, which
defines the term this way:

title-shortshort/abbreviated form of “title” (also accessible through the
“short” form of the “title” variable)
If the form is used, and no value is
set in the Short Title field, you get the Title field value instead, as a
fallback. Arguably, title-short should behave in the same way.

But …

One of the reasons title-short was introduced in the first place was to
allow testing for the presence of a value in the Short Title field (which
isn’t possible unless there is a first-class CSL variable attached to it).

It’s clear that title-short should test false if Short Title is empty. I’m
not sure whether it should also fall back to the value of the Title field
when an attempt is made to render it; the specification does not say so
explicitly, and it’s a bit of a stretch to read the language above in that
way.

I’ll write to the CSL dev list (xbiblio-devel) for guidance. Meanwhile, the
style can be fixed by testing for title-short, and explicitly calling the
title field when it shows false.


So … is it okay to just treat this variable as an ordinary field that
renders nothing if it is empty? Or should it fall back to title?

Frank

I’m convinced the current citeproc-js processor behavior is correct and in
line with the specs. title-short should return nothing if the corresponding
field is emtpy. If the user wants a fallback they can use title form=“short”

I’m convinced the current citeproc-js processor behavior is correct and in
line with the specs. title-short should return nothing if the corresponding
field is emtpy. If the user wants a fallback they can use title form=“short”

Music to my ears. :slight_smile:

Agreed.

Hello,

Yes, « title-short » should return nothing if the field is empty.

But…

I may add that variable=“title” form=“short” doesn’t work for legal_case. I don’t know if it’s on purpose of not, but it seems to be the only entry type with this config.

For now, I test title-short and display variable=“title” if it’s empty, but a working variable=“title” form=“short” would be for the best! I’m using Zotero 4.0.11. I don’t know if it’s in Zotero or Citeproc-js. I checked the code, but didn’t saw a difference between case and others entry type :frowning:

Florian

CAJgpGgAX23+OwgHwjTnnarKKMzh4Hq3uAWqsJbVWuLLPuodznA@mail.gmail.com
Content-Type: text/plain; charset=3D"utf-8"

Hi everyone,

An issue has come up on the Zotero forums that we’ve traced back to a
possible misunderstanding of the operation of the title-short variable, =
and
need some guidance.

Here’s the forum thread (the text of my diagnostic note is in this mail,
below):=


-legal-citation/#Item_8


Okay, here’s what’s happening.

The title-short variable is used in the subsequent reference. Currently,
title-short is set from the Short Title field, so if that field is =
empty,
you get nothing in the output. They style can be fixed by testing for
variable=3D"title-short", and rendering “title” if it is not available.

However …

This behaviour is arguably wrong on the CSL 1.0.1 specification, which
defines the term this way:

title-shortshort/abbreviated form of “title” (also accessible through =
the
“short” form of the “title” variable)
If the form <text variable=3D"title" form=3D"short"/> is used, and no =
value is
set in the Short Title field, you get the Title field value instead, as =
a
fallback. Arguably, title-short should behave in the same way.

But …

One of the reasons title-short was introduced in the first place was to
allow testing for the presence of a value in the Short Title field =
(which
isn’t possible unless there is a first-class CSL variable attached to =
it).

It’s clear that title-short should test false if Short Title is empty. =
I’m
not sure whether it should also fall back to the value of the Title =
field
when an attempt is made to render it; the specification does not say so
explicitly, and it’s a bit of a stretch to read the language above in =
that
way.

I’ll write to the CSL dev list (xbiblio-devel) for guidance. Meanwhile, =
the
style can be fixed by testing for title-short, and explicitly calling =
the
title field when it shows false.


So … is it okay to just treat this variable as an ordinary field that
renders nothing if it is empty? Or should it fall back to title?

Frank
-------------- next part --------------
An HTML attachment was scrubbed…


Hello,

Yes, « title-short » should return nothing if the field is empty.

But…

I may add that variable=“title” form=“short” doesn’t work for legal_case. I
don’t know if it’s on purpose of not, but it seems to be the only entry
type with this config.

For now, I test title-short and display variable=“title” if it’s empty,
but a working variable=“title” form=“short” would be for the best! I’m
using Zotero 4.0.11. I don’t know if it’s in Zotero or Citeproc-js. I
checked the code, but didn’t saw a difference between case and others entry
type :frowning:

Florian

Yes, citeproc-js is doing that on purpose. I’ll have to go back through the
use cases that brought it into that condition, but it’s very likely that
this can be smoothed out. When I dig into it, I’ll document the behaviour.
Sorry about the inconvenience: legal support seems to be pretty much
feature complete now, it should be mostly bug fixes and documentation from
here out.

Frank

Hello,

Yes, « title-short » should return nothing if the field is empty.

But…

I may add that variable=“title” form=“short” doesn’t work for legal_case. I
don’t know if it’s on purpose of not, but it seems to be the only entry
type with this config.

For now, I test title-short and display variable=“title” if it’s empty,
but a working variable=“title” form=“short” would be for the best! I’m
using Zotero 4.0.11. I don’t know if it’s in Zotero or Citeproc-js. I
checked the code, but didn’t saw a difference between case and others entry
type :frowning:

Florian

Yes, citeproc-js is doing that on purpose. I’ll have to go back through
the use cases that brought it into that condition, but it’s very likely
that this can be smoothed out. When I dig into it, I’ll document the
behaviour. Sorry about the inconvenience: legal support seems to be pretty
much feature complete now, it should be mostly bug fixes and documentation
from here out.

That was quick. It’s come back into focus. :slight_smile: This is a not-good solution
to a problem that can better be solved in another way.

The Bluebook rules for US law require abbreviation of a large list of
random terms in certain fields: the title field of legal_case (in English,
I guess); and institutional authors (everywhere, I guess, and for English
only, I guess – the rules are not clearly stated, but that’s what the
guidance note seems to say. At the same time, subsequent references should
use a short form of the title (i.e. the actual value in title-short, also
with abbreviations applied).

I’m currently handling these requirements by making form=“short” mean “call
the abbreviation list, but use title-short only if it is explicitly
requested” on the legal_case type only (and, I think, on institutional
authors). Hence the behaviour that you are seeing.

Forcing this implicitly is confusing, obviously, and in any case it doesn’t
make sense to be impose a special coding burden on styles that don’t get
any benefit from it. I should be distinguishing between “apply
abbreviations” and “render the short form” with some sort of explicit
markup in the CSL-m styles, but for the present I’ll see to it that this
gets disabled outside of the MLZ reference manager.

Thanks for raising this – I thought it was disabled outside of MLZ, so
I’m glad to correct it.

Frank

OK thanks !

Florian

Hello,

Yes, « title-short » should return nothing if the field is empty.

But…

I may add that variable=“title” form=“short” doesn’t work for legal_case. I
don’t know if it’s on purpose of not, but it seems to be the only entry
type with this config.

For now, I test title-short and display variable=“title” if it’s empty,
but a working variable=“title” form=“short” would be for the best! I’m
using Zotero 4.0.11. I don’t know if it’s in Zotero or Citeproc-js. I
checked the code, but didn’t saw a difference between case and others entry
type :frowning:

Florian

Yes, citeproc-js is doing that on purpose. I’ll have to go back through
the use cases that brought it into that condition, but it’s very likely
that this can be smoothed out. When I dig into it, I’ll document the
behaviour. Sorry about the inconvenience: legal support seems to be pretty
much feature complete now, it should be mostly bug fixes and documentation
from here out.

That was quick. It’s come back into focus. :slight_smile: This is a not-good solution
to a problem that can better be solved in another way.

The Bluebook rules for US law require abbreviation of a large list of
random terms in certain fields: the title field of legal_case (in English,
I guess); and institutional authors (everywhere, I guess, and for English
only, I guess – the rules are not clearly stated, but that’s what the
guidance note seems to say. At the same time, subsequent references should
use a short form of the title (i.e. the actual value in title-short, also
with abbreviations applied).

I’m currently handling these requirements by making form=“short” mean “call
the abbreviation list, but use title-short only if it is explicitly
requested” on the legal_case type only (and, I think, on institutional
authors). Hence the behaviour that you are seeing.

Forcing this implicitly is confusing, obviously, and in any case it doesn’t
make sense to be impose a special coding burden on styles that don’t get
any benefit from it. I should be distinguishing between “apply
abbreviations” and “render the short form” with some sort of explicit
markup in the CSL-m styles, but for the present I’ll see to it that this
gets disabled outside of the MLZ reference manager.

Thanks for raising this – I thought it was disabled outside of MLZ, so
I’m glad to correct it.

Frank

OK thanks !

Florian

Hello,

Yes, « title-short » should return nothing if the field is empty.

But…

I may add that variable=“title” form=“short” doesn’t work for
legal_case. I
don’t know if it’s on purpose of not, but it seems to be the only entry
type with this config.

For now, I test title-short and display variable=“title” if it’s empty,
but a working variable=“title” form=“short” would be for the best! I’m
using Zotero 4.0.11. I don’t know if it’s in Zotero or Citeproc-js. I
checked the code, but didn’t saw a difference between case and others
entry
type :frowning:

Florian

Yes, citeproc-js is doing that on purpose. I’ll have to go back through
the use cases that brought it into that condition, but it’s very likely
that this can be smoothed out. When I dig into it, I’ll document the
behaviour. Sorry about the inconvenience: legal support seems to be
pretty
much feature complete now, it should be mostly bug fixes and
documentation
from here out.

That was quick. It’s come back into focus. :slight_smile: This is a not-good solution
to a problem that can better be solved in another way.

The Bluebook rules for US law require abbreviation of a large list of
random terms in certain fields: the title field of legal_case (in English,
I guess); and institutional authors (everywhere, I guess, and for English
only, I guess – the rules are not clearly stated, but that’s what the
guidance note seems to say. At the same time, subsequent references should
use a short form of the title (i.e. the actual value in title-short, also
with abbreviations applied).

I’m currently handling these requirements by making form=“short” mean “call
the abbreviation list, but use title-short only if it is explicitly
requested” on the legal_case type only (and, I think, on institutional
authors). Hence the behaviour that you are seeing.

Forcing this implicitly is confusing, obviously, and in any case it doesn’t
make sense to be impose a special coding burden on styles that don’t get
any benefit from it. I should be distinguishing between “apply
abbreviations” and “render the short form” with some sort of explicit
markup in the CSL-m styles, but for the present I’ll see to it that this
gets disabled outside of the MLZ reference manager.

Thanks for raising this – I thought it was disabled outside of MLZ, so
I’m glad to correct it.

Frank

I’ve pushed a version update to the citeproc-js source repo that should fix
this on non-MLZ systems with non-CSL-m styles.

https://bitbucket.org/fbennett/citeproc-js/commits/98e36f0c36d0

Frank

Yes. “title-short” is a regular variable, and regular variables don’t do
fallback.

RintzeOn Mon, Nov 4, 2013 at 2:49 AM, Charles Parnot <@Charles_Parnot>wrote: