diff --git a/author/itu/topics/markup.adoc b/author/itu/topics/markup.adoc index b30a439d..cd1732d9 100644 --- a/author/itu/topics/markup.adoc +++ b/author/itu/topics/markup.adoc @@ -46,9 +46,9 @@ Renders as: ____ |=== h|Editors: |Andreas Reis | E-mail: pujaris@who.int -| |World Health Organization +| |World Health Organization | | |Sameer Pujari | E-mai: pujaris@who.int -| |World Health Organization +| |World Health Organization | |=== ____ @@ -263,7 +263,7 @@ e.g. NOTE: This editorial rule is mandated by the ITU Editorial Team, but is not described in the ITU-T Author's Guide. -Table titles and column titles are automatically +Table titles and column titles are automatically capitalised [added in https://github.com/metanorma/isodoc/releases/tag/v2.4.3]. To prevent this, you will need to set the capitalisation of the initial word to "none", using CSS: diff --git a/author/topics/blocks/figures.adoc b/author/topics/blocks/figures.adoc index 3ed90c66..5aac5236 100644 --- a/author/topics/blocks/figures.adoc +++ b/author/topics/blocks/figures.adoc @@ -415,3 +415,81 @@ image::logo.jpg[] ==== -- ====== + + +== SVG: re-mapping hyperlinks + +// SVG embedding + +Metanorma supports the inclusion of SVG images. + +SVGs can include hyperlinks on parts of the image, expressed as ``. +When an SVG image is created independently of the current document, the +hyperlinks may point to arbitrary destinations. + +A document author may want to update these hyperlinks to point to anchors within +the document. Metanorma supports the re-mapping of SVG +hyperlinks to have them point to parts of a Metanorma document. + +The `svgmap` function supports the re-mapping of SVG +hyperlinks [added in https://github.com/metanorma/metanorma-standoc/releases/tag/v1.8.3]. +To use this, the SVG image is wrapped in a figure block with the role attribute +`[.svgmap]` instead of `[figure]`. + +The syntax of `svgmap` is as follows. + +[source,asciidoc] +---- + [.svgmap] +==== +image::{filename}.svg[] <1> + +* {remapped-link-1}; {original-link-1} <2> <3> +* ... +==== +---- +<1> `{filename}.svg` is the filename of the SVG image with hyperlinks. +<2> `{remapped-link-1}` is the desired destination that replaces +`{original-link-1}`, it could be a hyperlink or a cross-reference. +<3> `{original-link-1}` is an existing hyperlink (content of the `href`) in the SVG +image. The links are separated by a semicolon. + +This allows the author to easily update the hyperlinks within the SVG image to +point to the appropriate locations in the current document. + +.Example of `svgmap` usage +====== +In this block: + +[source,asciidoc] +---- + [.svgmap] +==== +image::action_schemaexpg1.svg[] + +* <>; mn://action_schema +* http://www.example.org[]; http://www.example.com +* <>; 3 +==== +---- + +The image SVG file is `action_schemaexpg1.svg`, and it contains hyperlinks to three destinations: + +* `mn://action_schema` +* `http://www.example.com` +* `3` + +This block instructs Metanorma to rewrite those hyperlink destinations in the +SVG, expressed as ``, to point to the location of the references +on the left side: + +* `mn://action_schema` is rewritten to the location in the document of the +`ref1` anchor (or bibliographic reference); the optional cross-reference text, +`Computer`, is inserted in the SVG hyperlink, replacing whatever text is already +there, and can be used as a mouseover tip. + +* `http://www.example.com` is rewritten to `http://www.example.org`. + +* `3` is rewritten as the destination of the implicit cross-reference +`<>`. +======