metanorma / metanorma-gb

Metanorma processor for GB: write Chinese Standards using GbDoc
BSD 2-Clause "Simplified" License
2 stars 3 forks source link

Cover page elements accessible via document attributes #70

Closed ronaldtse closed 6 years ago

ronaldtse commented 6 years ago

These elements should be switchable between image or text (and in case of text, the font should be configurable): (Elements shown here https://github.com/riboseinc/gbdoc/#gb-standard-document-cover-page-elements)

(Reasons:

  1. StandardType Logo

    • Most of these logos are images. However, the "DBXX" prefix is sometimes a specific image, or a combination of the "DB" image with "XX" in text.
  2. StandardType text

    • We can reproduce these with system fonts quite well but again every system can be different. So we provide the option to render this line using an image (as GB/T 1.1 put it, "custom font"). For the StandardTypes we don't have images, we use text.
  3. Issuers text

    • Again we can do this quite well with text but the default GB issuers are in a stretched font and have special vertical spacing that cannot be reproduced in Word (can be done in HTML though). So we need to allow using an image to replace this element here. The issuers per types of standard can differ, and sometimes for the same sector standard type the issuers can also differ.

For these elements:

ronaldtse commented 6 years ago

Related to https://github.com/riboseinc/asciidoctor-gb/issues/69

opoudjis commented 6 years ago

1 is already being addressed as image + text mixture. To make the image + text mixture look nice would involve getting the DB "font", and then getting an image generator. I will not go there.

2 will need a library of images.

3 I took out the stretched font because it wasn't in the GB/T1.1 images. I can put it back in, but I'll need confirmation from Beijing. As to vertical spacing, I'll need more information; the tabular stacking of issuers is already implemented. Again, if you want images for issuers, we'll need a library of images.

And I have to say, I'm not convinced all of this is necessary at all. I'd need confirmation from whoever is consuming these Word documents that it's needed.

opoudjis commented 6 years ago

So this just has the option of an end user providing an image as a document attribute. OK, that's better.

ronaldtse commented 6 years ago

Indeed, it's just optional.

opoudjis commented 6 years ago

So, to reiterate: the font is configurable; and now, so is the stylesheet, since you can pass your own stylesheet in to any metanorma document. This issue is merely allowing an image instead of text to be supplied as a document attribute for the logo, the standard type, and the issuer.