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

Allow specification of cover image #288

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

Allow specification of cover image #288

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

Comments

@ronaldtse
Copy link
Contributor

ronaldtse commented Jan 13, 2025

IHO now allows for cover images in newer documents.

B-12

Screenshot 2025-01-13 at 9 27 41 AM

B-13

Screenshot 2025-01-13 at 9 27 51 AM

M-2

Screenshot 2025-01-13 at 9 28 04 AM

S-44

image

S-65

Screenshot 2025-01-13 at 9 28 37 AM
@ronaldtse ronaldtse added the enhancement New feature or request label Jan 13, 2025
@github-project-automation github-project-automation bot moved this to 🆕 New in Metanorma Jan 13, 2025
@ronaldtse ronaldtse moved this from 🆕 New to 🏔 High priority in Metanorma Jan 13, 2025
@opoudjis
Copy link
Contributor

opoudjis commented Feb 13, 2025

The code for specifying coverpage images has already been moved to standoc: this keeps coming up as a requirement for different flavours.

https://www.metanorma.org/author/ref/document-attributes/

:coverpage-image:
Comma-delimited list of image locations, for images to be included on the (PDF) cover page. All image locations are relative to the source document. Currently only supported for BSI, ITU, JIS, Plateau.

That means that if you specify a coverpage image in the same way in IHO, it will be ingested into the Semantic XML already. It's just that nothing will do anything to render it under IHO.

Adding IHO to the list of flavours that use coverpage images in their PDFs is a PDF task, and there is nothing further for me to do here (unless we decide HTML or DOC is to support coverpage images as well—and we shouldn't.)

So this task is for @Intelligent2013

@opoudjis opoudjis assigned Intelligent2013 and unassigned opoudjis Feb 13, 2025
@Intelligent2013
Copy link
Contributor

Currently, the cover page renders via IHO XSLT so:

Image

There are two kinds of the cover page in the first post:

  • similar to the cover page generates by XSLT + inner image in the rectangle
  • 'free design' cover page

There are two options

  1. the document author prepares the image cover.pdf and specify the document attribute :coverpage-image: cover.pdf, and XSLT fits the image into the rectangle (yellow box on the screenshot):

Image

If author wants to use the 'free design' cover page, then adds the additional attribute presentation-metanorma-coverpage-image-fullpage (the attribute name just for example, may be changed):

:presentation-metanorma-coverpage-image-fullpage: true

In this case, XSLT just puts the cover.pdf image 'as is' in the PDF and doesn't add any another data on the cover page.

  1. the document author prepares the image cover.pdf and specify the document attribute :coverpage-image: cover.pdf.
    In this case, XSLT just puts the cover.pdf image 'as is' in the PDF and doesn't add any another data on the cover page.
    I.e. author is full responsible for cover page layout.

Note: in both cases, if author doesn't specify the document attribute :coverpage-image:, then cover page will be render by XSLT (as currently).

I like the option 1. I assume that the free design cover pages were used for old documents (2017, 2018 year), and only new layout is using currently. But it just only my assumption...

@ronaldtse which option do you prefer?

@Intelligent2013 Intelligent2013 moved this from 🏔 High priority to 🏗 In progress in Metanorma Feb 15, 2025
@Intelligent2013
Copy link
Contributor

And also need to add the edition number:
Image

Currently, only document identifier is showing:
Image

@Intelligent2013
Copy link
Contributor

And also need to add the edition number: Image

Currently, only document identifier is showing: Image

In the original PDF (https://github.com/metanorma/S-102-Product-Specification/blob/main/reference-docs/S-102_EN_Bathymetric%20Surface%20Product%20Specification_Ed2.0.0.pdf) the edition number shows under the title:

Image

therefore the edition number after the document identifier should be render only when there is the :coverpage-image: attribute.

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

3 participants