relaton / relaton-bipm

MIT License
2 stars 0 forks source link

Faulty titles in BIPM Metrologia references #37

Closed anermina closed 1 year ago

anermina commented 1 year ago

Fetched titles of several BIPM Metrologia references include less and greater parameters.

bundle exec relaton fetch "BIPM Metrologia 55 1 L13"

<bibdata type="article">
  <fetched>2022-09-19</fetched>
  <title type="title-main" format="text/plain" language="en" script="Latn">The {CODATA} 2017 values of$\less$i$\greater$h$\less$/i$\greater$,$\less$i$\greater$e$\less$/i$\greater$,$\less$i$\greater$k$\less$/i$\greater$, and$\less$i$\greater$N$\less$/i$\greater$$\less$sub$\greater$A$\less$/sub$\greater$for the revision of the {SI}</title>
  <title type="main" format="text/plain" language="en" script="Latn">The {CODATA} 2017 values of$\less$i$\greater$h$\less$/i$\greater$,$\less$i$\greater$e$\less$/i$\greater$,$\less$i$\greater$k$\less$/i$\greater$, and$\less$i$\greater$N$\less$/i$\greater$$\less$sub$\greater$A$\less$/sub$\greater$for the revision of the {SI}</title>
  <uri type="src">https://iopscience.iop.org/article/10.1088/1681-7575/aa950a</uri>
  <uri type="doi">https://doi.org/10.1088/1681-7575/aa950a</uri>

Therefore, we don't get the correct rendering of those references: image

ronaldtse commented 1 year ago

Thank you @anermina for spotting this! This is the first instance where we needed to have math inside titles and abstracts. This will require a change in the Relaton data model for support, which will require us to adopt a series of downstream changes.

andrew2net commented 1 year ago

@ronaldtse title has a format option. We can use text/html format and have title with HTML content.

andrew2net commented 1 year ago

fixed in relaton-bib v1.13.8 and relaton-bipm v1.13.8

opoudjis commented 1 year ago

Of course, Metanorma expects content to be marked up in Metanorma, @andrew2net if there a Metanorma option on the titles? If not, I'll need to implement an HTML to Metanorma translator my side.

ronaldtse commented 1 year ago

I do not think HTML is a solution. This is LaTeX math in the title.

ronaldtse commented 1 year ago

If not, I'll need to implement an HTML to Metanorma translator my side.

That's a huge stretch. I'm not sure we really want that.

andrew2net commented 1 year ago

Of course, Metanorma expects content to be marked up in Metanorma, @andrew2net if there a Metanorma option on the titles? If not, I'll need to implement an HTML to Metanorma translator my side.

@opoudjis title is a subclass of FormattedString and it allows "text/html" format. We don't need full HTML support, just some markup that we already have in abstract (abstract is also FormattedString).

I do not think HTML is a solution. This is LaTeX math in the title.

@ronaldtse it's not a math, it's just italic and subscript markup:

<title type="title-main" format="text/html" language="en" script="Latn">The CODATA 2017 values of <i>h</i>, <i>e</i>, <i>k</i>, and <i>N</i><sub>A</sub> for the revision of the SI</title>
image
opoudjis commented 1 year ago

@opoudjis title is a subclass of FormattedString and it allows "text/html" format. We don't need full HTML support, just some markup that we already have in abstract (abstract is also FormattedString)

Yes, I know that. But I'm consuming these bibitems, and I'm consuming them in the context of Metanorma. So I'm asking you, whether a Metanorma XML option is available...

just some markup that we already have in abstract (abstract is also FormattedString).

Yes, and when this came up in IETF, we got away with it because p is shared between Metanorma XML and HTML; in fact, a lot of markup is.

On the other hand, <i> and <b> are not: Metanorma only understands <strong> and <em>.

So we still have a problem:

andrew2net commented 1 year ago

Fixed.

<title type="title-main" format="text/html" language="en" script="Latn">The CODATA 2017 values of <em>h</em>, <em>e</em>, <em>k</em>, and <em>N</em><sub>A</sub> for the revision of the SI</title>
opoudjis commented 1 year ago

So, we have for now gone for a solution of only using tags shared between Metanorma and HTML. Eventually, this will break, when we start using MathML in titles, and I will implement a translator.