summaryrefslogtreecommitdiff
path: root/tex/context/base/x-res-04.tex
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/x-res-04.tex')
-rw-r--r--tex/context/base/x-res-04.tex90
1 files changed, 45 insertions, 45 deletions
diff --git a/tex/context/base/x-res-04.tex b/tex/context/base/x-res-04.tex
index 826a07d23..578be1a7e 100644
--- a/tex/context/base/x-res-04.tex
+++ b/tex/context/base/x-res-04.tex
@@ -1,18 +1,5 @@
-%D \module
-%D [ file=x-fig-04,
-%D version=2001.03.21,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Figure Base Loading,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
% hele base laden
-
+
\setXMLfallbackmode3
% icon : preview
@@ -26,7 +13,20 @@
% applet
% application
-\usemodule[res-00] % basic element definitions
+%D \module
+%D [ file=x-fig-04,
+%D version=2001.03.21,
+%D title=\CONTEXT\ Style File,
+%D subtitle=Figure Base Loading,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\usemodule[res-00] % basic element definitions
%D This module implements an interface to a figure database
%D and file. The database is formatted in \XML\ conforming
@@ -36,7 +36,7 @@
%D
%D A figure base coded this way looks like:
%D
-%D \starttyping
+%D \starttypen
%D <!-- texexec --pdf --use=fig-01 figtest.xml -->
%D
%D <figurelibrary language="nl">
@@ -63,28 +63,28 @@
%D </figure>
%D
%D </figurelibrary>
-%D \stoptyping
+%D \stoptypen
%D
%D You can convert this base into a \PDF\ file using
%D \TEXEXEC\ and another module in this suite.
%D
-%D \starttyping
+%D \starttypen
%D texexec --pdf --use=fig-make yourfile.xml
-%D \stoptyping
+%D \stoptypen
%D
%D You can now select a graphic from this file using the
%D
-%D \starttyping
+%D \starttypen
%D \externalfigure[a dutch cow][width=4cm]
-%D \stoptyping
+%D \stoptypen
%D
%D This module overloads this command so that a figure is
%D it first searched in the list of databases.
%D
-%D \starttyping
+%D \starttypen
%D \usemodule [fig-base]
%D \usefigurebases[yourfile]
-%D \stoptyping
+%D \stoptypen
%D
%D The special keyword \type {reset} can be used to reset
%D this list.
@@ -111,7 +111,7 @@
\newcounter\figurefilepage
-% loading a complete figure base
+% loading a complete figure base
\startXMLmapping[rl:load]
@@ -122,7 +122,7 @@
\figbase@savedata{\XMLflush{rl:label}}\figurefilepage
\egroup}
-\stopXMLmapping
+\stopXMLmapping
\def\loadfigurebase#1%
{\doifnotflagged{rl:#1}
@@ -133,14 +133,14 @@
\doglobal\newcounter\figurefilepage
\processXMLfilegrouped{#1.xml}
\stopXMLmapping
- \doglobal\setflag{rl:#1}
+ \doglobal\setflag{rl:#1}
\stopnointerference}}
-\def\figbase@savedata#1#2%
+\def\figbase@savedata#1#2%
{%\writestatus{figbase}{data of #1 loaded}%
\doglobal\saveXMLdatastructure{rl:rl:#1}{record}{page="#2"}{}{rl:figure}{}}
-% locating and if needed loading one figure record
+% locating and if needed loading one figure record
\startXMLmapping[rl:find]
@@ -157,14 +157,14 @@
{\XMLflush{rl:figure}
\doglobal\increment\figurefilepage
\doif\askedlabel{\XMLflush{rl:label}}
- {\ifnum\figurebasemode=\plusone % load used ones
+ {\ifnum\figurebasemode=\plusone % load used ones
\figbase@savedata\askedlabel\figurefilepage
\fi
\doglobal\saveXMLdata{rl:l:manipulation}{rl:manipulation}%
\xdef\figurefilelabel {\XMLflush{rl:label}}%
\xdef\figurefilefile {\XMLflush{rl:file}}%
\xdef\figurefileoriginal{\XMLflush{rl:original}}%
- \xdef\figurefilename {\XMLflush{rl:file}}
+ \xdef\figurefilename {\XMLflush{rl:file}}
\endinput}%
\egroup}
@@ -173,7 +173,7 @@
{\xdef\figurefilename{\XMLpop{rl:file}}
\xdef\figurefilepage{\XMLop {page}}}
-\stopXMLmapping
+\stopXMLmapping
\def\getfigurefilename#1#2%
{\ifnum\figurebasemode=\plustwo \loadfigurebase{#1} \fi
@@ -191,8 +191,8 @@
\stopXMLmapping
\stopnointerference}
-% todo: niet toegekende naam doorgeven aan calculate en pad
-% in padstring
+% todo: niet toegekende naam doorgeven aan calculate en pad
+% in padstring
\def\dogetfigurefilename#1%
{\ifx\figurefilename\empty
@@ -236,7 +236,7 @@
\def\docommando##1%
{\getfigurefilename{##1}{#3}%
\ifx\figurefilename\empty\else
- \gdef\figurefilelabel{#3}%
+ \gdef\figurefilelabel{#3}%
\quitcommalist
\fi}%
\processcommacommand[\figurebaselist]\docommando
@@ -249,16 +249,16 @@
{\let\figurepathlist\figurefilebasepath
\normalcalculateexternalfigure
[#1][#2][\figurefilebase.pdf]%
- [\c!page=\figurefilepage,#4][#5][#6]}
- {\@EA\stripspaces\@EA\from\figurefilename\to\figurefilename
+ [\c!pagina=\figurefilepage,#4][#5][#6]}
+ {\@EA\stripspaces\@EA\from\figurefilename\to\figurefilename
\normalcalculateexternalfigure
[#1][#2][\figurefilename][#4][#5][#6]}%
\fi
\fi}
-% management
+% management
-% will become \useresourcelibrary
+% will become \useresourcelibrary
\def\usefigurebase[#1]%
{\doifelse{#1}\v!reset
@@ -269,30 +269,30 @@
\resetfigurefilebase
-% manipulations / todo: fixed order
+% manipulations / todo: fixed order
-\defineXMLsave [rl:manipulation]
+\defineXMLsave [rl:manipulation]
-\defineXMLsingular [rl:background] [r=0,g=0,b=0,s=0,c=0,m=0,y=0,k=0]
+\defineXMLsingular [rl:background] [r=0,g=0,b=0,s=0,c=0,m=0,y=0,k=0]
{\global\setbox\foundexternalfigure\vbox
{\definecolor
[XMLRLcolor]
[r=\XMLop{r},g=\XMLop{g},b=\XMLop{b},s=\XMLop{s},%
c=\XMLop{c},m=\XMLop{m},y=\XMLop{y},k=\XMLop{k}]%
\framed
- [\c!frame=\v!off,\c!offset=\v!overlay,
- \c!background=\v!color,\c!backgroundcolor=XMLRLcolor]
+ [\c!kader=\v!uit,\c!offset=\v!overlay,
+ \c!achtergrond=\v!kleur,\c!achtergrondkleur=XMLRLcolor]
{\box\foundexternalfigure}}}
\defineXMLsingular [rl:viewport] [\??cp] % []
{\global\setbox\foundexternalfigure\vbox
- {\expandXMLta \getXMLta
+ {\expandXMLta \getXMLta
\clip
[\XMLta]
{\box\foundexternalfigure}}%
\global\setbox\foundexternalfigure\vbox
{\scale
- [\c!width=\figurewidth,\c!height=\figureheight]
+ [\c!hoogte=\figurewidth,\c!hoogte=\figureheight]
{\box\foundexternalfigure}}}
\defineXMLsingular [rl:dimensions] [width=,height=]