2026-07-18 18:48:23 +02:00
|
|
|
#[
|
|
|
|
|
@@@state image_search_path.list :create Series of directories for image search
|
|
|
|
|
:value . imgsrc ../imgsrc ../dbg
|
|
|
|
|
@@@
|
|
|
|
|
]#
|
|
|
|
|
|
|
|
|
|
@@@state Image_search_path :desc Series of directories for image search
|
|
|
|
|
:value . imgsrc ../imgsrc ../dbg
|
|
|
|
|
@@@
|
|
|
|
|
|
|
|
|
|
@@@state Image_output_dir :desc Output directory for images :value img @@@
|
|
|
|
|
|
|
|
|
|
@@@state Image_default_width :desc Default width for images :value .667w @@@
|
|
|
|
|
|
2026-09-12 18:11:48 +02:00
|
|
|
@@@state Image_quality
|
|
|
|
|
:desc JPEG quality, 1 to 100, at which a photograph -- a raster with
|
|
|
|
|
no transparency, whether it arrives as JPEG, PNG or TIFF -- is
|
|
|
|
|
written to the image cache for the html and pdf targets. The
|
|
|
|
|
default keeps print quality at a fraction of the size; 100 copies
|
|
|
|
|
or converts the source unchanged, as before 2026-09-09.
|
|
|
|
|
:value 85
|
|
|
|
|
@@@
|
|
|
|
|
|
2026-07-18 18:48:23 +02:00
|
|
|
#
|
|
|
|
|
# @@@argtype pixels | a pixel count :pattern \d+px @@@
|
|
|
|
|
# @@image.k basename : Image read from a file @@
|
|
|
|
|
# @@image.html basename | width | height : @eval import image ; result = image.image(K) eval@ @@
|
2026-07-22 18:17:43 +02:00
|
|
|
|
2026-08-06 13:11:37 +02:00
|
|
|
# An image once had its own position type, for the sake of the "none" value
|
|
|
|
|
# (no positioning container). That value is meaningful for any block
|
|
|
|
|
# element, so the shared hpos type carries it and an image is placed by the
|
|
|
|
|
# hpos_args option set like every other block element.
|
2026-07-22 18:17:43 +02:00
|
|
|
|
2026-08-06 13:11:37 +02:00
|
|
|
@@image.k
|
2026-07-18 18:48:23 +02:00
|
|
|
basename
|
|
|
|
|
:id
|
|
|
|
|
:width.length .5w
|
2026-08-06 13:11:37 +02:00
|
|
|
@caption_args@
|
2026-07-18 18:48:23 +02:00
|
|
|
:vmargin.bool true
|
2026-08-06 13:11:37 +02:00
|
|
|
@hpos_args@
|
2026-07-18 18:48:23 +02:00
|
|
|
:rel
|
|
|
|
|
:abswidth.number 0.0
|
|
|
|
|
:border.bool false
|
|
|
|
|
:
|
2026-08-06 13:11:37 +02:00
|
|
|
An image read from a file. The basename names the file, which is looked
|
|
|
|
|
for in the image search path and converted to a format the target can use.
|
|
|
|
|
^:width is the image's width in the text column, ^:hpos and ^:offset place
|
|
|
|
|
it there, and the caption arguments caption it.
|
2026-07-18 18:48:23 +02:00
|
|
|
@@
|
|
|
|
|
|
2026-08-12 17:20:23 +02:00
|
|
|
@@image.html,tex :: @eval image.Image(K) eval@ @@
|
2026-08-06 13:11:37 +02:00
|
|
|
|
|
|
|
|
@@image_grid.k
|
2026-07-22 18:17:43 +02:00
|
|
|
image_specs.rest(2)
|
2026-07-18 18:48:23 +02:00
|
|
|
:cell_number.bool false
|
|
|
|
|
:landscape.bool false
|
|
|
|
|
:scale.number 0.98
|
2026-08-06 13:11:37 +02:00
|
|
|
@caption_args@
|
|
|
|
|
@hpos_args@
|
2026-07-18 18:48:23 +02:00
|
|
|
:thumbnail.bool false
|
|
|
|
|
:allow_break.bool true
|
|
|
|
|
:id
|
|
|
|
|
:rel
|
|
|
|
|
:hsep.number 0.02
|
2026-08-06 13:11:37 +02:00
|
|
|
: A grid of images
|
2026-07-18 18:48:23 +02:00
|
|
|
@@
|
|
|
|
|
|
2026-08-12 17:20:23 +02:00
|
|
|
@@image_grid.html,tex :: @eval image_grid.Image_grid(K) eval@ @@
|
2026-08-06 13:11:37 +02:00
|
|
|
|
2026-08-12 17:20:23 +02:00
|
|
|
@@fig.k spec.figure_id : The caption title for a figure @@
|
|
|
|
|
@@fig.html,tex :: @reference *spec* | Figure @ @@
|