1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
% flm.latex.def.flmx.images -- images.
%
% The element:
% \flmxImage[width, height, alt, display, anchor]{<path>}
% an image: <path> is the file the program published for this output
% (beside the document, or as the author wrote it). Its keys:
% width, height the size FLM computed, LaTeX lengths (4.5cm, 120bp,
% ...), each where known;
% alt the alternative text, where the author gave one;
% display block (the image stands as a paragraph of its own) or
% inline (in the line of text), always written;
% anchor where the image is a reference target.
% default: \includegraphics[width=..., height=...]{<path>}, with the width
% and the height where given (at its natural size where neither is),
% inside \par\centering ... \par for display=block, in the line
% otherwise; the target of the anchor first; alt is not typeset.
%
% A template changes the look with
% \flmxDefineImageDefault{<code over #1, the path>}
% whose code sees the keys (\flmxKey{width}, \flmxIfKey{alt}{...}{...}).
\ExplSyntaxOn
\NewDocumentCommand \flmxImage
% The options of \includegraphics: the width and the height where given.
\cs_new:Npn \__flmx_image_options:
% #1 the path.
\cs_new_protected:Npn \__flmx_image:n #1
\flmxDefineImageDefault
\ExplSyntaxOff