# "title-short" vs shortTitle

**URL:** <https://discourse.citationstyles.org/t/title-short-vs-shorttitle/1515>\
**Category:** CSL Development\
**Created:** [March 20, 2019, 8:23am UTC](https://discourse.citationstyles.org/t/title-short-vs-shorttitle/1515 "2019-03-20T08:23:29Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![PaulStanley](https://avatars.discourse-cdn.com/v4/letter/p/e19b73/32.png) [@PaulStanley](https://discourse.citationstyles.org/u/PaulStanley)\
**Post date:** [March 20, 2019, 8:23am UTC](https://discourse.citationstyles.org/t/title-short-vs-shorttitle/1515/1 "2019-03-20T08:23:29Z")

</div>

I have what may be a rather dumb question. I’m trying to understand short titles. The spec says, in discussing `cs:text` renderers:

> `variable` - renders the text contents of a variable. Attribute value must be one of the [standard variables](http://docs.citationstyles.org/en/1.0.1/specification.html#standard-variables). May be accompanied by the `form` attribute to select the “long” (default) or “short” form of a variable (e.g. the full or short title). If the “short” form is selected but unavailable, the “long” form is rendered instead.

And under variables,

> title-short  
> short/abbreviated form of “title” (also accessible through the “short” form of the “title” variable)

However, if one implements that behaviour, at least naively, then this test fails:

```
"container-title": "my container title", 
    "id": "ITEM-1", 
    "shortTitle": "something", 
    "type": "manuscript" 

```

So it looks as if citeproc-js is using `shortTitle` as an input field, at least in JSON.

One possibility would be that for whatever reason `citeproc-js` calls `title-short` `shortTitle` in json input, in which case one could simply remap `shortTitle` → `title-short` on input and be done. However, I’m doubtful about this. Googling throws up some old questions that suggest that something more is going on here (my guess is that it’s supposed to set `title-short` only after `title` has been rendered at least once, but really that’s a guess). I can’t find `shortTitle` referred to in the CSL spec.

I guess I have two questions: First, what’s happening: what is the intended behavior here (and where is it documented)? Second, if there is some undocumented behavior involving `shortTitle`, should a standards-compliant processor implement it, or should it be regarded as a `citeproc-js` oddity? In practical terms I suspect that depends on whether it’s behavior that styles “in the wild” rely on significantly (I understand “standards-compliant” pragmatically rather than religiously).

---

<div class="post-metadata">

**Author:** ![Sebastian\_Karcher](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/sebastian_karcher/32/176_2.png) [@Sebastian\_Karcher](https://discourse.citationstyles.org/u/Sebastian_Karcher)\
**Post date:** [March 20, 2019, 8:50am UTC](https://discourse.citationstyles.org/t/title-short-vs-shorttitle/1515/2 "2019-03-20T08:50:39Z")

</div>

This seems like a citeproc-js oddity to work with Zotero output. I don’t actually know why Zotero exports short title to `titleShort` to CSL JSON (it’s how the field is referred to internally in Zotero), but it does. @Frank_Bennett – do you have any insight on this?

---

<div class="post-metadata">

**Author:** ![PaulStanley](https://avatars.discourse-cdn.com/v4/letter/p/e19b73/32.png) [@PaulStanley](https://discourse.citationstyles.org/u/PaulStanley)\
**Post date:** [March 20, 2019, 9:51am UTC](https://discourse.citationstyles.org/t/title-short-vs-shorttitle/1515/3 "2019-03-20T09:51:12Z")

</div>

Thanks. If that’s so, then the “fix” is simply to translate zotero-generated `shortTitle` fields to canonical `title-short` fields on input, which would be gratifyingly (and surprisingly) simple.

---

<div class="post-metadata">

**Author:** ![Frank\_Bennett](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/frank_bennett/32/198_2.png) [@Frank\_Bennett](https://discourse.citationstyles.org/u/Frank_Bennett)\
**Post date:** [March 20, 2019, 12:14pm UTC](https://discourse.citationstyles.org/t/title-short-vs-shorttitle/1515/4 "2019-03-20T12:14:03Z")

</div>

It’s definitely a citeproc-js oddity. I thing I hacked that variable in before title-short arrived in the CSL spec. In current citeproc-js, it should work to map the value to title-short before input. If that’s not the case, raise the alarm and I can fix things; but the intention all around is to ease titleShort out of service, I think.

---

<div class="post-metadata">

**Author:** ![PaulStanley](https://avatars.discourse-cdn.com/v4/letter/p/e19b73/32.png) [@PaulStanley](https://discourse.citationstyles.org/u/PaulStanley)\
**Post date:** [March 20, 2019, 12:20pm UTC](https://discourse.citationstyles.org/t/title-short-vs-shorttitle/1515/5 "2019-03-20T12:20:33Z")

</div>

Thanks. I’ve no reason to think it’s not working in citeproc-js: the “fix” i was referring to was in relation to a new processor. Sounds like I can either change the test input, or if I want to be generous in handling input map `shortTitle` directly to `title-short` on import, neither of which is a big deal. (The tests are invaluable, but judgement is sometimes needed when deciding whether a failure of a citeproc-js test is necessarily significant.)

---

<div class="post-metadata">

**Author:** ![Frank\_Bennett](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/frank_bennett/32/198_2.png) [@Frank\_Bennett](https://discourse.citationstyles.org/u/Frank_Bennett)\
**Post date:** [March 20, 2019, 12:50pm UTC](https://discourse.citationstyles.org/t/title-short-vs-shorttitle/1515/6 "2019-03-20T12:50:44Z")

</div>

Oh, right, thanks for prompting again on that - I see that shortTitle is all over the place in the test suite. If there are no objections from anyone, would be happy to change those to title-short fields, for clarity.

---

<div class="post-metadata">

**Author:** ![Frank\_Bennett](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/frank_bennett/32/198_2.png) [@Frank\_Bennett](https://discourse.citationstyles.org/u/Frank_Bennett)\
**Post date:** [March 20, 2019, 1:06pm UTC](https://discourse.citationstyles.org/t/title-short-vs-shorttitle/1515/7 "2019-03-20T13:06:55Z")

</div>

Seems the right thing, so I went ahead and pushed that change.

---

<div class="post-metadata">

**Author:** ![Sebastian\_Karcher](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/sebastian_karcher/32/176_2.png) [@Sebastian\_Karcher](https://discourse.citationstyles.org/u/Sebastian_Karcher)\
**Post date:** [March 20, 2019, 1:11pm UTC](https://discourse.citationstyles.org/t/title-short-vs-shorttitle/1515/8 "2019-03-20T13:11:22Z")

</div>

Generally OK but we’d want to fix Zotero’s CSL JSON export at the same time.

---

<div class="post-metadata">

**Author:** ![Frank\_Bennett](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/frank_bennett/32/198_2.png) [@Frank\_Bennett](https://discourse.citationstyles.org/u/Frank_Bennett)\
**Post date:** [March 20, 2019, 1:17pm UTC](https://discourse.citationstyles.org/t/title-short-vs-shorttitle/1515/9 "2019-03-20T13:17:15Z")

</div>

It doesn’t affect the processor at all, it will accept either input; but the tests should use variables that are in the schema. Everything still passes after the change, so Zotero have assurance that it will be safe at their end, if they move to make the change.

---

<div class="post-metadata">

**Author:** ![Frank\_Bennett](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/frank_bennett/32/198_2.png) [@Frank\_Bennett](https://discourse.citationstyles.org/u/Frank_Bennett)\
**Post date:** [April 3, 2019, 11:13am UTC](https://discourse.citationstyles.org/t/title-short-vs-shorttitle/1515/10 "2019-04-03T11:13:39Z")

</div>

Oops, I take that back! Today in Jurism development we encountered an issue involving language variant fallbacks in `title-short`, and one source of trouble was exactly the use of `shortTitle` in Zotero’s `itemToCSLJSON`. I’ve worked through the small changes needed to shift Zotero to using `title-short` instead, without breaking imports of legacy data. When I get done with the Jurism end and have time to adapt the code to Zotero and prepare tests to back it up, I’ll file a pull request.

---

<div class="post-metadata">

**Author:** ![Frank\_Bennett](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/frank_bennett/32/198_2.png) [@Frank\_Bennett](https://discourse.citationstyles.org/u/Frank_Bennett)\
**Post date:** [April 4, 2019, 7:46pm UTC](https://discourse.citationstyles.org/t/title-short-vs-shorttitle/1515/11 "2019-04-04T19:46:59Z")

</div>

The deed is done.

> <https://github.com/zotero/zotero/pull/1677>
