Closed ronaldtse closed 1 year ago
This is blocking https://github.com/CalConnect/iso-34010/issues/1
bibdata
does not help me whatsoever.
Anything that is to be rendered as a citation MUST, no ifs, no buts, have a bibitem/@type
, because that tells it which rendering template to pick.
Absent a @type
, they are rendered with the misc template, which is brief, but not as brief as this.
If these are specified as bibitem/@type = standard
, which I assume is what is happening here, then they will be rendered as standards, and standards are rendered exactly as given above. Citations of standards under ISO NEVER have accompanying URLs. The correct bibtype to apply to these is "proceedings", not "standard".
Contrary to your implicit assumption, @ronaldtse, relaton-render is not authored by the staff of Hogwarts, and thus cannot magically conjure out of thin air information absent in the source record. The expansion "General Conference on Weights and Measures" is not in the record. I assume from this you want General Conference on Weights and Measures to be the corporate author, instead of BIPM.
Your decision to make a single title of CGPM Resolution 2018-02: On the definition of time scales is nothing whatsoever to do with the markup encoded, and it is not relaton-render's problem that it isn't. CGPM Resolution 2018-02 has been modelled as a docidentifier. Docidentifiers are not parts of titles, and if you're asking them to be, you're likely modelling the title incorrectly.
The bibliographic modelling of these clearly needs to be revisited. I am not unassigning myself here, but again, this is not primarily my issue; I can give my opinion about the modelling, but I am not going to do an ad hoc rule about shoving the docidentifier in front of some proceedings titles and not others.
For reference, the Relaton-Render template for proceedings is what you're going to get out of relaton-render; there is no ISO-specific override at this time. That template is identical to the book template, and is:
"{{ creatornames }} ({{role}}) . <em>{{ title }}</em> [{{medium}}] . {{ edition | capitalize_first }}. ({{ series }}.) {% if place %}{{place}}{%else%}{{ labels['no_place']}}{%endif%}: {{publisher}}. {{date}}. {{ labels['updated'] | capitalize }}:_{{date_updated}}. {{ standardidentifier | first }}. {{ uri }}. {{ labels['at'] | capitalize}}:_{{ access_location }}. [{{ labels['viewed'] }}:_{{date_accessed}}]. {{size}}. {{extent}}."
If "General Conference on Weights and Measures (CGPM). Proceedings of the 26th CGPM (2018), 2019. Available at: https://www.bipm.org/en/committees/cg/cgpm/26-2018"
is to be aligned to that, then
My task for this ticket is to implement a bibliographic rendering template for metanorma-iso. The source data, including calling these proceedings and not standards, is for @andrew2net
I am treating the Rice document as my model for bibliographic rendering.
The new release v 1.13.3 produces CCTF/CGPM/CIPM documents with type= proceedings.
Now renders as:
[1] CGPM Meeting 26, Bureau International des Poids et Mesures. 26th meeting of the CGPM. n.p.: Bureau International des Poids et Mesures. November 16, 2018. CGPM Meeting 26. https://www.bipm.org/en/committees/cg/cgpm/26-2018.
[2] CGPM Resolution 2 (2018), Bureau International des Poids et Mesures. On the definition of time scales. n.p.: Bureau International des Poids et Mesures. November 16, 2018. CGPM Resolution 2 (2018). https://www.bipm.org/en/committees/cg/cgpm/26-2018/resolution-2.
This is using the relaton-render default stylesheet, I have not yet created the ISO-specific stylesheet.
I'm actually OK with this. The only catch is, right now, if there is no city of publication in a book-like publication, I output "n.p." (no place), which is standard practice in such cases. I think we should be adding Paris as the place of publication for such proceedings. @andrew2net Please add it.
@andrew2net as part of the request for Paris, can you provide the full address as in https://github.com/relaton/relaton-bipm/issues/32 ?
@opoudjis there is a duplication in the document identifiers here. Notice that in:
[1] CGPM Meeting 26, Bureau International des Poids et Mesures. 26th meeting of the CGPM. n.p.: Bureau International des Poids et Mesures. November 16, 2018. CGPM Meeting 26. https://www.bipm.org/en/committees/cg/cgpm/26-2018.
It could have just been: "[1] General Conference on Weights and Measures. 26th meeting of the CGPM. Paris: Bureau International des Poids et Mesures, November 16, 2018. Available at: https://www.bipm.org/en/committees/cg/cgpm/26-2018."
"[2] General Conference on Weights and Measures. CGPM Resolution 2 (2018): On the definition of time scales. Paris: Bureau International des Poids et Mesures, November 16, 2018. Available at: https://www.bipm.org/en/committees/cg/cgpm/26-2018/resolution-2."
@opoudjis place has been added https://github.com/relaton/relaton-data-bipm/blob/8a5ea5ca0ceac8da6cdca52d0495999397f85c05/data/cctf/meeting/5.yaml#L57
@andrew2net @ronaldtse
- We're missing the author, which is the CGPM in this case.
- The initial ", Bureau International des Poids et Mesures" is not necessary because it is not technically part of the title.
Source data issue. Only one contributor is nominated in the bibitem entry, BIPM, as publisher. The default template has to put something as the author contributor, so it's putting the publisher.
(a) It shouldn't put the publisher, since that appears elsewhere in the entry. Will fix relaton-render. But (b) If you want CGPM to appear as the author, then relaton-bipm has to change.
The double representation of the identifier is because ISO puts the identifier in outside the generated citation, but it is currently using the default template, which includes the identifier in the citation. That will be fixed with the implementation of ISO-native templates.
The title was italicised, it just didn't survive the copy-paste.
Relaton-render is not coping with breakdown of places into cities, regions, countries. That also needs to be fixed.
[1] Metrologia 34 3 261, GUINOT. Application of general relativity to metrology. Metrologia. vol. 34; no. 3; pp. 261–290. {IOP} Publishing. June 1, 1997. Metrologia 34 3 261. https://doi.org/10.1088/0026-1394/34/3/9.
[2] CGPM Meeting 26, 26th meeting of the CGPM. Paris: Bureau International des Poids et Mesures. November 16, 2018. CGPM Meeting 26. https://www.bipm.org/en/committees/cg/cgpm/26-2018.
[3] CGPM Resolution 2 (2018), On the definition of time scales. Paris: Bureau International des Poids et Mesures. November 16, 2018. CGPM Resolution 2 (2018). https://www.bipm.org/en/committees/cg/cgpm/26-2018/resolution-2.
This is correct as it can be with the default template: no author is provided, and the citation starts with the title. The rest depends on implementation of the Rice template citation template.
Let's not talk about the Rice citation template. The proper citation format is only ISO 690.
Not in this ticket. If you want ISO 690 conformant rendering, make a new ticket, and don't expect it to be actioned soon. It would take time to analyse the rather ad hoc rendering conventions we have put into ISO 690 that I do not have.
The rendering of the given references is now:
[2] CGPM Meeting 26, 26th meeting of the CGPM. Bureau International des Poids et Mesures, Paris, November 16, 2018. Available from: https://www.bipm.org/en/committees/cg/cgpm/26-2018.
[3] CGPM Resolution 2 (2018), On the definition of time scales. Bureau International des Poids et Mesures, Paris, November 16, 2018. Available from: https://www.bipm.org/en/committees/cg/cgpm/26-2018/resolution-2.
That is close enough to the rendering you requested.
I have a lot of urgent tickets to go, so I strongly recommend, @ronaldtse, you either accept this rendering, or specify, very very very explicitly, how you want the rendering of proceedings to differ. This is conformant to the Rice model. The template being used is:
book: "<smallcap>{{ creatornames }}</smallcap> ({{role}}) . <em>{{ title }}</em> . {{ edition | capitalize_first }}. ({{ series }}). {{publisher}}, {% if place %}{{place}}{%else%}{{ labels['no_place']}}{%endif%}, {{date}}, {{size}}, {{extent}}. ._{{ labels['availablefrom'] }}:_<span_class='biburl'>{{ uri }}</span>. {{ labels['at'] | capitalize}}:_{{ access_location }}. [{{ labels['viewed'] }}:_{{date_accessed}}]."
and
one: "{% if nonpersonal[0] %}{{ nonpersonal[0] }}{% else %}{{surname[0]}} {{initials[0] | join: ''}}.{% endif %}"
two: "{% if nonpersonal[0] %}{{ nonpersonal[0] }}{% else %}{{surname[0]}} {{initials[0] | join: ''}}.{% endif %} , & {% if nonpersonal[1] %}{{ nonpersonal[1] }}{% else %}{{surname[1]}} {{initials[1] | join: ''}}.{% endif %}"
more: "{% if nonpersonal[0] %}{{ nonpersonal[0] }}{% else %}{{surname[0]}} {{initials[0] | join: ''}}.{% endif %} , {% if nonpersonal[1] %}{{ nonpersonal[1] }}{% else %}{{surname[1]}} {{initials[1] | join: ''}}. {% endif %} , & {% if nonpersonal[2] %}{{ nonpersonal[2] }}{% else %}{{surname[2]}} {{initials[2] | join: ''}}.{% endif %}"
(i.e. Surname, A.B., Surname A.B., & Surname, A.B., no "et al.".)
The relevant ticket has been created here: https://github.com/relaton/relaton-render/issues/36
Items to be done for this ticket:
As a result of this ticket, we are moving the docidentifier for standards into the citation. @Intelligent2013 That means you will no longer need to inject it before the citation, I will be doing it for you. I will get you sample XML in time.
Because what relaton-render returns is Metanorma markup, I will move the authoritative identifier parsing, and the parsing of its associated footnote, to the ISO instance of relaton::render::iso : isodoc's date_note_process, which wraps the bibitem/note[@type = 'Unpublished-Status']
in a footnote, can move to the ISO YAML template for standards, with {{authoritative_identifier}}|<fn>{{date_footnote}}</fn>
.
This is a non-trivial refactor, which also means that @Intelligent2013 needs to move his code around. But I have 18 current urgent + in progress tickets, with two external customers being kept waiting, and with an ongoing lack of support. So I am going to leave that refactoring until later: it does not hold up the publication of ISO 34010, and the child tickets deal with that.
I am not comfortable moving the code to Relaton-Render: the decisions about identifiers are too enmeshed with metanorma, not relaton, and I'd be passing a lot of state and logic into Relaton-Render which I don't think will help.
What I do need to do is move the code from isodoc HTML to isodoc Presentation XML, so that @Intelligent2013 is not stuck implementing and maintaining logic I've already implemented.
@Intelligent2013 The bibliographic tag will be inserted into Presentation XML as <biblio-tag>...</biblio-tag>
. So, when you see
<bibitem>
<biblio-tag>[1]</biblio-tag>
<formattedref>Author. Title.</formattedref>
</bibitem>
You will render it as
[1] Author. Title.
Instead of you having to work out the contents of [1], as is currently the case.
@opoudjis the identifiers will directly come from the BIPM data, so they will need to go through Relaton.
You're completely misunderstanding what I am doing here, and this remark is not helpful.
I am refactoring the RENDERING of the bibliographic tag, so that it is generated in Presentation XML and not independently in PDF and in HTML, as it is now. That is to apply across all of Metanorma. This is not related any more to BIPM, this is a longstanding inefficiency of me forcing Alex D to replicate my rendering, rather than rendering the bibliographic tag for him.
The bibliographic tag, wherever it is rendered, is rendered based on Relaton data, as well as ordinals and other Metanorma context.
That has nothing to do with whether that rendering processing happens in relaton-render or isodoc. I have decided to leave it in isodoc.
Because processing of identifiers for tags now happens in Presentation XML, the tagging in ISO of identifier tags with semantic spans is not limited to Word HTML, but will occur in Presentation XML. So <biblio-tag>
in ISO will now contain spans; @Intelligent2013 you will presumably just ignore those, as is the default with span tags.
Implemented, but will not include in Monday's release.
@Intelligent2013: The <biblio-tag>
element is simply inserted before <formattedref>
, and it includes commas, tabs, and space at the end: do not enter any whitespace between <biblio-tag>
and <formattedref>
@opoudjis I've found that fn
placed after comma in biblio-tag
- ...2011,<fn reference...
:
<bibitem id="ISO7301" type="standard">
<formattedref>
<em>
<span class="stddocTitle">Rice — Specification</span>
</em>
</formattedref>
<uri type="src">https://www.iso.org/standard/50935.html</uri>
<uri type="rss">https://www.iso.org/contents/data/standard/05/09/50935.detail.rss</uri>
<docidentifier type="metanorma-ordinal">[7]</docidentifier>
<docidentifier type="ISO" primary="true">ISO 7301:2011</docidentifier>
<docidentifier type="URN">URN urn:iso:std:iso:7301:ed-3</docidentifier>
<note type="Unpublished-Status">
<p id="_142063a4-06f3-ac7d-f38c-cedccc6b6b9f">Cancelled and replaced by ISO 7301:2021.</p>
</note>
<biblio-tag>[7]<tab/>ISO 7301:2011,<fn reference="c2649cb0-e5ed-4bf2-8cec-0b527594caa1">
<p>Cancelled and replaced by ISO 7301:2021.</p>
</fn>
</biblio-tag>
</bibitem>
In resulted PDF it renders now so:
Expected:
In Normative references
section, comma position is correct:
<bibitem id="ISO16634" type="standard">
<formattedref>
<em>
<span class="stddocTitle">Cereals, pulses, milled cereal products, oilseeds and animal feeding stuffs — Determination of the total nitrogen content by combustion according to the Dumas principle and calculation of the crude protein content</span>
</em>
</formattedref>
<docidentifier type="ISO">ISO 16634:—</docidentifier>
<note format="text/plain" type="Unpublished-Status">Under preparation. (Stage at the time of publication ISO/DIS 16634)</note>
<biblio-tag>ISO 16634:—<fn reference="75da99a2-2a5f-47c2-bc0b-2a3feb1ec7b9">
<p>Under preparation. (Stage at the time of publication ISO/DIS 16634)</p>
</fn>, </biblio-tag>
</bibitem>
Cool, thank you! OK, will debug this
I actually would have put the footnote after the comma, but OK, fixed.
Source:
Rendering:
Data:
Desired rendering:
General Conference on Weights and Measures (CGPM). Proceedings of the 26th CGPM (2018), 2019. Available at: https://www.bipm.org/en/committees/cg/cgpm/26-2018
General Conference on Weights and Measures (CGPM). CGPM Resolution 2018-02: On the definition of time scales, 2018. Available at: https://www.bipm.org/en/committees/cg/cgpm/26-2018