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

make image size attributes consistent with Asciidoctor documentation:… #743

Merged
merged 1 commit into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions author/topics/blocks/figures.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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]
----
====

Expand All @@ -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]
--
====

Expand All @@ -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]
--
====

Expand All @@ -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]
--
====

Expand All @@ -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)
Expand Down Expand Up @@ -321,4 +318,4 @@ image::logo.jpg[]
[.source]
<<iso1212>>, reformatted
====
--
--
11 changes: 4 additions & 7 deletions author/topics/blocks/images.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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]
----
====

Expand All @@ -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]
--
====

Expand All @@ -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]
--
====

Expand All @@ -141,7 +138,7 @@ An unspecified dimension is considered `auto`.
[source,asciidoc]
--
[height=150]
image::logo.jpg[]
image::logo.jpg[height=150]
--
====

Expand Down
Loading