From fdd3cea7faff04a5b62069ac88895817288a5199 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Wed, 15 Feb 2006 17:41:00 +0100 Subject: stable 2006.02.15 17:41 --- tex/context/base/colo-ini.tex | 2 +- tex/context/base/cont-new.tex | 2 +- tex/context/base/cont-old.tex | 2 + tex/context/base/context.tex | 2 +- tex/context/base/core-itm.tex | 3 +- tex/context/base/core-job.tex | 34 ++++----- tex/context/base/core-mat.tex | 1 + tex/context/base/core-mis.tex | 2 +- tex/context/base/core-spa.tex | 30 ++++++++ tex/context/base/core-syn.tex | 51 +++++++++++-- tex/context/base/core-ver.tex | 60 +++++++++++---- tex/context/base/lang-ctx.tex | 2 +- tex/context/base/meta-ini.tex | 10 ++- tex/context/base/s-pre-01.tex | 92 ++++++++++++++--------- tex/context/base/s-pre-02.tex | 108 ++++++++++++++++----------- tex/context/base/s-pre-03.tex | 40 +++++++--- tex/context/base/s-pre-04.tex | 152 +++++++++++++++++++++----------------- tex/context/base/s-pre-05.tex | 80 ++++++++++++-------- tex/context/base/s-pre-06.tex | 42 +++++++++-- tex/context/base/s-pre-07.tex | 28 +++++-- tex/context/base/s-pre-13.tex | 138 +++++++++++++++++++--------------- tex/context/base/s-pre-14.tex | 68 ++++++++--------- tex/context/base/spec-tpd.tex | 9 ++- tex/context/base/syst-ext.tex | 9 +++ tex/context/base/syst-gen.tex | 126 ++++++++++++++++--------------- tex/context/base/verb-ini.tex | 60 +++++++++++++-- tex/context/base/x-contml.tex | 13 +++- tex/context/interface/cont-cz.xml | 8 ++ tex/context/interface/cont-de.xml | 8 ++ tex/context/interface/cont-en.xml | 8 ++ tex/context/interface/cont-fr.xml | 8 ++ tex/context/interface/cont-it.xml | 8 ++ tex/context/interface/cont-nl.xml | 8 ++ tex/context/interface/cont-ro.xml | 8 ++ tex/context/interface/keys-cz.xml | 2 +- tex/context/interface/keys-de.xml | 2 +- tex/context/interface/keys-en.xml | 2 +- tex/context/interface/keys-fr.xml | 2 +- tex/context/interface/keys-it.xml | 2 +- tex/context/interface/keys-nl.xml | 2 +- tex/context/interface/keys-ro.xml | 2 +- 41 files changed, 815 insertions(+), 421 deletions(-) (limited to 'tex') diff --git a/tex/context/base/colo-ini.tex b/tex/context/base/colo-ini.tex index d8b057f11..1e2157ea9 100644 --- a/tex/context/base/colo-ini.tex +++ b/tex/context/base/colo-ini.tex @@ -379,7 +379,7 @@ \iffreezecolors#3{\??cr#5}{\getvalue{\??cr#6}}\fi} {\iffreezecolors\@EA#3\else\@EA#2\fi {\??cr#5}{\getvalue{\??cr#6}}}} - {\showmessage\m!colors3{#5}{(def)}}}% + {\showmessage\m!colors3{#5 (def)}}}% \ifcase#4\or \unexpanded#2{#5}{\switchtocolor[#5]}% \unexpanded toegevoegd \fi} diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex index e482b7b85..6a0ce0dee 100644 --- a/tex/context/base/cont-new.tex +++ b/tex/context/base/cont-new.tex @@ -24,7 +24,7 @@ \normalend}} \fi -\newcontextversion{2006.02.03 21:03} +\newcontextversion{2006.02.15 17:41} %D This file is loaded at runtime, thereby providing an %D excellent place for hacks, patches, extensions and new diff --git a/tex/context/base/cont-old.tex b/tex/context/base/cont-old.tex index d0529c695..70628a10c 100644 --- a/tex/context/base/cont-old.tex +++ b/tex/context/base/cont-old.tex @@ -15,6 +15,8 @@ \unprotect +% \def\middleraggedness {6\bodyfontsize} + \def\dosubstitutecommand#1#2% {\writestatus\m!systems{\string#1\normalspace -> \string#2}% \gdef#1{#2}% diff --git a/tex/context/base/context.tex b/tex/context/base/context.tex index 12c6815be..093652d18 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{2006.02.03 21:03} +\def\contextversion{2006.02.15 17:41} %D For those who want to use this: diff --git a/tex/context/base/core-itm.tex b/tex/context/base/core-itm.tex index 8b216190b..bc203dfa1 100644 --- a/tex/context/base/core-itm.tex +++ b/tex/context/base/core-itm.tex @@ -523,7 +523,7 @@ \globallet\somdestination\empty \let\symsymbol\empty \the\itemgroupcommands - \setitemlevel{#1}% +%\setitemlevel{#1}% moved from here %\getitemparameter\itemlevel\empty \let\listitem\empty % ** start value \doifelsenothing{#1} % iffirstargument @@ -545,6 +545,7 @@ {\doifnot{##1}{0}{\setitemmark{##1}}}% % \processcommalist[#1,\@@opsymbol]\docommando \processcommalist[#1]\docommando}% ** preset sequence or provided sequence +\setitemlevel{#1}% moved to here \ifx\listitem\empty \setitemmark\@@opsymbol % ** default value \ifx\listitem\empty diff --git a/tex/context/base/core-job.tex b/tex/context/base/core-job.tex index 58bfacb3f..7a950fc95 100644 --- a/tex/context/base/core-job.tex +++ b/tex/context/base/core-job.tex @@ -470,23 +470,23 @@ \def\executesystemcommand{\immediate\write18} % soon, when pdftex 1.22 is out in the field: -% -% \chardef\systemcommandmode\zerocount % 0=unknown 1=disabled 2=enabled -% -% \ifx\pdftexversion\undefined \else \ifnum\number\pdftexversion>122 -% \prependtoks -% \chardef\systemcommandmode \ifeof18 \plusone \else \plustwo \fi -% \to \everyjob -% \fi -% -% maybe in meta-ini -% -% \appendtoks -% \ifrunMPgraphics \ifcase\systemcommandmode \or -% \writestatus\m!systems{system commands are disabled}% -% \runMPgraphicsfalse -% \fi \fi -% \to \everyjob + +\chardef\systemcommandmode\zerocount % 0=unknown 1=disabled 2=enabled + +\ifx\pdfshellescape\undefined \else + \prependtoks + \chardef\systemcommandmode \ifcase\pdfshellescape \plusone \else \plustwo \fi + \to \everyjob +\fi + +\appendtoks + \ifcase\systemcommandmode + \or + \writestatus\m!systems{system commands are disabled}% + \or + \writestatus\m!systems{system commands are enabled}% + \fi +\to \everyjob \ifx\etexversion\undefined \else \ifnum\etexversion<202 \prependtoks diff --git a/tex/context/base/core-mat.tex b/tex/context/base/core-mat.tex index 60a1e1f23..d1b91e625 100644 --- a/tex/context/base/core-mat.tex +++ b/tex/context/base/core-mat.tex @@ -340,6 +340,7 @@ \nonoindentation \dochecknextindentation{\??fm\currentformula}% \egroup + \setfalse\handleformulanumber \dorechecknextindentation} % here ? \newif\ifinformula diff --git a/tex/context/base/core-mis.tex b/tex/context/base/core-mis.tex index 92723bb34..2a08f6ee3 100644 --- a/tex/context/base/core-mis.tex +++ b/tex/context/base/core-mis.tex @@ -595,7 +595,7 @@ \or \prewordbreak %\nobreak \hskip\hspaceamount\currentlanguage{#2}% - \languageparameter#1 + \languageparameter#1% \or \languageparameter#1% \fi diff --git a/tex/context/base/core-spa.tex b/tex/context/base/core-spa.tex index 18d091da6..29651ae71 100644 --- a/tex/context/base/core-spa.tex +++ b/tex/context/base/core-spa.tex @@ -3661,6 +3661,8 @@ \def\rightraggedness {2\bodyfontsize} \def\middleraggedness {6\bodyfontsize} +\def\middleraggedness {.5\hsize} % was: 6\bodyfontsize, fails on: \placefigure{x $x=x$ x}{} + %D More hyphenation control, will be combined with align %D setup. @@ -4621,6 +4623,34 @@ \def\fixedspaceamount#1% {#1\fontdimen2\font} +%D This is a dangerous feature because it makes the \TEX\ source +%D less portable, i.e. any parser now needs to apply exactly the +%D same algorithm when it wants to interpret the source. We +%D strongly recommend not to mention this feature in manuals! It's +%D provided for users who are hooked to such a mechanism. +%D +%D \starttyping +%D \setupsorting[logo][next=\autoinsertnextspace] \logo[TEX]{\TeX} +%D +%D bla bla \TEX bla bla \TEX (bla) bla (\TEX) +%D \stoptyping + +\def\autoinsertnextspace{\futurelet\nexttoken\doautoinsertnextspace} + +\def\doautoinsertnextspace % slightly extended version of a user supplied macro + {\ifx\nexttoken \bgroup\else \ifx\nexttoken\begingroup\else + \ifx\nexttoken \egroup\else \ifx\nexttoken \endgroup\else + \ifx\nexttoken \/\else \ifx\nexttoken /\else \ifx\nexttoken ~\else + \ifx\nexttoken \ \else \ifx\nexttoken \blankspace\else \ifx\nexttoken \space\else + \ifx\nexttoken .\else \ifx\nexttoken ,\else + \ifx\nexttoken !\else \ifx\nexttoken ?\else + \ifx\nexttoken :\else \ifx\nexttoken ;\else + \ifx\nexttoken '\else \ifx\nexttoken "\else + \ifx\nexttoken )\else \ifx\nexttoken -\else \ifx\nexttoken |\else + \ifx\nexttoken \%\else \ifx\nexttoken \&\else + \space + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} + \setupwhitespace [\v!none] diff --git a/tex/context/base/core-syn.tex b/tex/context/base/core-syn.tex index 0b6685a30..ac48b38f2 100644 --- a/tex/context/base/core-syn.tex +++ b/tex/context/base/core-syn.tex @@ -55,6 +55,8 @@ {\setvalue{#1\s!entry}{\getvalue{\??sm#1\c!command}}} % 3 argumenten {\setvalue{#1\s!entry}{\dohandlesynonymentry{#1}}}} +\def\synonymparameter#1{\csname\??sm\currentsynonym#1\endcsname} + \def\doplacelistofsynonyms#1#2% {\whitespace \begingroup @@ -110,15 +112,30 @@ \immediatewriteutility{s e {#1} {#2} {\asciisynonym} {\asciimeaning}}% \endgroup} +% \def\preexecutesynonym#1#2#3#4% +% {\ifdoinpututilities \else +% \dowritesynonym{#1}{#2}{#3}{#4}% +% \unexpanded\setgvalue{#2}{\processsynonym{#1}{#3}{#4}}% +% \fi} +% +% \def\executesynonym#1#2#3#4% +% {\preexecutesynonym{#1}{#2}{#3}{#4}% +% \processsynonym{#1}{#3}{#4}} + +\def\reprocesssynonym#1#2#3% + {\processsynonym{#1}{#2}{#3}% + \getvalue{\??sm#1\c!next}} % not formally documented + \def\preexecutesynonym#1#2#3#4% {\ifdoinpututilities \else \dowritesynonym{#1}{#2}{#3}{#4}% - \unexpanded\setgvalue{#2}{\processsynonym{#1}{#3}{#4}}% + \unexpanded\setgvalue{#2}{\reprocesssynonym{#1}{#3}{#4}}% \fi} \def\executesynonym#1#2#3#4% {\preexecutesynonym{#1}{#2}{#3}{#4}% - \processsynonym{#1}{#3}{#4}} + \processsynonym{#1}{#3}{#4}% + \getvalue{\??sm#1\c!next}} % not formally documented \def\expandsynonym#1#2#3#4% {{\synonymmeaningtrue @@ -241,9 +258,9 @@ \def\processsort#1#2#3% {\explicithmode - \bgroup + \begingroup % was \bgroup \doattributes{\??so#1}\c!style\c!color{#2}% - \egroup} + \endgroup} % was \egroup \def\dowritesort#1#2#3% {\bgroup @@ -254,18 +271,36 @@ \def\synonymentry#1% {\executeifdefined{#1\s!entry}\gobblethreearguments} +% \def\preexecutesort#1#2#3% +% {\ifdoinpututilities \else +% \dowritesort{#1}{#2}{#3}% +% \unexpanded\setgvalue{#2}{\processsort{#1}{#3}{#2}}% +% \fi} +% +% \def\executesort#1#2#3% +% {\begingroup +% \let\executesort\thirdofthreearguments % Trick needed for nested logo's. +% \preexecutesort{#1}{#2}{#3}% +% \processsort{#1}{#3}{#2}% +% \endgroup} + +\def\reprocesssort#1#2#3% + {\processsort{#1}{#2}{#3}% + \getvalue{\??so#1\c!next}} + \def\preexecutesort#1#2#3% {\ifdoinpututilities \else \dowritesort{#1}{#2}{#3}% - \unexpanded\setgvalue{#2}{\processsort{#1}{#3}{#2}}% + \unexpanded\setgvalue{#2}{\reprocesssort{#1}{#3}{#2}}% \fi} \def\executesort#1#2#3% - {\bgroup - \def\executesort##1##2##3{##3}% Trick needed for nested logo's. + {\begingroup + \let\executesort\thirdofthreearguments % Trick needed for nested logo's. \preexecutesort{#1}{#2}{#3}% \processsort{#1}{#3}{#2}% - \egroup} + \endgroup + \getvalue{\??so#1\c!next}} % not formally documented \def\doloadsort#1% {\setvalue{#1\s!entry}##1##2##3% diff --git a/tex/context/base/core-ver.tex b/tex/context/base/core-ver.tex index b5aa36fd9..7cd0d6100 100644 --- a/tex/context/base/core-ver.tex +++ b/tex/context/base/core-ver.tex @@ -164,6 +164,10 @@ [\getvalue{#1\c!lines}] [ \v!yes=>\obeybreakpoints, \v!hyphenated=>\obeyhyphens]% + \processaction + [\getvalue{#1\c!empty}] + [\v!yes=>\obeyemptylines, + \v!all=>\obeyallemptylines]% % \ExpandFirstAfter\processaction [\getvalue{#1\c!option}] @@ -295,7 +299,6 @@ % Verbatim does not work when passed as an argument, so here is a % workaround. Beware, spaces are introduced after a \type {\csname}. -\chardef\recodeverbatimmode\zerocount % 0=nothing 1=rescan 2=autorescan \chardef\recodeverbatimmode\zerocount % 0=nothing 1=rescan 2=autorescan % \appendtoks \chardef\recodeverbatimmode\plustwo \to \everytabulate @@ -522,26 +525,52 @@ \let\protectedfirsttype\string % \relax for special cases +% \bgroup +% \catcode`\<=\active +% \catcode`\>=\active +% \gdef\doprotectfirsttype +% {\ifx\next<% +% \let\next\relax +% \else\ifx\next\bgroup +% \let\next\relax +% \else\ifx\next\egroup % takes care of \type{} +% \let\next\relax +% \else\ifx\next\activeleftargument +% \let\next\relax +% \else +% \let\next\protectedfirsttype +% \fi\fi\fi\fi +% \next} +% \egroup +% +% \def\protectfirsttype +% {\futurelet\next\doprotectfirsttype} +% +% The next one is safe for: +% +% \def\xx#1{\type{#1}} \xx{\ifx} + \bgroup \catcode`\<=\active \catcode`\>=\active \gdef\doprotectfirsttype - {\ifx\next<% - \let\next\relax - \else\ifx\next\bgroup - \let\next\relax - \else\ifx\next\egroup % takes care of \type{} - \let\next\relax - \else\ifx\next\activeleftargument - \let\next\relax - \else - \let\next\protectedfirsttype - \fi\fi\fi\fi + {\normalifx\next<% + \endrobusttest \let\next\relax + \normalelse\normalifx\next\bgroup + \endrobusttest \let\next\relax + \normalelse\normalifx\next\egroup % takes care of \type{} + \endrobusttest \let\next\relax + \normalelse\normalifx\next\activeleftargument + \endrobusttest \let\next\relax + \normalelse + \endrobusttest \let\next\protectedfirsttype + \normalfi\normalfi\normalfi\normalfi \next} \egroup \def\protectfirsttype - {\futurelet\next\doprotectfirsttype} + {\beginrobusttest + \futurelet\next\doprotectfirsttype} %D The neccessary initializations are done by calling %D \type{\initializetype} which in return calls for the support @@ -838,7 +867,8 @@ \c!blank=\v!line, \c!escape=/, % beware \string\ , should also be accepted \c!numbering=\v!no, - \c!lines=] + \c!lines=, + \c!empty=] %D \macros %D {definetype} @@ -877,7 +907,7 @@ {\copyparameters [\??tp#1][\??tp] [\c!before,\c!after,\c!space,\c!page,\c!tab,\c!color,\c!style, - \c!text,\c!icommand,\c!vcommand,\c!ccommand,\c!bodyfont, + \c!text,\c!icommand,\c!vcommand,\c!ccommand,\c!bodyfont,\c!empty, \c!option,\c!palet,\c!margin,\c!evenmargin,\c!oddmargin, \c!indentnext,\c!blank,\c!escape,\c!lines,\c!numbering]% \getparameters diff --git a/tex/context/base/lang-ctx.tex b/tex/context/base/lang-ctx.tex index a686069b5..c9fa10c7c 100644 --- a/tex/context/base/lang-ctx.tex +++ b/tex/context/base/lang-ctx.tex @@ -40,7 +40,7 @@ \installlanguage [\s!pl] [\s!mapping={pl0,ec,qx},\s!encoding={pl0,ec,qx}] % pl0 may go \installlanguage [\s!cz] [\s!mapping={il2,ec},\s!encoding={il2,ec}] % il2 may go \installlanguage [\s!sk] [\s!mapping={il2,ec},\s!encoding={il2,ec}] % il2 may go -\installlanguage [\s!sl] [\s!mapping={il2,ec},\s!encoding={il2,ec}] % il2 may go +\installlanguage [\s!sl] [\s!mapping=ec,\s!encoding=ec] % il2 has gone \installlanguage [\s!vn] [\s!mapping=t5,\s!encoding=t5] diff --git a/tex/context/base/meta-ini.tex b/tex/context/base/meta-ini.tex index 6995201cb..20451074c 100644 --- a/tex/context/base/meta-ini.tex +++ b/tex/context/base/meta-ini.tex @@ -549,7 +549,7 @@ \long\def\dostartMPenvironment[#1][#2]#3\stopMPenvironment {\egroup \doif{#1}\s!reset\resetMPenvironment % reset mp toks - \doif{#1}\v!global{#3}% % use in main doc too + \doif{#1}\v!global{#3}% % use in main doc too \doif{#1}+{#3}% % use in main doc too \convertargument#3\to\ascii \expandafter\appendtoks\ascii\to\everyMPTEXgraphic} @@ -1002,6 +1002,14 @@ \protect \endinput +%D Experimental: + +\appendtoks + \ifrunMPgraphics \ifcase\systemcommandmode \or + \runMPgraphicsfalse + \fi \fi +\to \everyjob + % also: % % linecap := rounded ; diff --git a/tex/context/base/s-pre-01.tex b/tex/context/base/s-pre-01.tex index 2cc8c6e35..b86133fa6 100644 --- a/tex/context/base/s-pre-01.tex +++ b/tex/context/base/s-pre-01.tex @@ -8,14 +8,14 @@ %D copyright={PRAGMA / Hans Hagen \& Ton Otten}] %C %C This module is part of the \CONTEXT\ macro||package and is -%C therefore copyrighted by \PRAGMA. See mreadme.pdf for -%C details. +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. %D This environment can be used to typeset interactive %D presentations. This module was first used at the 1997 \TUG\ %D meeting. -\usemodule[pre-general] +\usemodule[pre-general] %D \macros %D {language} @@ -30,7 +30,7 @@ %D {setupbodyfont,setuplayout} %D %D For screen reading, a Lucida Bright font looks nice. We use -%D a 14.4 point bodyfont for the main text, but switch back to +%D a 14.4 point bodyfont for the main text, but switch back to %D 12 points for ornaments. \startmode[asintended] \setupbodyfont[lbr] \stopmode @@ -69,7 +69,7 @@ [topspace=12pt, header=0pt, footer=0pt, - height=402pt, % 450 - 12 - 15 - 12 - 12 + 3 + height=402pt, % 450 - 12 - 15 - 12 - 12 + 3 bottomdistance=15pt, bottom=12pt, backspace=12pt, @@ -115,7 +115,7 @@ %D %D We did not enable interactive text support yet, so let's do %D that now. We force page reference to circumvent problems -%D with named destinations in buggy viewers. +%D with named destinations in buggy viewers. \setupinteraction [page=yes, @@ -137,8 +137,8 @@ rightoffset=-3pt] \startinteractionmenu[bottom] - \txt \InteractionBar \\ - \txt \InteractionButtons \\ + \txt \InteractionBar \\ + \txt \InteractionButtons \\ \stopinteractionmenu %D \macros @@ -166,7 +166,7 @@ \setupinteractionbar [framecolor=white,rulethickness=1pt, height=\bottomheight,strut=no] - + \def\InteractionButtons% {\interactionbuttons [width=15em] @@ -179,23 +179,23 @@ %D \macros %D {StartTitlePage, TitlePage} %D -%D The titlepage is rather simple and can be typeset in two -%D ways: +%D The titlepage is rather simple and can be typeset in two +%D ways: %D %D \starttyping %D \StartTitlePage -%D text \\ text \\ text +%D text \\ text \\ text %D \StopTitlepage %D \stoptyping %D %D or more straightforward: %D %D \starttyping -%D \TitlePage{text\\text\\text} +%D \TitlePage{text\\text\\text} %D \stoptyping -%D -%D The first alternative can be used for more complicated -%D title pages. +%D +%D The first alternative can be used for more complicated +%D title pages. \def\StartTitlePage% {\startstandardmakeup @@ -236,8 +236,8 @@ %D {definehead} %D %D The commands \type{\Topic} and \type{\Subject} are defined -%D as copies of head. We use \type{\Nopic} for internal -%D purposes. +%D as copies of head. We use \type{\Nopic} for internal +%D purposes. \definehead [Topic] [chapter] \definehead [Subject] [section] @@ -247,10 +247,10 @@ %D \macros %D {setuphead} %D -%D Because chapters and sections do not make sense in -%D presentations, we use our own command for typesetting the -%D titles. Sectionnumbers are of course hidden from viewing. -%D Each topic is followed by a list of subjects that belong +%D Because chapters and sections do not make sense in +%D presentations, we use our own command for typesetting the +%D titles. Sectionnumbers are of course hidden from viewing. +%D Each topic is followed by a list of subjects that belong %D to the topic. \setuphead @@ -302,15 +302,15 @@ %D {\midaligned{#2}} %D \stoptyping %D -%D But why should we complicate things when we can use -%D alternative~\type{g}. The test is only needed if one -%D does not automatically goes a new page with each subject. +%D But why should we complicate things when we can use +%D alternative~\type{g}. The test is only needed if one +%D does not automatically goes a new page with each subject. \def\PlaceSubjectList% {\blank - \determinelistcharacteristics[Subject] + \determinelistcharacteristics[Subject] % \ifnum\utilitylistlength>0 \placelist[Subject] \fi} - \doifmode{*list}{\placelist[Subject]}} + \doifmode{*list}{\placelist[Subject]}} \setuplist [Subject, Topic] @@ -323,7 +323,7 @@ % %D {setuptexttexts} % %D % %D The topics will be listed in the right edge, using: -% +% % \setuptexttexts % [edge] % [][\TopicList] @@ -332,8 +332,8 @@ %D {setuplist, placelist,startinteractionmenu} %D %D The actual topic list is typeset using a \type{\vbox}. We -%D have to specify \type{criteriumcriterium=all} because otherwise no -%D list will be typeset. (By default lists are typeset +%D have to specify \type{criteriumcriterium=all} because otherwise no +%D list will be typeset. (By default lists are typeset %D locally.) \startinteractionmenu[right] @@ -348,7 +348,7 @@ style=\setsmallbodyfont\bfx] \stopinteractionmenu -\def\Topics#1% temporary hack +\def\Topics#1% temporary hack {\Nopic{#1} \placelist[Topic][criterium=all]} @@ -357,12 +357,12 @@ %D \macros %D {setuptexttexts, button} -%D +%D %D During a presentation, we want to use the cursor to point to %D parts of the text. Furthermore we want to be able to jump to %D the next page, without the need to move the cursor on buttons. %D Therefore we make the text part of the screen into an -%D invisible button. +%D invisible button. \setuptexttexts [\GotoNextPage][] @@ -374,11 +374,31 @@ %D {setupsubpagenumber} %D %D The left bottom navigation bar shows the subpages, which will -%D be counted by text. One can change this in the preentation -%D itself by saying \type {[way=byTopic]}. +%D be counted by text. One can change this in the preentation +%D itself by saying \type {[way=byTopic]}. \setupsubpagenumber [way=bytext, % Topic, state=start] -\endinput +\doifnotmode{demo}{\endinput} + +%D The (rather silly) demo section. + +\starttext + +\TitlePage{Title Page\\pre-original} + +\Topics{Some Nice Quotes} + +\Topic{A Few} + +\Subject{Knuth} \input knuth +\Subject{Tufte} \input tufte + +\Topic{Some More} + +\Subject{Zapf} \input zapf +\Subject{Bryson} \input bryson + +\stoptext diff --git a/tex/context/base/s-pre-02.tex b/tex/context/base/s-pre-02.tex index 4cd450f84..9df1fe383 100644 --- a/tex/context/base/s-pre-02.tex +++ b/tex/context/base/s-pre-02.tex @@ -8,12 +8,12 @@ %D copyright={PRAGMA / Hans Hagen \& Ton Otten}] %C %C This module is part of the \CONTEXT\ macro||package and is -%C therefore copyrighted by \PRAGMA. See mreadme.pdf for -%C details. +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. %D This environment can be used to typeset interactive -%D presentations. This module was first used at the 1998 -%D publishers conference of the European Portable Document +%D presentations. This module was first used at the 1998 +%D publishers conference of the European Portable Document %D Association (now merged into a graphics association). \usemodule[pre-general] @@ -21,8 +21,8 @@ %D \macros %D {setupbodyfont, switchtobodyfont, setuplayout} %D -%D At \PRAGMA\ we prefer using the Lucida Bright fonts, but -%D one can of course load another typeface. +%D At \PRAGMA\ we prefer using the Lucida Bright fonts, but +%D one can of course load another typeface. \startmode[asintended] \setupbodyfont[lbr] \stopmode @@ -34,7 +34,7 @@ %D \macros %D {setuppapersize, setuplayout} %D -%D The papersize suits the screen dimensions. The layout is +%D The papersize suits the screen dimensions. The layout is %D rather simple. We use the whole width of the screen and only %D have navigational tools at the bottom of the screen. @@ -55,8 +55,8 @@ %D \macros %D {setupwhitespace, setuptyping} %D -%D We don't have much height, so we use a more cramped -%D spacing. Verbatim text looks better when indented. +%D We don't have much height, so we use a more cramped +%D spacing. Verbatim text looks better when indented. %D \setupwhitespace @@ -69,7 +69,7 @@ %D {definecolor, setupcolors} %D %D Of course we enable color. We define some logical colors, -%D of which most default to the same green shade. +%D of which most default to the same green shade. \definecolor [BackgroundColor] [r=.8, g=.8, b=.8] \definecolor [OrnamentColor] [r= 0, g=.7, b=.4] @@ -79,8 +79,8 @@ %D \macros %D {setupinteraction, setupinteractionscreen} -%D -%D We still have to enable interaction mode. We go full +%D +%D We still have to enable interaction mode. We go full %D screen! \setupinteraction @@ -103,31 +103,31 @@ %D \macros %D {defineoverlay, setupbackgrounds} -%D -%D The navigational elements and the backgrounds are +%D +%D The navigational elements and the backgrounds are %D provided by \METAPOST. -%D +%D %D When \METAPOST\ is used, it makes sense to generate the %D graphics at runtime. This is supported when one enables %D system calls in the local \type {texmf.cnf} file and add the %D switch \type {\runMPgraphicstrue} to the local file \type -%D {cont-sys.tex}. When direct processing is disabled or not -%D supported, \TEXEXEC\ will take care of graphic generation. +%D {cont-sys.tex}. When direct processing is disabled or not +%D supported, \TEXEXEC\ will take care of graphic generation. \startuniqueMPgraphic{PageBackground} fill unitsquare - xyscaled(OverlayWidth,OverlayHeight) - withcolor OverlayColor ; + xyscaled(OverlayWidth,OverlayHeight) + withcolor OverlayColor ; draw unitsquare - xyscaled(OverlayWidth,OverlayHeight) + xyscaled(OverlayWidth,OverlayHeight) enlarged (-2*OverlayLineWidth) withpen pencircle scaled OverlayLineWidth - withcolor OverlayLineColor ; + withcolor OverlayLineColor ; \stopuniqueMPgraphic \defineoverlay [PageBackground] - [\uniqueMPgraphic{PageBackground}] + [\uniqueMPgraphic{PageBackground}] \setupbackgrounds [page] @@ -139,15 +139,15 @@ %D \macros %D {setuptexttexts} %D -%D By clicking on the text area, one goes to the next page. -%D We hook this feature into the text backgrounds. +%D By clicking on the text area, one goes to the next page. +%D We hook this feature into the text backgrounds. \startuniqueMPgraphic{TextBackground} draw unitsquare - xyscaled(OverlayWidth,OverlayHeight) + xyscaled(OverlayWidth,OverlayHeight) enlarged (4*OverlayLineWidth) withpen pencircle scaled OverlayLineWidth - withcolor OverlayLineColor ; + withcolor OverlayLineColor ; \stopuniqueMPgraphic \defineoverlay @@ -214,14 +214,14 @@ [menu=on] \def\WhateverButton - {\doifreferencefoundelse{Whatever} - {\raw [Whatever] \uniqueMPgraphic{UpArrow} \\} + {\doifreferencefoundelse{Whatever} + {\raw [Whatever] \uniqueMPgraphic{UpArrow} \\} {}} \startinteractionmenu[bottom] - \but [Topics] \\ % secret button + \but [Topics] \\ % secret button \hfill - \WhateverButton % user specific + \WhateverButton % user specific \kern2\bottomheight \raw [previouspage] \uniqueMPgraphic{LeftArrow} \\ \kern.5\bottomheight @@ -253,23 +253,23 @@ %D \macros %D {StartTitlePage, TitlePage} %D -%D The titlepage is rather simple and can be typeset in two -%D ways: +%D The titlepage is rather simple and can be typeset in two +%D ways: %D %D \starttyping %D \StartTitlePage -%D text \\ text \\ text +%D text \\ text \\ text %D \StopTitlepage %D \stoptyping %D %D or as one||liner: %D %D \starttyping -%D \TitlePage{text\\text\\text} +%D \TitlePage{text\\text\\text} %D \stoptyping -%D -%D The first alternative can be used for more complicated -%D title pages. +%D +%D The first alternative can be used for more complicated +%D title pages. \def\StartTitlePage% {\startstandardmakeup @@ -289,8 +289,8 @@ %D {definehead} %D %D The commands \type{\Topic} and \type{\Subject} are defined -%D as copies of head. We use \type{\Nopic} for internal -%D purposes. +%D as copies of head. We use \type{\Nopic} for internal +%D purposes. \definehead [Topic] [chapter] \definehead [Subject] [section] @@ -323,8 +323,8 @@ %D \macros %D {setuplist} %D -%D When found, the subject list is automatically placed -%D after the topic head. +%D When found, the subject list is automatically placed +%D after the topic head. \setuplist [Topic,Subject] @@ -337,7 +337,7 @@ [Topic] [criterium=all] -\def\Topics#1% +\def\Topics#1% {\determinelistcharacteristics[Topic] \doifmode{*list} {\Nopic[Topics]{#1} @@ -349,7 +349,7 @@ [Subject] [criterium=Topic] -\def\Subjects% +\def\Subjects% {\determinelistcharacteristics[Subject] \doifmode{*list} {\placelist[Subject]}} @@ -358,4 +358,24 @@ [Topic] [after={\blank[3*medium]\Subjects}] -\endinput +\doifnotmode{demo}{\endinput} + +%D The (rather silly) demo section. + +\starttext + +\TitlePage{Title Page\\pre-green} + +\Topics{Some Nice Quotes} + +\Topic{A Few} + +\Subject{Knuth} \input knuth +\Subject{Tufte} \input tufte + +\Topic{Some More} + +\Subject{Zapf} \input zapf +\Subject{Bryson} \input bryson + +\stoptext diff --git a/tex/context/base/s-pre-03.tex b/tex/context/base/s-pre-03.tex index c7420ba37..bdd7960c5 100644 --- a/tex/context/base/s-pre-03.tex +++ b/tex/context/base/s-pre-03.tex @@ -99,7 +99,7 @@ % path p; p := superellipse(r,t,l,b,.8) ; % fill p withcolor \MPcolor{Backgroundcolor} ; % draw p withcolor \MPcolor{OrnamentColor} ; -% color contrastcolor ; contrastcolor = 2/3 * \MPcolor{OrnamentColor} ; +% color contrastcolor ; contrastcolor = 2/3 * \MPcolor{OrnamentColor} ; % if (pos>0) and (tot>0): % pair pa ; pa := point 5 of p ; % pair pb ; pb := point 7 of p ; @@ -117,28 +117,28 @@ \startuseMPgraphic{PageShape} StartPage ; - path p ; pair pa, pb ; numeric len ; color contrastcolor ; - fill Page withcolor \MPcolor {PageColor} ; + path p ; pair pa, pb ; numeric len ; color contrastcolor ; + fill Page withcolor \MPcolor {PageColor} ; pickup pencircle rotated 45 xscaled 10pt yscaled 20pt ; p := Page enlarged (-10pt,-15pt) superellipsed .8 ; - p := p shifted (-1.5pt,0) ; % looks better + p := p shifted (-1.5pt,0) ; % looks better fill p withcolor \MPcolor{BackgroundColor} ; draw p withcolor \MPcolor{OrnamentColor} ; - contrastcolor = 2/3 * \MPcolor{OrnamentColor} ; + contrastcolor = 2/3 * \MPcolor{OrnamentColor} ; if (PageNumber>0) and (NOfPages>0): draw point 5 of p withcolor contrastcolor ; draw point 7 of p withcolor contrastcolor ; len := 2/NOfPages ; pa := point (5+len*PageNumber) of p ; pb := point (5+len*(PageNumber-1)) of p ; - draw (p cutafter pa) cutbefore pb + draw (p cutafter pa) cutbefore pb withcolor contrastcolor ; fi ; StopPage ; \stopuseMPgraphic %D We use the viewer provided feature to go to the previous or -%D next page. +%D next page. \defineoverlay[PrevButton][\overlaybutton{PreviousPage}] \defineoverlay[NextButton][\overlaybutton{NextPage}] @@ -151,11 +151,11 @@ [text][text] [background=NextButton] -% or using hard coded next/prev pages: +% or using hard coded next/prev pages: % % \defineoverlay[PrevButton][\overlaybutton{previouspage}] % \defineoverlay[NextButton][\overlaybutton{nextpage}] -% +% % \setupbackgrounds[state=repeat] % \setupbackground[text][text][background=NextButton] % @@ -234,4 +234,24 @@ \def\TitlePage#1% {\StartTitlePage#1\StopTitlePage} -\endinput +\doifnotmode{demo}{\endinput} + +%D The (rather silly) demo section. + +\starttext + +\TitlePage{Title Page\\pre-funny} + +\Topics{Some Nice Quotes} + +\Topic{A Few} + +\Subject{Knuth} \input knuth +\Subject{Tufte} \input tufte + +\Topic{Some More} + +\Subject{Zapf} \input zapf +\Subject{Bryson} \input bryson + +\stoptext diff --git a/tex/context/base/s-pre-04.tex b/tex/context/base/s-pre-04.tex index 29b040a8b..09cc79b72 100644 --- a/tex/context/base/s-pre-04.tex +++ b/tex/context/base/s-pre-04.tex @@ -8,17 +8,17 @@ %D copyright={PRAGMA / Hans Hagen \& Ton Otten}] %C %C This module is part of the \CONTEXT\ macro||package and is -%C therefore copyrighted by \PRAGMA. See mreadme.pdf for -%C details. +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. -\usemodule[pre-general] +\usemodule[pre-general] %D \macros %D {setupbodyfont} %D %D This is just another environment for typesetting interactive %D presentations. I wrote this module on behalf of a course I -%D gave for the United Kingdom \TeX\ users group. +%D gave for the United Kingdom \TeX\ users group. \setupbodyfont[ams,pos,14.4pt] @@ -28,33 +28,33 @@ %D I started using dark blue for the navigational elements. In %D that context, dark red is a logical choice for the contrast %D color. While playing around with the navigational elements -%D I decided to use the not so dominant color yellow for the -%D status bar. -%D +%D I decided to use the not so dominant color yellow for the +%D status bar. +%D %D A few days before I wrote this style, the recent acquisition %D of Mondriaans last painting by the Dutch governement was a %D hot topic in the dutch news scenary. Therefore I decided to %D replace the rather dull title page by something more %D colorful, in mondriaan colors, but far more random than any -%D of his paintings. For consistence we remap the already -%D defined primary colors. +%D of his paintings. For consistence we remap the already +%D defined primary colors. \setupcolors [state=start] -\definecolor [NoneColor] [s=.6] +\definecolor [NoneColor] [s=.6] \definecolor [GotoColor] [b=.6] \definecolor[blue] [GotoColor] \definecolor [ExitColor] [r=.6] \definecolor[red] [ExitColor] -\definecolor [JumpColor] [s=.6] +\definecolor [JumpColor] [s=.6] \definecolor [UserColor] [g=.6] \definecolor[green] [UserColor] \definecolor [StepColor] [r=.6,g=.6] \definecolor[yellow][StepColor] \definecolor [PageColor] [s=.80] \definecolor[gray] [PageColor] -\definecolor [TextColor] [s=.90] +\definecolor [TextColor] [s=.90] %D \macros %D {setuppapersize} %D -%D As usual, we take a screen oriented paper size: +%D As usual, we take a screen oriented paper size: \setuppapersize [S6][S6] @@ -62,9 +62,9 @@ %D \macros %D {setuplayout,setupinteractionscreen} %D -%D The layout definition fits into this $600\times450$ point +%D The layout definition fits into this $600\times450$ point %D area, but the dimensions are somewhat diffused by the text -%D background offset. +%D background offset. \setuplayout [width=530pt, @@ -85,10 +85,10 @@ %D \macros %D {setupbackgrounds} %D -%D Both the page and the text area have a gray background. -%D The \type {[text,text]} area also has an offset. Later we +%D Both the page and the text area have a gray background. +%D The \type {[text,text]} area also has an offset. Later we %D will see that we have to compensate for that in the -%D navigational areas. +%D navigational areas. \setupbackgrounds [page] @@ -104,19 +104,19 @@ %D \macros %D {setupinteraction} %D -%D For convenient navigation, we turn on interaction. +%D For convenient navigation, we turn on interaction. \setupinteraction [state=start, menu=on, - color=UserColor, + color=UserColor, contrastcolor=NoneColor] %D \macros %D {setupsubpagenumber} %D -%D When navigating the document, we keep the title page out -%D of sight, therefore we use sub page numbers. +%D When navigating the document, we keep the title page out +%D of sight, therefore we use sub page numbers. \setupsubpagenumber [state=start, @@ -127,7 +127,7 @@ %D %D There is only one interaction menu, located in the right %D edge of the screen. Both offsets enlarge the edge by the -%D same amount as the text background offset. +%D same amount as the text background offset. \setupinteractionmenu [right] @@ -146,10 +146,10 @@ %D start||stop alternative for setting the content. The macro %D \type {\interactioncolor} expands into either the %D interaction color or the contrast color, the latter only -%D when no jump is possible. +%D when no jump is possible. \startinteractionmenu[right] - \setupinteraction[color=GotoColor] + \setupinteraction[color=GotoColor] \but [previoussubpage] \Triangle {90}\framedwidth\interactioncolor \\ \vskip10pt \but [nextsubpage] \Triangle{270}\framedwidth\interactioncolor \\ @@ -162,11 +162,11 @@ %D \macros %D {setupinteractionbar} %D -%D The interaction bar at the bottom is also larger than the -%D normal width of the bottom area. +%D The interaction bar at the bottom is also larger than the +%D normal width of the bottom area. \setupinteractionbar - [alternative=f, + [alternative=f, width=\textwidth, height=\bottomheight, distance=10pt, @@ -176,29 +176,29 @@ %D \macros %D {setupbottomtexts} %D -%D The bar is centered in the middle. +%D The bar is centered in the middle. -\setupbottomtexts +\setupbottomtexts [\interactionbar] -%D We can exit viewing with a close button, located on the -%D rightmost bottom area. +%D We can exit viewing with a close button, located on the +%D rightmost bottom area. \def\CloseButton {\button [width=\rightedgewidth,height=\bottomheight,offset=overlay, background=color,backgroundcolor=ExitColor,frame=off] {}% - [CloseDocument]} + [CloseDocument]} \setupbottomtexts [edge][][\CloseButton] -%D \macros +%D \macros %D {definesymbol,setupitemize} %D -%D Because some prominent things are rectangular or triangular, -%D we prefer some different symbols in itemizations: +%D Because some prominent things are rectangular or triangular, +%D we prefer some different symbols in itemizations: \definesymbol[1][$\blacktriangleright$] \definesymbol[2][$\blacktriangledown$] @@ -245,11 +245,11 @@ %D \macros %D {Topic, Nopic, Subject, -%D definehead, setuphead} +%D definehead, setuphead} %D -%D We use \type {\Topic} and \type {\Subject} instead of -%D chapters and sections. The \type {\Nopic} alternative is -%D meant for internal use. +%D We use \type {\Topic} and \type {\Subject} instead of +%D chapters and sections. The \type {\Nopic} alternative is +%D meant for internal use. \definehead [Topic] [chapter] \definehead [Nopic] [title] @@ -275,9 +275,9 @@ %D {Topics, Subjects, %D setuplist, placelist, startcolumns} %D -%D This style is meant for the more large presentations, and -%D therefore provided for a list of topics as well as local -%D lists of subjects. When many topics are introduces, the +%D This style is meant for the more large presentations, and +%D therefore provided for a list of topics as well as local +%D lists of subjects. When many topics are introduces, the %D list is typeset in columns. \setuplist @@ -291,28 +291,28 @@ [Topic] [criterium=all] -\def\Topics#1% +\def\Topics#1% {\determinelistcharacteristics[Topic] - \ifnum\utilitylistlength>0 + \ifnum\utilitylistlength>0 \Nopic[Topics]{#1} - \ifnum\utilitylistlength>12 + \ifnum\utilitylistlength>12 \startcolumns \placelist[Topic] \stopcolumns \else \placelist[Topic] - \fi + \fi \fi} -\def\Subjects% +\def\Subjects% {\placelist[Subject]} -%D Last we define the overlays. Look at the way colors are +%D Last we define the overlays. Look at the way colors are %D linked into the macros. \startMPinclusions def triangle (expr wid, rot, col) = - x1 := x3 := y1 := 0 ; x2 := y3 := wid ; y2 := .5y3 ; + x1 := x3 := y1 := 0 ; x2 := y3 := wid ; y2 := .5y3 ; fill (z1--z2--z3--cycle) rotated rot withcolor col ; currentpicture := currentpicture xysized (wid,wid) ; enddef ; @@ -331,27 +331,47 @@ \def\Triangle#1#2#3% {\uniqueMPgraphic{triangle}{rotation=#1,width=#2,color=#3}} -\startuseMPgraphic{title} % can be simplified with "randomized" - color c ; path p ; - for i=1 upto 250 : - x0 := uniformdeviate \overlaywidth ; +\startuseMPgraphic{title} % can be simplified with "randomized" + color c ; path p ; + for i=1 upto 250 : + x0 := uniformdeviate \overlaywidth ; y0 := uniformdeviate \overlayheight ; - sx := uniformdeviate 20 ; + sx := uniformdeviate 20 ; sy := uniformdeviate 20 ; - cc := round(uniformdeviate 2) ; - if cc=0 : c := \MPcolor{GotoColor} fi ; - if cc=1 : c := \MPcolor{ExitColor} fi ; - if cc=2 : c := \MPcolor{StepColor} fi ; - qq := round(uniformdeviate 1) ; - if qq=0 : + cc := round(uniformdeviate 2) ; + if cc=0 : c := \MPcolor{GotoColor} fi ; + if cc=1 : c := \MPcolor{ExitColor} fi ; + if cc=2 : c := \MPcolor{StepColor} fi ; + qq := round(uniformdeviate 1) ; + if qq=0 : p := unitsquare xscaled sx yscaled sy ; else : - rr := round(uniformdeviate 3) * 90 ; - x1 := x3 := y1 := 0 ; x2 := y3 := sx; y2 := .5y3 ; + rr := round(uniformdeviate 3) * 90 ; + x1 := x3 := y1 := 0 ; x2 := y3 := sx; y2 := .5y3 ; p := (z1--z2--z3--cycle) rotated rr ; - fi ; - fill p shifted z0 withcolor c ; + fi ; + fill p shifted z0 withcolor c ; endfor ; \stopuseMPgraphic -\endinput +\doifnotmode{demo}{\endinput} + +%D The (rather silly) demo section. + +\starttext + +\TitlePage{Title Page\\pre-colorfull} + +\Topics{Some Nice Quotes} + +\Topic{A Few} + +\Subject{Knuth} \input knuth +\Subject{Tufte} \input tufte + +\Topic{Some More} + +\Subject{Zapf} \input zapf +\Subject{Bryson} \input bryson + +\stoptext diff --git a/tex/context/base/s-pre-05.tex b/tex/context/base/s-pre-05.tex index f095ae091..9b3ae89ff 100644 --- a/tex/context/base/s-pre-05.tex +++ b/tex/context/base/s-pre-05.tex @@ -8,13 +8,13 @@ %D copyright={PRAGMA / Hans Hagen \& Ton Otten}] %C %C This module is part of the \CONTEXT\ macro||package and is -%C therefore copyrighted by \PRAGMA. See mreadme.pdf for -%C details. +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. -\usemodule[pre-general] +\usemodule[pre-general] -%D As all styles sofar, this one has the same structuring -%D commands. +%D As all styles sofar, this one has the same structuring +%D commands. \startmode[asintended] \setupbodyfont[lbr] \stopmode @@ -22,7 +22,7 @@ \setupcolors [state=start] -\definecolor [BackgroundColor] [s=.95] +\definecolor [BackgroundColor] [s=.95] \definecolor [OrnamentColor] [r=.6,g=.7,b=.8] \setuppapersize @@ -68,7 +68,7 @@ color=OrnamentColor, contrastcolor=OrnamentColor] -%D Watch how we use a list alternative that matches the +%D Watch how we use a list alternative that matches the %D menu. \setupinteractionmenu @@ -77,7 +77,7 @@ style=smallbold, frame=off, offset=10pt, - height=35pt, + height=35pt, before=, after=, inbetween=\endgraf, @@ -96,7 +96,7 @@ \setupinteractionmenu [right] [height=30pt] - \but [CloseDocument] Close \\ + \but [CloseDocument] Close \\ \stopinteractionmenu \setupwhitespace @@ -140,19 +140,19 @@ \def\TitlePage#1% {\StartTitlePage#1\StopTitlePage} -%D \macros +%D \macros %D {Topics,Subjects} %D -%D Since the lists are in the menu, we don't honor list -%D placement macros. +%D Since the lists are in the menu, we don't honor list +%D placement macros. \def\Topics#1{} \def\Subjects{} %D \macros -%D {Topic, Nopic, Subject} +%D {Topic, Nopic, Subject} %D -%D Since t his style is meant for rather flat structured +%D Since t his style is meant for rather flat structured %D documents, only \type {\Topic} makes sense. \definehead [Topic] [chapter] @@ -175,27 +175,27 @@ continue=no, style=\tfa] -%D We use only one kind of base graphic, which is sligthly -%D tuned for the different usage. +%D We use only one kind of base graphic, which is sligthly +%D tuned for the different usage. \startMPinclusions - def random_hash_frame (expr width, height, offset, linewidth ) = + def random_hash_frame (expr width, height, offset, linewidth ) = def delta = ((uniformdeviate .5offset) + .25offset) enddef ; x1 := offset ; y1 := offset ; x2 := width-offset ; y2 := height-offset ; - drawoptions(withpen pencircle scaled linewidth withcolor \MPcolor{BackgroundColor}) ; + drawoptions(withpen pencircle scaled linewidth withcolor \MPcolor{BackgroundColor}) ; fill z1--(x2,y1)--z2--(x1,y2)--cycle ; - drawoptions(withpen pencircle scaled linewidth withcolor \MPcolor{OrnamentColor}) ; + drawoptions(withpen pencircle scaled linewidth withcolor \MPcolor{OrnamentColor}) ; draw (x1-delta,y1)--(x2+delta,y1) ; draw (x2,y1-delta)--(x2,y2+delta) ; draw (x2+delta,y2)--(x1-delta,y2) ; draw (x1,y2+delta)--(x1,y1-delta) ; - drawoptions(); + drawoptions(); setbounds currentpicture to unitsquare xscaled width yscaled height ; - enddef ; + enddef ; \stopMPinclusions \startuseMPgraphic{HashFrameA} @@ -207,14 +207,34 @@ \stopuseMPgraphic \startuseMPgraphic{TitleGraphic} - for i=1 upto 300 : - offset := uniformdeviate 10pt ; - width := 2*offset + 30pt + uniformdeviate 30pt ; - height := 2*offset + 10pt + uniformdeviate 10pt ; - addto currentpicture also - image(random_hash_frame(width,height,offset,1pt)) shifted - (uniformdeviate OverlayWidth, uniformdeviate OverlayHeight) ; - endfor ; + for i=1 upto 300 : + offset := uniformdeviate 10pt ; + width := 2*offset + 30pt + uniformdeviate 30pt ; + height := 2*offset + 10pt + uniformdeviate 10pt ; + addto currentpicture also + image(random_hash_frame(width,height,offset,1pt)) shifted + (uniformdeviate OverlayWidth, uniformdeviate OverlayHeight) ; + endfor ; \stopuseMPgraphic -\endinput +\doifnotmode{demo}{\endinput} + +%D The (rather silly) demo section. + +\starttext + +\TitlePage{Title Page\\pre-fuzzy} + +\Topics{Some Nice Quotes} + +\Topic{A Few} + +\Subject{Knuth} \input knuth +\Subject{Tufte} \input tufte + +\Topic{Some More} + +\Subject{Zapf} \input zapf +\Subject{Bryson} \input bryson + +\stoptext diff --git a/tex/context/base/s-pre-06.tex b/tex/context/base/s-pre-06.tex index d3b99d9b7..7a84323e9 100644 --- a/tex/context/base/s-pre-06.tex +++ b/tex/context/base/s-pre-06.tex @@ -27,7 +27,7 @@ \usemodule[pre-general] -%D \macros +%D \macros %D {setupbodyfont} %D %D As said, we will use the Antikwa Torunska, and because we @@ -36,7 +36,7 @@ \setupbodyfont [ant,14.4pt] -%D \macros +%D \macros %D {definecolor, setupcolors} %D %D Thus style only uses gray scales, but nevertheless we turn @@ -49,7 +49,7 @@ \definecolor [ContrastColor] [s=.9] \definecolor [InteractionColor] [s=.6] -%D \macros +%D \macros %D {setuppapersize} %D %D As (nearly) always, we use a 600 pt times 450 pt screen @@ -268,9 +268,9 @@ %D %D We use a nested \type {\everypar}; everything in there %D will be put in front of each paragraph. The nesting prevents -%D the first paragraph from indenting. The struts give the +%D the first paragraph from indenting. The struts give the %D lines a decent height, which looks better inrelation to the -%D next pages. +%D next pages. \def\StartTitlePage% {\startstandardmakeup @@ -292,4 +292,34 @@ \def\TitlePage#1% {\StartTitlePage#1\StopTitlePage} -\endinput +\doifnotmode{demo}{\endinput} + +%D The (rather silly) demo section. + +\usemodule[pre-antikwa] + +\starttext + +\TitlePage{Title Page\\pre-polish} + +\Topics{Some Nice Lists} + +\Topic{Some Lists} + +\Subject{A list} + +\startitemize +\item first +\item second +\stopitemize + +\Subject{A bigger list} + +\startitemize +\item first +\item second +\item third +\item fourth +\stopitemize + +\stoptext diff --git a/tex/context/base/s-pre-07.tex b/tex/context/base/s-pre-07.tex index 65514403a..bf84971bb 100644 --- a/tex/context/base/s-pre-07.tex +++ b/tex/context/base/s-pre-07.tex @@ -16,12 +16,12 @@ %D This is just one way of implementing such a style. Today %D we have more \METAPOST\ interfacing available, and %D thereby moore tools and alternative ways to reach such a -%D goal. I must admit that the main macro looks fuzzy. On -%D the other hand, the presentation can look quite structured. -%D +%D goal. I must admit that the main macro looks fuzzy. On +%D the other hand, the presentation can look quite structured. +%D %D \starttyping %D \Topics{...} -%D +%D %D \StartIdeas %D \Topic{...} %D \StartIdea ... \StopIdea @@ -54,7 +54,7 @@ %D keep the random seed reasonable constant. \setupsystem - [random=big] + [random=big] \setupcolors [state=start] @@ -193,4 +193,20 @@ \def\StopIdeas% {} -\endinput +\doifnotmode{demo}{\endinput} + +%D The (rather silly) demo section. + +\starttext + +\Topics{This is about \unknown} + +\StartIdeas + \Topic{Some topic} + \StartIdea An idea \unknown \StopIdea + \StartIdea \unknown\ and another \StopIdea +\StopIdeas + +\stoptext + + diff --git a/tex/context/base/s-pre-13.tex b/tex/context/base/s-pre-13.tex index a7b68dd69..6032f36d2 100644 --- a/tex/context/base/s-pre-13.tex +++ b/tex/context/base/s-pre-13.tex @@ -12,7 +12,7 @@ %C details. %D This is again one of the \EUROTEX\ 99 styles. It's one of -%D the quick and dirty styles supporting basic structuring. +%D the quick and dirty styles supporting basic structuring. \setuppapersize [S6][S6] @@ -27,14 +27,14 @@ topspace=2cm, backspace=2cm] -%D This style is meant to be used with lucida handwriting -%D fonts. If you don't have that font, you may reconsider -%D using this style. +%D This style is meant to be used with lucida handwriting +%D fonts. If you don't have that font, you may reconsider +%D using this style. \startmode[asintended] \setupbodyfont[lbr,hw] \stopmode %D These colors will mostly be used in the graphics drawn by -%D \METAPOST. +%D \METAPOST. \setupcolors [state=start] @@ -44,8 +44,8 @@ \definecolor[LineColor] [g=.4] \definecolor[SymbolColor][r=.4] -%D When interacting, we will use button shaped that are -%D quite random and thereby regenerated for each instance. +%D When interacting, we will use button shaped that are +%D quite random and thereby regenerated for each instance. \setupinteractionscreen [option=max] @@ -66,23 +66,23 @@ \startinteractionmenu[bottom] \hfill - \got [previouspage] \symbol[prevmark] \\ - \got [nextpage] \symbol[nextmark] \\ - \got [CloseDocument] \symbol[stopmark] \\ - \txt \tfd \SymbolColor \pagenumber \\ + \got [previouspage] \symbol[prevmark] \\ + \got [nextpage] \symbol[nextmark] \\ + \got [CloseDocument] \symbol[stopmark] \\ + \txt \tfd \SymbolColor \pagenumber \\ \stopinteractionmenu %D When not processed at runtime, the itemmark graphics can %D result in processing loops due to funny dimensions. %D Therefore, from now on, the itemize macros limit the height -%D and depth. +%D and depth. \definesymbol[itemmark][\useMPgraphic{itemmark}] \definesymbol[stopmark][\useMPgraphic{stopmark}] \definesymbol[nextmark][\useMPgraphic{nextmark}] \definesymbol[prevmark][\useMPgraphic{prevmark}] -%D Of course we have some backgrounds. +%D Of course we have some backgrounds. \defineoverlay [page] [\useMPgraphic{page}] \defineoverlay [next] [\overlaybutton{forward}] @@ -90,11 +90,11 @@ \setupbackgrounds [page] - [background={page,prev}] + [background={page,prev}] \setupbackgrounds [text] - [background=next] + [background=next] \setuphead [chapter] @@ -114,7 +114,7 @@ width=3\bodyfontsize] \def\StartTitlePage% - {\setupinteractionmenu[bottom][state=stop] % will be named page block + {\setupinteractionmenu[bottom][state=stop] % will be named page block \startstandardmakeup \setupalign[middle] \def\\% @@ -149,11 +149,11 @@ \def\Topics#1% {\Nopic{#1} \bgroup - \setupinteraction + \setupinteraction [color=, contrastcolor=] \determinelistcharacteristics[Topic] - \ifnum\utilitylistlength>12 + \ifnum\utilitylistlength>12 \startcolumns[n=2] \placelist[Topic] \stopcolumns @@ -162,35 +162,35 @@ \fi \egroup} -%D We don't support another level of structuring. +%D We don't support another level of structuring. \let\Subject \Topic \let\Subjects\relax -%D Most of this style is \METAPOST\ definitions. We could -%D have shared some code, but it would not on forehand make -%D things more readable, so we stick to the following -%D definitions. +%D Most of this style is \METAPOST\ definitions. We could +%D have shared some code, but it would not on forehand make +%D things more readable, so we stick to the following +%D definitions. \startuseMPgraphic{page} - width := \overlaywidth ; - height := \overlayheight ; + width := \overlaywidth ; + height := \overlayheight ; - d := 15 ; dd := d ; dd := 10 ; + d := 15 ; dd := d ; dd := 10 ; - def fuzzy (expr p,dx,dy) = + def fuzzy (expr p,dx,dy) = (xpart p +dx-uniformdeviate dx,ypart p+dy-uniformdeviate dy) - enddef ; + enddef ; - pair ll, lr, ur, ul ; + pair ll, lr, ur, ul ; ll := (d,d) ; lr := (width-d,d) ; ur := (width-d,height-d) ; ul := (d,height-d) ; - path p, q, r, s ; + path p, q, r, s ; p := ll.. for i=.1 step .1 until .9 : fuzzy (i[ll,lr],0,+dd).. endfor lr ; q := lr.. for i=.1 step .1 until .9 : fuzzy (i[lr,ur],-dd,0).. endfor ur ; @@ -201,27 +201,27 @@ fill p & q & r & s -- cycle withcolor \MPcolor{TextColor} ; - color c ; c := \MPcolor{LineColor} ; + color c ; c := \MPcolor{LineColor} ; - draw p withpen pencircle xscaled 20 yscaled 5 rotated 30 withcolor c ; - draw q withpen pencircle xscaled 5 yscaled 20 rotated 30 withcolor c ; - draw r withpen pencircle xscaled 20 yscaled 5 rotated 30 withcolor c ; - draw s withpen pencircle xscaled 5 yscaled 20 rotated 30 withcolor c ; + draw p withpen pencircle xscaled 20 yscaled 5 rotated 30 withcolor c ; + draw q withpen pencircle xscaled 5 yscaled 20 rotated 30 withcolor c ; + draw r withpen pencircle xscaled 20 yscaled 5 rotated 30 withcolor c ; + draw s withpen pencircle xscaled 5 yscaled 20 rotated 30 withcolor c ; \stopuseMPgraphic \startuseMPgraphic{itemmark} - width := BodyFontSize ; height := width/4 ; + width := BodyFontSize ; height := width/4 ; maxheight := StrutHeight ; line := 3width/2 ; - def fuzzy = -(height/4)+uniformdeviate (height/2) enddef ; + def fuzzy = -(height/4)+uniformdeviate (height/2) enddef ; - draw - ((0,0+fuzzy)--(width,height+fuzzy/2)) - shifted (line/2,0) - withpen pencircle - xscaled line yscaled (line/4) - rotated (25+uniformdeviate 10) withcolor \MPcolor{SymbolColor} ; + draw + ((0,0+fuzzy)--(width,height+fuzzy/2)) + shifted (line/2,0) + withpen pencircle + xscaled line yscaled (line/4) + rotated (25+uniformdeviate 10) withcolor \MPcolor{SymbolColor} ; setbounds currentpicture to unitsquare xyscaled(width,maxheight) ; \stopuseMPgraphic @@ -229,15 +229,15 @@ \startuseMPgraphic{nextmark} LoadPageState ; width := BottomHeight ; height := line := width/2 ; - def fuzzy = -(height/8)+uniformdeviate (height/4) enddef ; + def fuzzy = -(height/8)+uniformdeviate (height/4) enddef ; z1 = (0,0+fuzzy) ; z2 = (width,height/2+fuzzy/2) ; z3 = (0,height+fuzzy) ; - draw + draw (z1..{right}z2 & z2{left}..z3) - withpen pencircle - xscaled line yscaled (line/4) - rotated 30 withcolor \MPcolor{SymbolColor} ; + withpen pencircle + xscaled line yscaled (line/4) + rotated 30 withcolor \MPcolor{SymbolColor} ; setbounds currentpicture to unitsquare xyscaled(width,height) ; \stopuseMPgraphic @@ -245,15 +245,15 @@ \startuseMPgraphic{prevmark} LoadPageState ; width := BottomHeight ; height := line := width/2 ; - def fuzzy = -(height/8)+uniformdeviate (height/4) enddef ; + def fuzzy = -(height/8)+uniformdeviate (height/4) enddef ; z1 = (width,0+fuzzy) ; z2 = (0,height/2+fuzzy/2) ; z3 = (width,height+fuzzy) ; - draw + draw (z1..{left}z2 & z2{right}..z3) - withpen pencircle - xscaled line yscaled (line/4) - rotated 30 withcolor \MPcolor{SymbolColor} ; + withpen pencircle + xscaled line yscaled (line/4) + rotated 30 withcolor \MPcolor{SymbolColor} ; setbounds currentpicture to unitsquare xyscaled(width,height) ; \stopuseMPgraphic @@ -261,7 +261,7 @@ \startuseMPgraphic{stopmark} LoadPageState ; width := BottomHeight ; height := line := width/2 ; - def fuzzy = -(height/8)+uniformdeviate (height/4) enddef ; + def fuzzy = -(height/8)+uniformdeviate (height/4) enddef ; z1 = (0,0+fuzzy) ; z2 = (width,height+fuzzy) ; @@ -269,14 +269,34 @@ z4 = (0,height+fuzzy) ; z5 = (width/2,height/2) ; - drawoptions - (withpen pencircle - xscaled line yscaled (line/4) - rotated 30 withcolor \MPcolor{SymbolColor}) ; + drawoptions + (withpen pencircle + xscaled line yscaled (line/4) + rotated 30 withcolor \MPcolor{SymbolColor}) ; draw z1..{right}z5..z2 ; draw z3..{left}z5..z4 ; setbounds currentpicture to unitsquare xyscaled(width,height) ; \stopuseMPgraphic -\endinput +\doifnotmode{demo}{\endinput} + +%D The (rather silly) demo section. + +\starttext + +\TitlePage{Title Page\\pre-writing} + +\Topics{Some Nice Quotes} + +\Topic{A Few} + +\Subject{Knuth} \input knuth +\Subject{Tufte} \input tufte + +\Topic{Some More} + +\Subject{Zapf} \input zapf +\Subject{Bryson} \input bryson + +\stoptext diff --git a/tex/context/base/s-pre-14.tex b/tex/context/base/s-pre-14.tex index 7a777c27e..f44117e7c 100644 --- a/tex/context/base/s-pre-14.tex +++ b/tex/context/base/s-pre-14.tex @@ -15,18 +15,18 @@ %D In the process of making a couple of simple styles for %D \EUROTEX\ 99, I came to this one. The joke is in the %D pagenumber. This style can be used for short presentations -%D with much text. +%D with much text. \startmode[asintended] \setupbodyfont[lbr] \stopmode \setupbodyfont[14.4pt] -%D Since we expect text, we can best be very tolerant. +%D Since we expect text, we can best be very tolerant. -\setuptolerance +\setuptolerance [verytolerant,stretch] -%D As most styles we choose a large screen page size. +%D As most styles we choose a large screen page size. \setuppapersize [S6][S6] @@ -42,8 +42,8 @@ topspace=1cm, backspace=1cm] -%D We only use two colors, named \type {One} and \type -%D {Two}: +%D We only use two colors, named \type {One} and \type +%D {Two}: \setupcolors [state=start] @@ -54,15 +54,15 @@ %D If you've looked at the demo file, you will have noticed %D that the background consists of four pieces: two filled %D rectangles and two half numbers. These are put on th epage -%D using four overlays: +%D using four overlays: \setupbackgrounds [page] - [background={one,two,three,four}] + [background={one,two,three,four}] %D When we code this in \TEX, we get the following %D definitions. As an alternative we coudl have used layers -%D but I'm afraid that it would not have led to less code. +%D but I'm afraid that it would not have led to less code. \defineoverlay [one] @@ -80,8 +80,8 @@ width=\overlaywidth,height=\overlayheight] {}}}] -%D We could have used the main backgroundcolor instead of -%D overlay \type {one}. +%D We could have used the main backgroundcolor instead of +%D overlay \type {one}. \definefont[NumberFont][RegularBold at 3cm] @@ -123,7 +123,7 @@ \edef\overlaywidth{\the\scratchdimen}} %D A much cleaner implementation is the following. If you hate -%D \METAPOST, you can run this style in the specified mode: +%D \METAPOST, you can run this style in the specified mode: \startnotmode[no-metapost] @@ -135,36 +135,36 @@ \startuseMPgraphic{number} StartPage ; - path Vage ; picture Left, Right ; + path Vage ; picture Left, Right ; x1 = x2 = xpart (llcorner Field[Text][RightEdge] shifted (-RightEdgeDistance/2,0)) ; y1 = ypart llcorner Page ; y2 = ypart ulcorner Page ; Vage := llcorner Page -- z1 -- z2 -- ulcorner Page -- cycle ; fill Page withcolor \MPcolor {One} ; fill Vage withcolor \MPcolor {Two} ; - if PageNumber>0 : + if PageNumber>0 : defaultfont := "\truefontname{RegularBold}" ; - Left := Right := thelabel("\folio",origin) ysized 3cm ; - clip Right to boundingbox Right shifted (bbwidth(Right)/2,0) ; + Left := Right := thelabel("\folio",origin) ysized 3cm ; + clip Right to boundingbox Right shifted (bbwidth(Right)/2,0) ; draw Left shifted z1 shifted (0,2.25cm) withcolor \MPcolor {One} ; draw Right shifted z1 shifted (0,2.25cm) withcolor \MPcolor {Two} ; - fi ; + fi ; StopPage ; \stopuseMPgraphic \stopnotmode -%D We use the simple label typesetting present in \METAPOST\ -%D because digits are seldom kerned so real \TEX ing is not -%D needed. As in the previous method, we let the graphics -%D overlap so that we don't get white lines due to rounding -%D problems in viewers. -%D +%D We use the simple label typesetting present in \METAPOST\ +%D because digits are seldom kerned so real \TEX ing is not +%D needed. As in the previous method, we let the graphics +%D overlap so that we don't get white lines due to rounding +%D problems in viewers. +%D %D We put a button behind the text (this overlay is calculated -%D each page). +%D each page). -\defineoverlay - [nextpage] +\defineoverlay + [nextpage] [\overlaybutton{nextpage}] \setupbackgrounds @@ -183,7 +183,7 @@ [color=, contrastcolor=] -%D Next we define structuring commands. +%D Next we define structuring commands. \definehead[Topic] [chapter] \setuphead[Topic] [style=\bfc] \definehead[Subject][section] \setuphead[Subject][style=\bfa] @@ -193,12 +193,12 @@ [number=no, after={\blank[big]}] -%D Because we will provide a menu, we don't offer lists. +%D Because we will provide a menu, we don't offer lists. \let\Topics \gobbleoneargument \let\Subjects\relax -%D The table of contents goes to the right edge. +%D The table of contents goes to the right edge. \startinteractionmenu[right] \setupinteraction @@ -218,7 +218,7 @@ maxwidth=\rightedgewidth, style=\bfa] -%D We safe some space: +%D We safe some space: \setupwhitespace [medium] @@ -226,8 +226,8 @@ \setupblank [medium] -%D In the titlepage, we still use the \TEX\ overlays, -%D so that we don't have to define a second graphic. +%D In the titlepage, we still use the \TEX\ overlays, +%D so that we don't have to define a second graphic. \def\TitlePage#1% {\StartTitlePage#1\StopTitlePage} @@ -246,7 +246,7 @@ \stopstandardmakeup \egroup} -%D This is it. +%D This is it. \doifnotmode{demo}{\endinput} @@ -259,6 +259,6 @@ \Topic{Reich} \input reich \Topic{Zapf} \input zapf \Topic{Materie} \input materie -\Topic{Stork} \input stork +%Topic{Stork} \input stork \stoptext diff --git a/tex/context/base/spec-tpd.tex b/tex/context/base/spec-tpd.tex index 0e97a3858..f6c7097bc 100644 --- a/tex/context/base/spec-tpd.tex +++ b/tex/context/base/spec-tpd.tex @@ -93,13 +93,14 @@ \pdfvorigin=1 true in \fi -%D We default to 300 dots per inch image resolution. +%D We default to 300 dots per inch image resolution and 600 dpi +%D bitmap fonts (when asked for). -\ifx\pdfimageresolution\undefined - \newcount\pdfimageresolution -\fi +\ifx\pdfimageresolution\undefined \newcount\pdfimageresolution \fi +\ifx\pdfimageresolution\undefined \newcount\pdfpkresolution \fi \pdfimageresolution=300 +\pdfpkresolution =600 %D Another downward compatible hack: diff --git a/tex/context/base/syst-ext.tex b/tex/context/base/syst-ext.tex index 903460abf..f235fed0a 100644 --- a/tex/context/base/syst-ext.tex +++ b/tex/context/base/syst-ext.tex @@ -3991,6 +3991,15 @@ \setbox\@@dlhbox\hbox{\mathsurround\zeropoint\everymath\emptytoks$ $}\unhbox\@@dlhbox \fi \fi} +% Also ok, but more sensitive to lookahead expansion is: +% +% \def\dontleavehmode{\ifvmode \indent \fi} +% +% which assumes indent is kept unchanged. Protecting the macro is only +% possible in etex (watch out: \unexpanded in context is eq to \protected). +% +% \unexpanded \def\dontleavehmode{\ifvmode \indent \fi} % functional spec TH + %D But, if you run a recent version of \TEX, we can use the new %D primitive: diff --git a/tex/context/base/syst-gen.tex b/tex/context/base/syst-gen.tex index fd78b2520..e249325b9 100644 --- a/tex/context/base/syst-gen.tex +++ b/tex/context/base/syst-gen.tex @@ -4111,76 +4111,74 @@ %D \type {\if} and friends, in practice we will use a %D slightly more complicated macro. -\let\normalif \if -\let\normalifx \ifx -\let\normalifnum \ifnum -\let\normalifdim \ifdim -\let\normalifcat \ifcat -\let\normalifcase \ifcase -\let\normalifcsname \ifcsname -\let\normalifhmode \ifhmode -\let\normalifvmode \ifvmode -\let\normalor \or -\let\normalelse \else -\let\normalfi \fi +\let\normalif \if +\let\normalifcat \ifcat +\let\normalifnum \ifnum +\let\normalifdim \ifdim +\let\normalifodd \ifodd +\let\normalifvmode \ifvmode +\let\normalifhmode \ifhmode +\let\normalifmmode \ifmmode +\let\normalifinner \ifinner +\let\normalifvoid \ifvoid +\let\normalifhbox \ifhbox +\let\normalifvbox \ifvbox +\let\normalifx \ifx +\let\normalifeof \ifeof +\let\normaliftrue \iftrue +\let\normaliffalse \iffalse +\let\normalifcase \ifcase +\let\normalifdefined \ifdefined +\let\normalifcsname \ifcsname +\let\normaliffontchar \iffontchar +\let\normalifincsname \ifincsname +\let\normalifprimitive\ifprimitive +\let\normalifabsnum \ifabsnum +\let\normalifabsdim \ifabsdim + +\let\normalelse \else +\let\normalor \or +\let\normalfi \fi + +\newtoks \everyrobusttest + +\everyrobusttest + {\let\if \relax + \let\ifcat \relax + \let\ifnum \relax + \let\ifdim \relax + \let\ifodd \relax + \let\ifvmode \relax + \let\ifhmode \relax + \let\ifmmode \relax + \let\ifinner \relax + \let\ifvoid \relax + \let\ifhbox \relax + \let\ifvbox \relax + \let\ifx \relax + \let\ifeof \relax + \let\iftrue \relax + \let\iffalse \relax + \let\ifcase \relax + \let\ifdefined \relax + \let\ifcsname \relax + \let\iffontchar \relax + \let\ifincsname \relax + \let\ifprimitive\relax + \let\ifabsnum \relax + \let\ifabsdim \relax + \let\else \relax + \let\or \relax + \let\fi \relax} \def\beginrobusttest {\begingroup - \let\if \relax - \let\ifx \relax - \let\ifnum \relax - \let\ifdim \relax - \let\ifcat \relax - \let\ifcase \relax - \let\ifcsname\relax - \let\or \relax - \let\else \relax - \let\fi \relax} + \the\everyrobusttest} \let\endrobusttest\endgroup -% \def\dogetgroupargument#1#2% -% {\def\nextnextargument% -% {\normalifx\nextargument\bgroup -% \endrobusttest -% \let\expectedarguments\noexpectedarguments -% \def\nextargument{#1\dodogetargument}% -% %\normalelse\normalifx\nextargument\lineending % this can be an option -% % \def\nextargument{\begingroup\def\\ {\endgroup\dogetgroupargument#1#2}\\}% -% %\normalelse\normalifx\nextargument\blankspace % but may never be default -% % \def\nextargument{\begingroup\def\\ {\endgroup\dogetgroupargument#1#2}\\}% -% \normalelse -% \endrobusttest -% \ifnum\expectedarguments>\noexpectedarguments -% \showargumenterror{\number\expectedarguments}{\number\inputlineno}% -% \fi -% \let\expectedarguments\noexpectedarguments -% \def\nextargument{#2\dodogetargument{}}% -% \normalfi%\normalfi\normalfi % so let's get rid of it -% \nextargument}% -% \beginrobusttest -% \futurelet\nextargument\nextnextargument} - -% \def\dogetgroupargument#1#2% -% {\def\nextnextargument% -% {\normalifx\nextargument\bgroup -% \endrobusttest -% \noshowargumenterror -% \def\nextargument{#1\dodogetargument}% -% %\normalelse\normalifx\nextargument\lineending % this can be an option -% % \def\nextargument{\begingroup\def\\ {\endgroup\dogetgroupargument#1#2}\\}% -% %\normalelse\normalifx\nextargument\blankspace % but may never be default -% % \def\nextargument{\begingroup\def\\ {\endgroup\dogetgroupargument#1#2}\\}% -% \normalelse -% \endrobusttest -% \doshowargumenterror -% \def\nextargument{#2\dodogetargument{}}% -% \normalfi%\normalfi\normalfi % so let's get rid of it -% \nextargument}% -% \beginrobusttest -% \futurelet\nextargument\nextnextargument} - -% we need to use an \ifcase in order to honor the \normal... +%D We can add additional definitions later when we have defined +%D \type {\appendtoks}. \def \permitspacesbetweengroups{\chardef\@@permitspacesbetweengroups=0 } \def\dontpermitspacesbetweengroups{\chardef\@@permitspacesbetweengroups=1 } diff --git a/tex/context/base/verb-ini.tex b/tex/context/base/verb-ini.tex index 0d587ecb7..97bbf02c4 100644 --- a/tex/context/base/verb-ini.tex +++ b/tex/context/base/verb-ini.tex @@ -374,14 +374,41 @@ {\global\let\savedverbatimline\empty \global\chardef\verbatimstatus\ifskipfirstverbatimline0 \else1 \fi} -\let\donextemptyverbatimline\relax +% \let\donextemptyverbatimline\relax + +% \def\presetemptyverbatimline +% {\ifcase\verbatimstatus +% \global\chardef\verbatimstatus\plusone +% \or +% \or +% \donextemptyverbatimline +% \or +% \doflushverbatimline +% \global\let\savedverbatimline\empty +% \doemptyverbatimline +% \global\chardef\verbatimstatus\plustwo +% \else +% \kern\zeropoint +% \doverbatimnobreak +% \doflushverbatimline +% \global\let\savedverbatimline\empty +% \doemptyverbatimline +% \global\chardef\verbatimstatus\plustwo +% \fi} + +\chardef\verbatimemptylinemode\zerocount \def\presetemptyverbatimline {\ifcase\verbatimstatus \global\chardef\verbatimstatus\plusone \or + \ifcase\verbatimemptylinemode\or\or + \doemptyverbatimline + \fi \or - \donextemptyverbatimline + \ifcase\verbatimemptylinemode\else + \doemptyverbatimline + \fi \or \doflushverbatimline \global\let\savedverbatimline\empty @@ -417,13 +444,28 @@ \fi \global\let\savedverbatimline\verbatimline} +% \def\presetlastverbatimline +% {\ifcase\verbatimstatus \or \or \or +% \doflushverbatimline +% \else +% \kern\zeropoint +% \doverbatimnobreak +% \doflushverbatimline +% \fi} + \def\presetlastverbatimline - {\ifcase\verbatimstatus \or \or \or + {\ifcase \verbatimstatus + \or + \or + \or \doflushverbatimline \else - \kern\zeropoint + \kern \zeropoint \doverbatimnobreak \doflushverbatimline + \fi + \ifcase\verbatimemptylinemode\or\else + \kern \zeropoint \fi} %D \macros @@ -830,8 +872,14 @@ {\setbox0\hbox{\the\everyline}}% \global\linepartrue} -\def\obeyemptylines - {\let\donextemptyverbatimline\doemptyverbatimline} +% \def\obeyemptylines +% {\let\donextemptyverbatimline\doemptyverbatimline} + +\def\obeyemptylines % tricky, only in verbatim (should be token list)! + {\chardef\verbatimemptylinemode\plusone} + +\def\obeyallemptylines % tricky, only in verbatim (should be token list)! + {\chardef\verbatimemptylinemode\plustwo} %D \TEX\ does not offer \type{\everyline}, which is a direct %D result of its advanced multi||pass paragraph typesetting diff --git a/tex/context/base/x-contml.tex b/tex/context/base/x-contml.tex index 9f3fe6fd2..e1dda06c1 100644 --- a/tex/context/base/x-contml.tex +++ b/tex/context/base/x-contml.tex @@ -42,9 +42,18 @@ {\doifsomethingXMLop{name} {\processaction [\XMLop{type}] - [xml=>\readfile{\XMLop{name}}\donothing, + [xml=>\readfile{\XMLop{name}}\donothing\donothing, tex=>{{\disableXML\readfile{\XMLop{name}}\donothing\donothing}}, - txt=>{{\disableXML\typefile{\XMLop{name}}\donothing\donothing}}]}} + txt=>{{\disableXML\typefile{\XMLop{name}}}}]}} + +% or, nicer: +% +% \defineXMLsingular [context:include] [name=unknown,type=txt] +% {\XMLval{include:type}{\XMLop{type}}{}} +% +% \mapXMLvalue {include:type} {xml} {\readfile{\XMLop{name}}\donothing\donothing} +% \mapXMLvalue {include:type} {tex} {{\disableXML\readfile{\XMLop{name}}\donothing\donothing}} +% \mapXMLvalue {include:type} {txt} {{\disableXML\typefile{\XMLop{name}}}} %D \elements {compound} %D diff --git a/tex/context/interface/cont-cz.xml b/tex/context/interface/cont-cz.xml index 548f59f0a..cbc1bb632 100644 --- a/tex/context/interface/cont-cz.xml +++ b/tex/context/interface/cont-cz.xml @@ -864,6 +864,11 @@ + + + + + @@ -6243,6 +6248,9 @@ + + + diff --git a/tex/context/interface/cont-de.xml b/tex/context/interface/cont-de.xml index 9170b8bb7..6d916958c 100644 --- a/tex/context/interface/cont-de.xml +++ b/tex/context/interface/cont-de.xml @@ -864,6 +864,11 @@ + + + + + @@ -6243,6 +6248,9 @@ + + + diff --git a/tex/context/interface/cont-en.xml b/tex/context/interface/cont-en.xml index fe72edfe2..1e12929ec 100644 --- a/tex/context/interface/cont-en.xml +++ b/tex/context/interface/cont-en.xml @@ -864,6 +864,11 @@ + + + + + @@ -6243,6 +6248,9 @@ + + + diff --git a/tex/context/interface/cont-fr.xml b/tex/context/interface/cont-fr.xml index c177fc403..84e9172a2 100644 --- a/tex/context/interface/cont-fr.xml +++ b/tex/context/interface/cont-fr.xml @@ -864,6 +864,11 @@ + + + + + @@ -6243,6 +6248,9 @@ + + + diff --git a/tex/context/interface/cont-it.xml b/tex/context/interface/cont-it.xml index 0ee663431..631277f54 100644 --- a/tex/context/interface/cont-it.xml +++ b/tex/context/interface/cont-it.xml @@ -864,6 +864,11 @@ + + + + + @@ -6243,6 +6248,9 @@ + + + diff --git a/tex/context/interface/cont-nl.xml b/tex/context/interface/cont-nl.xml index 97b03f596..cc7e7d77e 100644 --- a/tex/context/interface/cont-nl.xml +++ b/tex/context/interface/cont-nl.xml @@ -864,6 +864,11 @@ + + + + + @@ -6243,6 +6248,9 @@ + + + diff --git a/tex/context/interface/cont-ro.xml b/tex/context/interface/cont-ro.xml index 39823b0bf..c8f30aa32 100644 --- a/tex/context/interface/cont-ro.xml +++ b/tex/context/interface/cont-ro.xml @@ -864,6 +864,11 @@ + + + + + @@ -6243,6 +6248,9 @@ + + + diff --git a/tex/context/interface/keys-cz.xml b/tex/context/interface/keys-cz.xml index bf799ff95..b0910bb68 100644 --- a/tex/context/interface/keys-cz.xml +++ b/tex/context/interface/keys-cz.xml @@ -1,6 +1,6 @@ - + diff --git a/tex/context/interface/keys-de.xml b/tex/context/interface/keys-de.xml index 68f17ba84..e3bff4c65 100644 --- a/tex/context/interface/keys-de.xml +++ b/tex/context/interface/keys-de.xml @@ -1,6 +1,6 @@ - + diff --git a/tex/context/interface/keys-en.xml b/tex/context/interface/keys-en.xml index bb4f774ef..6d953803a 100644 --- a/tex/context/interface/keys-en.xml +++ b/tex/context/interface/keys-en.xml @@ -1,6 +1,6 @@ - + diff --git a/tex/context/interface/keys-fr.xml b/tex/context/interface/keys-fr.xml index 252c2dcfb..7db7ff4aa 100644 --- a/tex/context/interface/keys-fr.xml +++ b/tex/context/interface/keys-fr.xml @@ -1,6 +1,6 @@ - + diff --git a/tex/context/interface/keys-it.xml b/tex/context/interface/keys-it.xml index 7ad542f75..f2ed3e237 100644 --- a/tex/context/interface/keys-it.xml +++ b/tex/context/interface/keys-it.xml @@ -1,6 +1,6 @@ - + diff --git a/tex/context/interface/keys-nl.xml b/tex/context/interface/keys-nl.xml index a7ce91052..c9ef3ea26 100644 --- a/tex/context/interface/keys-nl.xml +++ b/tex/context/interface/keys-nl.xml @@ -1,6 +1,6 @@ - + diff --git a/tex/context/interface/keys-ro.xml b/tex/context/interface/keys-ro.xml index ee57d0d47..ca6535388 100644 --- a/tex/context/interface/keys-ro.xml +++ b/tex/context/interface/keys-ro.xml @@ -1,6 +1,6 @@ - + -- cgit v1.2.3