Am 22.11.2025 um 21:56 schrieb Henning Hraban Ramm:
I’m trying to describe the "factor" parameter.

According to the reference (i.e. interface), factor can become:
fit broad max auto default
In the source (grph-trf.mk*), there’s also "min".

- "broad" fails with a "missing )", see below.

grph-trf.mkxl

-\defcsname\??scalenorm\v!broad \endcsname#1#-#-#-#2{\global#1{#2-(\externalfigureparameter\c!bodyfont\c!bodyfont)*4}} % todo +\defcsname\??scalenorm\v!broad \endcsname#1#-#-#-#2{\global#1{#2-(\externalfigureparameter\c!bodyfont)*4}} % todo

- I don’t see a difference between "max" and "fit" (both just use the max height and ignore the max width). - "min" fills the defined max space ignoring the ration and thus distorting the image.

It works as intended when you don't set limits to the image size.

\setupexternalfigures[location=default]

\starttext

\startframed[frame=off,offset=overlay,width=6cm,height=6cm]
\clip[width=\framedwidth,height=\framedheight]
  {\centerbox{\externalfigure[hacker][factor=min]}}
\stopframed

\startframed[frame=off,offset=overlay,width=6cm,height=6cm]
\clip[width=\framedwidth,height=\framedheight]
  {\centerbox{\externalfigure[mill][factor=min]}}
\stopframed

\stoptext

Wolfgang

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : [email protected] / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

Reply via email to