From 16446c62d7da63c02a1ec87b6eacc6e315f12a1f Mon Sep 17 00:00:00 2001 From: Nick Nicholas Date: Thu, 7 Mar 2024 19:12:40 +1100 Subject: [PATCH] make image size attributes consistent with Asciidoctor documentation: https://github.com/metanorma/metanorma/issues/354 --- author/topics/blocks/figures.adoc | 15 ++++++--------- author/topics/blocks/images.adoc | 11 ++++------- 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/author/topics/blocks/figures.adoc b/author/topics/blocks/figures.adoc index 29cfc62b..1d8cc54f 100644 --- a/author/topics/blocks/figures.adoc +++ b/author/topics/blocks/figures.adoc @@ -172,8 +172,7 @@ NOTE: The pixel is the only supported unit in image sizing right now. .Image resizing specifying `height` and `width` attributes in pixels [source] ---- -[height=150px,width=100px] -image::logo.jpg[] +image::logo.jpg[height=150px,width=100px] ---- ==== @@ -184,8 +183,7 @@ In the `height` and `width` attributes, the `px` suffix may be omitted. .Image resizing with values omitting `px` unit [source,asciidoc] -- -[height=150,width=100] -image::logo.jpg[] +image::logo.jpg[height=150,width=100] -- ==== @@ -196,8 +194,7 @@ retain the aspect ratio of the original image. .Aspect ratio is retained with `width` set to `auto` based on the value of `height` [source,asciidoc] -- -[height=150,width=auto] -image::logo.jpg[] +image::logo.jpg[height=150,width=auto] -- ==== @@ -207,8 +204,7 @@ An unspecified dimension is considered `auto`. .Aspect ratio is retained when setting `height` but not `width` [source,asciidoc] -- -[height=150] -image::logo.jpg[] +image::logo.jpg[height=150] -- ==== @@ -218,6 +214,7 @@ e.g. `width='50%'` [added in https://github.com/metanorma/isodoc/releases/tag/v2 NOTE: Treatment of image resizing may slightly differ across output formats. + === Captions and titles As elsewhere in Metanorma, the caption of an image (of the figure containing the image) @@ -321,4 +318,4 @@ image::logo.jpg[] [.source] <>, reformatted ==== --- \ No newline at end of file +-- diff --git a/author/topics/blocks/images.adoc b/author/topics/blocks/images.adoc index 9d56ad2e..ed2c5b00 100644 --- a/author/topics/blocks/images.adoc +++ b/author/topics/blocks/images.adoc @@ -105,8 +105,7 @@ NOTE: The pixel is the only supported unit in image sizing right now. .Image resizing specifying `height` and `width` attributes in pixels [source] ---- -[height=150px,width=100px] -image::logo.jpg[] +image::logo.jpg[height=150px,width=100px] ---- ==== @@ -117,8 +116,7 @@ In the `height` and `width` attributes, the `px` suffix may be omitted. .Image resizing with values omitting `px` unit [source,asciidoc] -- -[height=150,width=100] -image::logo.jpg[] +image::logo.jpg[height=150,width=100] -- ==== @@ -129,8 +127,7 @@ retain the aspect ratio of the original image. .Aspect ratio is retained with `width` set to `auto` based on the value of `height` [source,asciidoc] -- -[height=150,width=auto] -image::logo.jpg[] +image::logo.jpg[height=150,width=auto] -- ==== @@ -141,7 +138,7 @@ An unspecified dimension is considered `auto`. [source,asciidoc] -- [height=150] -image::logo.jpg[] +image::logo.jpg[height=150] -- ====