metanorma / metanorma-ieee

Metanorma for IEEE SA
BSD 2-Clause "Simplified" License
1 stars 0 forks source link

(URGENT) broken rendering of term source with IEV cross-reference #338

Closed ronaldtse closed 9 months ago

ronaldtse commented 9 months ago

hello @opoudjis today i have made a check of the rendering of the IEV reference.

as you described above, i have two references, one in clause 3 and one in the bibliography. (Note: these rendered images are from the PDF, i have not checked the word file.)

in using the iev reference, i expected the following: a) in the bibliography i was thinking "ievterms" referred to the online electropedia only, and that my bib entry would be for the entire "electropedia" not just a specific clause. so with this code * [[[ievterms,IEV]]] i was not expecting to see this render in the bibliography:

image

in the bibliography ievterms entry i did not specify a specific 60050 clause. it seems the IEV clause was picked up from this source reference entry code in clause 3:

[.source]
<<ievterms,clause=102-03-19>>, Note 1 has been modified. Note 2 has been added.

and this code in clause 3 in my document renders as:

image

which seems to be an error or incorrect render in my document.

b) when used in clause 3, i would have expected a different kind of reference, not what you have shown above, however since it is referring to IEC 65050 which is "mult-part" then i guess it is ok, but i dont know why the source reference in clause 3 influences the bib entry to specifically be the reference clause and not just the main document. i can understand why the user may want separate bib entries for each part of the 60050 document, but in the bib code, i would have expected a different syntax to designate the part.

if only wanted a reference to the entire electropedia is that possible or because the document is multi-part is a citation always expecting a part? i know i can create an entry manually for the "online electropeida" and that did render as i expected for the bib reference (but was not really an official reference), but that manual reference does not work for the clause 3 source reference. this is expected and would not be considered an issue.

c) additionally in the test i made today, the bibliography entry is out of order and renders like this:

image

d) when i first added this bib reference i used ievtermbank. which i found in the metanorma docs here: https://www.metanorma.org/author/topics/document-format/section-terms/

however the correct ievterms is additionally shown on another page here: https://www.metanorma.org/author/topics/building/reference-lookup/

i am using google to find those documentation instances because the metanorma search bar does not seem to be working.

e) question: when the document is generated do all of the bib entry searches/fetches show up in the "metanorma generate site"? i cannot find a log entry to 60050 or some other entries. i think it would help if every search/fetch had a log entry.

based on the correct code you provided, i believe my document matches those sections.

instead of opening a new issue, i have added my test results here. i will let you and @ronaldtse discuss and decide if anything from this comment should become a new issue(s) or not.

thank you for all the great work you are doing on this.

Originally posted by @ReesePlews in https://github.com/metanorma/metanorma-ieee/issues/337#issuecomment-1935871185

opoudjis commented 9 months ago

b)

in the bibliography i was thinking "ievterms" referred to the online electropedia only, and that my bib entry would be for the entire "electropedia" not just a specific clause.

That is not the case. The IEV reference is intended to resolve references to individual documents, as is required for ISO/IEC documents. That is the behaviour that has been implemented for IEV as a reference, and it is needed behaviour, that we will not be restricting to ISO and IEC.

The behaviour you want @reeseplews is simply a matter of citing the actual IEC 60050 document instead:

* [[[ievterms,IEC 60050 (all parts)]]]

I am going to update the documentation of metanorma.org to clarify that. @ronaldtse has failed to approve any changes to metanorma.org since November 2022, but that is an issue for him, not me.

d) I will fix the reference to ievtermbank. That too will for @ronaldtse to action. As has been the neglect to address the lack of a search bar.

opoudjis commented 9 months ago

b) raises a new concern: that a query to return "IEC 60050 (all parts)" is returning a reference to IEC 60050-05:1935. Raising as bug.

opoudjis commented 9 months ago

d) @reeseplews you are misunderstanding how to formulate references to Auto-fetched standards. The documentation is correct.

https://www.metanorma.org/author/topics/document-format/bibliography/#reference-tags

Bibliographic entries for standards are expected to have the standard document identifier as the item label. References to well-defined standards codes use the document identifiers for citations (e.g. ISO 20483:2013).

This is entered as:

* [[[{anchor},{document identifier as reference tag}]]], _{reference list text}_

The anchor is an arbitrary reference that the user enters. It can be a, ievterms, ievtermbank, or fluffy: that is immaterial to the fetching of the document.

The document to be fetched is specified in the reference tag, which uses the document identifier. So all these are identical in what they fetch:

* [[[a,IEV]]]
* [[[iev,IEV]]]
* [[[ievterms,IEV]]]
* [[[fluffy,IEV]]]

and the only difference is in the use of the anchor in cross-references:

<<a,clause=105-1-2>>
<<iev,clause=105-1-2>>
<<ievterms,clause=105-1-2>>
<<fluffy,clause=105-1-2>>

if you are using "ievterms" or "ievtermbank" after the comma entry, instead of "IEV", then you are misreading the examples, which are not in error:

<<ievtermbank,clause "113-01-08">>

* [[[ievtermbank,IEV]]]
opoudjis commented 9 months ago

e) the searches are not currently added to the log, because they are not errors, but I agree that they are valuable to save to disk. That will take some investigating, opening a ticket for it.

opoudjis commented 9 months ago

c) I'm going to need to fix ordinals here, like I've just done with ITU in https://github.com/metanorma/metanorma-itu/issues/492 . Any ordering of references with B1 needs to be overridden in Presentation XML, when the sort order is finalised.

opoudjis commented 9 months ago

a)

[.source]
<<ievtermbank,clause="113-01-08">>

[bibliography]
== Bibliography
* [[[ievtermbank,IEC 60050 (all parts)]]]

give

instant: point on the time axis [IEC 60050 (all parts) [B2], Clause 113-01-08]

ronaldtse commented 9 months ago

I need to clarify this:

opoudjis commented 9 months ago

The text I've put in metanorma.org is

You may wish to go against IEC practice, and cite IEC 60050 as an entire document, instead of converting references to individual parts of IEC 60050

If you're going to put this online, @ronaldtse, you will add it to the queue of all changes you have been neglecting since November 2022, and put it in branch doc20230606. This is VERY far from the most pressing update you have not actioned in that branch.

opoudjis commented 9 months ago

e) I have lodged the request for Relaton to export its log to me so I can export it out coherently. The messages are generated asynchronously, so I cannot just capture the stream of error messages and jam them into HTML. This will take some refactoring on Relaton's side.