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

(URGENT) Updates to vertical layout in PDF (for demo purposes) #5

Open
ronaldtse opened this issue Jan 15, 2025 · 13 comments
Open

(URGENT) Updates to vertical layout in PDF (for demo purposes) #5

ronaldtse opened this issue Jan 15, 2025 · 13 comments
Assignees
Labels
enhancement New feature or request

Comments

@ronaldtse
Copy link
Contributor

This occurs with the difan.adoc file:

bundle exec metanorma difan.adoc

Relevant files attached:

Screenshot 2025-01-16 at 12 24 13 AM Screenshot 2025-01-16 at 12 27 19 AM Screenshot 2025-01-16 at 12 28 34 AM Screenshot 2025-01-16 at 12 30 50 AM Screenshot 2025-01-16 at 12 31 49 AM
@ronaldtse ronaldtse added the enhancement New feature or request label Jan 15, 2025
@github-project-automation github-project-automation bot moved this to 🆕 New in Metanorma Jan 15, 2025
Intelligent2013 added a commit to metanorma/mn-native-pdf that referenced this issue Jan 15, 2025
Intelligent2013 added a commit to metanorma/mn-native-pdf that referenced this issue Jan 15, 2025
@Intelligent2013
Copy link
Contributor

Cover page

  • Make it possible to replace the name at the right
    image

Currently the string <localized-string key="JIS" language="ja">日本工業規格</localized-string> is shown.
Added the document attribute :presentation-metadata-coverpage-header: to replace this name:
For example:

:presentation-metadata-coverpage-header: ドキュメント
  • This is the "correction date", don't hardcode
    image

Currently, the 'published' date is shown. I've updated to the correction date.
"correction date" means "revision date", right?

In the Presentation XML there are only two dates in bibdata:

<date type="published">令和七年一月十五日</date>
<date type="announced">令和七年一月十五日</date>

@opoudjis could you add the revision date into the bibdata?

  • If the date is not present, don't show it.
    image

These are 'publisher' and 'authorizer'. I've updated to hide 発行 and 審議 if data is missing.

  • Make it possible to not use / replace these logos

These logos are part of user-provided images/coverpage.pdf.

@Intelligent2013
Copy link
Contributor

Foreword page

image

Now the text from :presentation-metadata-coverpage-header: is shown. If missing, then <localized-string key="JIS" language="ja">日本工業規格</localized-string> is using.

Allow overriding of the Foreword title

@opoudjis is there a way to do this?
Or would be better to use the document attribute like this :presentation-metadata-foreword-title:?

@Intelligent2013
Copy link
Contributor

First document page

Make it possible to change this into a series name

In adoc there is the attribute :docseries: A (https://www.metanorma.org/author/jis/ref/document-attributes/), but I can't find the value A or series name in the Presentation XML.
@opoudjis where is the docseries encoded in the XML?

Increase the font size

Use the CSS declarations https://www.metanorma.org/author/topics/inline_markup/text_formatting/#css. Include the text into [css font-size:13pt]# ... #.

[css font-size:13pt]#夫人者,國之先,國者,君之本。... #

@Intelligent2013
Copy link
Contributor

Last document page

image

@ronaldtse I don't understand 'it's not dynamic now'. Is this static text? Not from XML? Please, clarify what does mean.

Currently, the XSLT renders the publication date and edition:

<fo:block margin-top="6.5mm" font-size="10pt" font-weight="bold" margin-left="16.5mm">
	<fo:inline padding-right="7mm"><xsl:value-of select="xalan:nodeset($bibdata)//jis:bibdata/jis:date[@type = 'published']"/></fo:inline>
	<xsl:variable name="edition" select="xalan:nodeset($bibdata)//jis:edition[@language = 'ja'][1]"/>
	<!-- add spaced between characters -->
	<fo:inline padding-right="6mm"><xsl:value-of select="java:replaceAll(java:java.lang.String.new($edition), '(.)', '$1 ')"/></fo:inline>
	発行
</fo:block>

@ronaldtse
Copy link
Contributor Author

Thank you @Intelligent2013 ! In order to use :presentation-metadata-coverpage-header: I need to update mn2pdf? Or some other git location?

@Intelligent2013
Copy link
Contributor

Thank you @Intelligent2013 ! In order to use :presentation-metadata-coverpage-header: I need to update mn2pdf? Or some other git location?

I'll merge the changes in mn-native-pdf. In 20 minutes the updated XSLT should be available in metanorma-jis.

@ronaldtse
Copy link
Contributor Author

Thank you!

Currently, the 'published' date is shown. I've updated to the correction date.
"correction date" means "revision date", right?

No, "correction date" means that the document was wrong and corrected at that date. Most documents don't have a "correction date". The "revision date" means the date the document was authored.

  • Author/Editor finalizes document => revision date
  • Some authority agrees that document is finalized => authorization date
  • Publisher publishes document => publication date

@ronaldtse
Copy link
Contributor Author

I was mistaken about the date -- the dates are in Japanese because they are generated from normal YYYY-MM-DD dates in the document. But because this document is Chinese we don't want to use Japanese dates. I'll need to find a way to do that.

@ronaldtse
Copy link
Contributor Author

If possible, I’d like to replace the texts “ 日本工業規格” (cover page and the per-page sides) and the Japanese copyright text (back cover and per-page sides) using presentational metadata. Thank you!!

Intelligent2013 added a commit to metanorma/mn-native-pdf that referenced this issue Jan 15, 2025
@Intelligent2013
Copy link
Contributor

Back cover page

Make it possible to replace this boilerplate

Currently, the string from <localized-string key="permission_footer" language="ja">著作権法により無断での複製,転載等は禁止されております。</localized-string> is shown.

Added the document attribute :presentation-metadata-backpage-boilerplate-text:

image

Done.

Intelligent2013 added a commit to metanorma/mn-native-pdf that referenced this issue Jan 16, 2025
@Intelligent2013
Copy link
Contributor

If possible, I’d like to replace the texts “ 日本工業規格” (cover page and the per-page sides)

As I wrote abote, the attribute :presentation-metadata-coverpage-header: added for this purpose.

and the Japanese copyright text (back cover and per-page sides) using presentational metadata. Thank you!!

The document attribute :presentation-metadata-backpage-boilerplate-text: overrides the copyright text on back cover and per-page sides.

The next updated XSLT will be available in metanorma-jis in 20 minutes.

3am here, so I'll continue tomorrow...

@Intelligent2013 Intelligent2013 moved this from 🆕 New to 🏗 In progress in Metanorma Jan 16, 2025
@ronaldtse
Copy link
Contributor Author

Thank you @Intelligent2013 !! We don’t need anything further, this is perfect. As future work we just need to formalize these changes for production purposes.

Intelligent2013 added a commit to metanorma/metanorma.org that referenced this issue Jan 16, 2025
@Intelligent2013
Copy link
Contributor

As future work we just need to formalize these changes for production purposes.

JIS document attributes updated in metanorma/metanorma.org#838.

@Intelligent2013 Intelligent2013 moved this from 🏗 In progress to ✅ Done in Metanorma Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

No branches or pull requests

2 participants