summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2004-12-17 00:00:00 +0100
committerHans Hagen <pragma@wxs.nl>2004-12-17 00:00:00 +0100
commit5604cb0a875f6114b67391fd279060678a9b7937 (patch)
tree443afcf61e75ccfc0f68d851be02dfd50714a803 /tex
parentaade518a7e81df4cdf6b89559c5afc5192954a5e (diff)
downloadcontext-5604cb0a875f6114b67391fd279060678a9b7937.tar.gz
stable 2004.12.17
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/cont-new.tex7
-rw-r--r--tex/context/base/context.tex2
-rw-r--r--tex/context/base/core-fld.tex2
-rw-r--r--tex/context/base/core-fnt.tex36
-rw-r--r--tex/context/base/core-ini.tex1
-rw-r--r--tex/context/base/core-lst.tex1
-rw-r--r--tex/context/base/core-ltb.tex29
-rw-r--r--tex/context/base/core-mis.tex9
-rw-r--r--tex/context/base/core-not.tex19
-rw-r--r--tex/context/base/core-sec.tex4
-rw-r--r--tex/context/base/core-var.tex1
-rw-r--r--tex/context/base/core-ver.tex137
-rw-r--r--tex/context/base/font-bfm.tex7
-rw-r--r--tex/context/base/font-ini.tex71
-rw-r--r--tex/context/base/font-run.tex3
-rw-r--r--tex/context/base/java-exa.tex3
-rw-r--r--tex/context/base/math-ams.tex21
-rw-r--r--tex/context/base/math-eul.tex232
-rw-r--r--tex/context/base/math-ini.tex31
-rw-r--r--tex/context/base/math-lbr.tex314
-rw-r--r--tex/context/base/math-run.tex30
-rw-r--r--tex/context/base/math-tex.tex13
-rw-r--r--tex/context/base/page-flt.tex6
-rw-r--r--tex/context/base/page-mak.tex8
-rw-r--r--tex/context/base/spec-dpm.tex7
-rw-r--r--tex/context/base/spec-dpx.tex14
-rw-r--r--tex/context/base/spec-fdf.tex44
-rw-r--r--tex/context/base/spec-pdf.tex5
-rw-r--r--tex/context/base/spec-tpd.tex82
-rw-r--r--tex/context/base/supp-pdf.tex417
-rw-r--r--tex/context/base/type-buy.tex9
-rw-r--r--tex/context/base/type-enc.tex2
-rw-r--r--tex/context/base/type-exa.tex4
-rw-r--r--tex/context/base/type-pre.tex5
-rw-r--r--tex/context/base/type-siz.tex48
-rw-r--r--tex/context/base/type-spe.tex3
-rw-r--r--tex/context/base/type-syn.tex48
-rw-r--r--tex/context/base/xtag-ext.tex3
-rw-r--r--tex/context/base/xtag-ini.tex16
-rw-r--r--tex/context/interface/keys-cz.xml2
-rw-r--r--tex/context/interface/keys-de.xml2
-rw-r--r--tex/context/interface/keys-en.xml2
-rw-r--r--tex/context/interface/keys-it.xml2
-rw-r--r--tex/context/interface/keys-nl.xml2
-rw-r--r--tex/context/interface/keys-ro.xml2
45 files changed, 1127 insertions, 579 deletions
diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex
index 42faa8da3..8b21feee7 100644
--- a/tex/context/base/cont-new.tex
+++ b/tex/context/base/cont-new.tex
@@ -23,6 +23,13 @@
\ifx\normalcompound\undefined \let\normalcompound=| \fi
+\def\defXMLattributestring#1#2#3#4%
+ {\ifcsname\@@XMLvariable:#2:#3\endcsname
+ \@EA\convertcommand\csname\@@XMLvariable:#2:#3\endcsname\to#1%
+ \else
+ \convertargument#4\to#1%
+ \fi}
+
\bgroup \catcode`\<=\active
% usage: \expanded{\rescanXMLatttributes{fo:table-cell}}
diff --git a/tex/context/base/context.tex b/tex/context/base/context.tex
index f5b5b81f5..05033cb1b 100644
--- a/tex/context/base/context.tex
+++ b/tex/context/base/context.tex
@@ -31,7 +31,7 @@
%D 2004.8.30 the low level interface is english. Watch out and adapt
%D your styles an modules.
-\def\contextversion{2004.12.06}
+\def\contextversion{2004.12.17}
%D Welcome to the main module. When this module is ran through
%D \type{initex} or \type {tex -i} or \type {whatevertex} using
diff --git a/tex/context/base/core-fld.tex b/tex/context/base/core-fld.tex
index 8f8c5f263..b926b8a7a 100644
--- a/tex/context/base/core-fld.tex
+++ b/tex/context/base/core-fld.tex
@@ -486,7 +486,7 @@
{\def\@@DriverFieldValues{yes,no}}
{\def\@@DriverFieldValues{#4}}%
\doifelsenothing{#5}
- {\dogetcommacommandelement2\from\@@DriverFieldValues\to\@@DriverFieldDefault
+ {\dogetcommacommandelement2\from\@@DriverFieldValues \to\@@DriverFieldDefault
\dogetcommacommandelement1\from\@@DriverFieldDefault\to\@@DriverFieldDefault}
{\def\@@DriverFieldDefault{#5}}%
\setfield{#1}{#2}{}{}{\@@DriverFieldKids}{#3}{\@@DriverFieldMode\@@DriverFieldFree\@@DriverFieldAuto}{\@@DriverFieldValues}{\@@DriverFieldDefault}}
diff --git a/tex/context/base/core-fnt.tex b/tex/context/base/core-fnt.tex
index 5315f4d88..47c08451b 100644
--- a/tex/context/base/core-fnt.tex
+++ b/tex/context/base/core-fnt.tex
@@ -143,14 +143,11 @@
%D Some precautions for a \PLAIN\ \TEX\ definition.
-\let\normalcap\cap
+\unexpanded\def\normalcap{\dohandlemathtoken{cap}}
+\unexpanded\def\normalCap{\dohandlemathtoken{Cap}}
-\def\cap
- {\ifmmode
- \expandafter\normalcap
- \else
- \expandafter\smallcapped
- \fi}
+\def\cap{\mathortext\normalcap\smallcapped}
+\def\Cap{\mathortext\normalCap\SmallCapped}
%D \macros
%D {setupcapitals}
@@ -501,17 +498,26 @@
\def\betweenunderbarspaces
{\hskip\currentspaceskip}
-\unexpanded\def\dounderbar#1#2%
+% \unexpanded\def\dounderbar#1#2%
+% {\let\betweenisolatedwords#1%
+% \processisolatedwords{#2}\dodounderbar
+% \egroup}
+
+% \unexpanded\def\underbar
+% {\bgroup
+% \increment\underbarlevel
+% \donetrue
+% \dounderbar\betweenunderbarwords}
+
+\unexpanded\def\dounderbar#1%
{\let\betweenisolatedwords#1%
+ \dosingleempty\redounderbar}
+
+\unexpanded\def\redounderbar[#1]#2%
+ {\iffirstargument\setupunderbar[#1]\fi
\processisolatedwords{#2}\dodounderbar
\egroup}
-\unexpanded\def\underbar
- {\bgroup
- \increment\underbarlevel
- \donetrue
- \dounderbar\betweenunderbarwords}
-
\unexpanded\def\underbars
{\bgroup
\increment\underbarlevel
@@ -557,6 +563,8 @@
\processisolatedwords{#1}\dooverstrike
\egroup}
+\def\underbarparameter#1{\csname\??on#1\csname}
+
\def\setupunderbar
{\dodoubleargument\getparameters[\??on]}
diff --git a/tex/context/base/core-ini.tex b/tex/context/base/core-ini.tex
index 3dde16abc..a63b0c74e 100644
--- a/tex/context/base/core-ini.tex
+++ b/tex/context/base/core-ini.tex
@@ -40,6 +40,7 @@
\appendtoks \insertparagraphintro \to \everypar
\appendtoks \flushpostponedbookmark \to \neverypar
+\appendtoks \flushpostponedbookmark \to \everylistentry
\appendtoks \flushnotes \to \everydisplay
\appendtoks \adjustsidefloatdisplaylines \to \everydisplay
diff --git a/tex/context/base/core-lst.tex b/tex/context/base/core-lst.tex
index b3283bb65..9f7fec285 100644
--- a/tex/context/base/core-lst.tex
+++ b/tex/context/base/core-lst.tex
@@ -39,6 +39,7 @@
\def\dodowritetolist#1#2#3#4%
{\begingroup
+ \expanded{\everylistentry\emptytoks\the\everylistentry}% \emptytoks, else loop
\def\currentlist{#1}%
\convertexpanded{\??li\currentlist}{#3}\asciilistentry
\makesectionformat
diff --git a/tex/context/base/core-ltb.tex b/tex/context/base/core-ltb.tex
index ba0ba862d..ee00501a1 100644
--- a/tex/context/base/core-ltb.tex
+++ b/tex/context/base/core-ltb.tex
@@ -482,8 +482,8 @@
{\setuplinetable[\c!maxwidth=\zeropoint]}%
\processaction
[\linetableparameter\c!stretch]
- [\v!no=>{\setuplinetable[\c!stretch=\maxdimen]},% no stretch
- \v!yes=>{\setuplinetable[\c!stretch=\zeropoint]}]% max stretch
+ [ \v!no=>{\setuplinetable[\c!stretch=\maxdimen]},% no stretch
+ \v!yes=>{\setuplinetable[\c!stretch=\zeropoint]}]% max stretch
\chardef\linetablerepeat\linetableparameter\c!nleft
\chardef\linetablesplitstate % =
\ifdim\linetableparameter\c!maxwidth>\zeropoint
@@ -754,14 +754,12 @@
\doifnotmode{demo}{\endinput}
-% to be documented, see stan's ledger styles for an example
+\setuplinetable[n=6,m={2,2,2},lines=25] % m ?
-\setuplinetable[n=6,m={2,2,2},regels=25]
-
-\setuplinetable[c][1][width=2cm,background=color,backgroundcolor=red]
-\setuplinetable[c][4][width=3cm,background=color,backgroundcolor=yellow]
-\setuplinetable[c][6][width=3cm,background=color,backgroundcolor=magenta]
-\setuplinetable[r][odd][background=color,backgroundcolor=gray]
+\setuplinetable[c][1] [width=2cm,background=color,backgroundcolor=red]
+\setuplinetable[c][4] [width=3cm,background=color,backgroundcolor=yellow]
+\setuplinetable[c][6] [width=3cm,background=color,backgroundcolor=magenta]
+\setuplinetable[r][odd] [background=color,backgroundcolor=gray]
\setuplinetable[r][even][background=color,backgroundcolor=green]
\starttext
@@ -774,15 +772,20 @@
\startlinetable
\NC aaa\crlf aaa \NC bb \NC c \NC ddddd \NC eeee \NC ff \NC \NR
-\dorecurse{100}
- {\NC aaa \NC bb \NC c \NC ddddd \NC eeee \NC ff \NC \NR}
+\dorecurse{100}{\NC aaa \NC bb \NC c \NC ddddd \NC eeee \NC ff \NC \NR}
\stoplinetable
\startlinetable
\NC[style=slanted,color=green,background=color,backgroundcolor=darkred,nx=2,uitlijnen=middle] xxx
\NC yy \NC ddddd \NC eeee \NC ff \NC \NR
-\dorecurse{100}
- {\NC aaa \NC bb \NC c \NC ddddd \NC eeee \NC ff \NC \NR}
+\dorecurse{100}{\NC aaa \NC bb \NC c \NC ddddd \NC eeee \NC ff \NC \NR}
\stoplinetable
+% \startbuffer[lt]
+% \NC aaa\crlf aaa \NC bb \NC c \NC ddddd \NC ee \NC ff \NC \NR
+% \NC aaa\crlf aaa \NC b \NC cc \NC ddd \NC eeee \NC f \NC \NR
+% \stopbuffer
+%
+% \processlinetablebuffer[lt]
+
\stoptext
diff --git a/tex/context/base/core-mis.tex b/tex/context/base/core-mis.tex
index c86df8716..701da14f6 100644
--- a/tex/context/base/core-mis.tex
+++ b/tex/context/base/core-mis.tex
@@ -778,6 +778,9 @@
\c!before=\startnarrower,
\c!after=\stopnarrower]
+\appendtoks\def\quotation#1{"#1"}\to\simplifiedcommands
+\appendtoks\def\quote #1{'#1'}\to\simplifiedcommands
+
%D The next features was so desperately needed by Giuseppe
%D Bilotta that he made a module for it. Since this is a
%D typical example of core functionality, I decided to extend
@@ -2358,9 +2361,9 @@
{\getparameters[\??ro][#1]%
\processaction
[\@@rolocation]
- [\v!depth=>\!!counta\plusthree\donefalse,% depth fit - raw box
- \v!fit=>\!!counta\plustwo \donefalse,% depth tight - raw box
- \v!broad=>\!!counta\plusone \donefalse,% nodepth fit - raw box
+ [ \v!depth=>\!!counta\plusthree\donefalse,% depth fit - raw box
+ \v!fit=>\!!counta\plustwo \donefalse,% depth tight - raw box
+ \v!broad=>\!!counta\plusone \donefalse,% nodepth fit - raw box
\v!high=>\!!counta\plusone \donetrue,% nodepth fit - framed
\s!default=>\!!counta\plusthree\donetrue,% depth fit - framed
\s!unknown=>\!!counta\plusthree\donetrue]% depth fit - framed
diff --git a/tex/context/base/core-not.tex b/tex/context/base/core-not.tex
index 9d06c0567..93122ec99 100644
--- a/tex/context/base/core-not.tex
+++ b/tex/context/base/core-not.tex
@@ -635,25 +635,6 @@
\egroup
\kern\notesignal\relax} % \relax is needed to honor spaces
-% \def\dolastnotesymbol
-% {\unskip\unskip
-% \ifdim\lastkern=\notesignal
-% \high{\kern\noteparameter\c!afstand}% gets the font right, hack !
-% \fi
-% \nobreak
-% \iflocation
-% \naarbox
-% {\high{\tx\lastnotenumber\domovednote\v!vorigepagina\v!volgendepagina}}%
-% [\s!fnt:t:\internalfootreference]%
-% \rawreference\s!fnt{\s!fnt:f:\internalfootreference}{}%
-% \else
-% \high{\tx\lastnotenumber\domovednote\v!vorigepagina\v!volgendepagina}%
-% \ifconditional\pagewisenotes
-% \rawreference\s!fnt{\s!fnt:f:\internalfootreference}{}%
-% \fi
-% \fi
-% \globallet\lastnotesymbol\relax}
-
\def\dolastnotesymbol
{\unskip\unskip
\ifdim\lastkern=\notesignal
diff --git a/tex/context/base/core-sec.tex b/tex/context/base/core-sec.tex
index caf59baa0..9b07ba067 100644
--- a/tex/context/base/core-sec.tex
+++ b/tex/context/base/core-sec.tex
@@ -1580,7 +1580,7 @@
{\setglobalsystemreference\rt!list
{\e!previous#1}{\getvalue{\e!previouslocal#1}}}%
%
-% {\definereference[\e!vorige#1][\getvalue{\e!vorigelokale#1}]%
+% {\definereference[\e!previous#1][\getvalue{\e!previouslocal#1}]%
%
\def\stoplistreferences{\dostoplistreferences}}
@@ -1594,7 +1594,7 @@
{\setglobalsystemreference\rt!list
{\e!previous####1}{\getvalue{\e!currentlocal####1}}}%
%
-% {\definereference[\e!vorige####1][\getvalue{\e!huidigelokale####1}]%
+% {\definereference[\e!previous####1][\getvalue{\e!currentlocal####1}]%
%
\processcommacommand[\updatedlistreferences]\docommando
\globallet\updatelistreferences\relax
diff --git a/tex/context/base/core-var.tex b/tex/context/base/core-var.tex
index 7e67be23a..b181067fc 100644
--- a/tex/context/base/core-var.tex
+++ b/tex/context/base/core-var.tex
@@ -43,6 +43,7 @@
\newevery \everyendoftextbody \relax
\newevery \everybeginofpar \relax
\newevery \everyendofpar \relax
+\newevery \everylistentry \relax
%D For shared \type {\everymath} and \type {\everydisplay}:
diff --git a/tex/context/base/core-ver.tex b/tex/context/base/core-ver.tex
index f5b477849..cc6816a4b 100644
--- a/tex/context/base/core-ver.tex
+++ b/tex/context/base/core-ver.tex
@@ -61,7 +61,7 @@
\def\prettyidentifier {TEX}
\def\prettypalet {}
-\def\installprettytype%
+\def\installprettytype
{\dodoubleargument\doinstallprettytype}
\def\doinstallprettytype[#1][#2]% map #1 onto #2
@@ -213,11 +213,15 @@
%D set the catcodes of \type{<} and \type{>} and then we start
%D looking ahead.
-%\unexpanded\def\type%
-% {\bgroup
-% \catcode`\<=\@@other
-% \catcode`\>=\@@other
-% \futurelet\next\dotype}
+% \starttyping
+% normal: \par \type{xx<<..xx..<<xx <<xx>> >>..>>xx} \par \type<<....>> \par \type<<..<<xx>>..>> \par
+% normal: \par \type{xx<..xx..<xx <slanted> >..>xx} \par \type{<....>} \par \type{<..<xx>..>}
+% \setuptype[option=slanted]
+% slanted: \par \type{xx<<..sl..<<xx <<sl>> xx>>..sl..>>xx} \par \type<<..xx..>> \par \type<<..<<sl>>..>> \par
+% slanted: \par \type{xx<<..sl..<xx <sl> xx>..sl..>>xx} \par \type<<..xx..>> \par \type<<..<sl>..>> \par
+% \setuptype[option=none]
+% none: \par \type{xx<<..xx..<<xx <<xx>> >>..>>xx} \par \type<<....>> \par \type<<..<<xx>>..>> \par
+% \stoptyping
\unexpanded\def\type
{\dotype\empty}
@@ -233,63 +237,6 @@
%D Next we distinguish between the three alternatives and call
%D for the appropriate macros.
-% \def\dotype%
-% {\ifx\next\bgroup
-% \initializetype
-% \initializetypegrouping
-% \def\next%
-% {\afterassignment\protectfirsttype\let\next=}%
-% \else\if\next<%
-% \doifelse{\@@tyoptie}{\v!geen}
-% {\initializetype
-% \setupnotypegrouping
-% \def\next%
-% {\let\next=}}
-% {\def\next<##1%
-% {\initializetype
-% \if##1<%
-% \else
-% \setupalternativetypegrouping
-% ##1%
-% \fi}}%
-% \else
-% \def\next##1%
-% {\initializetype
-% \catcode`##1=\@@endgroup}%
-% \fi\fi
-% \verbatimcolor
-% \next}
-%
-% \def\dodotype%
-% {\ifx\next\bgroup
-% \initializetype
-% \verbatimcolor
-% \initializetypegrouping
-% \def\next%
-% {\afterassignment\protectfirsttype\let\next=}%
-% \else\if\next<%
-% \doifelsevalue{\??ty\@@currenttype\c!optie}{\v!geen}
-% {\initializetype
-% \verbatimcolor
-% \setupnotypegrouping
-% \def\next%
-% {\let\next=}}
-% {\def\next<##1%
-% {\initializetype
-% \verbatimcolor
-% \if##1<%
-% \else
-% \setupalternativetypegrouping
-% ##1%
-% \fi}}%
-% \else
-% \def\next##1%
-% {\initializetype
-% \verbatimcolor
-% \catcode`##1=\@@endgroup}%
-% \fi\fi
-% \next}
-
\def\dodotypeA
{\initializetype
\initializetypegrouping
@@ -305,8 +252,10 @@
\def\dodotypeC<#1%
{\initializetype
\verbatimcolor
- \if#1<\else
- \setupalternativetypegrouping#1%
+ \if#1<%
+ \@EA\setupalternativetypegrouping
+ \else
+ \@EA#1%
\fi}
\def\dodotypeD#1%
@@ -349,8 +298,26 @@
\gdef\setupalternativetypegrouping
{\catcode`\<=\@@active
\catcode`\>=\@@active
- \def<{\bgroup\switchslantedtype}%
- \def>{\egroup}}
+ \def\doless
+ {\ifx<\next
+ \def\next
+ {\bgroup\switchslantedtype
+ \let\next=}%
+ \else
+ \let\next\lesscharacter
+ \fi
+ \next}%
+ \def\domore
+ {\ifx>\next
+ \def\next
+ {\egroup
+ \let\next=}%
+ \else
+ \let\next\morecharacter
+ \fi
+ \next}%
+ \def<{\futurelet\next\doless}%
+ \def>{\futurelet\next\domore}}
\egroup
\def\setupnotypegrouping
@@ -376,7 +343,7 @@
%D {\ifx\next<%
%D \def\next{\bgroup\switchslantedtype\let\next=}%
%D \else
-%D \let\next=\lesscharacter
+%D \let\next\lesscharacter
%D \fi
%D \next}%
%D \futurelet\next\do}%
@@ -385,7 +352,7 @@
%D {\ifx\next>%
%D \def\next{\egroup\let\next=}%
%D \else
-%D \let\next=\morecharacter
+%D \let\next\morecharacter
%D \fi
%D \next}%
%D \futurelet\next\do}}
@@ -394,12 +361,12 @@
%D
%D The final implementation looks a bit further and treats the
%D lone \type{<<} and \type{>>} a bit different. The \type
-%D {\hbox{}} prevents ligatures, which unfortunately turn up
+%D {\null} prevents ligatures, which unfortunately turn up
%D in Lucida fonts.
\def\doenterdoublelesstype
{\ifx\next\egroup
- \lesscharacter\hbox{}\lesscharacter
+ \lesscharacter\null\lesscharacter
\else
\bgroup\switchslantedtype
\let\doenterdoublemoretype\egroup
@@ -408,7 +375,7 @@
\def\doenterdoublemoretype
{\def\doenterdoubletype
{\ifx\next\egroup
- \morecharacter\hbox{}\morecharacter
+ \morecharacter\null\morecharacter
\fi}}
\bgroup
@@ -420,19 +387,17 @@
\def\doless
{\ifx<\next
\def\next
- {\def\enterdoubletype
- {\futurelet\next\doenterdoublelesstype}%
+ {\def\enterdoubletype{\futurelet\next\doenterdoublelesstype}%
\afterassignment\enterdoubletype
\let\next=}%
\else
- \let\next=\lesscharacter
+ \let\next\lesscharacter
\fi
\next}%
\def\domore
{\ifx>\next
\def\next
- {\def\enterdoubletype
- {\futurelet\next\doenterdoublemoretype}%
+ {\def\enterdoubletype{\futurelet\next\doenterdoublemoretype}%
\afterassignment\enterdoubletype
\let\next=}%
\else
@@ -455,11 +420,6 @@
\fi
\fi}
-%\def\setupcommandsintype#1%
-% {\setupgroupedtype
-% \edef\!!stringa{\getvalue{#1\c!escape}}%
-% \@EA\catcode\@EA`\!!stringa=\@@escape}
-
\def\setupcommandsintype#1% can also be \string\
{\setupgroupedtype
\edef\\{\getvalue{#1\c!escape}}%
@@ -515,11 +475,6 @@
%D \type{\initializetype} which in return calls for the support
%D macro \type{\setupinlineverbatim}.
-%\def\initializetype%
-% {\let\obeylines=\ignorelines
-% \setupcommonverbatim\??ty
-% \setupinlineverbatim}
-
\let\@@currenttype\empty
\def\initializetype
@@ -548,13 +503,13 @@
%D The setups for inline verbatim default to:
\setuptype
- [\c!space=\v!off,
+ [ \c!space=\v!off,
\c!color=,
- \c!style=\tt\tf, % \tttf gives problems with {\tx \type...}
- \c!page=\v!no,
+ \c!style=\tt\tf, % \tttf gives problems with {\tx \type...}
+ \c!page=\v!no,
\c!tab=\v!no,
\c!palet=colorpretty,
- \c!option=\v!normal]
+ \c!option=\v!normal]
%D \macros
%D {typ,obeyhyphens,obeybreakpoints}
diff --git a/tex/context/base/font-bfm.tex b/tex/context/base/font-bfm.tex
index e7f510aad..a7bf398ef 100644
--- a/tex/context/base/font-bfm.tex
+++ b/tex/context/base/font-bfm.tex
@@ -111,9 +111,7 @@
\appendtoks
\dosetmathfamily\mrbffam\textface\scriptface\scriptscriptface\c!mrbf\mrfallback
\dosetmathfamily\mibffam\textface\scriptface\scriptscriptface\c!mibf\empty
- \dosetskewchar\defaultskewcharmi
\dosetmathfamily\sybffam\textface\scriptface\scriptscriptface\c!sybf\empty
- \dosetskewchar\defaultskewcharsy
\dosetmathfamily\exbffam\textface\textface \textface \c!exbf\empty
\dosetmathfamily\mabffam\textface\scriptface\scriptscriptface\c!mabf\empty
\dosetmathfamily\mbbffam\textface\scriptface\scriptscriptface\c!mbbf\empty
@@ -121,6 +119,11 @@
\to \boldmathstrategies
\appendtoks
+ \dosetskewchar\mifam\defaultskewcharmi
+ \dosetskewchar\syfam\defaultskewcharsy
+\to \boldmathstrategies
+
+\appendtoks
\dosetsymbfamily\mrbffam\textface\scriptface\scriptscriptface\c!mrbf
\dosetsymbfamily\mibffam\textface\scriptface\scriptscriptface\c!mibf
\dosetsymbfamily\sybffam\textface\scriptface\scriptscriptface\c!sybf
diff --git a/tex/context/base/font-ini.tex b/tex/context/base/font-ini.tex
index 7805654ff..fc07a4d52 100644
--- a/tex/context/base/font-ini.tex
+++ b/tex/context/base/font-ini.tex
@@ -3106,8 +3106,8 @@
{\edef\fontstyle{#1}%
\setcurrentfontstyle\normalizedbodyfontsize}
-\chardef\defaultskewcharmi='177
-\chardef\defaultskewcharsy='60
+\chardef\defaultskewcharmi=127 % '177
+\chardef\defaultskewcharsy= 48 % '60
% \def\dosetskewchar#1%
% {\skewchar\font\ifx\@@fontskewchar\empty#1\else\@@fontskewchar\fi}
@@ -3345,27 +3345,32 @@
\the\everybodyfont} % needed ?
%D \macros
-%D {os}
+%D {os,frak, goth, cal}
%D
%D Old style numerals can be typeset with \type{\os} and look
%D like {\os 1234567890} instead of the more common looking
%D 1234567890.
-
-\definefont[os][OldStyle sa *] % \currentfontscale]
-
-\definefontsynonym[OldStyle][Serif]
-
-%D \macros
-%D {frak, goth, cal}
%D
%D On behalf of {\frac Tobias Burnus}, we define some more of
%D these. Later we will link these names to real file names.
-\definefont [frak] [Fraktur sa *]
-\definefont [goth] [Gothic sa *]
-\definefont [cal] [Calligraphic sa *]
-\definefont [bbd] [Blackboard sa *]
+% older
+%
+% \definefont [os] [OldStyle sa *]
+% \definefont [frak] [Fraktur sa *]
+% \definefont [goth] [Gothic sa *]
+% \definefont [cal] [Calligraphic sa *]
+% \definefont [bbd] [Blackboard sa *]
+%
+% newer
+
+\def\os {\mathortext{\fam\purefamily {oldstyle}}{\symbolicfont {OldStyle}}}
+\def\frak{\mathortext{\fam\purefamily {fraktur}}{\symbolicfont {Fraktur}}}
+\def\goth{\mathortext{\fam\purefamily {gothic}}{\symbolicfont {Gothic}}}
+\def\cal {\mathortext{\fam\purefamily{calligraphic}}{\symbolicfont{Calligraphic}}}
+\def\bbd {\mathortext{\fam\purefamily {blackboard}}{\symbolicfont {Blackboard}}}
+\definefontsynonym [OldStyle] [Serif]
\definefontsynonym [Fraktur] [Serif]
\definefontsynonym [Gothic] [Serif]
\definefontsynonym [Calligraphic] [Serif]
@@ -3377,17 +3382,37 @@
%D These macros assume that we use text fonts, and not math
%D families.
-% \def\fraktur #1{\mathematics{\frak#1}}
-% \def\gothic #1{\mathematics{\goth#1}}
-% \def\calligraphic#1{\mathematics{\cal #1}}
-% \def\blackboard #1{\mathematics{\bbd #1}}
-
\ifx\mathtext\undefined \let\mathtext\hbox \fi
-\def\fraktur #1{\mathortext\mathtext\donothing{\frak#1}}
-\def\gothic #1{\mathortext\mathtext\donothing{\goth#1}}
-\def\calligraphic#1{\mathortext\mathtext\donothing{\cal #1}}
-\def\blackboard #1{\mathortext\mathtext\donothing{\bbd #1}}
+\def\fraktur #1{\mathortext\domathtext\donothing{\frak#1}}
+\def\gothic #1{\mathortext\domathtext\donothing{\goth#1}}
+\def\calligraphic#1{\mathortext\domathtext\donothing{\cal #1}}
+\def\blackboard #1{\mathortext\domathtext\donothing{\bbd#1}}
+
+%D Torture test:
+%D
+%D \starttyping
+%D \usetypescript[modern] [texnansi]
+%D \usetypescript[lucida] [texnansi]
+%D \usetypescript[palatino][texnansi]
+%D \usetypescript[times] [texnansi]
+%D \usetypescript[fourier] [ec]
+%D
+%D \startbuffer
+%D \section{\blackboard{T\high{\blackboard{T}}} \blackboard{E}\high{\blackboard{E}} \blackboard{X}\high{\blackboard{X}}}
+%D
+%D {\fontclass: 123 \os123 \cal TEX $\os 123$}
+%D
+%D $\blackboard{T}^{\blackboard{T}} \blackboard{E}^{\blackboard{E}} \blackboard{X}^{\blackboard{X}}$
+%D \blackboard{T}\high{\blackboard{T}} \blackboard{E}\high{\blackboard{E}} \blackboard{X}\high{\blackboard{X}}
+%D \stopbuffer
+%D
+%D {\setupbodyfont[lucida] \getbuffer}
+%D {\setupbodyfont[modern] \getbuffer}
+%D {\setupbodyfont[palatino] \getbuffer}
+%D {\setupbodyfont[times] \getbuffer}
+%D {\setupbodyfont[fourier] \getbuffer}
+%D \stoptyping
%D \macros
%D {definebodyfontswitch}
diff --git a/tex/context/base/font-run.tex b/tex/context/base/font-run.tex
index a30776cb8..0cb5ecdd5 100644
--- a/tex/context/base/font-run.tex
+++ b/tex/context/base/font-run.tex
@@ -22,7 +22,7 @@
\parindent\zeropoint
\setlocalhsize
\doifelsenothing{#1}
- {\def\title{[\the\korpsgrootte]}}
+ {\def\title{[\the\bodyfontsize]}}
{\switchtobodyfont[#1]\def\title{[#1]}}
\doifsomething\fontclass
{\doifnot{[\fontclass]}\title
@@ -111,6 +111,7 @@
\gdef\doshowfont[#1]%
{\bgroup
+ \boxrulewidth=.1pt
\setupcolors[\c!state=\v!local]%
\iffirstargument
\definefont[\s!dummy][#1]\dummy
diff --git a/tex/context/base/java-exa.tex b/tex/context/base/java-exa.tex
index 21b366174..0617f5e56 100644
--- a/tex/context/base/java-exa.tex
+++ b/tex/context/base/java-exa.tex
@@ -209,7 +209,8 @@
}
% exa_filename = exa_filename.replace(/\\\\/g,'/') ;
% exa_filelist = exa_filelist.replace(/\\\\/g,'/') ;
- str = "<exa:request><exa:application>" ;
+ str = "<?xml version='1.0' ?>\\n" ;
+ str = str+"<exa:request xmlns:exa='http://www.pragma-ade.com/schemas/example.rng'><exa:application>" ;
if (exa_filelist == "") {
exa_filelist = exa_registered ;
} else { if (exa_registered != "") {
diff --git a/tex/context/base/math-ams.tex b/tex/context/base/math-ams.tex
index 866228324..3df63ff48 100644
--- a/tex/context/base/math-ams.tex
+++ b/tex/context/base/math-ams.tex
@@ -15,9 +15,9 @@
% maybe we should just include these into the default tex one
-%definefamilysynonym [ams] [blackboard] [mb]
+\definefamilysynonym [default] [blackboard] [mb]
-\startmathcollection [default] % [ams]
+\startmathcollection [default]
\definemathsymbol [varGamma] [ord] [letters] ["00]
\definemathsymbol [varDelta] [ord] [letters] ["01]
@@ -33,13 +33,13 @@
\stopmathcollection
-\startmathcollection[default] % [ams]
+\startmathcollection[default]
\definemathsymbol [internalAnd] [rel] [operators] ["26]
\stopmathcollection
-\startmathcollection [default] % [ams]
+\startmathcollection [default]
\definemathsymbol [boxdot] [bin] [ma] ["00]
\definemathsymbol [boxplus] [bin] [ma] ["01]
@@ -180,7 +180,7 @@
\stopmathcollection
-\startmathcollection [default] % [ams]
+\startmathcollection [default]
\definemathcommand [integers] {\blackboard{Z}}
\definemathcommand [reals] {\blackboard{R}}
@@ -191,7 +191,7 @@
\stopmathcollection
-\startmathcollection [default] % [ams]
+\startmathcollection [default]
\definemathsymbol [lvertneqq] [rel] [mb] ["00]
\definemathsymbol [gvertneqq] [rel] [mb] ["01]
@@ -289,12 +289,17 @@
\stopmathcollection
-\startmathcollection [default] % [ams]
+\startmathcollection [default]
\definemathcommand [yen] [nothing] {\mathhexbox{\hexmafam}55}
\definemathcommand [checkmark] [nothing] {\mathhexbox{\hexmafam}58}
\definemathcommand [circledR] [nothing] {\mathhexbox{\hexmafam}72}
\definemathcommand [maltese] [nothing] {\mathhexbox{\hexmafam}7A}
+
+\stopmathcollection
+
+\startmathcollection [default]
+
\definemathcommand [dashrightarrow] [rel] {\dabar@\dabar@ \mathchar"0C4B}%
\definemathcommand [dashleftarrow] [rel] {\mathchar"0C4C\dabar@ \dabar@}%
\definemathcommand [dasharrow] [rel] {\dabar@\dabar@ \mathchar"0C4B}%
@@ -321,7 +326,7 @@
\mathaccent"0\purefamilyhex{ex}65{#1}%
\fi}
-\startmathcollection [default] % [ams]
+\startmathcollection [default]
\definemathcommand [widehat] {\AMSwidehat}
\definemathcommand [widetilde] {\AMSwidetilde}
diff --git a/tex/context/base/math-eul.tex b/tex/context/base/math-eul.tex
index 75dec7156..b3f4535dd 100644
--- a/tex/context/base/math-eul.tex
+++ b/tex/context/base/math-eul.tex
@@ -1,6 +1,6 @@
%D \module
%D [ file=math-eul,
-%D version=2003.02.03,
+%D version=2003.02.03,
%D title=\CONTEXT\ Math Macros,
%D subtitle=Virtual Euler Specials,
%D author={Hans Hagen \& Taco Hoekwater \& Adam Lindsay},
@@ -11,93 +11,237 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details. Further modified by Adam Lindsay.
-\unprotect
+\unprotect
%D We follow the following mappings from type-eul:
+%D
%D mr [MathRoman] [Euler-Roman] [zeurm10]
-%D mi [MathItalic] [Euler-Italic] [zeurm10]
+
+%D mi [MathItalic] [Euler-Italic] [eufm10]
+
%D ex [MathExtension] [Euler-Extension] [zeuex10]
%D sy [MathSymbol] [Euler-Symbol] [zeusm10]
-%D mb [MathBeta] [Charter-Roman] [bchr8r]
-%D mc [MathGamma] [Euler-Fraktur] [eufm10]
+
+%D mb [MathBeta] [Charter-Roman] [bchr8r] XXX
+%D mc [MathGamma] [Euler-Fraktur] [eufm10] XXX
%D
%D The inclusion of Bitstream Charter was originally for the text accents.
%D Obviously, it's not a proper ``MathBeta'' font.
-
-%D The varrho and varsigma characters don't exist in eulervm,
+%D The varrho and varsigma characters don't exist in eulervm,
%D so we point at the normal types.
+
+\definefamilysynonym [eul] [calligraphic] [sy]
+\definefamilysynonym [eul] [oldstyle] [mi]
+\definefamilysynonym [eul] [gothic] [mi]
+\definefamilysynonym [eul] [fraktur] [mi]
+
+\definefamilysynonym [eul] [lcgreek] [mr]
+\definefamilysynonym [eul] [ucgreek] [mr]
+\definefamilysynonym [eul] [vargreek] [mr]
+
+%% Well, you don't know until you try!
+%\definefamilysynonym [eul] [accents] [Serif]
+
+\startmathcollection [eul]
+
+\definemathsymbol [varrho] [nothing] [vargreek] ["1A]
+\definemathsymbol [varsigma] [nothing] [vargreek] ["1B]
+
+%D Changes necessitated by collapsing mr \& mi into one:
+\definemathsymbol [imath] [nothing] [mr] ["7B]
+\definemathsymbol [jmath] [nothing] [mr] ["7C]
+\definemathsymbol [ell] [nothing] [mr] ["60]
+\definemathsymbol [wp] [nothing] [mr] ["7D]
+\definemathsymbol [partial] [nothing] [mr] ["40]
+
+\definemathsymbol [flat] [ord] [mr] ["5B]
+\definemathsymbol [natural] [ord] [mr] ["5C]
+\definemathsymbol [sharp] [ord] [mr] ["5D]
+
+\definemathsymbol [triangleleft] [bin] [mr] ["2F]
+\definemathsymbol [triangleright][bin] [mr] ["2E]
+
+\definemathsymbol [star] [bin] [mr] ["3F]
+
+\definemathsymbol [smile] [rel] [mr] ["5E]
+\definemathsymbol [frown] [rel] [mr] ["5F]
+\definemathsymbol [leftharpoonup] [rel] [mr] ["28]
+\definemathsymbol [leftharpoondown] [rel] [mr] ["29]
+\definemathsymbol [rightharpoonup] [rel] [mr] ["2A]
+\definemathsymbol [rightharpoondown] [rel] [mr] ["2B]
+\definemathsymbol [lhook] [rel] [mr] ["2C]
+\definemathsymbol [rhook] [rel] [mr] ["2D]
+
+\definemathsymbol [mathperiod] [ord] [mr] ["3A]
+\definemathsymbol [textperiod] [punct] [mr] ["3A]
+
+\definemathsymbol [mathcomma] [ord] [mr] ["3B]
+\definemathsymbol [textcomma] [punct] [mr] ["3B]
+
+\definemathsymbol [ldotp] [punct] [mr] ["3A]
+
+% extras from AMS:
+\definemathsymbol [hslash] [ord] [mr] ["80] %beauty over truth
+
+\stopmathcollection
+
\startmathcollection [eul]
-\definemathsymbol [varrho] [nothing] [vargreek] ["1A]
-\definemathsymbol [varsigma] [nothing] [vargreek] ["1B]
+% Ugh. no way around this to keep it compact in the font defs.
+
+\definemathcharacter [a] [nothing] [mr] ["61]
+\definemathcharacter [b] [nothing] [mr] ["62]
+\definemathcharacter [c] [nothing] [mr] ["63]
+\definemathcharacter [d] [nothing] [mr] ["65]
+\definemathcharacter [e] [nothing] [mr] ["65]
+\definemathcharacter [f] [nothing] [mr] ["66]
+\definemathcharacter [g] [nothing] [mr] ["67]
+\definemathcharacter [h] [nothing] [mr] ["68]
+\definemathcharacter [i] [nothing] [mr] ["69]
+\definemathcharacter [j] [nothing] [mr] ["6A]
+\definemathcharacter [k] [nothing] [mr] ["6B]
+\definemathcharacter [l] [nothing] [mr] ["6C]
+\definemathcharacter [m] [nothing] [mr] ["6D]
+\definemathcharacter [n] [nothing] [mr] ["6E]
+\definemathcharacter [o] [nothing] [mr] ["6F]
+\definemathcharacter [p] [nothing] [mr] ["70]
+\definemathcharacter [q] [nothing] [mr] ["71]
+\definemathcharacter [r] [nothing] [mr] ["72]
+\definemathcharacter [s] [nothing] [mr] ["73]
+\definemathcharacter [t] [nothing] [mr] ["74]
+\definemathcharacter [u] [nothing] [mr] ["75]
+\definemathcharacter [v] [nothing] [mr] ["76]
+\definemathcharacter [w] [nothing] [mr] ["77]
+\definemathcharacter [x] [nothing] [mr] ["78]
+\definemathcharacter [y] [nothing] [mr] ["79]
+\definemathcharacter [z] [nothing] [mr] ["7A]
+
+\definemathcharacter [A] [nothing] [mr] ["41]
+\definemathcharacter [B] [nothing] [mr] ["42]
+\definemathcharacter [C] [nothing] [mr] ["43]
+\definemathcharacter [D] [nothing] [mr] ["45]
+\definemathcharacter [E] [nothing] [mr] ["45]
+\definemathcharacter [F] [nothing] [mr] ["46]
+\definemathcharacter [G] [nothing] [mr] ["47]
+\definemathcharacter [H] [nothing] [mr] ["48]
+\definemathcharacter [I] [nothing] [mr] ["49]
+\definemathcharacter [J] [nothing] [mr] ["4A]
+\definemathcharacter [K] [nothing] [mr] ["4B]
+\definemathcharacter [L] [nothing] [mr] ["4C]
+\definemathcharacter [M] [nothing] [mr] ["4D]
+\definemathcharacter [N] [nothing] [mr] ["4E]
+\definemathcharacter [O] [nothing] [mr] ["4F]
+\definemathcharacter [P] [nothing] [mr] ["50]
+\definemathcharacter [Q] [nothing] [mr] ["51]
+\definemathcharacter [R] [nothing] [mr] ["52]
+\definemathcharacter [S] [nothing] [mr] ["53]
+\definemathcharacter [T] [nothing] [mr] ["54]
+\definemathcharacter [U] [nothing] [mr] ["55]
+\definemathcharacter [V] [nothing] [mr] ["56]
+\definemathcharacter [W] [nothing] [mr] ["57]
+\definemathcharacter [X] [nothing] [mr] ["58]
+\definemathcharacter [Y] [nothing] [mr] ["59]
+\definemathcharacter [Z] [nothing] [mr] ["5A]
+
\stopmathcollection
\startmathcollection [eul]
-\definemathcharacter [!] [close] [mc] ["21]
-\definemathcharacter [(] [open] [mc] ["28]
-\definemathcharacter [)] [close] [mc] ["29]
-\definemathcharacter [+] [bin] [mc] ["2B]
+
+\definemathcharacter [!] [close] [sy] ["A1]
+\definemathcharacter [(] [open] [sy] ["A8]
+\definemathcharacter [)] [close] [sy] ["A9]
+\definemathcharacter [+] [bin] [sy] ["AB]
\definemathcharacter [:] [rel] [sy] ["BA]
\definemathcharacter [;] [punct] [sy] ["BB]
-\definemathcharacter [=] [rel] [mi] ["82]
+\definemathcharacter [=] [rel] [sy] ["BD]
\definemathcharacter [?] [close] [sy] ["BF]
\definemathcharacter [91] [open] [sy] ["DB] % [
\definemathcharacter [93] [close] [sy] ["DD] % ]
+
+\definemathcharacter [,] [punct] [mr] ["3B]
+\definemathcharacter [.] [ord] [mr] ["3A]
+\definemathcharacter [/] [ord] [mr] ["3D]
+\definemathcharacter [<] [rel] [mr] ["3C]
+\definemathcharacter [>] [rel] [mr] ["3E]
+
\stopmathcollection
\startmathcollection [eul]
+
\definemathcharacter [(] [nothing] [sy] ["A8] [ex] ["00]
\definemathcharacter [)] [nothing] [sy] ["A9] [ex] ["01]
\definemathcharacter [91] [nothing] [sy] ["DB] [ex] ["02] % [
\definemathcharacter [93] [nothing] [sy] ["DD] [ex] ["03] % ]
-\definemathcharacter [/] [nothing] [mi] ["3D] [ex] ["0E]
+\definemathcharacter [/] [nothing] [mr] ["3D] [ex] ["0E]
+
\stopmathcollection
\startmathcollection [eul]
-\definemathsymbol [hbar] [nothing] [mi] ["80]
+
+\definemathsymbol [hbar] [nothing] [mr] ["80]
+
\stopmathcollection
-%D I used my discretion in substituting Charter here for the CM glyphs
-%D brought in by the eulervm virtual font
\startmathcollection [eul]
-\definemathsymbol [ddagger] [bin] [mb] ["87]
-\definemathsymbol [dagger] [bin] [mb] ["86]
+
+\definemathsymbol [ddagger] [bin] [sy] ["7A]
+\definemathsymbol [dagger] [bin] [sy] ["79]
+
\stopmathcollection
\startmathcollection [eul]
+
\definemathsymbol [colon] [punct] [sy] ["BA]
+
\stopmathcollection
-%D This is very hackish; it brings in text accents from the
-%D well-matched Bitstream Charter.
+%D This used to be very hackish; it brought in text
+%D accents from the well-matched Bitstream Charter.
+
+%D But now, these characters don't exist. I would prefer to pull
+%D them from the text font, but I don't know how.
+%D Instead, I'm just pointing to null characters!
+
\startmathcollection [eul]
-\definemathsymbol [acute] [accent] [mb] ["B4]
-\definemathsymbol [grave] [accent] [mb] ["1E]
-\definemathsymbol [ddot] [accent] [mb] ["A8]
-\definemathsymbol [tilde] [accent] [mb] ["98]
-\definemathsymbol [bar] [accent] [mb] ["AF]
-\definemathsymbol [breve] [accent] [mb] ["0B]
-\definemathsymbol [check] [accent] [mb] ["10]
-%\definemathsymbol [hat] [accent] [mc] ["5E]
-\definemathsymbol [hat] [accent] [mb] ["88]
-\definemathsymbol [dot] [accent] [mb] ["01]
+
+\definemathsymbol [acute] [accent] [mr] ["90]
+\definemathsymbol [grave] [accent] [mr] ["91]
+\definemathsymbol [ddot] [accent] [mr] ["92]
+\definemathsymbol [tilde] [accent] [mr] ["93]
+\definemathsymbol [bar] [accent] [mr] ["94]
+\definemathsymbol [breve] [accent] [mr] ["95]
+\definemathsymbol [check] [accent] [mr] ["96]
+\definemathsymbol [hat] [accent] [mr] ["97]
+\definemathsymbol [dot] [accent] [mr] ["98]
+%\definemathsymbol [acute] [accent] [accents] ["B4]
+%\definemathsymbol [grave] [accent] [accents] ["1E]
+%\definemathsymbol [ddot] [accent] [accents] ["A8]
+%\definemathsymbol [tilde] [accent] [accents] ["98]
+%\definemathsymbol [bar] [accent] [accents] ["AF]
+%\definemathsymbol [breve] [accent] [accents] ["0B]
+%\definemathsymbol [check] [accent] [accents] ["10]
+%\definemathsymbol [hat] [accent] [accents] ["5E]
+%\definemathsymbol [dot] [accent] [accents] ["01]
+
+\definemathsymbol [vec] [accent] [mr] ["7E] % [ord]
+\definemathsymbol [hat] [accent] [sy] ["DE]
+
\stopmathcollection
\startmathcollection [eul]
-\definemathsymbol [lgroup] [open] [sy] ["A8] [ex] ["3A] % ?
-\definemathsymbol [rgroup] [close] [sy] ["A9] [ex] ["3B] % ?
+
+\definemathsymbol [lgroup] [open] [sy] ["A8] [ex] ["3A] % ?
+\definemathsymbol [rgroup] [close] [sy] ["A9] [ex] ["3B] % ?
+
\stopmathcollection
\startmathcollection [eul]
-\definemathsymbol [dag] [box] [mb] ["86]
-\definemathsymbol [ddag] [box] [mb] ["87]
-\definemathsymbol [S] [box] [mb] ["A7]
-\definemathsymbol [P] [box] [mb] ["B6]
-%%% originals before substituting Charter characters
-%\definemathsymbol [dag] [box] [sy] ["79]
-%\definemathsymbol [ddag] [box] [sy] ["7A]
-%\definemathsymbol [S] [box] [sy] ["78]
-%\definemathsymbol [P] [box] [sy] ["7B]
+
+\definemathsymbol [dag] [box] [sy] ["79]
+\definemathsymbol [ddag] [box] [sy] ["7A]
+\definemathsymbol [S] [box] [sy] ["78]
+\definemathsymbol [P] [box] [sy] ["7B]
+
\stopmathcollection
-\protect \endinput
+\protect \endinput
diff --git a/tex/context/base/math-ini.tex b/tex/context/base/math-ini.tex
index 8f3960f16..375fce3aa 100644
--- a/tex/context/base/math-ini.tex
+++ b/tex/context/base/math-ini.tex
@@ -300,9 +300,7 @@
\def\tracemathcommand#1%
{\iftracemathcollection
- \endgraf
- \hbox{\tex{#1}~:~{\mathematics{\getvalue{#1}{}}}}
- \endgraf
+ \endgraf\hbox{\tex{#1}~:~{\mathematics{\getvalue{#1}{}}}}\endgraf
\fi}
\def\startmathcollection[#1]%
@@ -345,12 +343,17 @@
\def\usemathcollection[#1]%
{\doinputonce{\truefilename{\f!mathprefix#1}}%
- \setvalue{\@mc@\fontclass\@mc@}{#1}}
+ \doifsomething\fontclass{\setvalue{\@mc@\fontclass\@mc@}{#1}}}
+
+\letvalue{\@mc@\@mc@}\nomathcollection
+
+% \def\autoenablemathcollection
+% {\doifdefinedelse{\@mc@\fontclass\@mc@}
+% {\enablemathcollection[\getvalue{\@mc@\fontclass\@mc@}]}
+% {\enablemathcollection[\s!default]}} % ? ? ?
\def\autoenablemathcollection
- {\doifdefinedelse{\@mc@\fontclass\@mc@}
- {\enablemathcollection[\getvalue{\@mc@\fontclass\@mc@}]}
- {\enablemathcollection[\s!default]}} % ? ? ?
+ {\expanded{\enablemathcollection[\executeifdefined{\@mc@\fontclass\@mc@}\nomathcollection]}}
\appendtoks\autoenablemathcollection\to\mathstrategies
@@ -426,7 +429,10 @@
\definefamilysynonym [default] [3] [ex]
\enablemathcollection[default]
-\usemathcollection[default]
+
+\usemathcollection[tex] % actually this is 'default'
+\usemathcollection[ams] % actually this is 'default'
+
\enablemathcollection[default]
%D Some goodies:
@@ -459,11 +465,10 @@
\protect \endinput
\tracemathcollectiontrue
-
- \input math-tex \page
-\setupbodyfont[ams] \enablemathcollection[ams] \input math-ams \page
-\setupbodyfont[lbr] \enablemathcollection[lbr] \input math-lbr \page
-\setupbodyfont[eul] \enablemathcollection[eul] \input math-eul \stoptext
+ \input math-tex \page
+\setupbodyfont[ams] \enablemathcollection[default] \input math-ams \page
+\setupbodyfont[lbr] \enablemathcollection[lbr] \input math-lbr \page
+\setupbodyfont[eul] \enablemathcollection[eul] \input math-eul \stoptext
% to be checked, overloads supp-lan !
diff --git a/tex/context/base/math-lbr.tex b/tex/context/base/math-lbr.tex
index c3c463254..3df4a36d0 100644
--- a/tex/context/base/math-lbr.tex
+++ b/tex/context/base/math-lbr.tex
@@ -1,6 +1,6 @@
%D \module
%D [ file=math-lbr,
-%D version=2001.04.12,
+%D version=2001.04.12,
%D title=\CONTEXT\ Math Macros,
%D subtitle=Lucida Specials,
%D author={Hans Hagen \& Taco Hoekwater},
@@ -11,26 +11,280 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\unprotect
+\unprotect
+
+\definefamilysynonym [lbr] [calligrapahy] [sy]
+\definefamilysynonym [lbr] [oldstyle] [mi]
+
+\definefamilysynonym [lbr] [blackboard] [ma]
+\definefamilysynonym [lbr] [ucgreek] [mb]
+\definefamilysynonym [lbr] [vargreek] [mi]
\startmathcollection[lbr]
-\definemathsymbol [blacktriangleright] [rel] [mi] ["F0]
-\definemathsymbol [blacktriangleleft] [rel] [mi] ["F1]
-\definemathsymbol [boxplus] [bin] [sy] ["EA]
-\definemathsymbol [boxminus] [bin] [sy] ["EB]
-\definemathsymbol [boxtimes] [bin] [sy] ["EC]
+\definemathsymbol [boxdot] [bin] [sy] ["ED]
+\definemathsymbol [boxplus] [bin] [sy] ["EA]
+\definemathsymbol [boxtimes] [bin] [sy] ["EC]
+\definemathsymbol [square] [ord] [ma] ["02]
+\definemathsymbol [Box] [ord] [ma] ["02] % square
+\definemathsymbol [blacksquare] [ord] [ma] ["03]
+\definemathsymbol [centerdot] [bin] [ma] ["E1] % [sy] ["01]
+\definemathsymbol [Diamond] [ord] [sy] ["05]
+\definemathsymbol [lozenge] [ord] [sy] ["05] % Diamond
+\definemathsymbol [blacklozenge] [ord] [ma] ["09]
+\definemathsymbol [circlearrowright] [rel] [ma] ["8C]
+\definemathsymbol [circlearrowleft] [rel] [ma] ["8B]
+\definemathsymbol [rightleftharpoons] [rel] [sy] ["8E]
+\definemathsymbol [leftrightharpoons] [rel] [sy] ["8D]
+\definemathsymbol [boxminus] [bin] [sy] ["EB]
+\definemathsymbol [Vdash] [rel] [sy] ["F0]
+\definemathsymbol [Vvdash] [rel] [mb] ["D3]
+\definemathsymbol [vDash] [rel] [mb] ["D6]
+\definemathsymbol [twoheadrightarrow] [rel] [ma] ["25]
+\definemathsymbol [twoheadleftarrow] [rel] [ma] ["23]
+\definemathsymbol [leftleftarrows] [rel] [ma] ["71]
+\definemathsymbol [rightrightarrows] [rel] [ma] ["73]
+\definemathsymbol [upuparrows] [rel] [ma] ["72]
+\definemathsymbol [downdownarrows] [rel] [ma] ["74]
+\definemathsymbol [upharpoonright] [rel] [ma] ["75]
+\definemathsymbol [restriction] [rel] [ma] ["77]
+\definemathsymbol [downharpoonright] [rel] [ma] ["77]
+\definemathsymbol [upharpoonleft] [rel] [ma] ["76]
+\definemathsymbol [downharpoonleft] [rel] [ma] ["78]
+\definemathsymbol [rightarrowtail] [rel] [ma] ["29]
+\definemathsymbol [leftarrowtail] [rel] [ma] ["28]
+\definemathsymbol [leftrightarrows] [rel] [ma] ["6E]
+\definemathsymbol [rightleftarrows] [rel] [ma] ["6D]
+\definemathsymbol [Lsh] [rel] [ma] ["7B]
+\definemathsymbol [Rsh] [rel] [ma] ["7D]
+\definemathsymbol [rightsquigarrow] [rel] [ma] ["8E]
+\definemathsymbol [leadsto] [rel] [ma] ["8E] % rightsquigarrow
+\definemathsymbol [leftrightsquigarrow] [rel] [ma] ["91]
+\definemathsymbol [looparrowleft] [rel] [ma] ["3F]
+\definemathsymbol [looparrowright] [rel] [ma] ["40]
+\definemathsymbol [circeq] [rel] [sy] ["D0]
+\definemathsymbol [succsim] [rel] [sy] ["E1]
+\definemathsymbol [gtrsim] [rel] [sy] ["DD]
+\definemathsymbol [gtrapprox] [rel] [mb] ["DB]
+\definemathsymbol [multimap] [rel] [mb] ["C7]
+\definemathsymbol [therefore] [rel] [sy] ["90]
+\definemathsymbol [because] [rel] [sy] ["91]
+\definemathsymbol [doteqdot] [rel] [sy] ["CA]
+\definemathsymbol [Doteq] [rel] [sy] ["CA] % doteqdot
+\definemathsymbol [triangleq] [rel] [sy] ["D5]
+\definemathsymbol [precsim] [rel] [sy] ["E0]
+\definemathsymbol [lesssim] [rel] [sy] ["DC]
+\definemathsymbol [lessapprox] [rel] [mb] ["DA]
+\definemathsymbol [eqslantless] [rel] [mb] ["E2]
+\definemathsymbol [eqslantgtr] [rel] [mb] ["E3]
+\definemathsymbol [curlyeqprec] [rel] [mb] ["E6]
+\definemathsymbol [curlyeqsucc] [rel] [mb] ["E7]
+\definemathsymbol [preccurlyeq] [rel] [mb] ["E4]
+\definemathsymbol [leqq] [rel] [sy] ["DA]
+\definemathsymbol [leqslant] [rel] [mb] ["E0]
+\definemathsymbol [lessgtr] [rel] [sy] ["DE]
+\definemathsymbol [backprime] [ord] [mb] ["C8]
+\definemathsymbol [dabar@] [ord] [ma] ["03] % !! @
+\definemathsymbol [risingdotseq] [rel] [sy] ["CC]
+\definemathsymbol [fallingdotseq] [rel] [sy] ["CB]
+\definemathsymbol [succcurlyeq] [rel] [mb] ["E5]
+\definemathsymbol [geqq] [rel] [sy] ["DB]
+\definemathsymbol [geqslant] [rel] [mb] ["E1]
+\definemathsymbol [gtrless] [rel] [sy] ["DF]
+\definemathsymbol [sqsubset] [rel] [sy] ["E4]
+\definemathsymbol [sqsupset] [rel] [sy] ["E5]
+\definemathsymbol [vartriangleright] [rel] [mb] ["2E]
+\definemathsymbol [rhd] [bin] [mb] ["2E]
+\definemathsymbol [lhd] [bin] [mb] ["2F]
+\definemathsymbol [vartriangleleft] [rel] [mb] ["2F]
+\definemathsymbol [trianglerighteq] [rel] [sy] ["F5]
+\definemathsymbol [unrhd] [bin] [sy] ["F5] % trianglerighteq
+\definemathsymbol [trianglelefteq] [rel] [sy] ["F4]
+\definemathsymbol [unlhd] [bin] [sy] ["F4] % trianglelefteq
+\definemathsymbol [bigstar] [ord] [ma] ["AB]
+\definemathsymbol [between] [rel] [mb] ["F2]
+\definemathsymbol [blacktriangledown] [ord] [ma] ["07]
+\definemathsymbol [blacktriangleright] [rel] [mb] ["F1]
+\definemathsymbol [blacktriangleleft] [rel] [mb] ["F0]
+\definemathsymbol [vartriangle] [rel] [ma] ["04]
+\definemathsymbol [triangleup] [ord] [ma] ["04] % vartriangle
+\definemathsymbol [blacktriangle] [ord] [ma] ["05]
+\definemathsymbol [triangledown] [ord] [ma] ["06]
+\definemathsymbol [eqcirc] [rel] [sy] ["CF]
+\definemathsymbol [lesseqgtr] [rel] [mb] ["E8]
+\definemathsymbol [gtreqless] [rel] [mb] ["E9]
+\definemathsymbol [lesseqqgtr] [rel] [mb] ["EA]
+\definemathsymbol [gtreqqless] [rel] [mb] ["EB]
+\definemathsymbol [Rrightarrow] [rel] [ma] ["6C]
+\definemathsymbol [Lleftarrow] [rel] [ma] ["6A]
+\definemathsymbol [veebar] [bin] [mb] ["D2]
+\definemathsymbol [barwedge] [bin] [sy] ["F6]
+\definemathsymbol [doublebarwedge] [bin] [sy] ["D4]
+\definemathsymbol [angle] [ord] [sy] ["8B]
+\definemathsymbol [measuredangle] [ord] [sy] ["8C]
+\definemathsymbol [sphericalangle] [ord] [sy] ["8D]
+\definemathsymbol [varpropto] [rel] [sy] ["2F]
+\definemathsymbol [smallsmile] [rel] [mb] ["5E]
+\definemathsymbol [smallfrown] [rel] [mb] ["5F]
+\definemathsymbol [Subset] [rel] [sy] ["F8]
+\definemathsymbol [Supset] [rel] [sy] ["F9]
+\definemathsymbol [Cup] [bin] [sy] ["FA]
+\definemathsymbol [doublecup] [bin] [sy] ["FA] % Cup
+\definemathsymbol [Cap] [bin] [sy] ["FB]
+\definemathsymbol [doublecap] [bin] [sy] ["FB]
+\definemathsymbol [curlywedge] [bin] [sy] ["84]
+\definemathsymbol [curlyvee] [bin] [sy] ["85]
+\definemathsymbol [leftthreetimes] [bin] [mb] ["D0]
+\definemathsymbol [rightthreetimes] [bin] [mb] ["D1]
+\definemathsymbol [subseteqq] [rel] [mb] ["EE]
+\definemathsymbol [supseteqq] [rel] [mb] ["EF]
+\definemathsymbol [bumpeq] [rel] [sy] ["C8]
+\definemathsymbol [Bumpeq] [rel] [sy] ["C7]
+\definemathsymbol [llless] [rel] [mb] ["DE]
+\definemathsymbol [lll] [rel] [mb] ["DE] % llless
+\definemathsymbol [gggtr] [rel] [mb] ["DF]
+\definemathsymbol [ggg] [rel] [mb] ["DF] % gggtr
+\definemathsymbol [ulcorner] [open] [ma] ["5B] [ma] ["5B]
+\definemathsymbol [urcorner] [close] [ma] ["5C] [ma] ["5C]
+\definemathsymbol [circledS] [ord] [mb] ["CA]
+\definemathsymbol [pitchfork] [rel] [ma] ["F3]
+\definemathsymbol [dotplus] [bin] [sy] ["89]
+\definemathsymbol [backsim] [rel] [sy] ["24]
+\definemathsymbol [backsimeq] [rel] [sy] ["27]
+\definemathsymbol [llcorner] [open] [ma] ["5D] [ma] ["5D]
+\definemathsymbol [lrcorner] [close] [ma] ["5E] [ma] ["5E]
+\definemathsymbol [complement] [ord] [mb] ["94]
+\definemathsymbol [intercal] [bin] [ma] ["03] % !!
+\definemathsymbol [circledcirc] [bin] [sy] ["E6]
+\definemathsymbol [circledast] [bin] [sy] ["E7]
+\definemathsymbol [circleddash] [bin] [mb] ["CC]
+
+\stopmathcollection
+
+\startmathcollection [lbr]
+
+\definemathsymbol [lvertneqq] [rel] [ma] ["DE]
+\definemathsymbol [gvertneqq] [rel] [ma] ["DE]
+\definemathsymbol [nleq] [rel] [ma] ["9C]
+\definemathsymbol [ngeq] [rel] [ma] ["9D]
+\definemathsymbol [nless] [rel] [ma] ["9A]
+\definemathsymbol [ngtr] [rel] [ma] ["9B]
+\definemathsymbol [nprec] [rel] [ma] ["E5]
+\definemathsymbol [nsucc] [rel] [ma] ["E6]
+\definemathsymbol [lneqq] [rel] [ma] ["DC]
+\definemathsymbol [gneqq] [rel] [ma] ["DE]
+\definemathsymbol [nleqslant] [rel] [ma] ["D6]
+\definemathsymbol [ngeqslant] [rel] [ma] ["D7]
+\definemathsymbol [lneq] [rel] [ma] ["DA]
+\definemathsymbol [gneq] [rel] [ma] ["DB]
+\definemathsymbol [npreceq] [rel] [ma] ["E7]
+\definemathsymbol [nsucceq] [rel] [ma] ["E8]
+\definemathsymbol [precnsim] [rel] [ma] ["EB]
+\definemathsymbol [succnsim] [rel] [ma] ["EC]
+\definemathsymbol [lnsim] [rel] [ma] ["E0]
+\definemathsymbol [gnsim] [rel] [ma] ["E2]
+\definemathsymbol [nleqq] [rel] [ma] ["D8]
+\definemathsymbol [ngeqq] [rel] [ma] ["D9]
+\definemathsymbol [precneqq] [rel] [ma] ["E9]
+\definemathsymbol [succneqq] [rel] [ma] ["EA]
+\definemathsymbol [precnapprox] [rel] [ma] ["ED]
+\definemathsymbol [succnapprox] [rel] [ma] ["EE]
+\definemathsymbol [lnapprox] [rel] [ma] ["E4]
+\definemathsymbol [gnapprox] [rel] [ma] ["E3]
+\definemathsymbol [nsim] [rel] [ma] ["96]
+\definemathsymbol [ncong] [rel] [ma] ["99]
+\definemathsymbol [diagup] [ord] [mb] ["CD]
+\definemathsymbol [diagdown] [ord] [mb] ["D8]
+\definemathsymbol [varsubsetneq] [rel] [ma] ["D0]
+\definemathsymbol [varsupsetneq] [rel] [ma] ["D1]
+\definemathsymbol [nsubseteqq] [rel] [ma] ["CA]
+\definemathsymbol [nsupseteqq] [rel] [ma] ["CB]
+\definemathsymbol [subsetneqq] [rel] [ma] ["CE]
+\definemathsymbol [supsetneqq] [rel] [ma] ["CF]
+\definemathsymbol [varsubsetneqq] [rel] [ma] ["D2]
+\definemathsymbol [varsupsetneqq] [rel] [ma] ["D3]
+\definemathsymbol [subsetneq] [rel] [ma] ["CC]
+\definemathsymbol [supsetneq] [rel] [ma] ["CD]
+\definemathsymbol [nsubseteq] [rel] [ma] ["C8]
+\definemathsymbol [nsupseteq] [rel] [ma] ["C9]
+\definemathsymbol [nparallel] [rel] [ma] ["F7]
+\definemathsymbol [nmid] [rel] [ma] ["F6]
+\definemathsymbol [nshortmid] [rel] [ma] ["F4]
+\definemathsymbol [nshortparallel] [rel] [ma] ["F5]
+\definemathsymbol [nvdash] [rel] [ma] ["F8]
+\definemathsymbol [nVdash] [rel] [ma] ["F9]
+\definemathsymbol [nvDash] [rel] [ma] ["FA]
+\definemathsymbol [nVDash] [rel] [ma] ["FB]
+\definemathsymbol [ntrianglerighteq] [rel] [ma] ["F2]
+\definemathsymbol [ntrianglelefteq] [rel] [ma] ["F1]
+\definemathsymbol [ntriangleleft] [rel] [ma] ["EF]
+\definemathsymbol [ntriangleright] [rel] [ma] ["F0]
+\definemathsymbol [nleftarrow] [rel] [ma] ["32]
+\definemathsymbol [nrightarrow] [rel] [ma] ["33]
+\definemathsymbol [nLeftarrow] [rel] [ma] ["66]
+\definemathsymbol [nRightarrow] [rel] [ma] ["68]
+\definemathsymbol [nLeftrightarrow] [rel] [ma] ["67]
+\definemathsymbol [nleftrightarrow] [rel] [ma] ["34]
+\definemathsymbol [divideontimes] [bin] [mb] ["F7]
+\definemathsymbol [varnothing] [ord] [sy] ["53]
+\definemathsymbol [nexists] [ord] [ma] ["20]
+\definemathsymbol [Finv] [ord] [mb] ["90]
+\definemathsymbol [Game] [ord] [mb] ["91]
+\definemathsymbol [mho] [ord] [mb] ["92]
+\definemathsymbol [eth] [ord] [ma] ["03] % !!
+\definemathsymbol [eqsim] [rel] [sy] ["99]
+\definemathsymbol [beth] [ord] [mb] ["95]
+\definemathsymbol [gimel] [ord] [mb] ["96]
+\definemathsymbol [daleth] [ord] [mb] ["97]
+\definemathsymbol [lessdot] [bin] [mb] ["DC]
+\definemathsymbol [gtrdot] [bin] [mb] ["DD]
+\definemathsymbol [ltimes] [bin] [mb] ["CF]
+\definemathsymbol [rtimes] [bin] [mb] ["CE]
+\definemathsymbol [shortmid] [rel] [mb] ["F4]
+\definemathsymbol [shortparallel] [rel] [mb] ["F5]
+\definemathsymbol [smallsetminus] [bin] [mb] ["D8]
+\definemathsymbol [thicksim] [rel] [sy] ["18] % not that thick
+\definemathsymbol [thickapprox] [rel] [sy] ["19] % not that thick
+\definemathsymbol [approxeq] [rel] [sy] ["9D]
+\definemathsymbol [succapprox] [rel] [mb] ["ED]
+\definemathsymbol [precapprox] [rel] [mb] ["EC]
+\definemathsymbol [curvearrowleft] [rel] [ma] ["87]
+\definemathsymbol [curvearrowright] [rel] [ma] ["88]
+\definemathsymbol [digamma] [ord] [ma] ["03] % !!
+\definemathsymbol [varkappa] [ord] [mb] ["9B]
+\definemathsymbol [Bbbk] [ord] [ma] ["6B]
+\definemathsymbol [hslash] [ord] [mb] ["9D]
+\definemathsymbol [hbar] [ord] [ma] ["1B]
+\definemathsymbol [backepsilon] [rel] [ma] ["03] % !!
+
+\stopmathcollection
+
+\startmathcollection [lbr]
+
+\definemathsymbol [yen] [nothing] [ma] ["03] % !!
+\definemathsymbol [checkmark] [nothing] [ma] ["AC]
+\definemathsymbol [circledR] [nothing] [mb] ["C9]
+\definemathsymbol [maltese] [nothing] [mb] ["CB]
+
+\stopmathcollection
+
+\startmathcollection [lbr]
+
+\definemathsymbol [dashrightarrow] [rel] [ma] ["3A]
+\definemathsymbol [dashleftarrow] [rel] [ma] ["38]
+\definemathcommand [dasharrow] [rel] {\dashleftarrow\mkern-15.8mu\dashrightarrow}
+%definemathcommand [Join] [rel] {\mathchar"0D6F\mkern-15.8mu\mathchar"0D6E} % !!
\stopmathcollection
\startmathcollection[lbr]
-\definemathcharacter [91] [open] [mi] ["86]
-\definemathcharacter [93] [close] [mi] ["87]
-\definemathcharacter [(] [open] [mi] ["84]
-\definemathcharacter [)] [close] [mi] ["85]
-\definemathcharacter [/] [nothing] [mi] ["3D]
-\definemathcharacter [=] [rel] [sy] ["83]
+\definemathcharacter [91] [open] [mi] ["86]
+\definemathcharacter [93] [close] [mi] ["87]
+\definemathcharacter [(] [open] [mi] ["84]
+\definemathcharacter [)] [close] [mi] ["85]
+\definemathcharacter [/] [nothing] [mi] ["3D]
+\definemathcharacter [=] [rel] [sy] ["83]
\definemathcharacter [+] [bin] [sy] ["82]
\definemathcharacter [91] [nothing] [mi] ["86] [ex] ["02]
@@ -42,19 +296,19 @@
\stopmathcollection
% \startmathcollection[lbr]
-%
+%
% \definemathcharacter [:] [punct] [tf] ["3A] % unbelievable
% \definemathcharacter [;] [punct] [tf] ["3B] % unbelievable
-%
+%
% \stopmathcollection
\startmathcollection[lbr]
\definemathsymbol [ldbrack] [open] [mi] ["82] [ex] ["82]
\definemathsymbol [rdbrack] [close] [mi] ["83] [ex] ["83]
-\definemathsymbol [surfintop] [op] [ex] ["90]
-\definemathsymbol [midintop] [op] [ex] ["92]
-\definemathsymbol [midointop] [op] [ex] ["93]
+\definemathsymbol [surfintop] [op] [ex] ["90]
+\definemathsymbol [midintop] [op] [ex] ["92]
+\definemathsymbol [midointop] [op] [ex] ["93]
\definemathsymbol [midsurfintop] [op] [ex] ["94]
\definemathsymbol [largeint] [op] [ex] ["5A] [ex] ["95]
@@ -63,9 +317,9 @@
% \definemathcommand [midoint] [nolop] {\midointop}
% \definemathcommand [midsurfint] [nolop] {\midsurfintop}
-\definemathsymbol [surfint] [nolop] [ex] ["90]
-\definemathsymbol [midint] [nolop] [ex] ["92]
-\definemathsymbol [midoint] [nolop] [ex] ["93]
+\definemathsymbol [surfint] [nolop] [ex] ["90]
+\definemathsymbol [midint] [nolop] [ex] ["92]
+\definemathsymbol [midoint] [nolop] [ex] ["93]
\definemathsymbol [midsurfint] [nolop] [ex] ["94]
\definemathsymbol [dblint] [ord] [mi] ["88]
@@ -80,7 +334,6 @@
\definemathsymbol [models] [rel] [sy] ["EE]
\definemathsymbol [doteq] [rel] [sy] ["C9]
\definemathsymbol [cong] [rel] [sy] ["9B]
-\definemathsymbol [angle] [ord] [sy] ["8B]
\definemathsymbol [hbar] [ord] [mi] ["9D]
\definemathsymbol [neq] [rel] [ma] ["94]
\definemathsymbol [rightleftharpoons] [rel] [ma] ["7A]
@@ -93,23 +346,8 @@
\stopmathcollection
-\definefamilysynonym [lbr] [ucgreek] [mb]
-\definefamilysynonym [lbr] [vargreek] [mi]
-
\startmathcollection[lbr]
-%\definemathsymbol [Gamma] [alpha] [ucgreek] ["D0]
-%\definemathsymbol [Delta] [alpha] [ucgreek] ["D1]
-%\definemathsymbol [Theta] [alpha] [ucgreek] ["D2]
-%\definemathsymbol [Lambda] [alpha] [ucgreek] ["D3]
-%\definemathsymbol [Xi] [alpha] [ucgreek] ["D4]
-%\definemathsymbol [Pi] [alpha] [ucgreek] ["D5]
-%\definemathsymbol [Sigma] [alpha] [ucgreek] ["D6]
-%\definemathsymbol [Upsilon] [alpha] [ucgreek] ["D7]
-%\definemathsymbol [Phi] [alpha] [ucgreek] ["D8]
-%\definemathsymbol [Psi] [alpha] [ucgreek] ["D9]
-%\definemathsymbol [Omega] [alpha] [ucgreek] ["DA]
-
\definemathsymbol [Gamma] [alpha] [ucgreek] ["00]
\definemathsymbol [Delta] [alpha] [ucgreek] ["01]
\definemathsymbol [Theta] [alpha] [ucgreek] ["02]
@@ -202,4 +440,4 @@
\stoprawmathcollection
-\protect \endinput
+\protect \endinput
diff --git a/tex/context/base/math-run.tex b/tex/context/base/math-run.tex
index c2a5852a0..b41ea3c64 100644
--- a/tex/context/base/math-run.tex
+++ b/tex/context/base/math-run.tex
@@ -13,18 +13,21 @@
\unprotect
+\ifx\showmathmodern\undefined \global\chardef\showmathmodern\zerocount \fi
+
\gdef\showmathcharacters% nearly \showcharacters
{\par
\bgroup
+ \ifcase\showmathmodern\or\ifx\modern\undefined\chardef\showmathmodern\zerocount\fi\fi
\setuptextrules[\c!bodyfont=,\c!style=]
- \starttextrule{math characters}
+ \starttextrule{math characters -- \currentmathcollection}
\whitespace
\dontcomplain
\forgetall
\def\startmathcollection[##1]{}
\let\stopmathcollection\relax
- \dimen0=\!!zeropoint
- \dimen2=\!!zeropoint
+ \dimen0\zeropoint
+ \dimen2\zeropoint
\def\definemathsymbol {\dosixtupleempty\dodefinemathsymbol}
\def\definemathcharacter{\dosixtupleempty\dodefinemathcharacter}
\def\definemathcommand {\dotripleempty \dodefinemathcommand}
@@ -33,19 +36,19 @@
{%\doifcolorelse{math \purefamilyhex{##3}}{}
% {\increment\mathcolor
% \definecolor[math \purefamilyhex{##3}][\mathcolor]}%
- \setbox0=\hbox spread 1em
- {$\getvalue{##1}{}$}%
+ \setbox0\hbox spread 1em{\mathematics{\getvalue{##1}{}{}{}}}%
\ifdim\wd0>\dimen0 \dimen0=\wd0 \fi
- \setbox2=\hbox spread 1em
- {\hbox to 1em{\tttf\purefamilyhex{##3}\hss}\box0 ##1}
+ \setbox2\hbox spread 1em{\hbox to 1em{\tttf\purefamilyhex{##3}\hss}\box0 ##1}%
\ifdim\wd2>\dimen2 \dimen2=\wd2 \fi}
\def\dodefinemathcharacter[##1][##2][##3][##4][##5][##6]{}
- \def\dodefinemathcommand[##1][##2][##3]##4{}
- \readsysfile{\f!mathprefix tex}{}{}
+ \def\dodefinemathcommand [##1][##2][##3]##4{}
+ \readsysfile{\f!mathprefix tex}\donothing\donothing
+ \readsysfile{\f!mathprefix ams}\donothing\donothing
\edef\encwidth{\the\dimen0}
\dimen0=\hsize
\advance\dimen0 2em
\advance\dimen2 2em
+ \ifcase\showmathmodern\or\advance\dimen2 2em\fi
\divide \dimen0 by \dimen2 \advance\dimen0 1sp
\edef\enccols{\number\dimen0}
\startcolumns[\c!n=\enccols,\c!distance=2em]
@@ -54,10 +57,13 @@
%\color
% [math \purefamilyhex{##3}]
{\hbox
- {\hbox to \encwidth{$\getvalue{##1}{}$\hss}%
+ {\ifcase\showmathmodern\or
+ \hbox to \encwidth{\modern\let\mathcollection\nomathcollection\mathematics{\getvalue{##1}{}{}{}}\hss}%
+ \fi
+ \hbox to \encwidth{\mathematics{\getvalue{##1}{}{}{}}\hss}%
\hbox to 1em{\tttf\purefamilyhex{##3}\hss}##1}\par}}
- \readsysfile{\f!mathprefix tex}{}{}
-% \readsysfile{\f!mathprefix ams}{}{}
+ \readsysfile{\f!mathprefix tex}\donothing\donothing
+ \readsysfile{\f!mathprefix ams}\donothing\donothing
\stopcolumns
\stoptextrule
\egroup}
diff --git a/tex/context/base/math-tex.tex b/tex/context/base/math-tex.tex
index 0e474a892..4db3a2058 100644
--- a/tex/context/base/math-tex.tex
+++ b/tex/context/base/math-tex.tex
@@ -15,10 +15,15 @@
\mathcode`\ ="8000 \mathcode`\_="8000 \mathcode`\'="8000
-\definefamilysynonym [default] [lcgreek] [mi]
-\definefamilysynonym [default] [ucgreek] [mr]
-\definefamilysynonym [default] [vargreek] [mi]
-%definefamilysynonym [default] [blackboard] [mb] % extra font
+\definefamilysynonym [default] [calligraphic] [sy]
+\definefamilysynonym [default] [oldstyle] [mi]
+\definefamilysynonym [default] [blackboard] [mr]
+\definefamilysynonym [default] [gothic] [mr]
+\definefamilysynonym [default] [fraktur] [mr]
+
+\definefamilysynonym [default] [lcgreek] [mi]
+\definefamilysynonym [default] [ucgreek] [mr]
+\definefamilysynonym [default] [vargreek] [mi]
\startmathcollection [default]
diff --git a/tex/context/base/page-flt.tex b/tex/context/base/page-flt.tex
index 94fd2e0e5..3fa99850f 100644
--- a/tex/context/base/page-flt.tex
+++ b/tex/context/base/page-flt.tex
@@ -1953,7 +1953,7 @@
\getparameters[\??si][#1]%
\resetnumber[\??si]%
\def\floatcaptionsuffix{\convertednumber[\??si]}%
- \TABLEcaptionheight=\@@silines\lineheight % brrr
+ \TABLEcaptionheight\@@silines\lineheight % brrr
\simplifypagebreak % \page becomes \goodbreak
\dowithnextbox
{\forgetall
@@ -1963,7 +1963,7 @@
\setbox2\vbox{\unvbox2}
\ifdim\ht2>\lineheight
\incrementnumber[\??si]%
- \ifnum\rawnumber[\??si]=1 \ifdim\nextboxht=\zeropoint
+ \ifcase\rawnumber[\??si]\or \ifdim\nextboxht=\zeropoint
\let\floatcaptionsuffix\empty
\fi \fi
\bgroup
@@ -1981,7 +1981,7 @@
\vbox
\fi}
-\def\splitfloat%
+\def\splitfloat
{\dosingleempty\dosplitfloat}
\def\dooutput{\sidefloatoutput} % redefinition of \dooutput
diff --git a/tex/context/base/page-mak.tex b/tex/context/base/page-mak.tex
index 87d8be7c2..fe3bfe40d 100644
--- a/tex/context/base/page-mak.tex
+++ b/tex/context/base/page-mak.tex
@@ -176,13 +176,13 @@
\processaction
[\makeupparameter\c!doublesided]
[ \v!yes=>\null
- \page,
- % \verlaagpaginanummer, % new
+ \page,
+ % \verlaagpaginanummer, % new
\v!empty=>{\setupmakeuplayout
\page[\v!blank]%
\null
\page}]%
- % \verlaagpaginanummer]% % new
+ % \verlaagpaginanummer]% % new
\fi \fi
% \verlaagpaginanummer % new
\globalpopmacro\@@pnstate} % new
@@ -192,7 +192,7 @@
%D connection between them is made by the following macro
\def\setupmakeuplayout
- {\setupfooter[\c!state=\makeupparameter\c!footerstate ]%
+ {\setupfooter[\c!state=\makeupparameter\c!footerstate]%
\setupheader[\c!state=\makeupparameter\c!headerstate]%
\setuptext [\c!state=\makeupparameter\c!textstate]%
\setupbottom[\c!state=\makeupparameter\c!bottomstate]%
diff --git a/tex/context/base/spec-dpm.tex b/tex/context/base/spec-dpm.tex
index 0aceee9ca..74fb16963 100644
--- a/tex/context/base/spec-dpm.tex
+++ b/tex/context/base/spec-dpm.tex
@@ -409,9 +409,10 @@
\def\doPDFbookmark level #1 n #2 text #3 page #4 open #5%
{\ifcase#2\else
- \special
- {pdf: out \ifcase#5-\fi#2
- <</Page #4\space /View [/Fit] /Title (#3)>>}%
+ \scratchcounter#4\advance\scratchcounter\minusone
+ \special{pdf: out \ifcase#5-\fi#2
+ % <</Page \the\scratchcounter\space /View [/Fit] /Title (#3)>>}%
+ <</Title (#3) /A <</S /GoTo /D [@page\number#4\space\PDFpageviewwrd]>> >>}%
\fi}
%D \macros
diff --git a/tex/context/base/spec-dpx.tex b/tex/context/base/spec-dpx.tex
index 95d5a3021..1641e0daa 100644
--- a/tex/context/base/spec-dpx.tex
+++ b/tex/context/base/spec-dpx.tex
@@ -223,7 +223,7 @@
\def\assignPDFtransparency#1#2%
{\def\PDFtransparencyidentifier{/Tr#1}%
- %\def\PDFtransparencyreference{#2 0 R}}
+ %\def\PDFtransparencyreference{\PDFobjref{#2}}}
\def\PDFtransparencyreference{@TR:#2}}
\def\presetPDFtransparency#1#2%
@@ -237,7 +237,7 @@
\doPDFreserveDPXobject{TR:\the\PDFcurrenttransparency}{<< >>}%
\special{pdf: \doPDFcheckedDPXobject{TR:\the\PDFcurrenttransparency}\PDFtransparancydictionary{#1}{#2}{}}%
\edef\PDFtransparencyidentifier{/Tr\the\PDFcurrenttransparency}%
- %\edef\PDFtransparencyreference {\the\pdflastobj\space 0 R}%
+ %\edef\PDFtransparencyreference {\PDFobjref\pdflastobj}%
\edef\PDFtransparencyreference {@TR:\the\PDFcurrenttransparency}%
\setxvalue{\@@PDT#1:#2}%
{\noexpand\assignPDFtransparency{\the\PDFcurrenttransparency}{\the\PDFcurrenttransparency}}%
@@ -251,7 +251,7 @@
{\doPDFreserveDPXobject{TR:0}{<< >>}%
\special{pdf: \doPDFcheckedDPXobject{TR:0}\PDFtransparancydictionary{1}{1}{/AIS false}}%
\xdef\PDFtransparencyresetidentifier{/Tr0}%
- %\xdef\PDFtransparencyresetreference{\the\pdflastobj\space 0 R}%
+ %\xdef\PDFtransparencyresetreference{\PDFobjref\pdflastobj}%
\xdef\PDFtransparencyresetreference{@TR:0}%
\setxvalue{\@@PDT0:0}%
%{\noexpand\assignPDFtransparency{0}{\the\pdflastobj}}%
@@ -555,8 +555,8 @@
\def\doPDFpageresource#1%
{\special{pdf: put @resources <<#1>>}}
-\let\doPDFresetpageresources =\relax
-\let\doPDFresetpageattributes=\relax
+\let\doPDFresetpageresources \relax
+\let\doPDFresetpageattributes\relax
%D \type{\doPDFbookmark} in \type{spec-dpm} had a bug.
%D The openbookmark option \#5 is not supported yet.
@@ -566,8 +566,10 @@
\def\doPDFbookmark level #1 n #2 text #3 page #4 open #5%
{\ifcase#1\else
+ \scratchcounter#4\advance\scratchcounter\minusone
\special{pdf: outline #1 %\ifcase\the#5-\fi#1
- <</Title (#3) /A <</S /GoTo /D (page:#4)>>>>}%
+ % <</Title (#3) /A <</S /GoTo /D (page:\the\scratchcounter)>>>>}%
+ <</Title (#3) /A <</S /GoTo /D [@page\number#4\space\PDFpageviewwrd]>> >>}%
\fi}
%D \macros
diff --git a/tex/context/base/spec-fdf.tex b/tex/context/base/spec-fdf.tex
index 94bc756e4..7d5a73b4d 100644
--- a/tex/context/base/spec-fdf.tex
+++ b/tex/context/base/spec-fdf.tex
@@ -33,6 +33,16 @@
\unprotect
%D \macros
+%D {\PDFobjref}
+%D
+%D Just a shortcut.
+
+% Watch out, \def\PDFobjref#1{\purenumber#1 0 R} also works, but not when
+% #1 == \the\whatever
+
+\def\PDFobjref#1{\purenumber{#1} 0 R}
+
+%D \macros
%D {setPDFdestination}
%D
%D \PDF\ destinations should obey the specifications laid down
@@ -629,7 +639,7 @@
% ==>
%
% \advance\scratchcounter 1
-% \edef\PDFdestination{[\pdfpageref \scratchcounter\space 0 R\space\PDFpageviewwrd]}%
+% \edef\PDFdestination{[\pdfpageref \PDFobjref\scratchcounter\PDFpageviewwrd]}%
%
% \doPDFgetpagedestination#1#2% pagenumber macro % % fuzzy hack
@@ -1007,27 +1017,6 @@
\def\doPDFgetfilestreamreference#1#2%
{0 0 R}
-% \def\doPDFattachfile#1#2#3#4#5#6#7#8%
-% {\bgroup % title width height color symbol file
-% \edef\PDFfile{#8}\convertcommand\PDFfile\to\PDFfile
-% % beware: the symbol may (indirectly) use the file
-% % reference when typesetting the object number;
-% \presetPDFsymbolappearance{#5}{#6}{#2}{#3}{#4}% sets width/height
-% \startPDFsymbolappearance
-% \doifnotflagged{a:\PDFfile}%
-% {\doPDFfilestreamobject
-% class PDFEF name {\PDFfile} file {#7} source {#8}%
-% \doglobal\setflag{a:\PDFfile}}%
-% \doPDFgetobjectreference{PDFEF}\PDFfile\PDFobjectreference
-% \doPDFannotation width {\width} height {\totalheight} data
-% {/Subtype /FileAttachment
-% /FS \PDFobjectreference\space
-% /Contents (#1)
-% \PDFsymbol
-% \PDFattributes}%
-% \stopPDFsymbolappearance
-% \egroup}
-
\def\doPDFattachfile#1#2#3#4#5#6#7#8%
{\bgroup % title width height color symbol file
\edef\PDFfile{#8}\convertcommand\PDFfile\to\PDFfile
@@ -1264,11 +1253,8 @@
% todo, unicode
\sanitizePDFdocencoding#3\to\bookmarktext % uses scratchcounter
\stripstring\bookmarktext
- \scratchcounter#4%
- \advance\scratchcounter \minusone
%\sanitizePDFstring#3\to\bookmarktext
- \doPDFbookmark level #1 n #2 text {\bookmarktext}
- page {\the\scratchcounter} open #5
+ \doPDFbookmark level #1 n #2 text {\bookmarktext} page {#4} open #5
\egroup}
%D The next section of this module is dedicated to form
@@ -2553,7 +2539,7 @@
{/Subtype /Text
\ifcase#5 \else/Open true\fi
% pdftex (efficient)
- % \ifdone /Popup \the\pdflastannot\space 0 R\fi
+ % \ifdone /Popup \PDFobjref\pdflastannot\fi
% generic (less efficient)
\ifdone /Popup \PDFobjectreference\fi
/Contents \ifPDFunicode <\PDFdata> \else(\PDFdata) \fi
@@ -2777,7 +2763,7 @@
% we cannot use /DeviceN since GS <=7.21 breaks on it
% and Jaws does not handle it at all {[/DeviceN [/All|/None]
-% /Device#2 \the\pdflastobj\space0 R]} so we use separation
+% /Device#2 \PDFobjref\pdflastobj]} so we use separation
% colors that work and print ok
\def\doPDFregistersomespotcolor#1#2#3#4% implemented in the driver
@@ -3087,7 +3073,7 @@
\prependtoksonce \flushPDFpagelayers \to \everyshipout
\prependtoksonce \flushPDFtextlayers \to \everylastshipout
-\def\PDFlayeractionlist{null} % \PDFlayeractionlist{5 0 R}
+\def\PDFlayeractionlist{null}
\def\PDFexecutehidelayer {/SetOCGState /State [/OFF \PDFlayeractionlist]}
\def\PDFexecutevidelayer {/SetOCGState /State [/ON \PDFlayeractionlist]}
diff --git a/tex/context/base/spec-pdf.tex b/tex/context/base/spec-pdf.tex
index 58a8876a2..ae3f582c7 100644
--- a/tex/context/base/spec-pdf.tex
+++ b/tex/context/base/spec-pdf.tex
@@ -448,9 +448,10 @@
%D This is how we force bookmarks entries in the file.
\def\doPDFbookmark level #1 n #2 text #3 page #4 open #5%
- {\special
+ {\scratchcounter#4\advance\scratchcounter\minusone
+ \special
{\@@insertpostscriptretain
- [ /Page #4\space
+ [ /Page \the\scratchcounter\space
\ifcase#2 \else/Count \ifcase#5-\fi#2 \fi
\PDFpageview
/Title (#3)
diff --git a/tex/context/base/spec-tpd.tex b/tex/context/base/spec-tpd.tex
index 51720d6a7..e6ea95fbd 100644
--- a/tex/context/base/spec-tpd.tex
+++ b/tex/context/base/spec-tpd.tex
@@ -11,8 +11,17 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-% todo: nagaan of we met reserveobjnum en useobjnum kunnen werken;
-% driver referenced etc
+% once we can be sure that the latest versions of pdftex are
+% available we can use:
+%
+% \pdfobj reserveobjnum \edef\one{\the\pdflastobj}
+% \pdfobj reserveobjnum \edef\two{\the\pdflastobj}
+%
+% \pdfobj useobjnum \one {x}
+% \pdfobj useobjnum \two {x}
+%
+% we then can rewrite part of spec-fdf because the other drivers
+% already support symbolic references
% layers and links don't work while the spec says they should
@@ -219,7 +228,6 @@
\fi
-
%D nasty but needed
\appendtoksonce \loadallfontmapfiles \to \everyPDFximage
@@ -256,7 +264,7 @@
\definespecial\dogetnofinsertpages#1%
{\xdef\nofinsertpages{1}% global
\doifvalidpdfimagefileelse{#1}%
- {\pdfximage {#1}\xdef\nofinsertpages{\the\pdflastximagepages}}
+ {\pdfximage{#1}\xdef\nofinsertpages{\the\pdflastximagepages}}
{}}
%D Currently we support \type{pdf} for \PDF\ files, \type{mps}
@@ -400,10 +408,10 @@
\global\let\pdfimageattributes\empty
\else
\immediate\pdfobj
- {[ << /Image \PDFfigurereference\space0 R
+ {[ << /Image \PDFobjref\PDFfigurereference
/DefaultForPrinting true >> ]}%
\xdef\pdfimageattributes
- {attr {/Alternates \the\pdflastobj\space0 R}}%
+ {attr {/Alternates \PDFobjref\pdflastobj}}%
\fi}
\global\let\PDFimagecolorreference\empty
@@ -560,15 +568,6 @@
\definespecial\dostartnonecolormode{\doPDFstartnonecolormode}
\definespecial\doregisternonecolor {\doPDFregisternonecolor}
-% \def\doPDFregistersomespotcolor#1#2#3#4%
-% {\immediate \pdfobj stream attr
-% {/FunctionType 4 /Domain [0.0 1.0] /Range #3}{#4}%
-% \immediate \pdfobj
-% {[/Separation /#1 /Device#2 \the\pdflastobj\space0 R]}%
-% \dosetobjectreference{PDFCS}{#1}{\the\pdflastobj}%
-% \appendtoPDFdocumentcolorspaces
-% {/#1 \the\pdflastobj\space0 R}}
-
\def\doPDFregisterspotcolorname#1#2%
{\bgroup
\let\ascii\empty
@@ -605,9 +604,9 @@
\immediate \pdfobj stream attr
{/FunctionType 4 /Domain [\PDFspotcolordomain] /Range [#6]}{{\spotpops#7}}%
\immediate \pdfobj
- {[\PDFspotcolornames\space /Device#5 \the\pdflastobj\space0 R]}%
+ {[\PDFspotcolornames\space /Device#5 \PDFobjref\pdflastobj]}%
\dosetobjectreference{PDFCS}{#1}{\the\pdflastobj}%
- \appendtoPDFdocumentcolorspaces{/#1 \the\pdflastobj\space0 R}%
+ \appendtoPDFdocumentcolorspaces{/#1 \PDFobjref\pdflastobj}%
\egroup}
%D New and very experimental.
@@ -636,10 +635,10 @@
{/FunctionType 4 /Domain [\PDFspotcolordomain] /Range [#6]}{{\spotpops#7}}%
\immediate \pdfobj
{[/Indexed
- [/DeviceN [\PDFspotcolornames] /Device#5 \the\pdflastobj\space0 R] %
+ [/DeviceN [\PDFspotcolornames] /Device#5 \PDFobjref\pdflastobj] %
255 <\PDFcolorindexvector>]}%
\dosetobjectreference{PDFIX}{#1}{\the\pdflastobj}%
- \appendtoPDFdocumentcolorspaces{/#1_INDEXED \the\pdflastobj\space0 R}%
+ \appendtoPDFdocumentcolorspaces{/#1_INDEXED \PDFobjref\pdflastobj}%
\egroup}
%D \macros
@@ -660,8 +659,8 @@
\fi
\def\assignPDFtransparency#1#2%
- {\def\PDFtransparencyidentifier{/Tr#1}%
- \def\PDFtransparencyreference{#2 0 R}}
+ {\edef\PDFtransparencyidentifier{/Tr#1}%
+ \edef\PDFtransparencyreference{\PDFobjref{#2}}}
\def\presetPDFtransparency#1#2%
{\initializePDFtransparency
@@ -671,7 +670,7 @@
{\global\advance\PDFcurrenttransparency \plusone
\immediate\pdfobj{\PDFtransparancydictionary{#1}{#2}{}}%
\edef\PDFtransparencyidentifier{/Tr\the\PDFcurrenttransparency}%
- \edef\PDFtransparencyreference {\the\pdflastobj\space 0 R}%
+ \edef\PDFtransparencyreference {\PDFobjref\pdflastobj}%
\setxvalue{\@@PDT#1:#2}%
{\noexpand\assignPDFtransparency{\the\PDFcurrenttransparency}{\the\pdflastobj}}%
\appendtoPDFdocumentextgstates
@@ -681,7 +680,7 @@
\def\initializePDFtransparency
{\immediate\pdfobj{\PDFtransparancydictionary{1}{1}{/AIS false}}%
\xdef\PDFtransparencyresetidentifier{/Tr0}%
- \xdef\PDFtransparencyresetreference{\the\pdflastobj\space 0 R}%
+ \xdef\PDFtransparencyresetreference{\PDFobjref\pdflastobj}%
\setxvalue{\@@PDT0:0}%
{\noexpand\assignPDFtransparency{0}{\the\pdflastobj}}%
\appendtoPDFdocumentextgstates
@@ -758,10 +757,10 @@
\@EA\doPSsanitizeJScode\sanitizedJScode\to\sanitizedJScode
\immediate\pdfobj {<< /S /JavaScript /JS (\sanitizedJScode) >>}%
\edef\compositeJScode
- {\compositeJScode\space (##1) \the\pdflastobj\space 0 R}}%
+ {\compositeJScode\space (##1) \PDFobjref\pdflastobj}}%
\processcommalist[#1]\docommando
\immediate\pdfobj{<< /Names [ \compositeJScode ] >>}%
- \pdfnames{/JavaScript \the\pdflastobj\space 0 R}%
+ \pdfnames{/JavaScript \PDFobjref\pdflastobj}%
\egroup}
%D \macros
@@ -1099,7 +1098,7 @@
\xdef\lastPDFaction{<<#3>>}%
\or
\immediate\pdfobj{<<#3>>}%
- \xdef\lastPDFaction{\the\pdflastobj\space0 R}%
+ \xdef\lastPDFaction{\PDFobjref\pdflastobj}%
\else
% leave \lastPDFaction untouched
\fi
@@ -1126,7 +1125,7 @@
\xdef\lastPDFaction{<<\lastPDFcontent>>}%
\or
\immediate\pdfobj{<<\lastPDFcontent>>}%
- \xdef\lastPDFaction{\the\pdflastobj\space0 R}%
+ \xdef\lastPDFaction{\PDFobjref\pdflastobj}%
\else
% leave \lastPDFaction untouched
\fi
@@ -1152,7 +1151,7 @@
\xdef\lastPDFaction{<<#3>>}%
\or
\immediate\pdfobj{<<#3>>}%
- \xdef\lastPDFaction{\the\pdflastobj\space0 R}%
+ \xdef\lastPDFaction{\PDFobjref\pdflastobj}%
\else
% leave \lastPDFaction untouched
\fi
@@ -1248,9 +1247,16 @@
% \ifcase#2 \else count \ifcase#5-\fi#2 \fi
% {#3}}
+% \def\doPDFbookmark level #1 n #2 text #3 page #4 open #5%
+% {\pdfoutline
+% user {<</S /GoTo /D [#4\space\PDFpageviewwrd]>>}%
+% \ifcase#2 \else count \ifcase#5-\fi#2 \fi
+% {#3}}
+
\def\doPDFbookmark level #1 n #2 text #3 page #4 open #5%
- {\pdfoutline
- user {<</S /GoTo /D [#4\space\PDFpageviewwrd]>>}%
+ {\doPDFgetpagereference{#4}\PDFobjectreference
+ \pdfoutline
+ user {<</S /GoTo /D [\PDFobjectreference\space\PDFpageviewwrd]>>}%
\ifcase#2 \else count \ifcase#5-\fi#2 \fi
{#3}}
@@ -1282,7 +1288,7 @@
\def\doPDFgetobjectreference#1#2#3%
{\dogetobjectreference{#1}{#2}#3%
- \edef#3{\ifx#3\empty null\else#3\space0 R\fi}}
+ \edef#3{\ifx#3\empty null\else\PDFobjref{#3}\fi}}
% \def\doPDFgetobjectpage #1#2#3{..}
% \def\doPDFgetobjectpagereference#1#2#3{..}
@@ -1297,7 +1303,7 @@
\else
\def\doPDFgetpagereference#1#2% number macro
- {\edef#2{\pdfpageref#1\space\space0 R}}
+ {\edef#2{\ifnum#1>\zerocount\PDFobjref{\pdfpageref#1}\else null\fi}}
\fi
@@ -1311,18 +1317,18 @@
\def\initializePDFnegative
{\immediate\pdfobj stream attr {/FunctionType 4 /Range [0 1] /Domain [0 1]} {{1 exch sub}}%
- \immediate\pdfobj{<</Type /ExtGState /TR \the\pdflastobj\space0 R>>}%
- \appendtoPDFdocumentextgstates{/GSnegative \the\pdflastobj\space0 R}%
+ \immediate\pdfobj{<</Type /ExtGState /TR \PDFobjref\pdflastobj>>}%
+ \appendtoPDFdocumentextgstates{/GSnegative \PDFobjref\pdflastobj}%
\immediate\pdfobj{<</Type /ExtGState /TR /Identity>>}%
- \appendtoPDFdocumentextgstates{/GSpositive \the\pdflastobj\space0 R}%
+ \appendtoPDFdocumentextgstates{/GSpositive \PDFobjref\pdflastobj}%
\global\let\initializePDFnegative\relax}
\def\initializePDFoverprint
{\immediate\pdfobj{<</Type /ExtGState /OP false /OPM 0>>}% /op defaults to /OP
- \appendtoPDFdocumentextgstates{/GSknockout \the\pdflastobj\space0 R}%
+ \appendtoPDFdocumentextgstates{/GSknockout \PDFobjref\pdflastobj}%
\immediate\pdfobj{<</Type /ExtGState /OP true /OPM 1>>}% /op defaults to /OP
\edef\PDFobjectreferenceB{\the\pdflastobj}%
- \appendtoPDFdocumentextgstates{/GSoverprint \the\pdflastobj\space0 R}%
+ \appendtoPDFdocumentextgstates{/GSoverprint \PDFobjref\pdflastobj}%
\global\let\initializePDFoverprint\relax}
%D File embedding. Storing the stream identifier is needed
@@ -1338,7 +1344,7 @@
\edef\PDFlaststreamobject{\the\pdflastobj}%
\dosetobjectreference{PDFFS}{#2}{\PDFlaststreamobject}%
\doPDFdictionaryobject class {#1} name {#2} data
- {/Type /Filespec /F (#3) /EF <</F \PDFlaststreamobject\space0 R>>}}
+ {/Type /Filespec /F (#3) /EF <</F \PDFobjref\PDFlaststreamobject>>}}
\def\doPDFgetfilestreamreference#1#2%
{\doPDFgetobjectreference{PDFFS}{#1}#2}
diff --git a/tex/context/base/supp-pdf.tex b/tex/context/base/supp-pdf.tex
index 3e0e99568..184cfb815 100644
--- a/tex/context/base/supp-pdf.tex
+++ b/tex/context/base/supp-pdf.tex
@@ -1,29 +1,16 @@
%D \module
%D [ file=supp-pdf,
-%D version=2004.10.26,
+%D version=2004.12.16,
%D title=\CONTEXT\ Support Macros,
%D subtitle=\METAPOST\ to \PDF\ conversion,
-%D author=Hans Hagen,
+%D author=Hans Hagen \& others (see text),
%D date=\currentdate,
-%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%D copyright=\PRAGMA]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-% This method is not that accurate with small files that use
-% penshapes. I tried several methods but so far I could not
-% come up with a better alternative. \TEX's real calculation
-% options are simply to simple. Using \ETEX's expression
-% mechanism does not lead to better results.
-
-% beware, we cannot use \zeropoint here since it may be
-% defined in the range \dimen 0 - 20 which we happen to use
-% as scratch registers ; inside context we may consider
-% using dedicated registers
-
-% fails: ( ) vect10 9.96265 fshow % \040\040\040\040
-
%D These macros are written as generic as possible. Some
%D general support macro's are loaded from a small module
%D especially made for non \CONTEXT\ use. In this module I
@@ -32,7 +19,19 @@
%D Ratz I was able to complete this module within reasonable
%D time. This module has support for \METAPOST\ extensions
%D built in.
+%D
+%D Daniel H. Luecking came up with a better (more precise)
+%D transformation method. You can recognize his comment by
+%D his initials. (We keep the old code around because it's a
+%D nice illustration on how a module like this evolves.)
+% Beware, we cannot use \zeropoint here since it may be
+% defined in the range \dimen 0 - 20 which we happen to use
+% as scratch registers; inside context we may consider
+% using dedicated registers.
+
+% fails: ( ) vect10 9.96265 fshow % \040\040\040\040
+%
% some optimizations are possible, but we need to be generic
%D First we take care of non||\CONTEXT\ use (newlines needed,
@@ -50,7 +49,7 @@
%D default engine for \TEX\ distributions, we need a more complex
%D test.
-\writestatus{loading}{Context Support Macros / PDF (2004.10.26)}
+\writestatus{loading}{Context Support Macros / PDF (2004.03.26)}
\unprotect
@@ -1069,7 +1068,7 @@
%D
%D The last case outputs a \type{gsave fill grestore} before
%D \type{stroke}. Handling the path outside the main loops
-%D saves about 40\% run time.\footnote{We can save some more by
+%D saves about 40\% run time.\footnoot{We can save some more by
%D following the \METAPOST\ output routine, but for the moment
%D we keep things simple.} Switching between the main loop and
%D the path loop is done by means of the recursely called
@@ -1088,8 +1087,7 @@
%D split up the routine in two.
\def\flushnormalMPsegment
-% {\expandafter\ifcase\getMPkeyword\relax % {\the\nofMPsegments}\relax
- {\ifcase\getMPkeyword\relax % {\the\nofMPsegments}\relax
+ {\ifcase\getMPkeyword\relax
\PDFcode{\!MPgMPs1 \!MPgMPs2 l}%
\or
\PDFcode{\!MPgMPs1 \!MPgMPs2 \!MPgMPs3 \!MPgMPs4 \!MPgMPs5 \!MPgMPs6 c}%
@@ -1102,8 +1100,7 @@
\fi}
\def\flushconcatMPsegment
-% {\expandafter\ifcase\getMPkeyword\relax % {\the\nofMPsegments}\relax
- {\ifcase\getMPkeyword\relax % {\the\nofMPsegments}\relax
+ {\ifcase\getMPkeyword\relax
\doMPconcat{\gMPs1}\a{\gMPs2}\b%
\PDFcode{\!MP\a\space\!MP\b\space l}%
\or
@@ -1159,7 +1156,14 @@
\doflushsomeMPpath}
\def\flushnormalMPpath{\let\dodoflushsomeMPpath\flushnormalMPsegment\flushsomeMPpath}
-\def\flushconcatMPpath{\let\dodoflushsomeMPpath\flushconcatMPsegment\flushsomeMPpath}
+
+%OLD \def\flushconcatMPpath{\let\dodoflushsomeMPpath\flushconcatMPsegment\flushsomeMPpath}
+
+%NEW pre-calculate 1/D so it needn't be repeated for each control point.
+
+\def\flushconcatMPpath
+ {\MPreciprocaldeterminant
+ \let\dodoflushsomeMPpath\flushconcatMPsegment\flushsomeMPpath}
%D The transformation of the coordinates is handled by one of
%D the macros Tanmoy posted to the \PDFTEX\ mailing list.
@@ -1182,45 +1186,141 @@
%D we converted them to pure points, simply because those can
%D be converted back.
-\mathchardef\MPconcatfactor=256 % beware don't remove spaces before it
+%OLD \mathchardef\MPconcatfactor=256 % beware don't remove spaces before it
+
+%OLD \def\doMPreducedimen#1
+%OLD {\count0\MPconcatfactor
+%OLD \advance\dimen#1 \ifdim\dimen#1>\zeropoint .5\else -.5\fi\count0
+%OLD \divide\dimen#1 \count0\relax}
+
+%OLD % too inaccurate (see old pragma logo)
+%OLD
+%OLD \def\doMPreducedimen#1
+%OLD {\count0=\MPconcatfactor
+%OLD \divide\dimen#1 \count0\relax}
+
+%OLD \def\doMPreducedimen#1
+%OLD {\advance\dimen#1 \ifdim\dimen#1>\zeropoint .5\else -.5\fi\MPconcatfactor
+%OLD \divide\dimen#1 \MPconcatfactor}
+
+%D The transformation code is rewritten by Daniel H. Luecking who
+%D describes his patch as follows:
+%D
+%D We would like to divide 1 by $X4, but all divisions are integer so
+%D for accuracy we want to convert to large integers and make sure the
+%D integer quotient has as many significant digits as possible. Thus we
+%D need to replace $1/X$ with $M/N$ where $N$ is as large as possible
+%D and $M/N$ is as large as possible. Also for simplicity $M$ should be
+%D a power of 2. So we make $M = 2^{30}$ \footnote{$2^{31} - 1$ is the
+%D largest legal integer. Using it (and simply ignoring the inaccuracy
+%D caused by $-1$) turns out to be at least as accurate in all cases,
+%D and more accurate in some.} (largest legal power of 2) and adjust
+%D $X4 downward (if necessary) to the the range $1-2^{16}$. This gives
+%D at least 15 significant binary digits, (almost as accurate as
+%D \METAPOST\ for numbers near 1) or almost 5 significant figures
+%D (decimal).
+
+\newcount\MPscratchCnt
+\newdimen\MPscratchDim % will be assigned global
+
+\def\MPadjustdimen % sets \MPscratchDim and \MPscratchCnt
+ {\MPscratchCnt\zerocount
+ \doMPadjustdimen}
+
+\def\doMPadjustdimen
+ {\ifdim\MPscratchDim>\onepoint
+ \divide\MPscratchDim 2
+ \advance\MPscratchCnt \plusone
+ \expandafter\doMPadjustdimen
+ \fi}
-% \def\doMPreducedimen#1
-% {\count0\MPconcatfactor
-% \advance\dimen#1 \ifdim\dimen#1>\zeropoint .5\else -.5\fi\count0
-% \divide\dimen#1 \count0\relax}
+%OLD \def\doMPexpanddimen#1
+%OLD {\multiply\dimen#1 \MPconcatfactor\relax}
+
+%D DHL: When viewed as an integer, $1 \hbox{pt}=2^{16}$ so $2^{32}/X$
+%D is the right way to do $(1 \hbox{pt})/(X \hbox{pt})$ and get the
+%D answer in points. But we are limited to $2^{30}/X$. However, we
+%D actually do $[ 2^{30} / (X/2^K) ]*2^{2-K}$ where $K$ is the number
+%D of halvings it takes to bring $X4 below $1 \hbox{pt}$. If $K$ is 0
+%D or 1 we readjust by multiplying by 4 or 2, otherwise by halving
+%D $(K-2)$ times \type {\MPscratchCnt} holds the value of $K$ from
+%D \type {\MPadjustdimen}.
+
+\def\MPreadjustdimen % acts on \MPscratchDim and MPscratchCnt
+ {\ifcase\MPscratchCnt
+ \multiply\MPscratchDim 4
+ \or
+ \multiply\MPscratchDim 2
+ \else
+ \expandafter\doMPreadjustdimen
+ \fi}
-\def\doMPreducedimen#1
- {\advance\dimen#1 \ifdim\dimen#1>\zeropoint .5\else -.5\fi\MPconcatfactor
- \divide\dimen#1 \MPconcatfactor}
+\def\doMPreadjustdimen
+ {\ifnum\MPscratchCnt > 2
+ \divide\MPscratchDim 2
+ \advance\MPscratchCnt \minusone
+ \expandafter\doMPreadjustdimen
+ \fi}
-% too inaccurate (see old pragma logo)
-%
-% \def\doMPreducedimen#1
-% {\count0=\MPconcatfactor
-% \divide\dimen#1 \count0\relax}
+\def\MPreciprocaldeterminant
+ {\MPscratchDim\withoutpt\the\dimen0 \dimen6 % s_x*s_y
+ \advance\MPscratchDim - \withoutpt\the\dimen2 \dimen4 % s_x*s_y - r_x*r_y
+ \ifdim\MPscratchDim<\zeropoint % we need a positive dimension
+ \MPscratchDim-\MPscratchDim % for \MPadjustdimen
+ \doMPreciprocal
+ \MPscratchDim-\MPscratchDim
+ \else
+ \doMPreciprocal
+ \fi}
-\def\doMPexpanddimen#1
- {\multiply\dimen#1 \MPconcatfactor\relax}
+\newcount\MPnumerator \MPnumerator = 1073741824 % 2^{30}
+
+% todo: dimexpr
+
+\def\doMPreciprocal % replace \MPscratchDim with its reciprocal
+ {\ifdim\MPscratchDim=\onepoint \else
+ \MPadjustdimen
+ \scratchcounter\MPnumerator
+ \divide\scratchcounter\MPscratchDim
+ \MPscratchDim1\scratchcounter % 1 needed !
+ \MPreadjustdimen
+ \fi}
+
+%OLD \def\presetMPconcat
+%OLD {\dimen 0=\gMPs1\onepoint \doMPreducedimen 0 % r_x
+%OLD \dimen 2=\gMPs2\onepoint \doMPreducedimen 2 % s_x
+%OLD \dimen 4=\gMPs3\onepoint \doMPreducedimen 4 % s_y
+%OLD \dimen 6=\gMPs4\onepoint \doMPreducedimen 6 % r_y
+%OLD \dimen 8=\gMPs5\onepoint \doMPreducedimen 8 % t_x
+%OLD \dimen10=\gMPs6\onepoint \doMPreducedimen10 } % t_y
+%OLD
+%OLD \def\presetMPscale
+%OLD {\dimen 0=\gMPs1\onepoint \doMPreducedimen 0
+%OLD \dimen 2 \zeropoint
+%OLD \dimen 4 \zeropoint
+%OLD \dimen 6=\gMPs2\onepoint \doMPreducedimen 6
+%OLD \dimen 8 \zeropoint
+%OLD \dimen10 \zeropoint}
\def\presetMPconcat
- {\dimen 0=\gMPs1 \onepoint \doMPreducedimen 0 % r_x
- \dimen 2=\gMPs2 \onepoint \doMPreducedimen 2 % s_x
- \dimen 4=\gMPs3 \onepoint \doMPreducedimen 4 % s_y
- \dimen 6=\gMPs4 \onepoint \doMPreducedimen 6 % r_y
- \dimen 8=\gMPs5 \onepoint \doMPreducedimen 8 % t_x
- \dimen10=\gMPs6 \onepoint \doMPreducedimen10 } % t_y
+ {\dimen 0=\gMPs1\onepoint % s_x
+ \dimen 2=\gMPs2\onepoint % r_x
+ \dimen 4=\gMPs3\onepoint % r_y
+ \dimen 6=\gMPs4\onepoint % s_y
+ \dimen 8=\gMPs5\onepoint % t_x
+ \dimen10=\gMPs6\onepoint} % t_y
\def\presetMPscale
- {\dimen 0=\gMPs1 \onepoint \doMPreducedimen 0
- \dimen 2=\zeropoint
- \dimen 4=\zeropoint
- \dimen 6=\gMPs2 \onepoint \doMPreducedimen 6
- \dimen 8=\zeropoint
- \dimen10=\zeropoint}
+ {\dimen 0=\gMPs1\onepoint
+ \dimen 2 \zeropoint
+ \dimen 4 \zeropoint
+ \dimen 6=\gMPs2\onepoint
+ \dimen 8 \zeropoint
+ \dimen10 \zeropoint}
\def\noMPtranslate % use this one grouped
- {\dimen 8=\zeropoint % t_x
- \dimen10=\zeropoint} % t_y
+ {\dimen 8 \zeropoint % t_x
+ \dimen10 \zeropoint} % t_y
%D \starttyping
%D \def\doMPconcat#1#2#3#4%
@@ -1378,96 +1478,133 @@
%D We cannot use \type {\beginETEX} here since in plain we
%D get \type {\outer} problems, sigh.
-% \beginTEX
-
-\def\MPcriteriumA {512pt} % scale
-\def\MPcriteriumB {2pt} % scale
-
-% \endTEX
-%
-
-% \ifx\MPcriteriumA\undefined
-%
-% \newdimen\MPcriteriumA \MPcriteriumA=512pt
-% \newdimen\MPcriteriumB \MPcriteriumB= 2pt
-%
-% \fi
-
-% one day i'll rewrite this to etex's \dimexpr (internally double precission)
+%OLD \beginTEX
+%OLD
+%OLD \def\MPcriteriumA {512pt} % scale
+%OLD \def\MPcriteriumB {2pt} % scale
+%OLD
+%OLD \endTEX
+%OLD
+%OLD \ifx\MPcriteriumA\undefined
+%OLD
+%OLD \newdimen\MPcriteriumA \MPcriteriumA=512pt
+%OLD \newdimen\MPcriteriumB \MPcriteriumB= 2pt
+%OLD
+%OLD \fi
+
+%OLD \def\doMPconcat#1#2#3#4%
+%OLD {\dimen12=#1pt % p_x
+%OLD \dimen14=#3pt % p_y
+%OLD %
+%OLD \chardef\MPfactor\zerocount
+%OLD \ifdim\dimen4<\MPcriteriumB\ifdim\dimen4>-\MPcriteriumB
+%OLD \ifdim\dimen6<\MPcriteriumB\ifdim\dimen6>-\MPcriteriumB
+%OLD \ifdim\dimen8<\MPcriteriumB\ifdim\dimen8>-\MPcriteriumB
+%OLD \ifdim\dimen10<\MPcriteriumB\ifdim\dimen10>-\MPcriteriumB
+%OLD \chardef\MPfactor\plusone
+%OLD \fi\fi
+%OLD \fi\fi
+%OLD \fi\fi
+%OLD \fi\fi
+%OLD \ifcase\MPfactor % spurious 0 removed
+%OLD \chardef\MPfactor\plusone
+%OLD \ifdim\dimen12<\MPcriteriumA\ifdim\dimen12>-\MPcriteriumA
+%OLD \ifdim\dimen14<\MPcriteriumA\ifdim\dimen14>-\MPcriteriumA
+%OLD \chardef\MPfactor16
+%OLD \fi\fi
+%OLD \fi\fi
+%OLD \fi
+%OLD %
+%OLD \multiply\dimen12 \MPfactor
+%OLD \multiply\dimen14 \MPfactor
+%OLD %
+%OLD \doMPreducedimen12
+%OLD \doMPreducedimen14
+%OLD %
+%OLD \dimen16 \dimen 0
+%OLD \multiply \dimen16 \dimen 6
+%OLD \dimen20 \dimen 2
+%OLD \multiply \dimen20 \dimen 4
+%OLD \advance \dimen16 -\dimen20
+%OLD %
+%OLD \dimen18 \dimen12
+%OLD \multiply \dimen18 \dimen 6
+%OLD \dimen20 \dimen14
+%OLD \multiply \dimen20 \dimen 4
+%OLD \advance \dimen18 -\dimen20
+%OLD \dimen20 \dimen 4
+%OLD \multiply \dimen20 \dimen10
+%OLD \advance \dimen18 \dimen20
+%OLD \dimen20 \dimen 6
+%OLD \multiply \dimen20 \dimen 8
+%OLD \advance \dimen18 -\dimen20
+%OLD %
+%OLD \multiply \dimen12 -\dimen 2
+%OLD \multiply \dimen14 \dimen 0
+%OLD \advance \dimen12 \dimen14
+%OLD \dimen20 \dimen 2
+%OLD \multiply \dimen20 \dimen 8
+%OLD \advance \dimen12 \dimen20
+%OLD \dimen20 \dimen 0
+%OLD \multiply \dimen20 \dimen10
+%OLD \advance \dimen12 -\dimen20
+%OLD %
+%OLD \ifdim\dimen16=\onepoint \else
+%OLD \ifdim\dimen16>\MPconcatfactor \onepoint \relax
+%OLD \doMPreducedimen16
+%OLD \divide \dimen18 \dimen16 \doMPexpanddimen18
+%OLD \divide \dimen12 \dimen16 \doMPexpanddimen12
+%OLD \else
+%OLD \divide \dimen18 \dimen16 \doMPexpanddimen18 \doMPexpanddimen18
+%OLD \divide \dimen12 \dimen16 \doMPexpanddimen12 \doMPexpanddimen12
+%OLD \fi
+%OLD \fi
+%OLD %
+%OLD \divide\dimen18 \MPfactor
+%OLD \divide\dimen12 \MPfactor
+%OLD %
+%OLD \edef#2{\withoutpt\the\dimen18}% % p_x^\prime
+%OLD \edef#4{\withoutpt\the\dimen12}} % p_y^\prime
+
+%D DHL: Ideally, $r_x$, $r_y$, $s_x4, $s_y$ should be in macros, not
+%D dimensions (they are scalar quantities after all, not lengths). I
+%D suppose the authors decided to do calculations with integer
+%D arithmetic instead of using real factors because it's faster.
+%D However, the actual macros test slower, possibly because I've
+%D omitted three nested loops. In my test files, my approach is more
+%D accurate. It is also far simpler and overflow does not seem to be a
+%D significant concern. The scale factors written by Metapost are (?)
+%D always $<=1$ (it scales coordinates internally) and coordinates are
+%D always likely to be less than \type {\maxdimen}.
+%D
+%D If this should ever cause problems, the scale factors can be reduced.
\def\doMPconcat#1#2#3#4%
- {\dimen12=#1pt % p_x
- \dimen14=#3pt % p_y
- %
- \chardef\MPfactor\zerocount
- \ifdim\dimen4<\MPcriteriumB\ifdim\dimen4>-\MPcriteriumB
- \ifdim\dimen6<\MPcriteriumB\ifdim\dimen6>-\MPcriteriumB
- \ifdim\dimen8<\MPcriteriumB\ifdim\dimen8>-\MPcriteriumB
- \ifdim\dimen10<\MPcriteriumB\ifdim\dimen10>-\MPcriteriumB
- \chardef\MPfactor\plusone
- \fi\fi
- \fi\fi
- \fi\fi
- \fi\fi
- \ifcase\MPfactor % spurious 0 removed
- \chardef\MPfactor\plusone
- \ifdim\dimen12<\MPcriteriumA\ifdim\dimen12>-\MPcriteriumA
- \ifdim\dimen14<\MPcriteriumA\ifdim\dimen14>-\MPcriteriumA
- \chardef\MPfactor16
- \fi\fi
- \fi\fi
- \fi
- %
- \multiply\dimen12 \MPfactor
- \multiply\dimen14 \MPfactor
- %
- \doMPreducedimen12
- \doMPreducedimen14
- %
- \dimen16 \dimen 0
- \multiply \dimen16 \dimen 6
- \dimen20 \dimen 2
- \multiply \dimen20 \dimen 4
- \advance \dimen16 -\dimen20
- %
- \dimen18 \dimen12
- \multiply \dimen18 \dimen 6
- \dimen20 \dimen14
- \multiply \dimen20 \dimen 4
- \advance \dimen18 -\dimen20
- \dimen20 \dimen 4
- \multiply \dimen20 \dimen10
- \advance \dimen18 \dimen20
- \dimen20 \dimen 6
- \multiply \dimen20 \dimen 8
- \advance \dimen18 -\dimen20
- %
- \multiply \dimen12 -\dimen 2
- \multiply \dimen14 \dimen 0
- \advance \dimen12 \dimen14
- \dimen20 \dimen 2
- \multiply \dimen20 \dimen 8
- \advance \dimen12 \dimen20
- \dimen20 \dimen 0
- \multiply \dimen20 \dimen10
- \advance \dimen12 -\dimen20
- %
- \ifdim\dimen16=\onepoint \else
- \ifdim\dimen16>\MPconcatfactor \onepoint \relax
- \doMPreducedimen16
- \divide \dimen18 \dimen16 \doMPexpanddimen18
- \divide \dimen12 \dimen16 \doMPexpanddimen12
- \else
- \divide \dimen18 \dimen16 \doMPexpanddimen18 \doMPexpanddimen18
- \divide \dimen12 \dimen16 \doMPexpanddimen12 \doMPexpanddimen12
- \fi
- \fi
- %
- \divide\dimen18 \MPfactor
- \divide\dimen12 \MPfactor
- %
+ {\dimen12=#1pt % p_x % #1\onepoint
+ \dimen14=#3pt % p_y % #3\onepoint
+ \advance\dimen12 -\dimen8 % p_x - t_x
+ \advance\dimen14 -\dimen10 % p_y - t_y
+ \dimen18=\withoutpt\the\dimen6 \dimen12 % s_y(p_x - t_x)
+ \advance\dimen18 -\withoutpt\the\dimen4 \dimen14 % - r_y(p_y-t_y)
+ \dimen14=\withoutpt\the\dimen0 \dimen14 % s_x(p_y-t_y)
+ \advance\dimen14 -\withoutpt\the\dimen2 \dimen12 % - r_x(p_x-t_x)
+ % \MPscratchDim contains precomputed 1/D:
+ \dimen18=\withoutpt\the\MPscratchDim \dimen18
+ \dimen14=\withoutpt\the\MPscratchDim \dimen14
\edef#2{\withoutpt\the\dimen18}% % p_x^\prime
- \edef#4{\withoutpt\the\dimen12}} % p_y^\prime
+ \edef#4{\withoutpt\the\dimen14}} % p_y^\prime
+
+%D One reason for Daniel to write this patch was that at small sizes
+%D the accuracy was less than optimal. Here is a test that demonstrates
+%D that his alternative is pretty good:
+%D
+%D \startlinecorrection
+%D \startMPcode
+%D for i = 5cm,1cm,5mm,1mm,.5mm,.1mm,.01mm :
+%D draw fullcircle scaled i withpen pencircle xscaled (i/10) yscaled (i/20) rotated 45 ;
+%D endfor ;
+%D \stopMPcode
+%D \stoplinecorrection
%D The following explanation of the conversion process was
%D posted to the \PDFTEX\ mailing list by Tanmoy. The original
@@ -1856,7 +1993,7 @@
\forgetall
\offinterlineskip
\startMPresources
- \doprocessMPtoPDFfile} % {#1}{#2}{#3}} % {#1}{0#2}{0#3} would be saver
+ \doprocessMPtoPDFfile} %
%D The next one is kind of private and probably will become obsolete):
diff --git a/tex/context/base/type-buy.tex b/tex/context/base/type-buy.tex
index 632793146..2c4c3fc1e 100644
--- a/tex/context/base/type-buy.tex
+++ b/tex/context/base/type-buy.tex
@@ -62,7 +62,6 @@
\definefontsynonym [SerifBoldItalic] [LucidaBright-DemiItalic]
\definefontsynonym [SerifBoldSlanted] [LucidaBright-DemiItalic]
\definefontsynonym [SerifCaps] [LucidaBrightSmallcaps]
- \definefontsynonym [OldStyle] [MathItalic]
\stoptypescript
\starttypescript [sans] [lucida] [name]
@@ -94,6 +93,14 @@
\definefontsynonym [MathBeta] [LucidaNewMath-Roman]
\stoptypescript
+\starttypescript [math] [lucida] [name]
+ \definefontsynonym [OldStyle] [MathItalic]
+ \definefontsynonym [Fraktur] [eufm10]
+ \definefontsynonym [Blackboard] [MathAlpha]
+ \definefontsynonym [Gothic] [eufm10]
+ \definefontsynonym [Calligraphic] [MathSymbol] % math caligraphic !
+\stoptypescript
+
\starttypescript [boldmath] [lucida] [name]
\definefontsynonym [MathRoman] [LucidaBright-Demi]
\definefontsynonym [MathExtension] [LucidaNewMath-Extension]
diff --git a/tex/context/base/type-enc.tex b/tex/context/base/type-enc.tex
index 47eba37fb..3a6c6a32f 100644
--- a/tex/context/base/type-enc.tex
+++ b/tex/context/base/type-enc.tex
@@ -850,7 +850,6 @@
\definefontsynonym [Euler-Extension] [zeuex10]
\definefontsynonym [Euler-Symbol] [zeusm10]
\definefontsynonym [Euler-Fraktur] [eufm10]
- \definefontsynonym [CharterRomanMath] [bchr8r] [encoding=8r]
\stoptypescript
\starttypescript [boldmath,bfmath] [euler] [default]
@@ -858,7 +857,6 @@
\definefontsynonym [Euler-Extension] [zeuex10]
\definefontsynonym [Euler-Symbol-Bold] [zeusb10]
\definefontsynonym [Euler-Fraktur-Bold] [eufb10]
- \definefontsynonym [CharterRomanBoldMath] [bchb8r] [encoding=8r]
\stoptypescript
% AMS (AMS)
diff --git a/tex/context/base/type-exa.tex b/tex/context/base/type-exa.tex
index 749b2f390..c1da0d969 100644
--- a/tex/context/base/type-exa.tex
+++ b/tex/context/base/type-exa.tex
@@ -43,8 +43,8 @@
\starttypescript [times] [texnansi,ec,8r,t5,uc]
\definetypeface [times] [rm] [serif] [times] [default] [encoding=\typescripttwo]
- \definetypeface [times] [ss] [sans] [helvetica] [default] [rscale=.9,encoding=\typescripttwo]
- \definetypeface [times] [tt] [mono] [modern] [default] [encoding=\typescripttwo,rscale=1.1]
+ \definetypeface [times] [ss] [sans] [helvetica] [default] [encoding=\typescripttwo,rscale=0.9]
+ \definetypeface [times] [tt] [mono] [modern] [default] [encoding=\typescripttwo,rscale=1.05]
\definetypeface [times] [mm] [math] [times] [default] [encoding=\typescripttwo]
% \usemathcollection[default]
diff --git a/tex/context/base/type-pre.tex b/tex/context/base/type-pre.tex
index 10413eae8..e884ba47b 100644
--- a/tex/context/base/type-pre.tex
+++ b/tex/context/base/type-pre.tex
@@ -126,7 +126,7 @@
\usetypescript [math] [ams] [all]
- \usemathcollection[ams]
+ \usemathcollection[default]
\stoptypescript
@@ -254,8 +254,7 @@
\usetypescript [serif] [palatino] [name,\defaultencoding]
\usetypescript [serif] [default] [size]
-
- \usetypescript [all] [palatino] [\defaultencoding]
+ \usetypescript [all] [palatino] [\defaultencoding]
\stoptypescript
diff --git a/tex/context/base/type-siz.tex b/tex/context/base/type-siz.tex
index 465c63c46..d01d49e6d 100644
--- a/tex/context/base/type-siz.tex
+++ b/tex/context/base/type-siz.tex
@@ -620,25 +620,19 @@
\definebodyfont [9pt,10pt,11pt,12pt,14.4pt,17.3pt,20.7pt] [mm]
[mr=zeurm10 sa 1,
ex=zeuex10 sa 1,
- mi=zeurm10 sa 1,
sy=zeusm10 sa 1,
- mb=bchr8r sa 1,
- mc=eufm10 sa 1]
+ mi=eufm10 sa 1]
\definebodyfont [6pt,7pt,8pt] [mm]
- [mi=zeurm7 sa 1,
- mr=zeurm7 sa 1,
+ [mr=zeurm7 sa 1,
sy=zeusm7 sa 1,
- mc=eufm7 sa 1,
- mb=bchr8r sa 1,
+ mi=eufm7 sa 1,
ex=zeuex10 sa 1]
\definebodyfont [5pt] [mm]
- [mi=zeurm5,
- mr=zeurm5,
+ [mr=zeurm5,
sy=zeusm5,
- mc=eufm5,
- mb=bchr8r at 5pt,
+ mi=eufm5,
ex=zeuex10 at 5pt]
\stoptypescript
@@ -648,25 +642,19 @@
\definebodyfont [9pt,10pt,11pt,12pt,14.4pt,17.3pt,20.7pt] [mm]
[mrbf=zeurb10 sa 1,
exbf=zeuex10 sa 1,
- mibf=zeurb10 sa 1,
sybf=zeusb10 sa 1,
- mbbf=bchb8r sa 1,
- mcbf=eufb10 sa 1]
+ mibf=eufb10 sa 1]
\definebodyfont [6pt,7pt,8pt] [mm]
- [mibf=zeurb7 sa 1,
- mrbf=zeurb7 sa 1,
+ [mrbf=zeurb7 sa 1,
sybf=zeusb7 sa 1,
- mcbf=eufb7 sa 1,
- mbbf=bchb8r sa 1,
+ mibf=eufb7 sa 1,
exbf=zeuex10 sa 1]
\definebodyfont [5pt] [mm]
- [mibf=zeurb5,
- mrbf=zeurb5,
+ [mrbf=zeurb5,
sybf=zeusb5,
- mcbf=eufb5,
- mbbf=bchb8r at 5pt,
+ mibf=eufb5,
exbf=zeuex10 at 5pt]
\stoptypescript
@@ -675,25 +663,19 @@
\definebodyfont [9pt,10pt,11pt,12pt,14.4pt,17.3pt,20.7pt] [mm]
[mr=zeurb10 sa 1,
ex=zeuex10 sa 1,
- mi=zeurb10 sa 1,
sy=zeusb10 sa 1,
- mb=bchb8r sa 1,
- mc=eufb10 sa 1]
+ mi=eufb10 sa 1]
\definebodyfont [6pt,7pt,8pt] [mm]
- [mi=zeurb7 sa 1,
- mr=zeurb7 sa 1,
+ [mr=zeurb7 sa 1,
sy=zeusb7 sa 1,
- mc=eufb7 sa 1,
- mb=bchb8r sa 1,
+ mi=eufb7 sa 1,
ex=zeuex10 sa 1]
\definebodyfont [5pt] [mm]
- [mi=zeurb5,
- mr=zeurb5,
+ [mr=zeurb5,
sy=zeusb5,
- mc=eufb5,
- mb=bchb8r at 5pt,
+ mi=eufb5,
ex=zeuex10 at 5pt]
\stoptypescript
diff --git a/tex/context/base/type-spe.tex b/tex/context/base/type-spe.tex
index 70990d4b0..6bc020f7a 100644
--- a/tex/context/base/type-spe.tex
+++ b/tex/context/base/type-spe.tex
@@ -11,6 +11,9 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
+% \controlspace -> enco files
+% no special, always
+
\starttypescript [mono] [courier,lucida] [special]
\def\controlspace{\getglyph{ComputerModernMono}{\char32}}
\stoptypescript
diff --git a/tex/context/base/type-syn.tex b/tex/context/base/type-syn.tex
index d0a3b52fc..09e8dff45 100644
--- a/tex/context/base/type-syn.tex
+++ b/tex/context/base/type-syn.tex
@@ -108,42 +108,36 @@
\starttypescript [math] [euler] [name]
\definefontsynonym [MathRoman] [Euler-Roman] % mr
- \definefontsynonym [MathItalic] [Euler-Roman] % mi
+ \definefontsynonym [MathItalic] [Euler-Fraktur] % mi
\definefontsynonym [MathExtension] [Euler-Extension] % ex
\definefontsynonym [MathSymbol] [Euler-Symbol] % sy
- \definefontsynonym [MathBeta] [CharterRomanMath]
- \definefontsynonym [MathGamma] [Euler-Fraktur] % mc ?
\stoptypescript
\starttypescript [boldmath] [euler] [name]
\definefontsynonym [MathRoman] [Euler-Roman-Bold] % mr
- \definefontsynonym [MathItalic] [Euler-Roman-Bold] % mi
+ \definefontsynonym [MathItalic] [Euler-Fraktur-Bold] % mi
\definefontsynonym [MathExtension] [Euler-Extension] % ex
\definefontsynonym [MathSymbol] [Euler-Symbol-Bold] % sy
- \definefontsynonym [MathBeta] [CharterRomanBoldMath]
- \definefontsynonym [MathGamma] [Euler-Fraktur-Bold] % mc ?
\stoptypescript
\starttypescript [bfmath] [euler] [name]
\definefontsynonym [MathRomanBold] [Euler-Roman-Bold] % mr
- \definefontsynonym [MathItalicBold] [Euler-Roman-Bold] % mi
+ \definefontsynonym [MathItalicBold] [Euler-Fraktur-Bold] % mi
\definefontsynonym [MathExtension] [Euler-Extension] % ex
\definefontsynonym [MathSymbolBold] [Euler-Symbol-Bold] % sy
- \definefontsynonym [MathBetaBold] [CharterRomanBoldMath]
- \definefontsynonym [MathGammaBold] [Euler-Fraktur-Bold] % mc ?
\stoptypescript
\starttypescript [math] [euler] [name]
- \definefontsynonym [OldStyle] [MathGamma]
- \definefontsynonym [Fraktur] [MathGamma]
- \definefontsynonym [Gothic] [MathGamma]
+ \definefontsynonym [OldStyle] [MathItalic]
+ \definefontsynonym [Fraktur] [MathItalic]
+ \definefontsynonym [Gothic] [MathItalic]
\definefontsynonym [Calligraphic] [MathSymbol]
\stoptypescript
\starttypescript [boldmath] [euler] [name]
- \definefontsynonym [OldStyle] [MathGammaBold]
- \definefontsynonym [Fraktur] [MathGammaBold]
- \definefontsynonym [Gothic] [MathGammaBold]
+ \definefontsynonym [OldStyle] [MathItalicBold]
+ \definefontsynonym [Fraktur] [MathItalicBold]
+ \definefontsynonym [Gothic] [MathItalicBold]
\definefontsynonym [Calligraphic] [MathSymbolBold]
\stoptypescript
@@ -289,6 +283,14 @@
\definefontsynonym [MathExtension] [Fourier-Math-Extension]
\stoptypescript
+\starttypescript [math] [fourier] [name] % todo
+ \definefontsynonym [OldStyle] [Serif-OldStyle] % strange, no oldstyles
+ \definefontsynonym [Fraktur] [eufm10]
+ \definefontsynonym [Blackboard] [msbm10]
+ \definefontsynonym [Gothic] [eufm10]
+ \definefontsynonym [Calligraphic] [eusm10]
+\stoptypescript
+
% Charter :
\starttypescript [serif] [charter] [name]
@@ -329,6 +331,14 @@
\definefontsynonym [MathBeta] [Times-Math-SymbolsB]
\stoptypescript
+\starttypescript [math] [times] [name]
+ \definefontsynonym [OldStyle] [MathItalic]
+ \definefontsynonym [Fraktur] [eufm10]
+ \definefontsynonym [Blackboard] [MathBeta]
+ \definefontsynonym [Gothic] [eufm10]
+ \definefontsynonym [Calligraphic] [eusm10]
+\stoptypescript
+
% Helvetica :
\starttypescript [sans] [helvetica] [name]
@@ -381,6 +391,14 @@
\definefontsynonym [MathBeta] [Palatino-Math-SymbolsB]
\stoptypescript
+\starttypescript [math] [palatino] [name]
+ \definefontsynonym [OldStyle] [MathItalic]
+ \definefontsynonym [Fraktur] [eufm10]
+ \definefontsynonym [Blackboard] [MathBeta]
+ \definefontsynonym [Gothic] [eufm10]
+ \definefontsynonym [Calligraphic] [eusm10]
+\stoptypescript
+
% bonus definitions
\starttypescript [serif] [palatino] [name]
diff --git a/tex/context/base/xtag-ext.tex b/tex/context/base/xtag-ext.tex
index 3427efb30..5ee40a77c 100644
--- a/tex/context/base/xtag-ext.tex
+++ b/tex/context/base/xtag-ext.tex
@@ -241,7 +241,8 @@
\gdef\texXMLelement#1%
{\begingroup
- \setnormalcatcodes
+% \setnormalcatcodes
+ \disableXML
\scantokens\@EA\@EA\@EA{\csname\@@XMLsave:#1\endcsname}%
\endgroup}
diff --git a/tex/context/base/xtag-ini.tex b/tex/context/base/xtag-ini.tex
index c064deca8..21377d22d 100644
--- a/tex/context/base/xtag-ini.tex
+++ b/tex/context/base/xtag-ini.tex
@@ -2128,7 +2128,19 @@
\def\XMLflush#1% one level
{\csname\ifcsname\@@XMLdata:#1\endcsname\@@XMLdata:#1\else\s!empty\fi\endcsname}
-\let\XMLflushdata\XMLflush
+%D \starttyping
+%D \defineXMLenvironmentsave[formula]{}{$\XMLtex{formula}$}
+%D
+%D \startXMLdata
+%D <formula>t+3+x+t\neq m\alpha\frac\theta\hbar</formula>
+%D \stopXMLdata
+%D \stoptyping
+
+\def\XMLtex#1%
+ {\begingroup
+ \disableXML
+ \scantokens\@EA\@EA\@EA{\csname\@@XMLdata:#1\endcsname}%
+ \endgroup}
\def\XMLflushdata#1% see m-steps for usage
{\@EA\ifx\csname\@@XMLdata:#1\endcsname\longempty\else
@@ -2165,6 +2177,7 @@
\simplifyXMLelements
\let\getXMLentity\firstofoneargument
\XMLrawentitiestrue
+ \chardef\utfunicodetracer7% new
\xdef\@@XML@@string{\csname\@@XMLdata:#2\endcsname}%
\egroup
\convertcommand\@@XML@@string\to#1}
@@ -2174,6 +2187,7 @@
\enableXMLexpansion
\simplifyXMLelements
\simplifyXMLentities
+ \chardef\utfunicodetracer7% new
\let\getXMLentity\expandedXMLentity % should this go in \simplify ?
\xdef\@@XML@@string{\csname\@@XMLdata:#2\endcsname}%
\egroup
diff --git a/tex/context/interface/keys-cz.xml b/tex/context/interface/keys-cz.xml
index 290a7d44e..22c293997 100644
--- a/tex/context/interface/keys-cz.xml
+++ b/tex/context/interface/keys-cz.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="cz" version="2004.12.06">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="cz" version="2004.12.17">
<cd:variables>
<cd:variable name="one" value="jedna"/>
diff --git a/tex/context/interface/keys-de.xml b/tex/context/interface/keys-de.xml
index 4e2d03bd1..9b9f92fc1 100644
--- a/tex/context/interface/keys-de.xml
+++ b/tex/context/interface/keys-de.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="de" version="2004.12.06">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="de" version="2004.12.17">
<cd:variables>
<cd:variable name="one" value="eins"/>
diff --git a/tex/context/interface/keys-en.xml b/tex/context/interface/keys-en.xml
index 6ae70c2dd..9871f1ba7 100644
--- a/tex/context/interface/keys-en.xml
+++ b/tex/context/interface/keys-en.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="en" version="2004.12.06">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="en" version="2004.12.17">
<cd:variables>
<cd:variable name="one" value="one"/>
diff --git a/tex/context/interface/keys-it.xml b/tex/context/interface/keys-it.xml
index 2caba051e..bf5ad3355 100644
--- a/tex/context/interface/keys-it.xml
+++ b/tex/context/interface/keys-it.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="it" version="2004.12.06">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="it" version="2004.12.17">
<cd:variables>
<cd:variable name="one" value="uno"/>
diff --git a/tex/context/interface/keys-nl.xml b/tex/context/interface/keys-nl.xml
index ffa076af4..b92e77274 100644
--- a/tex/context/interface/keys-nl.xml
+++ b/tex/context/interface/keys-nl.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="nl" version="2004.12.06">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="nl" version="2004.12.17">
<cd:variables>
<cd:variable name="one" value="een"/>
diff --git a/tex/context/interface/keys-ro.xml b/tex/context/interface/keys-ro.xml
index ebafd1281..23516086b 100644
--- a/tex/context/interface/keys-ro.xml
+++ b/tex/context/interface/keys-ro.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="ro" version="2004.12.06">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="ro" version="2004.12.17">
<cd:variables>
<cd:variable name="one" value="unu"/>