summaryrefslogtreecommitdiff
path: root/tex/context/base/supp-emp.tex
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/supp-emp.tex')
-rw-r--r--tex/context/base/supp-emp.tex76
1 files changed, 42 insertions, 34 deletions
diff --git a/tex/context/base/supp-emp.tex b/tex/context/base/supp-emp.tex
index bd0736308..15489bca7 100644
--- a/tex/context/base/supp-emp.tex
+++ b/tex/context/base/supp-emp.tex
@@ -29,11 +29,11 @@
%D
%D Therefore, \PDFTEX\ provides just these three primitives:
%D
-%D \starttabulatie[|l|l|]
+%D \starttabulate[|l|l|]
%D \NC \type {\pdfsavepos} \NC marks the current position \NC \NR
%D \NC \type {\pdflastxpos} \NC the last marked horizontal position \NC \NR
%D \NC \type {\pdflastypos} \NC the last marked vertical position \NC \NR
-%D \stoptabulatie
+%D \stoptabulate
%D
%D Based on these three primitives, very advanced systems can
%D be build, and for some time now, \CONTEXT\ has such a
@@ -45,7 +45,7 @@
%D {\special} fail when producing \PDF\ code directly. Take for
%D instance \EMTEX\ specials. When someone sent me a mail
%D asking if \PDFTEX\ did support those specials, the original
-%D answer was \citaat {no}, but in the last few years I have learned
+%D answer was \quotation {no}, but in the last few years I have learned
%D that you must never underestimate \TEX's capabilities.
%D
%D I must admit that I never use those specials myself, but
@@ -62,10 +62,10 @@
%D into the macros \type {\EMmoveto} and \type {\EMlineto},
%D like:
%D
-%D \starttypen
+%D \starttyping
%D \def\EMmoveto{\special{em:moveto}}
%D \def\EMlineto{\special{em:lineto}}
-%D \stoptypen
+%D \stoptyping
%D
%D They are used in macro packages to draw lines, and the
%D results are often boxes with content like the following:
@@ -83,9 +83,11 @@
%D This box will contain a triangle, and when typeset, it should
%D look like:
%D
-%D \startregelcorrectie[blanko]
-%D \haalbuffer
-%D \stopregelcorrectie
+%D \startlinecorrection[blank]
+%D \getbuffer
+%D \stoplinecorrection
+
+\def\EMlinewd{.4}
\ifx\dosetpositionpt\undefined % non context part
@@ -105,13 +107,11 @@
%D length. We need to convert this number into base points as
%D used by \POSTSCRIPT\ and \PDF. When done, we insert some
%D literal \PDF\ code into the text using \type {\pdfliteral}.
-%D Here, the \type {m} means \citeer {moveto}, the \type {l}
-%D means \citeer {lineto} and the \type {S} operator \citeer
+%D Here, the \type {m} means \quote {moveto}, the \type {l}
+%D means \quote {lineto} and the \type {S} operator \quote
%D {strokes} (draws) the line. The macro \type {\EMlinewd}
%D holds the linewidth in basepoints.
-\def\EMlinewd{.4}
-
\def\EMlineto
{\bgroup
\EMgetposition\EMlastlinex\EMlastliney
@@ -119,7 +119,7 @@
\count2=\EMlastmovey \advance\count2 -\EMlastliney
\divide\count0 65536
\divide\count2 65536
- \pdfliteral{\EMlinewd\space w 0 0 m \the\count0 \space\the\count2 \space l S}%
+ \PDFcode{\EMlinewd\space w 0 0 m \the\count0 \space\the\count2 \space l S}%
\global\let\EMlastmovex\EMlastlinex
\global\let\EMlastmovey\EMlastliney
\egroup}
@@ -136,21 +136,21 @@
%D shipped out, since \type {\write} postpones its action
%D until that moment. The file has entries like:
%D
-%D \starttypen
+%D \starttyping
%D \EMsetpos 1 4661756 46651918
%D \EMsetpos 2 5000359 46990521
%D \EMsetpos 3 4661756 46313315
%D \EMsetpos 4 5338962 46990521
%D \EMsetpos 5 4661756 45974712
-%D \stoptypen
+%D \stoptyping
%D
%D These lines are written with the command:
%D
-%D \starttypen
+%D \starttyping
%D \write\EMfile
%D {\EMsetpos\number\EMcounter
%D \space\number\pdflastxpos\space\number\pdflastypos}%
-%D \stoptypen
+%D \stoptyping
%D
%D In reality the argument to \type {\write} looks slightly
%D more complicated, because we have to make sure that the
@@ -231,12 +231,12 @@
%D \stopbuffer
%D
%D \startbuffer[pos-nl]
-%D \stelpositionerenin[eenheid=ex]
-%D \startpositioneren
+%D \setuppositioning[uniteenheid=ex]
+%D \startpositioning
%D \dostepwiserecurse{-10}{10}{1}
-%D {\positioneer(0,\recurselevel){\EMmoveto}
-%D \positioneer(\recurselevel,0){\EMlineto}}
-%D \stoppositioneren
+%D {\position(0,\recurselevel){\EMmoveto}
+%D \position(\recurselevel,0){\EMlineto}}
+%D \stoppositioning
%D \stopbuffer
%D
%D \typebuffer[pos-en]
@@ -245,22 +245,22 @@
%D positioning mechanism, which positions the commands
%D using \TEX's skips and kerns.
%D
-%D \startregelcorrectie[blanko]
-%D \haalbuffer[pos-nl]
-%D \stopregelcorrectie
+%D \startlinecorrection[blank]
+%D \getbuffer[pos-nl]
+%D \stoplinecorrection
%D
%D Of course one should start and end the file with:
%D
-%D \starttypen
+%D \starttyping
%D \startEMspecials
%D \stopEMspecials
-%D \stoptypen
+%D \stoptyping
%D
%D and, if needed, reset the begin position at each page using:
%D
-%D \starttypen
+%D \starttyping
%D \resetEMspecials
-%D \stoptypen
+%D \stoptyping
\fi % end of non context part
@@ -309,7 +309,7 @@
\global\advance\EMlastmovey -\EMlastliney
\ScaledPointsToBigPoints{\number\EMlastmovex}\EMx
\ScaledPointsToBigPoints{\number\EMlastmovey}\EMy
- \pdfliteral{\EMlinewd\space w 0 0 m \EMx \space \EMy \space l S}%
+ \PDFcode{\EMlinewd\space w 0 0 m \EMx \space \EMy \space l S}%
\global\EMlastmovex\EMlastlinex
\global\EMlastmovey\EMlastliney}
@@ -333,7 +333,15 @@
%D this mechanism transparant to \DVI\ as well as \PDF\
%D output. We will use \type {\pdfiteral} as trigger.
-\ifx\pdfliteral\undefined
+\ifx\PDFcode\undefined
+ \ifx\pdfliteral\undefined
+ \def\PDFcode#1{\special{PDF: #1}}
+ \else
+ \let\PDFcode\pdfliteral
+ \fi
+\fi
+
+\ifx\PDFcode\undefined
\def\EMpdfordvi#1#2{#2}
\else\ifx\pdfoutput\undefined
\def\EMpdfordvi#1#2{#2}
@@ -363,9 +371,9 @@
%D macro does the job. Beware of the fact that \type
%D {\special}'s may interfere with the typesetting process.
%D
-%D \starttypen
+%D \starttyping
%D \setEMlinewidth{1pt}
-%D \stoptypen
+%D \stoptyping
\def\setEMlinewidth#1% this could be done more efficient for
{\bgroup % context alone, but it's a hack anyway
@@ -387,4 +395,4 @@
%D methods as well. Also, it is always good to have more roads
%D to reach the same goal.
-\endinput \ No newline at end of file
+\endinput