Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reviewer notes do not get generated when annex anchors are used #844

Closed
anermina opened this issue Dec 15, 2023 · 5 comments
Closed

Reviewer notes do not get generated when annex anchors are used #844

anermina opened this issue Dec 15, 2023 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@anermina
Copy link

Reviewer notes do not get generated at all in case the source .adoc file contains a reviewer note that has from and/or to anchor set to an anchor of some annex.

For example, if the following is used, the PDF output will contain no comments at all:

[[anc1]]
[appendix]
== annex

[reviewer=ISO,from=anc1,to=anc1]
****
* ISO/IEC Directives, Part 2, 2021, Clause 19
****
@anermina anermina added the bug Something isn't working label Dec 15, 2023
@github-project-automation github-project-automation bot moved this to 🆕 New in Metanorma Dec 15, 2023
@ronaldtse ronaldtse moved this from 🆕 New to 🏔 High priority in Metanorma Dec 16, 2023
@opoudjis opoudjis moved this from 🏔 High priority to 🌋 Urgent in Metanorma Dec 18, 2023
@opoudjis opoudjis moved this from 🌋 Urgent to 🏗 In progress in Metanorma Dec 18, 2023
@opoudjis
Copy link
Contributor

This document:

= A
:docsubtype: vocabulary
:subdoctype: vocabulary
:stem:
:draft:

[[cl1]]
== clause

ABC

[reviewer=ISO,from=cl1,to=cl1]
****
* ISO/IEC Directives, Part 2, 2021, Clause 19
****

[[anc1]]
[appendix]
== annex

DEF

[reviewer=ISO,from=anc1,to=anc1]
****
* ISO/IEC Directives, Part 2, 2021, Clause 19
****

is generating annotations on both the clause and the annex in Word. I can't see either in the PDF, but as far as I can tell, this is a PDF-specific issue. Passing on to @Intelligent2013

Archive 2.zip

@opoudjis opoudjis assigned Intelligent2013 and unassigned opoudjis Dec 19, 2023
@Intelligent2013
Copy link
Contributor

The source Presentation XML:

<review id="_b817e2fa-1d63-f891-94eb-56005509016c" reviewer="ISO" date="2023-12-19T00:00:00Z" from="cl1" to="cl1">
...
<review id="_c35eeeb0-025b-677a-ba6b-6d9b78670957" reviewer="ISO" date="2023-12-19T00:00:00Z" from="anc1" to="anc1">

2nd annotation metadata is wrond - page="-1" rect=",":

<?xml version="1.0" encoding="UTF-8"?>
<xfdf xmlns="http://ns.adobe.com/xfdf/">
	<annots>
		<text color="#FFC333" opacity="0.600000" flags="nozoom,norotate" date="2023-12-19T00:00:00Z" page="4" rect="70.866,89.076" title="ISO">
			<contents-richtext>
				<body xmlns="http://www.w3.org/1999/xhtml">
					<p dir="ltr">ISO/IEC Directives, Part 2, 2021, Clause 19</p>
				</body>
			</contents-richtext>
			<popup flags="nozoom,norotate" open="yes" page="4" rect=""/>
		</text>
		<text color="#FFC333" opacity="0.600000" flags="nozoom,norotate" date="2023-12-19T00:00:00Z" page="-1" rect="," title="ISO">
			<contents-richtext>
				<body xmlns="http://www.w3.org/1999/xhtml">
					<p dir="ltr">ISO/IEC Directives, Part 2, 2021, Clause 19</p>
				</body>
			</contents-richtext>
			<popup flags="nozoom,norotate" open="yes" page="-1" rect=""/>
		</text>
	</annots>
</xfdf>

The IF XML contains <id name="cl1"/>, but doesn't contain <id name="ancl"/>.

XSL-FO:

		<fo:flow flow-name="xsl-region-body">
			<fo:block>
				<fo:block id="cl1">
					<fo:block font-size="13pt" font-weight="bold" space-before="18pt" space-after="8pt" keep-with-next="always" role="H1">1<fo:inline role="SKIP" padding-right="4mm">​</fo:inline>clause</fo:block>
					<fo:block text-align="justify" margin-bottom="8pt" id="_5d472aa9-ad4a-9bb6-9565-aa9be8e4c09a">ABC</fo:block>
				</fo:block>
				<fo:block break-after="page"/>
				<fo:block id="anc1"/>
				<fo:block role="H1" keep-with-next="always" margin-bottom="48pt" text-align="center" font-size="16pt">
					<fo:inline font-weight="bold" role="SKIP">Annex A</fo:inline>&#8232;(normative)&#8232;&#8232;<fo:inline font-weight="bold" role="SKIP">
						<fo:inline role="SKIP" keep-together.within-line="always">annex</fo:inline>
					</fo:inline>
				</fo:block>
				<fo:block text-align="justify" margin-bottom="8pt" id="_b507ce2b-a7b8-0848-74cb-c9ec03131d17">DEF</fo:block>
				<fo:block role="SKIP" font-size="1pt" id="lastBlock"> </fo:block>
			</fo:block>
		</fo:flow>

<fo:block id="anc1"/> is empty block. Looks like Apache FOP doesn't create <id name="..."/> for empty blocks. Need slightly update the XSL-FO generation.

Intelligent2013 added a commit to metanorma/mn-native-pdf that referenced this issue Dec 24, 2023
Intelligent2013 added a commit to metanorma/mn-native-pdf that referenced this issue Dec 25, 2023
@Intelligent2013
Copy link
Contributor

ISO XSLT updated, but can't be updated in metanorma-iso gem due the error (https://github.com/metanorma/mn-native-pdf/actions/runs/7323939034/job/19947018928)

Installing fontist 1.17.1
Bundler::HTTPError: Could not download gem from https://rubygems.org/ due to
underlying error <bad response Forbidden 403
(https://rubygems.org/gems/expressir-1.3.0-x86_64-linux.gem)>
/opt/hostedtoolcache/Ruby/2.7.8/x64/lib/ruby/gems/2.7.0/gems/bundler-2.4.22/lib/bundler/rubygems_integration.rb:497:in
`rescue in download_gem'

Will try again later.

@anermina
Copy link
Author

Thank you, @opoudjis and @Intelligent2013 !

@Intelligent2013
Copy link
Contributor

ISO XSLT updated in metanorma-iso repository.

@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in Metanorma Dec 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

3 participants