supperscript in ordinal form of edition

edited April 12, 2017
@Rintze Is any way to write letters "nd" in "2nd edition" by superscript?

EDIT: I've found a way by new terms definition
<term name="ordinal">&#7511;&#688;</term>
<term name="ordinal-01">&#738;&#7511;</term>
<term name="ordinal-02">&#8319;&#7496;</term>
<term name="ordinal-03">&#691;&#7496;</term>
<term name="ordinal-11">&#7511;&#688;</term>
<term name="ordinal-12">&#7511;&#688;</term>
<term name="ordinal-13">&#7511;&#688;</term>

But i think, it is not the best way, because, theoreticaly, the ordinal form can be used in diferent part of reference in a different form.
  • edited April 13, 2017
    But i think, it is not the best way, because, theoreticaly, the ordinal form can be used in diferent part of reference in a different form.
    Can you elaborate ?

    (@Rintze: I didn't find a link to on, I found it because I remembered it was on ReadTheDocs)
  • I see two potential solutions of "the ordinal form can be used in different part of reference in a different form".The first way is based on three definitions of ordinal terms, one for normal align, one for superscripted form and one for subscripted form. In my opinion, the better way is to specify "vertical-align" only for ordinal suffixes, because it creates a possibility to have ordinal suffixes in the sub/superscripted form in one part of bibliography and normal form in another part of bibliography. But I think, it is not possible in the current version of CSL. @Rintze: Could you add vertical aligning of ordinal suffixes to the CSL Specification in some new version of the specification? @fbennett: Maybe it will be necessary to create some developments in citeproc processor.
  • My question should have been: why would you need "a possibility to have ordinal suffixes in the sub/superscripted form in one part of bibliography and normal form in another part of bibliography. "? Have you seen this inconsistent requirement in a style/guide?
  • @LliborA What is the use case? If these ordinals are numbers formatted by the style, you can just use vertical-align (by wrapping the cs:text term in a group), I think. If they are embedded in titles and the like, there is a serious question over whether a CSL processor should tamper with them.
  • @Gracile I do not know any style/journal with this requirement. Now, it is only theoretical level.
    @fbennett In the current version, I cannot get ordinals number in form "2nd" where only "nd" is superscripted through the vertical-align, or I do not know the correct code. Now I use:
    <number variable="edition" form="ordinal"/>
  • Ah, yes of course, my apologies. There is indeed no way of controlling the superscripting of an ordinal suffix separately from the number. I guess that brings us to @Gracile's question.
  • Yes, I agree that different form of ordinals in one style is very unlikely. On another side, I can say, that "vertical-align-ordinal-suffixes" is more user-friendly than creating a new definition of terms with obscure UTF codes in decimal or hexadecimal form.
  • I agree that if there were a demand for such forms, that they should be handled by a specific parameter (that can be specified in the style header if needed). But do any styles require non-standard aligned ordinal suffixes?
  • I mean -- 2ⁿᵈ is a common requirement, yes. It's the combination of 2ⁿᵈ and 2nd in a single style that I'm not seeing.

    I'm also not loving the UTF character solution -- I'm a bit worried about font coverage -- but having tested this in Word, it seems to work fine across all fonts I checked and it does have the advantage of being very simple.
  • I don't like that the UTF solution is rather opaque to CSL style writers. A vertical-align-ordinal-suffixes parameter, while potentially ugly, is very clear.
  • or we could allow vertical-align in locales?
  • I think that vertical align of locales is possible by wrapping the cs:text term in a group in generally, isn't it? Only numbers in ordinal form are problematic, or I am wrong?
  • You can apply text-formatting to any cs:text element, yes, but you can't include it in the locale. I think that only affects ordinals since they aren't used with a separate cs:text or cs:label term (technically I think it'd affect "and", too, though I don't expect that to ever be needed), but if we're going to allow it, we'd probably allow it everywhere.
  • ah -- so that takes care of the font coverage issue. Nice.
  • The history of this has slowly come back into focus while following this thread.

    I think my first solution was just to use the raw characters, but several people pointed out problems with font coverage. Then I suggested using escaped HTML markup in the term def, but that klutsy hack was firmly nixed by @bdarcus. The internal transform was how I tried to thread the needle, covering the use case while adhering to standards and best practice in style code, but avoiding a formal extension to the CSL spec.
  • edited April 15, 2017
    I actually think this may be the nicest solution. I'm okay with ensuring font coverage for cases like this being on the processor implementations.
  • edited August 10, 2017
    I was wondering if codes would work for French style where superscript is used in several places: plural of nº (numéro) needs a superscript s after the o; ordinal e (as in first) needs to be superscripted as well. If it would work, where would I get the list of codes?
  • Yes, all of the Unicode superscripted characters should be recognized.
  • edited August 16, 2017
    I can't seem to get the letters in superscript even with the codes. Can someone help me with an example of script? Where and how to use the ?

    I found code 02E2; 0073 # s is supposed to give superscripted s, but don't know how to write that in actual code.
  • I'm not exactly sure what you're trying to do. The superscripts are already implemented in the French locale both for ordinals:
    and for the short issue term:
  • Thank you so much adamsmith, that is exactly what I needed. It all works perfectly now.
  • Adamsmith, for some reason, I seem to have the plural form even when there is only one number in the series. Can you think of what I might have done wrong?
  • for which term?
  • for the term=issue, now, whether the issue in the Zotero field is 1 or whether it is 1-2, I get nos, instead of no 1 and nos 1-2
Sign In or Register to comment.