metanorma-taste 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.adoc +65 -1
- data/data/csa/csa.standard.xsl +161 -77
- data/data/enosema/config.yaml +1 -0
- data/data/oiml/config.yaml +7 -4
- data/data/oiml/oiml-logo-full.png +0 -0
- data/data/oiml/oiml-logo.pdf +593 -298
- data/data/oiml/oiml-logo.png +0 -0
- data/data/oiml/oiml-logo_full-dark.svg +1 -0
- data/data/oiml/oiml-logo_full-light.svg +1 -0
- data/data/oiml/oiml-logo_icon-dark.svg +1 -0
- data/data/oiml/oiml-logo_icon-light.svg +1 -0
- data/data/oiml/oiml.xsl +8 -8
- data/data/oiml-cs/config.yaml +38 -0
- data/data/oiml-cs/i18n.yaml +12 -0
- data/data/oiml-cs/oiml-logo-cs-dark.svg +1 -0
- data/data/oiml-cs/oiml-logo-cs-light.svg +1 -0
- data/data/pdfa/pdfa.xsl +480 -262
- data/lib/metanorma/taste/base.rb +13 -2
- data/lib/metanorma/taste/taste_config.rb +5 -0
- data/lib/metanorma/taste/version.rb +1 -1
- data/lib/metanorma/taste_register.rb +89 -16
- metadata +11 -3
- data/data/oiml/logo.jpeg +0 -0
- data/data/oiml/oiml-logo.svg +0 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 686d4d785e6ed2890e94fb9c12cfaa0c4fbcc37968ed7ebdfc893b2ec7a48b07
|
|
4
|
+
data.tar.gz: c7016844988a435795d95f1acef03bc189bb258c9e10db6e314e1d9da5246fe1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2d31290947c4efce3b6d095c49697fa6807f14b2b6a8df05e493bae9e54b9ebdbe7d7a306c1ef01aeb322dab63340957d1c58687ccc65927950e3efbad3682a1
|
|
7
|
+
data.tar.gz: 7842302cc3f83237352fdaf86e07c8fa99c4d3c2dc73bde895d15a03bc18e070f383d4e011f20327851558d60e7bf1b18bc6ff35c67f982c472d392572b75d57
|
data/README.adoc
CHANGED
|
@@ -28,7 +28,9 @@ code is required.
|
|
|
28
28
|
|
|
29
29
|
**Base flavor dependency**:: Every taste must specify a `base-flavor` (e.g.,
|
|
30
30
|
`iso`, `ietf`, `ieee`) that provides the document structure and validation
|
|
31
|
-
logic.
|
|
31
|
+
logic. A taste may instead inherit from another taste with `base-taste`, in
|
|
32
|
+
which case the parent taste supplies the `base-flavor`; see
|
|
33
|
+
<<taste-inheritance>>.
|
|
32
34
|
|
|
33
35
|
**Lightweight customization**:: Tastes can override document attributes, provide
|
|
34
36
|
custom copyright notices, modify presentation styling, and add
|
|
@@ -189,6 +191,11 @@ currently available:
|
|
|
189
191
|
|`iso`
|
|
190
192
|
|International Organization of Legal Metrology specifications and standards with OIML branding and copyright
|
|
191
193
|
|
|
194
|
+
|`oiml-cs`
|
|
195
|
+
|OIML Certification System
|
|
196
|
+
|`oiml` (via `base-taste`)
|
|
197
|
+
|OIML Certification System publications (PD, OD, CID), inheriting the `oiml` taste and overriding only the OIML-CS logo, i18n, publisher and doctypes
|
|
198
|
+
|
|
192
199
|
|`wmo`
|
|
193
200
|
|World Meteorological Organization
|
|
194
201
|
|`iho`
|
|
@@ -250,6 +257,7 @@ The main configuration file for each taste:
|
|
|
250
257
|
flavor: string # The name of the custom flavor (e.g., "icc")
|
|
251
258
|
owner: string # Organization name (e.g., "International Color Consortium")
|
|
252
259
|
base-flavor: string # Base Metanorma flavor to extend (e.g., "iso")
|
|
260
|
+
base-taste: string # Optional: another taste to inherit config and assets from (e.g., "oiml"); see Taste inheritance
|
|
253
261
|
base-override: # Document attributes to override from base flavor
|
|
254
262
|
filename-attributes: # Metanorma document attributes that contain filenames
|
|
255
263
|
copyright-notice: string # Path to boilerplate file (e.g., "copyright.adoc")
|
|
@@ -372,6 +380,62 @@ committees:
|
|
|
372
380
|
----
|
|
373
381
|
====
|
|
374
382
|
|
|
383
|
+
[[taste-inheritance]]
|
|
384
|
+
==== Taste inheritance (`base-taste`)
|
|
385
|
+
|
|
386
|
+
A taste can inherit from another taste by declaring `base-taste` instead of
|
|
387
|
+
`base-flavor`. This keeps related tastes DRY: the child inherits all of the
|
|
388
|
+
parent taste's configuration and content assets, and overrides only the keys
|
|
389
|
+
and files that genuinely differ.
|
|
390
|
+
|
|
391
|
+
Resolution rules:
|
|
392
|
+
|
|
393
|
+
* Configuration is merged parent-first, child-wins. Nested mappings (such as
|
|
394
|
+
`base-override.filename-attributes` and `base-override.value-attributes`) are
|
|
395
|
+
merged key-by-key; arrays and scalars (such as `doctypes`,
|
|
396
|
+
`bibliography-sort` and `base-flavor`) are replaced wholesale by the child
|
|
397
|
+
when it specifies them.
|
|
398
|
+
* Content assets are resolved from the child taste's directory first, then the
|
|
399
|
+
parent's. A child therefore ships only the assets it overrides and reuses the
|
|
400
|
+
parent's copyright notice, stylesheets, portfolio pages, and so on.
|
|
401
|
+
* `base-flavor` is inherited from the parent unless the child overrides it, so
|
|
402
|
+
the child maps to the same underlying Metanorma flavor.
|
|
403
|
+
* Multi-level inheritance chains are supported; cycles and unknown parents are
|
|
404
|
+
reported as configuration errors.
|
|
405
|
+
|
|
406
|
+
.The `oiml-cs` taste inherits `oiml`, overriding only its own logo, i18n, publisher and doctypes
|
|
407
|
+
[example]
|
|
408
|
+
====
|
|
409
|
+
[source,yaml]
|
|
410
|
+
----
|
|
411
|
+
flavor: oiml-cs
|
|
412
|
+
owner: OIML Certification System
|
|
413
|
+
base-taste: oiml # inherit OIML (base-flavor iso, shared XSL, copyright, portfolio, fonts)
|
|
414
|
+
base-override:
|
|
415
|
+
filename-attributes:
|
|
416
|
+
i18n-dictionary: i18n.yaml # OIML-CS-specific
|
|
417
|
+
publisher-logo: oiml-logo-cs-light.svg # OIML-CS cover logo
|
|
418
|
+
value-attributes:
|
|
419
|
+
publisher: OIML Certification System
|
|
420
|
+
publisher_abbr: OIML-CS
|
|
421
|
+
bibliography-sort:
|
|
422
|
+
- abbrev: OIML-CS
|
|
423
|
+
rank: 1
|
|
424
|
+
name: International Organization of Legal Metrology
|
|
425
|
+
doctypes:
|
|
426
|
+
- taste: procedural-document
|
|
427
|
+
base: international-standard
|
|
428
|
+
- taste: operational-document
|
|
429
|
+
base: international-standard
|
|
430
|
+
- taste: clarification-document
|
|
431
|
+
base: international-standard
|
|
432
|
+
----
|
|
433
|
+
|
|
434
|
+
Here `copyright.adoc`, the PDF stylesheet (`oiml.xsl`) and the PDF-portfolio
|
|
435
|
+
page are absent from the `oiml-cs` taste directory: they are inherited from the
|
|
436
|
+
`oiml` taste.
|
|
437
|
+
====
|
|
438
|
+
|
|
375
439
|
==== i18n.yaml
|
|
376
440
|
|
|
377
441
|
Internationalization dictionary for custom text translations:
|