inukshuk / citeproc-ruby

A Citation Style Language (CSL) Cite Processor
101 stars 22 forks source link

Superscripts produce invalid CSS #45

Closed fallax closed 7 years ago

fallax commented 7 years ago

Numeric CSL styles which format the citation number with superscript seem to contain something like this:

<citation collapse="citation-number">
    <sort>
      <key variable="citation-number"/>
    </sort>
    <layout delimiter="," vertical-align="sup">
      <text variable="citation-number"/>
    </layout>
  </citation>

citeproc-ruby outputs the "sup" part directly into the HTML - but "vertical-align: sup" is invalid CSS (it should be "vertical-align: super" instead). As a result, the rendered HTML displays without any superscript formatting.

The CSL spec seems to suggest that "vertical-align: sup" is the correct CSL (even if it is wrong in CSS).

Perhaps citeproc-ruby should be detecting this and outputting "vertical-align: super" instead?

There is currently also a test checking this behaviour.

inukshuk commented 7 years ago

You're absolutely right, thanks!

Fixed in 1.1.7