Skip to content

Commit

Permalink
table widths, figure widths for PDF: metanorma/metanorma-iso#1111
Browse files Browse the repository at this point in the history
  • Loading branch information
opoudjis authored and ronaldtse committed Mar 18, 2024
1 parent 88a5ccf commit fa5c64c
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
20 changes: 20 additions & 0 deletions author/topics/blocks/images.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,26 @@ image::logo.jpg[height=150]
--
====


The `width` attribute, can also have the values `full-page-width`, `narrow`,
and `text-width`, which is used in PDF to indicate how wide an image is rendered
against text, particularly if the text is formatted in
multiple columns [added in https://github.com/metanorma/metanorma-standoc/releases/tag/v2.8.6].

[source,asciidoc]
----
[width=narrow]
image::abc.png[]
----

[source,asciidoc]
----
[.figure,width=narrow]
====
image::abc.png[]
====
----

NOTE: Treatment of image resizing may slightly differ across output formats.


Expand Down
13 changes: 12 additions & 1 deletion author/topics/blocks/tables.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,9 @@ It could be either:

* a percentage (e.g. `70%`); or
* a pixel count (e.g. `500px`).
* `full-page-width` and `text-width`, used only in PDF [added in https://github.com/metanorma/metanorma-standoc/releases/tag/v2.8.6]

NOTE: The `width` attribute value aligns with HTML CSS and HTML 4 behavior.
NOTE: The non-PDF `width` attribute values align with HTML CSS and HTML 4 behavior.

[source,asciidoc]
----
Expand All @@ -113,6 +114,16 @@ NOTE: The `width` attribute value aligns with HTML CSS and HTML 4 behavior.

Will result in the table width spanning 70% of the rendered output medium.

[source,asciidoc]
----
[width=full-page-width]
|===
|A |B
|C |D
|===
----

NOTE: This feature is not supported in typical AsciiDoc.

== Notes and footnotes
Expand Down

0 comments on commit fa5c64c

Please sign in to comment.