metanorma / mn-native-pdf

Development repository for mn2pdf with Metanorma document samples
3 stars 2 forks source link

Editor: do UN document review #61

Closed ronaldtse closed 4 years ago

ronaldtse commented 4 years ago

Visual diff on the UN documents (Recommendation, Plenary) against the Word version in mn-samples-un. We need to ensure the Word and PDF version matches. (And the original PDFs provided)

manuelfuenmayor commented 4 years ago

Hi @ronaldtse , These are my visual diff reviews for the UNECE files: "42" and "GE.18-02016(E)". Located in https://metanorma.github.io/mn-native-pdf/

Review of UNECE "42" file:

In addition, there are a couple of differences between the PDF file located in "mn-samples-un/reference-docs" and the PDF file from "mn-native-pdf". But I don't if that is relevant.

Review of UNECE "GE.18-02016(E)":

Here, I didn't find any noticeable difference. However, I did notice some differences between the PDF files from "mn-samples-un/reference-docs" and "mn-native-pdf". These are as follows:

Again, I don't know if this is relevant but I point it anyway.

Intelligent2013 commented 4 years ago

Hi @ronaldtse, @manuel489, I'm not assignee for this issue, but would like to leave a comment.

Regarding https://github.com/metanorma/mn-native-pdf/issues/51, UN Recommendation template was developed for source PDF: https://github.com/metanorma/mn-samples-un/blob/master/reference-docs/ECE_TRADE_437E_Rec42.pdf

UN Plenary template was developed for DOC: https://metanorma.github.io/mn-samples-un/documents/ECE_TRADE_C_CEFACT_2018_6E.doc

I.e. these files should be compared: https://github.com/metanorma/mn-samples-un/blob/master/reference-docs/ECE_TRADE_437E_Rec42.pdf (original PDF) vs. https://metanorma.github.io/mn-native-pdf/documents/un-ECE_TRADE_437E_Rec42.pdf (resulted PDF)

and

https://metanorma.github.io/mn-samples-un/documents/ECE_TRADE_C_CEFACT_2018_6E.doc (original DOC) vs. https://metanorma.github.io/mn-native-pdf/documents/un-ECE_TRADE_C_CEFACT_2018_6E.pdf (resulted PDF). @manuel489 as I understood, you've compared them yet I didn't find differences.

anermina commented 4 years ago

Comparison of https://github.com/metanorma/mn-samples-un/blob/master/reference-docs/ECE_TRADE_437E_Rec42.pdf (original PDF) vs. https://metanorma.github.io/mn-native-pdf/documents/un-ECE_TRADE_437E_Rec42.pdf (resulted PDF)

anermina commented 4 years ago

Comparison of https://metanorma.github.io/mn-samples-un/documents/ECE_TRADE_C_CEFACT_2018_6E.doc (original DOC) vs. https://metanorma.github.io/mn-native-pdf/documents/un-ECE_TRADE_C_CEFACT_2018_6E.pdf (resulted PDF).

manuelfuenmayor commented 4 years ago

Thanks @anermina for completing this for me. In addition to @anermina 's above comparison (original PDF vs resulted PDF), I found this little detail:

The Annex cross-reference differs by a semicolon (:) Original PDF:

diff3-original-pdf

Resulted PDF:

diff3-resulted-pdf

Intelligent2013 commented 4 years ago

I've fixed the issues in XSL, but there are a few which relates to the source xml data.

Comparison of https://github.com/metanorma/mn-samples-un/blob/master/reference-docs/ECE_TRADE_437E_Rec42.pdf (original PDF) vs. https://metanorma.github.io/mn-native-pdf/documents/un-ECE_TRADE_437E_Rec42.pdf (resulted PDF)

One paragraph and the signature are missing in Foreword.

In source XML (https://metanorma.github.io/mn-samples-un/documents/ECE_TRADE_437E_Rec42.xml) there isn't this paragraph and the signature image.

Text which should be below the signature should also be horizontally centered.

To fix it, the element 'p' in source xml should contain attribute align="center":

<p id="_2bf41f7e-8518-4770-abc4-3844220757f6" align="center">Olga Algayerova<br/>
Executive Secretary<br/>
United Nations Economic Commission for Europe</p>

I've found that paragraph in foreword have left alignment, and I've fixed this issue and added justify alignment in XSL.

Notation for the first figure differs.

The original PDF document contains Figure 1 without "Figure" indication, and caption below the figure: image

and Figure 2 with "Figure 2" indication and caption above the figure: image

The source XML contains identical markup for two figures:

<figure id="Figure1">
<name>UNECE Recommendation n°18 illustrates a simplified view of the international supply chain in the Buy-Ship-Pay model. The model identifies the key commercial, logistical, regulatory and payment procedures involved in the international supply chain. Source: <link target="http://tfig.unece.org/contents/buy-ship-pay-model.htm"/>.</name>
<image src="data:image/png;base64,iVBORw0KGgoAAAAN...=" id="_85834035-4fca-4a9b-8c86-d396772688bb" mimetype="image/png" height="auto" width="auto"/>
</figure>
<figure id="figure2">
<name>Recommended tier of indicators and database</name>
<image src="data:image/png;base64,iVBORw0KGgo...=" id="_40a11e9c-6fd5-4632-95a2-718d4f3ffc37" mimetype="image/png" height="auto" width="auto"/>
</figure>

In xml there isn't indication where caption should be placed - above or below the figure, and no information about "Figure" number indication.

I've found one more difference. The original PDF contains "(Figure 1)" text in caption for first Figure, but XML doesn't.

In section 3, second listed item shouldn't be indented twice in generated PDF.

In the source XML the second listed item placed in nested list: image

"<" and ">" signs are missing in the URL in the generated PDF.

In source XML the URL should be enclosed in lt; and gt; entities: &lt;<link target="http://www.unescap.org/resources/towards-national-integrated-and-sustainable-trade-and-transport-facilitation-monitoring"/>&gt;

The similar issue in Annex II, in section "1. Top tier indicators".

Numbering contained in sections in Annex I differs.

Yes, the original PDF doesn't contain numbering in sections in Annex I: image

but in Annex II there are numbering in sections: image

In source XML I didn't found the difference in annex markup to determine in which case we should place section number and when shouldn't. Could you specify it in XML?

Additional blank page is added before the last page in the original PDF.

Fixed.

The Annex cross-reference differs by a semicolon (:)

Fixed

Comparison of https://metanorma.github.io/mn-samples-un/documents/ECE_TRADE_C_CEFACT_2018_6E.doc (original DOC) vs. https://metanorma.github.io/mn-native-pdf/documents/un-ECE_TRADE_C_CEFACT_2018_6E.pdf (resulted PDF).

Original DOC has an extra blank page after the front page.

Fixed.

Text goes out of the margins on page 6 of the resulted PDF.

Fixed.

manuelfuenmayor commented 4 years ago

Remaining issues for Recommendation doc posted in https://github.com/metanorma/mn-native-pdf/issues/151

manuelfuenmayor commented 4 years ago

I didn't notice any remaining issue with Plenary doc.

manuelfuenmayor commented 4 years ago

Remaining issues in this ticket are posted in https://github.com/metanorma/metanorma-un/issues/61.

Closing.