-
Notifications
You must be signed in to change notification settings - Fork 7
Image size
Whereas base Markdown requires HTML code to constrain the size of an image, Quarkdown introduces a new syntax extension to achieve the same result in a more elegant and efficient way:
!(200x150)[Alt](image.png)
<!-- or -->
!(200*150)[Alt](image.png)
<!-- or -->
!(200 150)[Alt](image.png)
The previous (equivalent) examples load image.png
with the label Alt
as CommonMark Markdown would do, but also adding an additional size constraint, making the visible image fit into a 200px by 150px box.
Apart from pixels, whose unit can be omitted, any other size unit is supported. In this case the x
delimiter can no longer be used, in favor of either *
or a space.
!(5cm*35mm)[Alt](image.png)
<!-- or -->
!(2.5in 1cm)[Alt](image.png)
In case one of the components (width or height) is equal to _
(underscore), it becomes automatic, meaning that component is automatically calculated in order to keep the original aspect ratio.
Examples:
-
300x_
,5cm*_
,2in _
(auto height) -
_x100
,_*15mm
,_ 2in
(auto width)
- Syntax of a function call
- Declaring functions
- Dynamic typing
- Localization
- Including other Quarkdown files
- Importing external libraries
- Document metadata
- Theme
- Page format
- Page margin content
- Page counter
- Automatic page break
- Numbering
- Table of contents
- Stacks (row, column, grid)
- Align
- Container
- Box
- Collapsible
- Whitespace
- String
- Number
- Markdown content
- Boolean
- Enumeration entry
- Iterable
- Dictionary
- Range
- Lambda
- Size(s)
- Color
- Dynamic