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

PDF: Add new vertical layout #226

Open
21 of 24 tasks
Intelligent2013 opened this issue Oct 18, 2024 · 34 comments
Open
21 of 24 tasks

PDF: Add new vertical layout #226

Intelligent2013 opened this issue Oct 18, 2024 · 34 comments
Assignees
Labels
enhancement New feature or request

Comments

@Intelligent2013
Copy link
Contributor

Intelligent2013 commented Oct 18, 2024

In continue of metanorma/mn-native-pdf#713.

As titled, based on the new JIS layout JIS_Template_traditional_blue_v2_traditional.pdf.

To do (draft list):

  • add new parameters :presentation-metadata-color-cover-page-background-1:, :presentation-metadata-color-cover-page-background-2: for vertical stripes (with opacity) on the cover page no need, it's part of user-provided cover page
  • add new parameters :presentation-metadata-color-cover-page-background-opacity-1:, :presentation-metadata-color-cover-page-background-opacity-2: vertical stripes opacities no need, it's part of user-provided cover page
  • integrate two new logos JIS and JSA into SVG. no need, it's part of user-provided cover page
  • add new parameter :presentation-metadata-color-header-footer-background: (blue bar in the reference PDF)
  • use font Noto Sans JP Thin, Noto Serif JP ExtraLight and Source Sans Noto Serif JP Medium in the XSLT, and add into processor.rb metanorma-jis (Jis new layout fonts #230)
  • use Japanese numerals in
  • add parameter :coverpage-image: (see https://www.metanorma.org/author/bsi/ref/document-attributes/) - image location, for image to be included on the PDF cover page. Image location is relative to the source document.
  • add parameter :backpage-image: - same, for image to be included on the PDF back page. (Add document attributes for cover and back page image #227)
  • put cover page image into the back cover page, if back cover page doesn't set
  • add last section (see page 4 in the reference PDF)
  • don't rotate letters in web links (http;// https:// www.), no need special actions, the English text doesn't rotate by default
  • some English text should not be rotated, markup with something like this span:norotate[text]

Known issues:

@Intelligent2013 Intelligent2013 added the enhancement New feature or request label Oct 18, 2024
@Intelligent2013 Intelligent2013 self-assigned this Oct 18, 2024
@github-project-automation github-project-automation bot moved this to 🆕 New in Metanorma Oct 18, 2024
@ronaldtse
Copy link

Here's an updated file for reference:

use font NotoSansJP-Thin, NotoSerifJP-ExtraLight and Source Sans in the XSLT

I've used "Noto Serif JP" "Medium" to replace the Italic text, so we don't need Source Sans.

put cover page image into the back cover page

It's a mirrored front-back image of the front cover page. If possible allow using a separate front/back cover page.

Thanks!

Intelligent2013 added a commit to metanorma/mn-native-pdf that referenced this issue Oct 19, 2024
@Intelligent2013
Copy link
Contributor Author

add new parameters :presentation-metadata-color-cover-page-background-1:, :presentation-metadata-color-cover-page-background-2: for vertical stripes (with opacity) on the cover page

The parameter :presentation-metadata-color-cover-page-background-1: for
image

The parameter :presentation-metadata-color-cover-page-background-2: for
image

Also we need two parameters for opacities:

  • :presentation-metadata-color-cover-page-background-opacity-1: 0.58
  • :presentation-metadata-color-cover-page-background-opacity-2: 0.75

@Intelligent2013 Intelligent2013 moved this from 🆕 New to 🏗 In progress in Metanorma Oct 19, 2024
Intelligent2013 added a commit that referenced this issue Oct 20, 2024
Intelligent2013 added a commit that referenced this issue Oct 20, 2024
@Intelligent2013
Copy link
Contributor Author

Intelligent2013 commented Oct 20, 2024

The footer contains the last on page clause title. First depth clause:

image

@Intelligent2013
Copy link
Contributor Author

@ronaldtse there are question about numbers in header/footer:

  • the number in header means :edition:?
  • the number in footer means the page number? Just mistakenly all page number are 2?
  • both numbers in header/footer ToC page should be in parenthesis?

Examples:

  • ToC page

    • header - number 1 in parenthesis
      image
    • footer - number 2 in parenthesis
      image
  • first document page

    • header - number 1
      image
    • footer - number 2
      image
  • last document page - same

Intelligent2013 added a commit to metanorma/mn-native-pdf that referenced this issue Oct 20, 2024
@Intelligent2013
Copy link
Contributor Author

@ronaldtse could you check the fonts which are used on the cover page in the source Adobe Illustrator file.
Adobe Acrobat shows Noto Serif Extra Light for all texts:
image

but the rendered fonts looks so:
image

I've tried to use Noto Serif JP Medium, but it looks different than in the source PDF(generated from AI):
image

Also, Adobe Acrobat in the document properties shows 7 fonts Noto Serif Extra Light:
image

Thanks.

@ronaldtse
Copy link

@Intelligent2013 I think this is because I’m using Noto Sans JP “Variable” that can realize all weights. It’s not Extra Light.

@Intelligent2013
Copy link
Contributor Author

Actually the fonts Noto Serif JP Medium, Noto Serif JP Bold and Noto Serif Black are using on the cover page text.

Intelligent2013 added a commit to metanorma/mn-native-pdf that referenced this issue Dec 2, 2024
Intelligent2013 added a commit to metanorma/mn-native-pdf that referenced this issue Dec 2, 2024
Intelligent2013 added a commit to metanorma/mn2pdf that referenced this issue Dec 5, 2024
@Intelligent2013
Copy link
Contributor Author

Latest PDF with rotated text in the tables: 20241205.vertical.jis.example.pdf

@ReesePlews
Copy link

hello @Intelligent2013 this layout represents a great amount of work here. thank you very much. i have followed this work on and off, sorry i could not review everything.

i have one question, the cover is A4 portrait but the pages are A4 landscape. was there a precedent/reference to use landscape format for this layout over portrait format?

if we think about a printed and bound document (at the top of the landscape formatted pages) i think there would not be enough space to see the top row of characters with the binding. while there is more space at the bottom of the landscape pages, the binding would never be at the bottom, as it causes too much interactive conflict for the user.

it is really fascinating to see this and to know that metanorma has this implemented functionality. i think there are specific areas in the document that could be independently modified a bit for readability. its that independent aspect that makes it very difficult to define blanket rules for some of those issues.

@Intelligent2013
Copy link
Contributor Author

@ReesePlews thank you for the comments.

i have one question, the cover is A4 portrait but the pages are A4 landscape. was there a precedent/reference to use landscape format for this layout over portrait format?

Your question is hard for me to answer. The XSLT module for the PDF generating was developed based on the template JIS_Template_traditional_blue_v2_traditional.pdf provided 1.5 month (see post
#226 (comment)).
I don't have the knowledge in the Japanese language at all and can't appreciate the layout ergonomic for the end-user.
I thought that the sample template was accepted by JIS...

I forward the question to @ronaldtse.

if we think about a printed and bound document (at the top of the landscape formatted pages) i think there would not be enough space to see the top row of characters with the binding. while there is more space at the bottom of the landscape pages, the binding would never be at the bottom, as it causes too much interactive conflict for the user.

Regarding printing, I agree there may be problems in the header/footer (i.e. left/right margins on landscape pages) printing due the limitation of some printers.
But what does bound document mean? And see the top row of characters with the binding. Could you clarify, please?
Your UX will be helpful.

@Intelligent2013
Copy link
Contributor Author

Intelligent2013 commented Dec 7, 2024

Next tasks are:

image

and then paste the text into editor, the the user will see the 'left cornet bracket' as vertically oriented symbol:
image

instead of
image

@Intelligent2013
Copy link
Contributor Author

Intelligent2013 commented Dec 8, 2024

Some characters from U+3001 IDEOGRAPHIC COMMA can't be rotated for correct vertical visualization, for instance U+3001 IDEOGRAPHIC COMMA looks as glyph moved from the left bottom to right top corner. Such visualization can't be performed by rotation.
image
Therefore, these characters need to be replaced by the vertical form (dedicated character).

In this case, there will be differences between the original and copy-pasted text in part of these characters.

Intelligent2013 added a commit to metanorma/mn-native-pdf that referenced this issue Dec 8, 2024
Intelligent2013 added a commit to metanorma/mn-native-pdf that referenced this issue Dec 8, 2024
Intelligent2013 added a commit to metanorma/mn-native-pdf that referenced this issue Dec 8, 2024
@Intelligent2013
Copy link
Contributor Author

Intelligent2013 commented Dec 8, 2024

Found 8 characters which require to use the dedicated characters:

  • U+3001 IDEOGRAPHIC COMMA (、) to U+FE11 PRESENTATION FORM FOR VERTICAL IDEOGRAPHIC COMMA (︑)
  • U+FE50 SMALL COMMA (﹐) to U+FE10 PRESENTATION FORM FOR VERTICAL COMMA (︐)
  • U+FE51 SMALL IDEOGRAPHIC COMMA (﹑) to U+FE11 PRESENTATION FORM FOR VERTICAL IDEOGRAPHIC COMMA (︑)
  • U+FF0C FULLWIDTH COMMA (,) to U+FE10 PRESENTATION FORM FOR VERTICAL COMMA (︐)
  • U+FF1A FULLWIDTH COLON (:) to U+FE13 PRESENTATION FORM FOR VERTICAL COLON (︓)
  • U+FF1B FULLWIDTH SEMICOLON (;) to U+FE14 PRESENTATION FORM FOR VERTICAL SEMICOLON
  • U+FF01 FULLWIDTH EXCLAMATION MARK (!) to U+FE15 PRESENTATION FORM FOR VERTICAL EXCLAMATION MARK (︕)
  • U+FF1F FULLWIDTH QUESTION MARK (?) to U+FE16 PRESENTATION FORM FOR VERTICAL QUESTION MARK (︖)

Intelligent2013 added a commit to metanorma/mn-native-pdf that referenced this issue Dec 9, 2024
Intelligent2013 added a commit to metanorma/mn-native-pdf that referenced this issue Dec 9, 2024
Intelligent2013 added a commit to metanorma/mn-native-pdf that referenced this issue Dec 13, 2024
Intelligent2013 added a commit to metanorma/mn-native-pdf that referenced this issue Dec 13, 2024
Intelligent2013 added a commit to metanorma/metanorma.org that referenced this issue Dec 15, 2024
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: 🏗 In progress
Development

No branches or pull requests

4 participants