diff options
author | Hans Hagen <pragma@wxs.nl> | 2001-03-27 00:00:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2001-03-27 00:00:00 +0200 |
commit | 2a2e86e6c2022e3925e0ee62f5c7b66bbec03338 (patch) | |
tree | e02a419ec09c32da024db4855f46de2b1fa85ead | |
parent | e78478392e9717499b101d0fed642c945c104097 (diff) | |
download | context-2a2e86e6c2022e3925e0ee62f5c7b66bbec03338.tar.gz |
stable 2001.03.27
164 files changed, 14474 insertions, 5542 deletions
diff --git a/context/config/texexec.rme b/context/config/texexec.rme index 1e0f0a3c2..7d216923a 100644 --- a/context/config/texexec.rme +++ b/context/config/texexec.rme @@ -73,11 +73,11 @@ for tetex set UserInterface to en for tetex set TeXExecutable to pdfetex for tetex set TeXVirginFlag to -ini for tetex set TeXPassString to -progname=context -for tetex set TeXBatchString to -int=batchmode -for tetex set MpToTeXExecutable to mptotex +for tetex set TeXBatchFlag to -int=batchmode +for tetex set MpToTeXExecutable to mpto for tetex set MpVirginFlag to -ini for tetex set MpPassString to -progname=mpost -for tetex set MpBatchString to -int=batchmode +for tetex set MpBatchFlag to -int=batchmode % These also apply to fpTeX. @@ -86,11 +86,11 @@ for fptex set UserInterface to en for fptex set TeXExecutable to pdfetex for fptex set TeXVirginFlag to -ini for fptex set TeXPassString to -progname=context -for fptex set TeXBatchString to -int=batchmode -for fptex set MpToTeXExecutable to mptotex +for fptex set TeXBatchFlag to -int=batchmode +for fptex set MpToTeXExecutable to mpto for fptex set MpVirginFlag to -ini for fptex set MpPassString to -progname=mpost -for fptex set MpBatchString to -int=batchmode +for fptex set MpBatchFlag to -int=batchmode % MikTeX users probably have to set up some paths too. @@ -98,11 +98,14 @@ for miktex set UsedInterfaces to en,nl,de,uk for miktex set UserInterface to en for miktex set TeXExecutable to pdftex for miktex set TeXVirginFlag to --initialize -for miktex set TeXBatchString to --interaction=batchmode +for miktex set TeXBatchFlag to --interaction=batchmode for miktex set MpToTeXExecutable to mptotex for miktex set MpVirginFlag to --initialize for miktex set MpPassString to -for miktex set MpBatchString to --interaction=batchmode +for miktex set MpBatchFlag to --interaction=batchmode + +for miktex set TeXFormatFlag to --undump= +for miktex set MpFormatFlag to --undump= % These are the settings used on some machines at PRAGMA ADE that % don't use the texmf tree. They can serve as an example for local diff --git a/context/data/cont-cz.tws b/context/data/cont-cz.tws index 965258bce..a9f53a270 100644 --- a/context/data/cont-cz.tws +++ b/context/data/cont-cz.tws @@ -26,13 +26,13 @@ stopsetup startsetup com:jazyk: typ:val/: -val:nl,fr,en,uk,de,sp,cz,..:nl: +val:nl,fr,en,uk,de,es,cz,..:nl: stopsetup startsetup com:hlavnijazyk: typ:val/: -val:nl,fr,en,uk,de,sp,cz,..:nl: +val:nl,fr,en,uk,de,es,cz,..:nl: stopsetup startsetup @@ -629,14 +629,14 @@ stopsetup startsetup com:nastavtexthlavicky: typ:val/var/: -val:nl,fr,en,uk,de,sp,cz,..:nl: +val:nl,fr,en,uk,de,es,cz,..:nl: var:*jmeno:*text:: stopsetup startsetup com:nastavtextpopisku: typ:val/var/: -val:nl,fr,en,uk,de,sp,cz,..:nl: +val:nl,fr,en,uk,de,es,cz,..:nl: var:*jmeno:*text:: stopsetup @@ -810,6 +810,8 @@ var:levyoffset:*dimenze:: var:pravyoffset:*dimenze:: var:offsetvrsku:*dimenze:: var:offsetspodku:*dimenze:: +var:pred:*prikaz:: +var:po:*prikaz:: var:status:start,stop:: ivr:nastavoramovani:: stopsetup @@ -952,19 +954,19 @@ val:*jmeno,reset:.: stopsetup startsetup -com:ped: +com:nizky: typ:arg/: val:*text:: stopsetup startsetup -com:ap: +com:vysoky: typ:arg/: val:*text:: stopsetup startsetup -com:pedap: +com:nivy: typ:arg/arg/: val:*text:: val:*text:: @@ -1819,7 +1821,7 @@ startsetup com:nastavumistovani: typ:vars/: var:status:start,prekryv:: -var:jednotka:cm,pt,em,mm,ex,sp,in:: +var:jednotka:cm,pt,em,mm,ex,es,in:: var:faktor:*cislo:: var:meritko:*cislo:: var:offset:ano,ne:: @@ -1846,7 +1848,7 @@ var:ykrok:*cislo:: var:offset:ano,ne:: var:faktor:*cislo:: var:meritko:*cislo:: -var:jednotka:cm,pt,em,mm,ex,sp,in:: +var:jednotka:cm,pt,em,mm,ex,es,in:: var:misto:vlevo,nastred:: stopsetup @@ -1869,6 +1871,7 @@ var:vpravo:*prikaz:: var:konverzesouboru:ano,ne,male,velke:: var:oddelovac:*text:: var:autofile:ano,ne,stranka:: +var:globalne:ano,ne:: stopsetup startsetup @@ -2177,7 +2180,7 @@ ivr:nastavvzhled:: stopsetup startsetup -com:mettiloghi: +com:definujlogo: typ:val/val/val/vars/: val:*jmeno:: val:vrsek,zahlavi,upati,spodek:: @@ -2187,7 +2190,7 @@ var:status:start,stop:: stopsetup startsetup -com:definiscicolori: +com:umistiloga: typ:vals/: val:*jmeno:: stopsetup @@ -2683,7 +2686,7 @@ stopsetup startsetup com:nastavzarovnani: typ:val/: -val:sirka,vlevo,vpravo,nastred,uvnitr,vnejsi, siroce,siroky,vyska,spodek,radek,reset:: +val:sirka,vlevo,vpravo,nastred,uvnitr,vnejsi, siroce,siroky,vyska,spodek,radek,reset, visici,nothanging,hyphenated,nothyphenated:: stopsetup startsetup @@ -3256,7 +3259,9 @@ var:ramecky:zap,vyp:: var:ymax:*cislo:: var:xmax:*cislo:: var:adresar:*text:: -var:misto:lokalne,globalne:: +var:misto:lokalne,globalne,implicitni:: +var:maxsirka:*dimenze:: +var:maxvyska:*dimenze:: stopsetup startsetup @@ -3427,7 +3432,7 @@ var:mezi:*prikaz:: var:vlevo:*prikaz:: var:vpravo:*prikaz:: var:stredni:*prikaz:: -var:status:start,stop,zadny:: +var:status:start,stop,zadny,lokalne:: var:pismeno:normalni,tucne,sklonene,tucnesklonene,opis,kap,male...*prikaz:: var:barva:*jmeno:: var:vzdalenost:prekryv,*dimenze:: @@ -3582,13 +3587,13 @@ val:*jmeno:: stopsetup startsetup -com:segnalibro: +com:umistizalozky: typ:vals/vals/: val:*jmeno:: stopsetup startsetup -com:definiscilogo: +com:zalozka: typ:val/arg/: val:*jmeno:: stopsetup diff --git a/context/data/cont-de.tws b/context/data/cont-de.tws index 451988498..ecefb0f2d 100644 --- a/context/data/cont-de.tws +++ b/context/data/cont-de.tws @@ -26,13 +26,13 @@ stopsetup startsetup com:sprache: typ:val/: -val:nl,fr,en,uk,de,sp,cz,..:nl: +val:nl,fr,en,uk,de,es,cz,..:nl: stopsetup startsetup com:hauptsprache: typ:val/: -val:nl,fr,en,uk,de,sp,cz,..:nl: +val:nl,fr,en,uk,de,es,cz,..:nl: stopsetup startsetup @@ -629,14 +629,14 @@ stopsetup startsetup com:stelleueberschrifttextein: typ:val/var/: -val:nl,fr,en,uk,de,sp,cz,..:nl: +val:nl,fr,en,uk,de,es,cz,..:nl: var:*Name:*Text:: stopsetup startsetup com:stellelabeltextein: typ:val/var/: -val:nl,fr,en,uk,de,sp,cz,..:nl: +val:nl,fr,en,uk,de,es,cz,..:nl: var:*Name:*Text:: stopsetup @@ -810,6 +810,8 @@ var:linkeroffset:*Dimension:: var:rechterabstand:*Dimension:: var:obenoffset:*Dimension:: var:untenoffset:*Dimension:: +var:vor:*Befehl:: +var:nach:*Befehl:: var:status:start,stop:: ivr:stelleumrahmtein:: stopsetup @@ -1819,7 +1821,7 @@ startsetup com:stellepositionierenein: typ:vars/: var:status:start,overlay:: -var:einheit:cm,pt,em,mm,ex,sp,in:: +var:einheit:cm,pt,em,mm,ex,es,in:: var:faktor:*Nummer:: var:format:*Nummer:: var:offset:ja,nein:: @@ -1846,7 +1848,7 @@ var:yschritt:*Nummer:: var:offset:ja,nein:: var:faktor:*Nummer:: var:format:*Nummer:: -var:einheit:cm,pt,em,mm,ex,sp,in:: +var:einheit:cm,pt,em,mm,ex,es,in:: var:platz:links,mittig:: stopsetup @@ -1869,6 +1871,7 @@ var:rechts:*Befehl:: var:konvertieredatei:ja,nein,klein,gross:: var:seperator:*Text:: var:autofile:ja,nein,seite:: +var:global:ja,nein:: stopsetup startsetup @@ -2177,7 +2180,7 @@ ivr:stellelayoutein:: stopsetup startsetup -com:definujlogo: +com:definierelogo: typ:val/val/val/vars/: val:*Name:: val:oben,kopfzeile,fusszeile,unten:: @@ -2187,7 +2190,7 @@ var:status:start,stop:: stopsetup startsetup -com:umistiloga: +com:platzierelogo: typ:vals/: val:*Name:: stopsetup @@ -2683,7 +2686,7 @@ stopsetup startsetup com:stelleausrichtungein: typ:val/: -val:breite,links,rechts,mittig,innen,aussen, breit,breit,hoehe,unten,zeile,zuruecksetzten:: +val:breite,links,rechts,mittig,innen,aussen, breit,breit,hoehe,unten,zeile,zuruecksetzten, haengend,nothanging,hyphenate,nothyphenated:: stopsetup startsetup @@ -3256,7 +3259,9 @@ var:umrahmen:an,aus:: var:ymax:*Nummer:: var:xmax:*Nummer:: var:verzeichnis:*Text:: -var:platz:lokal,global:: +var:platz:lokal,global,default:: +var:maxbreite:*Dimension:: +var:maxhoehe:*Dimension:: stopsetup startsetup @@ -3427,7 +3432,7 @@ var:zwischen:*Befehl:: var:links:*Befehl:: var:rechts:*Befehl:: var:mittig:*Befehl:: -var:status:start,stop,kein:: +var:status:start,stop,kein,lokal:: var:stil:normal,fett,geneigt,fettgeneigt,tippen,kap,klein...*Befehl:: var:farbe:*Name:: var:abstand:overlay,*Dimension:: @@ -3582,13 +3587,13 @@ val:*Name:: stopsetup startsetup -com:umistizalozky: +com:platzierebookmarks: typ:vals/vals/: val:*Name:: stopsetup startsetup -com:zalozka: +com:bookmark: typ:val/arg/: val:*Name:: stopsetup diff --git a/context/data/cont-en.tws b/context/data/cont-en.tws index 910d9c6a2..d62b29818 100644 --- a/context/data/cont-en.tws +++ b/context/data/cont-en.tws @@ -26,13 +26,13 @@ stopsetup startsetup com:language: typ:val/: -val:nl,fr,en,uk,de,sp,cz,..:nl: +val:nl,fr,en,uk,de,es,cz,..:nl: stopsetup startsetup com:mainlanguage: typ:val/: -val:nl,fr,en,uk,de,sp,cz,..:nl: +val:nl,fr,en,uk,de,es,cz,..:nl: stopsetup startsetup @@ -629,14 +629,14 @@ stopsetup startsetup com:setupheadtext: typ:val/var/: -val:nl,fr,en,uk,de,sp,cz,..:nl: +val:nl,fr,en,uk,de,es,cz,..:nl: var:*name:*text:: stopsetup startsetup com:setuplabeltext: typ:val/var/: -val:nl,fr,en,uk,de,sp,cz,..:nl: +val:nl,fr,en,uk,de,es,cz,..:nl: var:*name:*text:: stopsetup @@ -810,6 +810,8 @@ var:leftoffset:*dimension:: var:rightoffset:*dimension:: var:topoffset:*dimension:: var:bottomoffset:*dimension:: +var:before:*command:: +var:after:*command:: var:state:start,stop:: ivr:setupframed:: stopsetup @@ -1819,7 +1821,7 @@ startsetup com:setuppositioning: typ:vars/: var:state:start,overlay:: -var:unit:cm,pt,em,mm,ex,sp,in:: +var:unit:cm,pt,em,mm,ex,es,in:: var:factor:*number:: var:scale:*number:: var:offset:yes,no:: @@ -1846,7 +1848,7 @@ var:ystep:*number:: var:offset:yes,no:: var:factor:*number:: var:scale:*number:: -var:unit:cm,pt,em,mm,ex,sp,in:: +var:unit:cm,pt,em,mm,ex,es,in:: var:location:left,middle:: stopsetup @@ -1869,6 +1871,7 @@ var:right:*command:: var:convertfile:yes,no,small,big:: var:separator:*text:: var:autofile:yes,no,page:: +var:global:yes,no:: stopsetup startsetup @@ -2683,7 +2686,7 @@ stopsetup startsetup com:setupalign: typ:val/: -val:width,left,right,middle,inner,outer, wide,broad,height,bottom,line,reset:: +val:width,left,right,middle,inner,outer, wide,broad,height,bottom,line,reset, hanging,nothanging,hyphenated,nothyphenated:: stopsetup startsetup @@ -3256,7 +3259,9 @@ var:frames:on,off:: var:ymax:*number:: var:xmax:*number:: var:directory:*text:: -var:location:local,global:: +var:location:local,global,default:: +var:maxwidth:*dimension:: +var:maxheight:*dimension:: stopsetup startsetup @@ -3427,7 +3432,7 @@ var:inbetween:*command:: var:left:*command:: var:right:*command:: var:middle:*command:: -var:state:start,stop,none:: +var:state:start,stop,none,local:: var:style:normal,bold,slanted,boldslanted,type,cap,small...*command:: var:color:*name:: var:distance:overlay,*dimension:: diff --git a/context/data/cont-nl.tws b/context/data/cont-nl.tws index f024cd8ec..f64e56bfb 100644 --- a/context/data/cont-nl.tws +++ b/context/data/cont-nl.tws @@ -26,13 +26,13 @@ stopsetup startsetup com:taal: typ:val/: -val:nl,fr,en,uk,de,sp,cz,..:nl: +val:nl,fr,en,uk,de,es,cz,..:nl: stopsetup startsetup com:hoofdtaal: typ:val/: -val:nl,fr,en,uk,de,sp,cz,..:nl: +val:nl,fr,en,uk,de,es,cz,..:nl: stopsetup startsetup @@ -629,14 +629,14 @@ stopsetup startsetup com:stelkoptekstin: typ:val/var/: -val:nl,fr,en,uk,de,sp,cz,..:nl: +val:nl,fr,en,uk,de,es,cz,..:nl: var:*naam:*tekst:: stopsetup startsetup com:stellabeltekstin: typ:val/var/: -val:nl,fr,en,uk,de,sp,cz,..:nl: +val:nl,fr,en,uk,de,es,cz,..:nl: var:*naam:*tekst:: stopsetup @@ -810,6 +810,8 @@ var:linkeroffset:*maat:: var:rechteroffset:*maat:: var:bovenoffset:*maat:: var:onderoffset:*maat:: +var:voor:*commando:: +var:na:*commando:: var:status:start,stop:: ivr:stelomlijndin:: stopsetup @@ -1819,7 +1821,7 @@ startsetup com:stelpositionerenin: typ:vars/: var:status:start,overlay:: -var:eenheid:cm,pt,em,mm,ex,sp,in:: +var:eenheid:cm,pt,em,mm,ex,es,in:: var:factor:*getal:: var:schaal:*getal:: var:offset:ja,nee:: @@ -1846,7 +1848,7 @@ var:ystap:*getal:: var:offset:ja,nee:: var:factor:*getal:: var:schaal:*getal:: -var:eenheid:cm,pt,em,mm,ex,sp,in:: +var:eenheid:cm,pt,em,mm,ex,es,in:: var:plaats:links,midden:: stopsetup @@ -1869,6 +1871,7 @@ var:rechts:*commando:: var:converteerfile:ja,nee,klein,groot:: var:scheider:*tekst:: var:autofile:ja,nee,pagina:: +var:globaal:ja,nee:: stopsetup startsetup @@ -2683,7 +2686,7 @@ stopsetup startsetup com:steluitlijnenin: typ:val/: -val:breedte,links,rechts,midden,binnen,buiten, breed,ruim,hoogte,onder,regel,reset:: +val:breedte,links,rechts,midden,binnen,buiten, breed,ruim,hoogte,onder,regel,reset, hangend,niethangend,afgebroken,afgebroken:: stopsetup startsetup @@ -3256,7 +3259,9 @@ var:hokjes:aan,uit:: var:ymax:*getal:: var:xmax:*getal:: var:gebied:*tekst:: -var:plaats:lokaal,globaal:: +var:plaats:lokaal,globaal,default:: +var:maxbreedte:*maat:: +var:maxhoogte:*maat:: stopsetup startsetup @@ -3427,7 +3432,7 @@ var:tussen:*commando:: var:links:*commando:: var:rechts:*commando:: var:midden:*commando:: -var:status:start,stop,geen:: +var:status:start,stop,geen,lokaal:: var:letter:normaal,vet,schuin,vetschuin,type,kap,klein...*commando:: var:kleur:*naam:: var:afstand:overlay,*maat:: diff --git a/context/perltk/makempy.pl b/context/perltk/makempy.pl new file mode 100644 index 000000000..49b1f9cb3 --- /dev/null +++ b/context/perltk/makempy.pl @@ -0,0 +1,355 @@ +eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' && eval 'exec perl -S $0 $argv:q' + if 0; + +#D \module +#D [ file=makempy.pl, +#D version=2000.12.14, +#D title=\METAFUN, +#D subtitle=\METAPOST\ Text Graphics, +#D author=Hans Hagen, +#D date=\currentdate, +#D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +#C +#C This module is part of the \CONTEXT\ macro||package and is +#C therefore copyrighted by \PRAGMA. See licen-en.pdf for +#C details. + +# Tobias Burnus provided the code needed to proper testing +# of binaries on UNIX as well as did some usefull suggestions +# to imnprove the functionality. + +# This script uses GhostScript and PStoEdit as well as +# pdfTeX, and if requested TeXEdit and ConTeXt. + +use Getopt::Long ; +use Config ; +use strict ; + +$Getopt::Long::passthrough = 1 ; # no error message +$Getopt::Long::autoabbrev = 1 ; # partial switch accepted + +my $help = 0 ; +my $silent = 0 ; +my $force = 0 ; +my $noclean = 0 ; + +my $amethod = my $pmethod = my $gmethod = 0 ; + +my $format = "plain" ; # can be "context" for plain users too + +&GetOptions + ( "help" => \$help , + "silent" => \$silent , + "force" => \$force , + "pdftops" => \$pmethod , + "xpdf" => \$pmethod , + "acrobat" => \$amethod , + "reader" => \$amethod , + "gs" => \$gmethod , + "ghostscript" => \$gmethod , + "noclean" => \$noclean ) ; + +my $mpochecksum = 0 ; + +my %tex ; my %start ; my %stop ; + +$tex{plain} = "pdftex" ; +$tex{latex} = "pdflatex" ; +$tex{context} = "texexec --batch --once --interface=en --pdf" ; + +$start{plain} = '' ; +$stop{plain} = '\end' ; + +$start{latex} = '\begin{document}' ; +$stop{latex} = '\end{document}' ; + +$start{context} = '\starttext' ; +$stop{context} = '\stoptext' ; + +my $ghostscript = "" ; +my $pstoedit = "" ; +my $pdftops = "" ; +my $acroread = "" ; + +my $wereondos = ($Config{'osname'} =~ /dos|win/io) ; + +# Unix only: assume that "gs" in the path. We could also +# use $ghostscipt = system "which gs" but this would require +# that which is installedd on the system. + +sub checkenv + { my ($var, $env) = @_ ; + if ($var) + { return $var } + elsif ($ENV{$env}) + { return $ENV{$env} } + else + { return $var } } + +$ghostscript = checkenv ($ghostscript, "GS_PROG" ) ; +$ghostscript = checkenv ($ghostscript, "GS" ) ; +$pstoedit = checkenv ($pstoedit , "PSTOEDIT") ; +$pdftops = checkenv ($pdftops , "PDFTOPS" ) ; +$acroread = checkenv ($acroread , "ACROREAD") ; + +sub setenv + { my ($var, $unix, $win) = @_ ; + if ($var) + { return $var } + elsif ($wereondos) + { return $win } + else + { return $unix } } + +$ghostscript = setenv($ghostscript, "gs" , "gswin32c") ; +$pstoedit = setenv($pstoedit , "pstoedit", "pstoedit") ; +$pdftops = setenv($pdftops , "pdftops" , "pdftops" ) ; +$acroread = setenv($acroread , "acroread", "" ) ; + +# Force a method if unknown. + +unless ($pmethod||$amethod||$gmethod) + { if ($wereondos) { $pmethod = 1 } else { $amethod = 1 } } + +# Set the error redirection used under Unix: +# stderr -> stdout + +my $logredirection = '>>' ; + +# This unfortunally doen't work with the ksh and simple sh +# +# if (!$wereondos) +# { $logredirection = '2>&1 >>' ; # Bash +# $logredirection = '>>&' ; # tcsh, Bash +# default $logredirection. } + +# Some TeX Code Snippets. + +my $macros = ' + +% auxiliary macros + +\input supp-mis.tex + +\def\startTEXpage[scale=#1]% + {\output{} + \batchmode + \pdfoutput=1 + \pdfcompresslevel=9 + \hoffset=-1in + \voffset=\hoffset + \scratchcounter=#1 + \divide\scratchcounter1000 + \edef\TEXscale{\the\scratchcounter\space} + \forgetall + \setbox0=\vbox\bgroup} + +\def\stopTEXpage + {\egroup + \dimen0=\ht0 \advance\dimen0 \dp0 + \setbox2=\vbox to 10\dimen0 + {\pdfliteral{\TEXscale 0 0 \TEXscale 0 0 cm} + \copy0 + \pdfliteral{1 0 0 1 0 0 cm} + \vfill} + \wd2=10\wd0 + \pdfpageheight=\ht2 + \pdfpagewidth=\wd2 + \ScaledPointsToBigPoints{\number\pdfpageheight}\pdfcropheight + \ScaledPointsToBigPoints{\number\pdfpagewidth }\pdfcropwidth + \expanded{\pdfpageattr{/CropBox [0 0 \pdfcropwidth \space \pdfcropheight]}} + \shipout\hbox{\box2}} + +% end of auxiliary macros' ; + +sub report + { return if $silent ; + my $str = shift ; + if ($str =~ /(.*?)\s+([\:\/])\s+(.*)/o) + { if ($1 eq "") { $str = " " } else { $str = $2 } + print sprintf("%22s $str %s\n",$1,$3) } } + +sub error + { report("processing aborted : " . shift) ; + exit } + +sub process + { report("generating : " . shift) } + +sub banner + { return if $silent ; + print "\n" ; + report ("MakeMPY 1.1 - MetaFun / PRAGMA ADE 2000-2001") ; + print "\n" } + +my $metfile = "" ; # main metapost file +my $mpofile = "" ; # metapost text specifiation file (provided) +my $mpyfile = "" ; # metapost text picture file (generated) +my $texfile = "" ; # temporary tex file +my $pdffile = "" ; # temporary pdf file +my $tmpfile = "" ; # temporary metapost file +my $posfile = "" ; # temporary postscript file +my $logfile = "" ; # temporary log file +my $errfile = "" ; # final log file (with suffix log) + +sub show_help_info + { banner ; + report ("--help : this message" ) ; + report ("--noclean : don't remove temporary files" ) ; + report ("--force : force processing (ignore checksum)" ) ; + report ("--silent : don't show messages" ) ; + print "\n" ; + report ("--acrobat : use acrobat (reader) for ps->pdf (on unix)") ; + report ("--pdftops : use pdftops (xpdf) ps->pdf") ; + report ("--ghostscript : use ghostscript (gs) for ps->pdf") ; + print "\n" ; + report ("input file : metapost file with graphics") ; + report ("programs needed : texexec and english context") ; + report (" : pdftops from the xpdf suite, or") ; # page size buggy + report (" : pdf2ps and ghostscript, or") ; + report (" : acrobat reader for unix, and") ; + report (" : pstoedit and ghostscript") ; + report ("output file : metapost file with pictures") ; + exit } + +sub check_input_file + { my $file = $ARGV[0] ; + if ((!defined($file))||($file eq "")) + { banner ; error("no filename given") } + else + { $file =~ s/\.mp.*$//o ; + $metfile = "$file.mp" ; + $mpofile = "$file.mpo" ; + $mpyfile = "$file.mpy" ; + $logfile = "$file.log" ; + $texfile = "mpy-$file.tex" ; + $pdffile = "mpy-$file.pdf" ; + $posfile = "mpy-$file.pos" ; + $tmpfile = "mpy-$file.tmp" ; + $errfile = "mpy-$file.log" ; + if (! -f $metfile) + { banner ; error("$metfile is empty") } + elsif (-s $mpofile < 32) + { unlink $mpofile ; # may exist with zero length + unlink $mpyfile ; # get rid of left overs + exit } + else + { banner ; report("processing file : $mpofile") } } } + +sub verify_check_sum # checksum calculation from perl documentation + { return unless (open (MPO,"$mpofile")) ; + $mpochecksum = do { local $/ ; unpack("%32C*",<MPO>) % 65535 } ; + close (MPO) ; + return unless open (MPY,"$mpyfile") ; + my $str = <MPY> ; chomp $str ; + close (MPY) ; + if ($str =~ /^\%\s*mpochecksum\s*\:\s*(\d+)/o) + { if ($mpochecksum eq $1) + { report("mpo checksum : $mpochecksum / unchanged") ; + exit unless $force } + else + { report("mpo checksum : $mpochecksum / changed") } } } + +sub cleanup_files + { my @files = <mpy-*.*> ; + foreach (@files) { unless (/\.log/o) { unlink $_ } } } + +sub construct_tex_file + { my $n = 0 ; + unless (open (MPO, "<$mpofile")) + { error("unable to open $mpofile") } + unless (open (TEX, ">$texfile")) + { error("unable to open $texfile") } + my $textext = "" ; + while (<MPO>) + { s/\s*$//mois ; + if (/\%\s*format=(\w+)/) + { $format = $1 } + else # if (!/^\%/) + { if (/startTEXpage/o) + { ++$n ; + $textext .= "$start{$format}\n" ; + $start{$format} = "" } + $textext .= "$_\n" } } + unless (defined($tex{$format})) { $format = "plain" } + if ($format eq "context") { $macros = "" } + # print TEX "$start{$format}\n$macros\n$textext\n$stop{$format}\n" ; + print TEX "$start{$format}\n" if $start{$format} ; + print TEX "$macros\n" if $macros ; + print TEX "$textext\n" if $textext ; + print TEX "$stop{$format}\n" if $stop{$format} ; + close (MPO) ; + close (TEX) ; + report("tex format : $format") ; + report("requested texts : $n") } + +sub construct_mpy_file + { unless (open (TMP, "<$tmpfile")) + { error("unable to open $tmpfile file") } + unless (open (MPY, ">$mpyfile")) + { error("unable to open $mpyfile file") } + print MPY "% mpochecksum : $mpochecksum\n" ; + my $copying = my $n = 0 ; + while (<TMP>) + { if (s/beginfig/begingraphictextfig/o) + { print MPY $_ ; $copying = 1 ; ++$n } + elsif (s/endfig/endgraphictextfig/o) + { print MPY $_ ; $copying = 0 } + elsif ($copying) + { print MPY $_ } } + close (TMP) ; + close (MPY) ; + report("processed texts : $n") ; + report("produced file : $mpyfile") } + +sub run + { my ($resultfile, $program,$arguments) = @_ ; + my $result = system("$program $arguments $logredirection $logfile") ; + unless (-f $resultfile) { error("invalid `$program' run") } } + +sub make_pdf_pages + { process ("pdf file") ; + run ($pdffile, "$tex{$format}", "$texfile") } + +sub make_mp_figures + { process ("postscript file") ; + if ($pmethod) { run($posfile, "$pdftops", + "-paperw 10000 -paperh 10000 $pdffile $posfile") } + if ($gmethod) { run($posfile, "$ghostscript", + "-q -sOutputFile=$posfile -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pswrite $pdffile") } + if ($amethod) { run($posfile, "$acroread", + "-toPostScript -pairs $pdffile $posfile") } } + +sub make_mp_pictures + { process ("metapost file") ; + run ($tmpfile, "$pstoedit", "-ssp -dt -f mpost $posfile $tmpfile") } + +if ($help) { show_help_info } + +check_input_file ; +verify_check_sum ; +cleanup_files ; +construct_tex_file ; +make_pdf_pages ; +make_mp_figures ; +make_mp_pictures ; +construct_mpy_file ; # less save : rename $tmpfile, $mpyfile ; +unless ($noclean) { cleanup_files } + +# a simple test file (needs context) +# +# % output=pdftex +# +# \starttext +# +# \startMPpage +# graphictext +# "\bf MAKE" +# scaled 8 +# zscaled (1,2) +# withdrawcolor \MPcolor{blue} +# withfillcolor \MPcolor{gray} +# withpen pencircle scaled 5pt ; +# \stopMPpage +# +# \stoptext diff --git a/context/perltk/mptopdf.pl b/context/perltk/mptopdf.pl index 48b43f655..5e9e5b093 100644 --- a/context/perltk/mptopdf.pl +++ b/context/perltk/mptopdf.pl @@ -15,14 +15,31 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' && eval 'exec perl -S $0 $ #C therefore copyrighted by \PRAGMA. See licen-en.pdf for #C details. +# use File::Copy ; # not in every perl + $program = "MPtoPDF 1.0" ; $pattern = $ARGV[0] ; $done = 0 ; $report = '' ; +sub CopyFile # agressive copy, works for open files like in gs + { my ($From,$To) = @_ ; + return unless open(INP,"<$From") ; binmode INP ; + return unless open(OUT,">$To") ; binmode OUT ; + while (<INP>) { print OUT $_ } + close (INP) ; + close (OUT) } + if (($pattern eq '')||($pattern =~ /^\-+(h|help)$/io)) { print "\n$program: provide MP output file (or pattern)\n" ; exit } +elsif ($pattern =~ /\.mp$/io) + { $error = system ("texexec --mptex $pattern") ; + if ($error) + { print "\n$program: error while processing mp file\n" ; exit } + else + { $pattern =~ s/\.mp$//io ; + @files = glob "$pattern.*" } } elsif (-e $pattern) { @files = ($pattern) } elsif ($pattern =~ /.\../o) @@ -36,6 +53,7 @@ foreach $file (@files) if (s/\.(\d+)$// && -e $file) { system ("pdftex \&mptopdf \\relax $file") ; rename ("$_.pdf", "$_-$1.pdf") ; + if (-e "$_.pdf") { CopyFile ("$_.pdf", "$_-$1.pdf") } if ($done) { $report .= " +" } $report .= " $_-$1.pdf" ; ++$done } } diff --git a/context/perltk/texexec.pl b/context/perltk/texexec.pl index 0f47a5089..96675fb6d 100644 --- a/context/perltk/texexec.pl +++ b/context/perltk/texexec.pl @@ -1,6 +1,8 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' && eval 'exec perl -S $0 $argv:q' if 0; +# todo: second run of checksum of mp file with --nomprun changes + #D \module #D [ file=texexec.pl, #D version=2000.03.25, @@ -23,7 +25,7 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' && eval 'exec perl -S $0 $ #D {#!/usr/bin/perl}. use Cwd ; -use Time::Local ; +use Time::Local ; # needed ? use Config ; use Getopt::Long ; @@ -70,7 +72,8 @@ my $Convert = '' ; my $DoMPTeX = 0 ; my $DoMPXTeX = 0 ; my $EnterBatchMode = 0 ; -my $Environment = '' ; +my $Environments = '' ; +my $Modules = '' ; my $FastMode = 0 ; my $FinalMode = 0 ; my $Format = '' ; @@ -78,7 +81,7 @@ my $MpDoFormat = '' ; my $HelpAsked = 0 ; my $MainBodyFont = 'standard' ; my $MainLanguage = 'standard' ; -my $MainResponse = 'standard' ; +my $MainResponse = 'standard' ; my $MakeFormats = 0 ; my $Markings = 0 ; my $Mode = '' ; @@ -98,6 +101,7 @@ my $PdfSelect = 0 ; my $PdfCombine = 0 ; my $PrintFormat = 'standard' ; my $ProducePdf = 0 ; +my $Input = "" ; my $Result = 0 ; my $Suffix = '' ; my $RunOnce = 0 ; @@ -115,6 +119,9 @@ my $UseColor = 0 ; my $Verbose = 0 ; my $PdfCopy = 0 ; my $LogFile = "" ; +my $MpyForce = 0 ; +my $RunPath = "" ; +my $Arguments = "" ; &GetOptions ( "arrange" => \$Arrange , @@ -122,7 +129,9 @@ my $LogFile = "" ; "color" => \$UseColor , "centerpage" => \$CenterPage , "convert=s" => \$Convert , - "environment=s" => \$Environment , + "environments=s"=> \$Environments , + "usemodules=s" => \$Modules , + "xmlfilters=s" => \$Filters , "fast" => \$FastMode , "final" => \$FinalMode , "format=s" => \$Format , @@ -131,7 +140,8 @@ my $LogFile = "" ; "interface=s" => \$ConTeXtInterface , "language=s" => \$MainLanguage , "bodyfont=s" => \$MainBodyFont , - "response=s" => \$MainResponse , + "results=s" => \$Result , + "response=s" => \$MainResponse , "make" => \$MakeFormats , "mode=s" => \$Mode , "module" => \$TypesetModule , @@ -147,6 +157,7 @@ my $LogFile = "" ; "pages=s" => \$Pages , "paper=s" => \$PaperFormat , "passon=s" => \$PassOn , + "path=s" => \$RunPath , "pdf" => \$ProducePdf , "pdfarrange" => \$PdfArrange , "pdfselect" => \$PdfSelect , @@ -165,7 +176,6 @@ my $LogFile = "" ; "background=s" => \$Background , "logfile=s" => \$LogFile , "print=s" => \$PrintFormat , - "results=s" => \$Result , "suffix=s" => \$Suffix , "runs=s" => \$NOfRuns , "silent" => \$SilentMode , @@ -173,7 +183,10 @@ my $LogFile = "" ; "verbose" => \$Verbose , "alone" => \$Alone , "optimize" => \$Optimize , - "texutil" => \$ForceTeXutil ) ; + "texutil" => \$ForceTeXutil , + "mpyforce" => \$MpyForce , + "input=s" => \$Input , + "arguments=s" => \$Arguments ) ; $SIG{INT} = "IGNORE" ; @@ -199,7 +212,7 @@ if (($LogFile ne '')&&($LogFile =~ /\w+\.log$/io)) *STDOUT = *LOGFILE ; *STDERR = *LOGFILE } -my $Program = " TeXExec 2.3 - ConTeXt / PRAGMA ADE 1997-2000" ; +my $Program = " TeXExec 2.5 - ConTeXt / PRAGMA ADE 1997-2001" ; print "\n$Program\n\n"; @@ -250,13 +263,19 @@ else my $kpsewhich = '' ; +sub found_ini_file + { my $suffix = shift ; + my $IniPath = `$kpsewhich --format="other text files" -progname=context texexec.$suffix` ; + chomp($IniPath) ; + return $IniPath } + if ($IniPath eq '') { foreach (@paths) { my $p = checked_path($_) . 'kpsewhich' ; if ((-e $p)||(-e $p . '.exe')) { $kpsewhich = $p ; - $IniPath = `$kpsewhich --format="other text files" -progname=context texexec.ini` ; - chomp($IniPath) ; + $IniPath = found_ini_file("ini") ; + unless (-e $IniPath) { $IniPath = found_ini_file("rme") } last } } if ($Verbose) { if ($kpsewhich eq '') @@ -264,7 +283,10 @@ if ($IniPath eq '') elsif ($IniPath eq '') { print " locating ini file : not found by kpsewhich\n" } else - { print " locating ini file : found by kpsewhich\n" } } } + { if ($IniFile =~ /rme/oi) + { print " locating ini file : not found by kpsewhich, using '.rme' file\n" } + else + { print " locating ini file : found by kpsewhich\n" } } } } #D Now, when we didn't find the \type {kpsewhich}, we have #D to revert to some other method. We could have said: @@ -279,6 +301,7 @@ if ($IniPath eq '') #D decided to copy the code of \type {texpath} into this file. use File::Find ; +# use File::Copy ; no standard in perl my ($ReportPath, $ReportName, $ReportFile) = (0,0,1) ; my ($FileToLocate, $PathToStartOn) = ('','') ; @@ -500,35 +523,39 @@ $OutputFormats{dvipsone} = "dvipsone" ; $OutputFormats{acrobat} = "acrobat" ; $OutputFormats{dviwindo} = "dviwindo" ; $OutputFormats{dviview} = "dviview" ; +$OutputFormats{dvipdfm} = "dvipdfm" ; -my @ConTeXtFormats = ("nl", "en", "de", "cz", "uk", "it") ; +my @ConTeXtFormats = ("nl", "en", "de", "cz", "uk", "it", "ro") ; -sub SetInterfaces - { my ($short,$long,$full) = @_ ; - $ConTeXtInterfaces{$short} = $short ; - $ConTeXtInterfaces{$long} = $short ; - $ResponseInterface{$short} = $full ; +sub SetInterfaces + { my ($short,$long,$full) = @_ ; + $ConTeXtInterfaces{$short} = $short ; + $ConTeXtInterfaces{$long} = $short ; + $ResponseInterface{$short} = $full ; $ResponseInterface{$long} = $full } #SetInterfaces ( "en" , "unknown" , "english" ) ; -SetInterfaces ( "nl" , "dutch" , "dutch" ) ; +SetInterfaces ( "nl" , "dutch" , "dutch" ) ; SetInterfaces ( "en" , "english" , "english" ) ; SetInterfaces ( "de" , "german" , "german" ) ; SetInterfaces ( "cz" , "czech" , "czech" ) ; SetInterfaces ( "uk" , "brittish" , "english" ) ; SetInterfaces ( "it" , "italian" , "italian" ) ; SetInterfaces ( "no" , "norwegian" , "norwegian" ) ; +SetInterfaces ( "ro" , "romanian" , "romanian" ) ; SetInterfaces ( "xx" , "experimental" , "english" ) ; $Help{ARRANGE} = " --arrange process and arrange\n" ; $Help{BATCH} = " --batch run in batch mode (don't pause)\n" ; $Help{CENTERPAGE} = " --centerpage center the page on the paper\n" ; $Help{COLOR} = " --color enable color (when not yet enabled)\n" ; -$Help{CONVERT} = " --convert converts file first\n" ; -$Help{convert} = -$Help{CONVERT} . " =xml : XML => TeX\n" - . " =sgml : SGML => TeX\n" ; +$Help{USEMODULE} = " --usemodule load some modules first\n" ; +$Help{usemodule} = +$Help{USEMODULE} . " =name : list of modules\n" ; +$Help{XMLFILTER} = " --xmlfilter apply XML filter\n" ; +$Help{xmlfilter} = +$Help{XMLFILTER} . " =name : list of filters\n" ; $Help{ENVIRONMENT} = " --environment load some environments first\n" ; $Help{environment} = $Help{ENVIRONMENT} . " =name : list of environments\n" ; @@ -552,7 +579,7 @@ $Help{INTERFACE} . " =en : English\n" . " =nl : Dutch\n" . " =de : German\n" . " =cz : Czech\n" - . " =uk : Brittish\n" + . " =uk : Brittish\n" . " =it : Italian\n" ; $Help{LANGUAGE} = " --language main hyphenation language \n" ; $Help{language} = @@ -585,7 +612,8 @@ $Help{OUTPUT} . " =pdftex\n" . " =dvips\n" . " =dvipsone\n" . " =dviwindo\n" - . " =dviview\n" ; + . " =dviview\n" + . " =dvipdfm\n" ; $Help{PASSON} = ' --passon switches to pass to TeX ("--src" for MikTeX)' . "\n" ; $Help{PAGES} = " --pages pages to output\n" ; $Help{pages} = @@ -596,6 +624,9 @@ $Help{PAPER} = " --paper paper input and output format\n" $Help{paper} = $Help{PAPER} . " =a4a3 : A4 printed on A3\n" . " =a5a4 : A5 printed on A4\n" ; +$Help{PATH} = " --path document source path\n" ; +$Help{path} = +$Help{PATH} . " =string : path\n" ; $Help{PDF} = " --pdf produce PDF directly using pdf(e)tex\n" ; $Help{PDFARRANGE} = " --pdfarrange arrange pdf pages\n" ; $Help{pdfarrange} = @@ -639,6 +670,9 @@ $Help{PRINT} . " =up : 2 pages per sheet doubl $Help{RESULT} = " --result resulting file \n" ; $Help{result} = $Help{RESULT} . " =name : filename \n" ; +$Help{INPUT} = " --input input file (if used)\n" ; +$Help{input} = +$Help{INPUT} . " =name : filename \n" ; $Help{SUFFIX} = " --suffix resulting file suffix\n" ; $Help{suffix} = $Help{SUFFIX} . " =string : suffix \n" ; @@ -663,7 +697,10 @@ if ($HelpAsked) print $Help{BATCH} ; print $Help{CENTERPAGE} ; print $Help{COLOR} ; - print $Help{CONVERT} ; +# print $Help{CONVERT} ; + print $Help{INPUT} ; + print $Help{USEMODULE} ; + print $Help{XMLFILTER} ; print $Help{ENVIRONMENT} ; print $Help{FAST} ; print $Help{FIGURES} ; @@ -685,6 +722,7 @@ if ($HelpAsked) print $Help{PAGES} ; print $Help{PAPER} ; print $Help{PASSON} ; + print $Help{PATH} ; print $Help{PDFARRANGE} ; print $Help{PDFCOMBINE} ; print $Help{PDFCOPY} ; @@ -761,14 +799,16 @@ sub MakeOptionFile { print OPT "\\setupsystem[file=$Result]\n" } elsif ($Suffix) { print OPT "\\setupsystem[file=$JobName$Suffix]\n" } + if ($RunPath ne "") + { $RunPath =~ s/\\/\//go ; print OPT "\\usepath[$RunPath]\n" } $MainLanguage = lc $MainLanguage ; unless ($MainLanguage eq "standard") { print OPT "\\setuplanguage[$MainLanguage]\n" } -# can best become : \use...[mik] / [web] -if ($TeXShell eq (MikTeX)) - { print OPT "\\def\\MPOSTbatchswitch \{$MpBatchString\}" ; - print OPT "\\def\\MPOSTformatswitch\{$MpPassString $MpFormatFlag\}" } -# + # can best become : \use...[mik] / [web] + if ($TeXShell eq (MikTeX)) + { print OPT "\\def\\MPOSTbatchswitch \{$MpBatchFlag\}" ; + print OPT "\\def\\MPOSTformatswitch\{$MpPassString $MpFormatFlag\}" } + # if ($FullFormat ne 'standard') { print OPT "\\setupoutput[$FullFormat]\n" } if ($EnterBatchMode) @@ -813,6 +853,10 @@ if ($TeXShell eq (MikTeX)) { print OPT "\\stelarrangerenin[$PrintFormat]\n" } } else { print OPT "\\stelarrangerenin[\\v!blokkeer]\n" } } + if ($Arguments) + { print OPT "\\setupenv[$Arguments]\n" } + if ($Input) + { print OPT "\\setupsystem[inputfile=$Input]\n" } if ($Mode) { print OPT "\\enablemode[$Mode]\n" } if ($Pages) @@ -833,11 +877,13 @@ if ($TeXShell eq (MikTeX)) chop $Pages ; print OPT "\\def\\pagestoshipout\{$Pages\}\n" } } print OPT "\\protect\n" ; - if ($Environment) - { foreach my $E (split(/,/,$Environment)) { print OPT "\\omgeving $E\n" } } - close (OPT) ; - if (open(TMP,">cont-opt.bak")&&open(TMP,"<cont-opt.tex")) - { while (<OPT>) { print TMP $_ } } } + if ($Filters ne "") + { foreach my $F (split(/,/,$Filters)) { print OPT "\\useXMLfilter[$F]\n" } } + if ($Modules ne "") + { foreach my $M (split(/,/,$Modules)) { print OPT "\\usemodule[$M]\n" } } + if ($Environments ne "") + { foreach my $E (split(/,/,$Environments)) { print OPT "\\omgeving $E\n" } } + close (OPT) } my $UserFileOk = 0 ; my @MainLanguages ; @@ -867,13 +913,13 @@ sub MakeUserFile $UserFileOk = 1 } sub RemoveResponseFile - { unlink "mult-def.tex" } - + { unlink "mult-def.tex" } + sub MakeResponseFile { if ($MainResponse eq 'standard') - { RemoveResponseFile() } + { RemoveResponseFile() } elsif (! defined ($ResponseInterface{$MainResponse})) - { RemoveResponseFile() } + { RemoveResponseFile() } else { my $MR = $ResponseInterface{$MainResponse} ; print " preparing interface file : mult-def.tex\n" ; @@ -899,10 +945,12 @@ sub ReportUserFile sub CompareFiles # 2 = tuo { my ($File1, $File2) = @_ ; my $Str1 = my $Str2 = '' ; - if ((-s $File1 eq -s $File2)&&(open(TUO1,$File1))&&(open(TUO2,$File2))) - { while(1) - { $Str1 = <TUO1> ; - $Str2 = <TUO2> ; + if ( ((-s $File1) eq (-s $File2))&& + (open(TUO1,$File1)) && + (open(TUO2,$File2)) ) + { while (1) + { $Str1 = <TUO1> ; chomp $Str1 ; + $Str2 = <TUO2> ; chomp $Str2 ; if ($Str1 eq $Str2) { unless ($Str1) { close(TUO1) ; close(TUO2) ; return 1 } } else @@ -914,7 +962,7 @@ sub CheckPositions { return if ($DVIspec eq '') ; my $JobName = shift ; my $TuoName = "$JobName.tuo" ; if (open(POS,"$TuoName")) - { seek POS, -s $TuoName -5000, 0 ; + { seek POS, (-s $TuoName) - 5000, 0 ; while (<POS>) { if (/\% *position commands *\: *(\d*) *\(unresolved\)/io) { if ($1) @@ -939,11 +987,11 @@ sub ScanPreamble while (<TEX>) { chomp ; if (/^\%.*/) - { if (/tex=([a-z]*)/goi) { $TeXExecutable = $1 } - if (/translat.*?=([\:\/0-9\-a-z]*)/goi) { $TeXTranslation = $1 } - if (/program=([a-z]*)/goi) { $TeXExecutable = $1 } - if (/modes=([a-z\,]*)/goi) { $ConTeXtModes = $1 } - if (/output=([a-z\,]*)/goi) { $OutputFormat = $1 } + { if (/tex=([a-z]*)/goi) { $TeXExecutable = $1 } + if (/translat.*?=([\:\/0-9\-a-z]*)/goi) { $TeXTranslation = $1 } + if (/program=([a-z]*)/goi) { $TeXExecutable = $1 } + if (/output=([a-z\,\-]*)/goi) { $OutputFormat = $1 } + if (/modes=([a-z\,\-]*)/goi) { $ConTeXtModes = $1 } if ($ConTeXtInterface eq "unknown") { if (/format=([a-z]*)/goi) { $ConTeXtInterface = $ConTeXtInterfaces{$1} } if (/interface=([a-z]*)/goi) { $ConTeXtInterface = $ConTeXtInterfaces{"$1"} } } @@ -964,18 +1012,24 @@ sub ScanContent { $ConTeXtInterface = "nl" ; last } elsif (/\\(use|setup|environment)/) { $ConTeXtInterface = "en" ; last } + elsif (/\\(usa|imposta|ambiente)/) + { $ConTeXtInterface = "it" ; last } elsif (/(hoogte|breedte|letter)=/) { $ConTeXtInterface = "nl" ; last } elsif (/(height|width|style)=/) { $ConTeXtInterface = "en" ; last } elsif (/(hoehe|breite|schrift)=/) { $ConTeXtInterface = "de" ; last } + elsif (/(altezza|ampiezza|stile)=/) + { $ConTeXtInterface = "it" ; last } elsif (/externfiguur/) { $ConTeXtInterface = "nl" ; last } elsif (/externalfigure/) { $ConTeXtInterface = "en" ; last } elsif (/externeabbildung/) - { $ConTeXtInterface = "de" ; last } } + { $ConTeXtInterface = "de" ; last } + elsif (/figuraesterna/) + { $ConTeXtInterface = "it" ; last } } close (TEX) } if ($ConTeXtInterfaces{$ConTeXtInterface}) @@ -984,7 +1038,7 @@ if ($ConTeXtInterfaces{$ConTeXtInterface}) my $Problems = my $Ok = 0 ; sub RunTeX - { my $JobName = shift ; + { my ($JobName,$JobSuffix) = @_ ; my $StartTime = time ; my $cmd ; my $TeXProgNameFlag ; @@ -1002,7 +1056,7 @@ sub RunTeX { $cmd .= "$TeXBatchFlag " } if ($TeXTranslation ne '') { $cmd .= "-translate-file=$TeXTranslation " } - $cmd .= "$TeXFormatFlag$TeXFormatPath$Format $JobName" ; + $cmd .= "$TeXFormatFlag$TeXFormatPath$Format $JobName.$JobSuffix" ; if ($Verbose) { print "\n$cmd\n\n" } if ($EnterBatchMode) # { $Problems = system("$cmd 1>batch.log 2>batch.err") ; @@ -1036,7 +1090,9 @@ sub PopResult unlink "$Result.tuo" ; rename "$File.tuo", "$Result.tuo" ; unlink "$Result.log" ; rename "$File.log", "$Result.log" ; unlink "$Result.dvi" ; rename "$File.dvi", "$Result.dvi" ; +if (-e "$File.dvi") { CopyFile("$File.dvi", "$Result.dvi") } unlink "$Result.pdf" ; rename "$File.pdf", "$Result.pdf" ; +if (-e "$File.pdf") { CopyFile("$File.pdf", "$Result.pdf") } return if ($File ne "texexec") ; rename "texexec.tuo", "$File.tuo" ; rename "texexec.log", "$File.log" ; @@ -1078,34 +1134,66 @@ sub RunTeXMP { if ($JobName =~ /$MPFoundJobName$/i) { if ($MpExecutable ne '') { print " generating graphics : metaposting $MPJobName\n" ; + my $ForceMpy = "" ; + if ($MpyForce) { $ForceMpy = "--mpyforce" } if ($EnterBatchMode) - { RunPerlScript ($TeXExec,"--mptex --nomp --batch $MPJobName") } + { RunPerlScript ($TeXExec,"$ForceMpy --mptex --nomp --batch $MPJobName") } else - { RunPerlScript ($TeXExec,"--mptex --nomp $MPJobName") } } + { RunPerlScript ($TeXExec,"$ForceMpy --mptex --nomp $MPJobName") } } else { print " generating graphics : metapost cannot be run\n" } $MPrundone = 1 } } } } return $MPrundone } +sub CopyFile # agressive copy, works for open files like in gs + { my ($From,$To) = @_ ; + return unless open(INP,"<$From") ; binmode INP ; + return unless open(OUT,">$To") ; binmode OUT ; + while (<INP>) { print OUT $_ } + close (INP) ; + close (OUT) } + sub RunConTeXtFile - { my ($JobName) = @_ ; + { my ($JobName, $JobSuffix) = @_ ; $JobName =~ s/\\/\//goi ; - if (-e "$JobName.tex") - { ScanPreamble ("$JobName.tex") ; + $RunPath =~ s/\\/\//goi ; + my $DummyFile = 0 ; + if (-e "$JobName.$JobSuffix") + { $DummyFile = ($JobSuffix =~ /xml/io) } + elsif (($RunPath)&&(-e "$RunPath/$JobName.$JobSuffix")) + { $DummyFile = 1 } + if ($DummyFile) + { open (TMP,">$JobName.tex") ; + if ($JobSuffix =~ /xml/io) + { if ($Filters ne "") + { print " using xml filters : $Filters\n" } + print TMP "\\ifx\\processXMLfile\\undefined\n" ; + print TMP " \\let\\processXMLfile\\processfile\n" ; + print TMP "\\fi\n" ; + print TMP "\\starttext\n" ; + print TMP "\\processXMLfilegrouped{$JobName.xml}\n" ; + print TMP "\\stoptext\n" } + else + { print TMP "\\processfile{$JobName}\n" } + close (TMP) ; + $JobSuffix = "tex" } + if (-e "$JobName.$JobSuffix") + { ScanPreamble ("$JobName.$JobSuffix") ; if ($ConTeXtInterface eq "unknown") - { ScanContent ("$JobName.tex") } + { ScanContent ("$JobName.$JobSuffix") } if ($ConTeXtInterface eq "unknown") { $ConTeXtInterface = $UserInterface } if ($ConTeXtInterface eq "unknown") { $ConTeXtInterface = "en" } if ($ConTeXtInterface eq "") { $ConTeXtInterface = "en" } - if (lc $Convert eq "xml") - { print " xml input : $JobName.xml\n" ; - ConvertXMLFile ($JobName) } - elsif (lc $Convert eq "sgml") - { print " sgml input : $JobName.sgm\n" ; - ConvertSGMLFile ($JobName) } + # unless ($JobSuffix eq "tex") # hack, preprocessing will change + # { if (lc $Convert eq "xml") + # { print " xml input : $JobName.xml\n" ; + # ConvertXMLFile ($JobName) } + # elsif (lc $Convert eq "sgml") + # { print " sgml input : $JobName.sgm\n" ; + # ConvertSGMLFile ($JobName) } } CheckOutputFormat ; my $StopRunning = 0 ; my $MPrundone = 0 ; @@ -1113,6 +1201,10 @@ sub RunConTeXtFile { $Format = "cont-$ConTeXtInterface" } print " executable : $TeXProgramPath$TeXExecutable\n" ; print " format : $TeXFormatPath$Format\n" ; + if ($RunPath) + { print " source path : $RunPath\n" } + if ($DummyFile) + { print " dummy file : $JobName.$JobSuffix\n" } print " inputfile : $JobName\n" ; print " output : $FullFormat\n" ; print " interface : $ConTeXtInterface\n" ; @@ -1141,7 +1233,11 @@ sub RunConTeXtFile { print " current mode : $Mode\n" } else { print " current mode : all\n" } - if ($Environment) + if ($Arguments) + { print " arguments : $Arguments\n" } + if ($Modules) + { print " modules : $Modules\n" } + if ($Environments) { print " environments : $Environment\n" } if ($Suffix) { $Result = "$JobName$Suffix" } @@ -1151,16 +1247,18 @@ sub RunConTeXtFile if (($PdfArrange)||($PdfSelect)||($RunOnce)) { MakeOptionFile (1, 1, $JobName) ; print "\n" ; - $Problems = RunTeX($JobName) ; + $Problems = RunTeX($JobName, $JobSuffix) ; if ($ForceTeXutil) { $Ok = RunTeXutil ($JobName) } + CopyFile("$JobName.top","$JobName.tmp") ; + unlink "$JobName.top" ; # runtime option file PopResult($JobName) } else { while (!$StopRunning&&($TeXRuns<$NOfRuns)&&(!$Problems)) { MakeOptionFile (0, 0, $JobName) ; ++$TeXRuns ; print " TeX run : $TeXRuns\n\n" ; - $Problems = RunTeX($JobName) ; + $Problems = RunTeX($JobName,$JobSuffix) ; if ((!$Problems)&&($NOfRuns>1)) { if (!$NoMPMode) { $MPrundone = RunTeXMP ($JobName, "mpgraph") ; @@ -1171,19 +1269,22 @@ sub RunConTeXtFile if ((!$Problems)&&(($FinalMode||$FinalRunNeeded))&&($NOfRuns>1)) { MakeOptionFile (1, $FinalMode, $JobName) ; print " final TeX run : $TeXRuns\n\n" ; - $Problems = RunTeX($JobName) } + $Problems = RunTeX($JobName, $JobSuffix) } + CopyFile("$JobName.top","$JobName.tmp") ; unlink "$JobName.tup" ; # previous tuo file unlink "$JobName.top" ; # runtime option file - PopResult($JobName) } } } + PopResult($JobName) } + if ($DummyFile) + { unlink "$JobName.$JobSuffix" } } } sub RunSomeTeXFile - { my ($JobName) = @_ ; - if (-e "$JobName.tex") + { my ($JobName, $JobSuffix) = @_ ; + if (-e "$JobName.$JobSuffix") { PushResult($JobName) ; print " executable : $TeXProgramPath$TeXExecutable\n" ; print " format : $TeXFormatPath$Format\n" ; - print " inputfile : $JobName\n" ; - $Problems = RunTeX($JobName) ; + print " inputfile : $JobName.$JobSuffix\n" ; + $Problems = RunTeX($JobName,$JobSuffix) ; PopResult($JobName) } } my $ModuleFile = "texexec" ; @@ -1214,7 +1315,7 @@ sub RunModule print MOD "\\stoptekst \n" ; close (MOD) ; $ConTeXtInterface = "nl" ; - RunConTeXtFile($ModuleFile) ; + RunConTeXtFile($ModuleFile, "tex") ; if ($FileName ne $ModuleFile) { foreach my $FileSuffix ("dvi", "pdf", "tui", "tuo", "log") { unlink ("$FileName.$FileSuffix") ; @@ -1238,7 +1339,7 @@ sub RunFigures print FIG "\\stoptext\n" ; close(FIG) ; $ConTeXtInterface = "en" ; - RunConTeXtFile($FiguresFile) } + RunConTeXtFile($FiguresFile, "tex") } sub CleanTeXFileName { my $str = shift ; @@ -1272,7 +1373,7 @@ sub RunListing print LIS "\\stoptext\n" ; close(LIS) ; $ConTeXtInterface = "en" ; - RunConTeXtFile($ListingFile) } + RunConTeXtFile($ListingFile, "tex") } # sub DetermineNOfPdfPages # { my $FileName = shift ; @@ -1336,7 +1437,7 @@ sub RunArrange print ARR "\\stoptext\n" ; close (ARR) ; $ConTeXtInterface = "en" ; - RunConTeXtFile($ModuleFile) } + RunConTeXtFile($ModuleFile, "tex") } sub RunSelect { my $FileName = shift ; @@ -1374,7 +1475,7 @@ sub RunSelect print SEL "\\stoptext\n" ; close (SEL) ; $ConTeXtInterface = "en" ; - RunConTeXtFile($SelectFile) } + RunConTeXtFile($SelectFile, "tex") } sub RunCopy { my $FileName = shift ; @@ -1412,7 +1513,7 @@ sub RunCopy print COP "\\stoptext\n" ; close (COP) ; $ConTeXtInterface = "en" ; - RunConTeXtFile($CopyFile) } + RunConTeXtFile($CopyFile, "tex") } sub RunCombine { my $FileName = shift ; @@ -1446,7 +1547,7 @@ sub RunCombine print COM "\\stoptext\n" ; close (COM) ; $ConTeXtInterface = "en" ; - RunConTeXtFile($CombineFile) } + RunConTeXtFile($CombineFile, "tex") } sub LocatedFormatPath { my $FormatPath = shift ; @@ -1472,9 +1573,9 @@ sub RunOneFormat { my $cmd = "$fmtutil --byfmt $FormatName" ; if ($Verbose) { print "\n$cmd\n\n" } MakeUserFile ; # this works only when the path is kept - MakeResponseFile ; + MakeResponseFile ; $Problems = system ( "$cmd" ) ; - RemoveResponseFile ; + RemoveResponseFile ; RestoreUserFile } else { $Problems = 1 } @@ -1484,14 +1585,14 @@ sub RunOneFormat my $CurrentPath = cwd() ; $TeXFormatPath = LocatedFormatPath($TeXFormatPath) ; if ($TeXFormatPath ne '') - { chdir "$TeXFormatPath" } + { chdir $TeXFormatPath } MakeUserFile ; - MakeResponseFile ; + MakeResponseFile ; my $cmd = "$TeXProgramPath$TeXExecutable $TeXVirginFlag " . "$TeXPassString $PassOn ${TeXPrefix}$FormatName" ; if ($Verbose) { print "\n$cmd\n\n" } system ( $cmd ) ; - RemoveResponseFile ; + RemoveResponseFile ; RestoreUserFile ; if (($TeXFormatPath ne '')&&($CurrentPath ne '')) { chdir $CurrentPath } } } @@ -1564,19 +1665,21 @@ sub RunFiles else { RunCombine ($JobName) } } } else - { foreach my $JobName (@ARGV) - { $JobName =~ s/\.tex//goi ; + { my $JobSuffix = "tex" ; + foreach my $JobName (@ARGV) + { if ($JobName =~ s/\.(\w+)$//io) + { $JobSuffix = $1 } if ($TypesetModule) { unless ($Format) { RunModule ($JobName) } } elsif (($Format eq '')||($Format =~ /^cont.*/io)) - { RunConTeXtFile ($JobName) } + { RunConTeXtFile ($JobName, $JobSuffix) } else - { RunSomeTeXFile ($JobName) } + { RunSomeTeXFile ($JobName, $JobSuffix) } unless (-s "$JobName.log") { unlink ("$JobName.log") } unless (-s "$JobName.tui") { unlink ("$JobName.tui") } } } } -my $MpTmp = "tmpgraph" ; -my $MpKep = "$MpTmp.kep" ; +my $MpTmp = "tmpgraph" ; # todo: prefix met jobname +my $MpKep = "$MpTmp.kep" ; # sub => MpTmp("kep") my $MpLog = "$MpTmp.log" ; my $MpTex = "$MpTmp.tex" ; my $MpDvi = "$MpTmp.dvi" ; @@ -1588,23 +1691,50 @@ sub RunMP ########### { foreach my $RawMpName (@ARGV) { my ($MpName, $Rest) = split (/\./, $RawMpName, 2) ; my $MpFile = "$MpName.mp" ; - if (-e $MpFile and (-s $MpFile>25)) # texunlink makes empty file - { unlink "$MpName.mpt" ; - doRunMP($MpName,0) ; - # test for labels - my $belabels = 0 ; - if (open(MP, "<$MpName.mpt")) - { while (<MP>) - { if (/% figure (\d+) : (.*)/o) - { $mpbetex{$1} .= "$2\n" ; ++$belabels } } - close (MP) ; - if ($belabels) - { print " second MP run needed : $belabels merged labels\n" ; - doRunMP($MpName,1) } } } } } } - + if (-e $MpFile and (-s $MpFile>25)) # texunlink makes empty file + { unlink "$MpName.mpt" ; + doRunMP($MpName,0) ; + # test for graphics, new per 14/12/2000 + my $mpgraphics = checkMPgraphics($MpName) ; + # test for labels + my $mplabels = checkMPlabels($MpName) ; + if ($mpgraphics||$mplabels) + { doRunMP($MpName,$mplabels) } } } } } + +my $mpochecksum = 0 ; + +sub checkMPgraphics # also see makempy + { my $MpName = shift ; + if ($MpyForce) + { $MpName .= " --force " } # dirty + else + { return 0 unless -s "$MpName.mpo" > 32 ; + return 0 unless (open (MPO,"$MpName.mpo")) ; + $mpochecksum = do { local $/ ; unpack("%32C*",<MPO>) % 65535 } ; + close (MPO) ; + if (open (MPY,"$MpName.mpy")) + { my $str = <MPY> ; chomp $str ; close (MPY) ; + if ($str =~ /^\%\s*mpochecksum\s*\:\s*(\d+)/o) + { return 0 if (($mpochecksum eq $1)&&($mpochecksum ne 0)) } } } + RunPerlScript("makempy", "$MpName") ; + print " second MP run needed : text graphics found\n" ; + return 1 } + +sub checkMPlabels + { my $MpName = shift ; + return 0 unless (-s "$MpName.mpt" > 10) ; + return 0 unless open(MP, "$MpName.mpt") ; + my $n = 0 ; + while (<MP>) + { if (/% figure (\d+) : (.*)/o) + { $mpbetex{$1} .= "$2\n" ; ++$n } } + close (MP) ; + print " second MP run needed : $n tex labels found\n" if $n ; + return $n } + sub doRunMP ########### - { my ($MpName, $MergeBE) = @_ ; - my $TexFound = 0 ; + { my ($MpName, $MergeBE) = @_ ; + my $TexFound = 0 ; my $MpFile = "$MpName.mp" ; if (open(MP, $MpFile)) { local $/ = "\0777" ; $_ = <MP> ; close(MP) ; @@ -1613,7 +1743,11 @@ sub doRunMP ########### return if (-e $MpKep) ; rename ($MpFile, $MpKep) ; # check for tex stuff - $TexFound = $MergeBE || /(btex|etex|verbatimtex)/o ; +# $TexFound = $MergeBE || /(btex|etex|verbatimtex)/o ; +# verbatim tex can be there due to an environment belonging to +# mpy (not really, but about) +# $TexFound = $MergeBE || /(btex|etex)/o ; +$TexFound = $MergeBE || /btex .*? etex/o ; # shorten lines into new file if okay unless (-e $MpFile) { open(MP, ">$MpFile") ; @@ -1621,10 +1755,12 @@ sub doRunMP ########### s/\;/\;\n/gmois ; s/\n\n/\n/gmois ; s/(btex.*?)\@\@\@(.*?etex)/$1\;$2/gmois ; -# merge labels -if ($MergeBE) - { s/beginfig\s*\((\d+)\)\s*\;/beginfig($1)\;\n$mpbetex{$1}\n/goims } - print MP $_ ; print MP "end .\n" ; + # merge labels + if ($MergeBE) + { s/beginfig\s*\((\d+)\)\s*\;/beginfig($1)\;\n$mpbetex{$1}\n/goims } + # flush + print MP $_ ; + print MP "end .\n" ; close(MP) } if ($TexFound) { print " metapost to tex : $MpName\n" ; @@ -1634,13 +1770,15 @@ if ($MergeBE) print TMP "\\end\n" ; # to be sure close (TMP) ; if (($Format eq '')||($Format =~ /^cont.*/io)) - { $OutputFormat = "dvips" ; - RunConTeXtFile ($MpTmp) } + { $OutputFormat = "dvips" ; + RunConTeXtFile ($MpTmp, "tex") } else - { RunSomeTeXFile ($MpTmp) } + { RunSomeTeXFile ($MpTmp, "tex") } if (-e $MpDvi && !$Problems) { print " dvi to metapost : $MpName\n" ; - $Problems = system ("$DviToMpExecutable $MpDvi $MpName.mpx") } + $Problems = system ("$DviToMpExecutable $MpDvi $MpName.mpx") } +# $Problems = system ("dvicopy $MpDvi texexec.dvi") ; +# $Problems = system ("$DviToMpExecutable texexec.dvi $MpName.mpx") } unlink $MpTex ; unlink $MpDvi } } print " metapost : $MpName\n" ; @@ -1651,14 +1789,19 @@ if ($MergeBE) { print " format : $MpFormat\n" ; $cmd .= " $MpPassString $MpFormatFlag$MpFormat " } $Problems = system ("$cmd $MpName" ) ; -# unlink "mptrace.tmp" ; rename ($MpFile, "mptrace.tmp") ; +open (MPL,"$MpName.log") ; +while (<MPL>) # can be one big line unix under win + { while (/^l\.(\d+)\s/gmois) + { print " error in metapost run : $MpName.mp:$1\n" } } + + # unlink "mptrace.tmp" ; rename ($MpFile, "mptrace.tmp") ; if (-e $MpKep) { unlink ($MpFile) ; - rename ($MpKep, $MpFile) } } } + rename ($MpKep, $MpFile) } } } sub RunMPX - { my $MpName = shift ; $MpName =~ s/\..*$//o ; - my $MpFile = $MpName . ".mp" ; + { my $MpName = shift ; $MpName =~ s/\..*$//o ; + my $MpFile = $MpName . ".mp" ; if (($MpToTeXExecutable)&&($DviToMpExecutable)&& (-e $MpFile)&&(-s $MpFile>5)&&open(MP, $MpFile)) { local $/ = "\0777" ; $_ = <MP> ; close(MP) ; @@ -1670,9 +1813,9 @@ sub RunMPX print TMP "\\end\n" ; # to be sure close (TMP) ; if (($Format eq '')||($Format =~ /^cont.*/io)) - { RunConTeXtFile ($MpTmp) } + { RunConTeXtFile ($MpTmp, "tex") } else - { RunSomeTeXFile ($MpTmp) } + { RunSomeTeXFile ($MpTmp, "tex") } if (-e $MpDvi && !$Problems) { $Problems = system ("$DviToMpExecutable $MpDvi $MpName.mpx") } unlink $MpTex ; @@ -1692,16 +1835,10 @@ elsif ($MakeFormats) else { RunFormats } } elsif (@ARGV) - { foreach (@ARGV) { $_ =~ s/\.tex//io } @ARGV = <@ARGV> ; RunFiles } + { #foreach (@ARGV) { $_ =~ s/\.tex//io } + @ARGV = <@ARGV> ; RunFiles } else { print $Help{HELP} ; unless ($Verbose) { print $Help{VERBOSE} } } -if (-f "cont-opt.tex") - { unlink ("cont-opt.bak") ; - rename ("cont-opt.tex", "cont-opt.bak") } - -if (-f "cont-opt.tex") - { unlink ("texexec.nul") } - if ($Problems) { exit 1 } diff --git a/context/perltk/texexec.rme b/context/perltk/texexec.rme index 1e0f0a3c2..7d216923a 100644 --- a/context/perltk/texexec.rme +++ b/context/perltk/texexec.rme @@ -73,11 +73,11 @@ for tetex set UserInterface to en for tetex set TeXExecutable to pdfetex for tetex set TeXVirginFlag to -ini for tetex set TeXPassString to -progname=context -for tetex set TeXBatchString to -int=batchmode -for tetex set MpToTeXExecutable to mptotex +for tetex set TeXBatchFlag to -int=batchmode +for tetex set MpToTeXExecutable to mpto for tetex set MpVirginFlag to -ini for tetex set MpPassString to -progname=mpost -for tetex set MpBatchString to -int=batchmode +for tetex set MpBatchFlag to -int=batchmode % These also apply to fpTeX. @@ -86,11 +86,11 @@ for fptex set UserInterface to en for fptex set TeXExecutable to pdfetex for fptex set TeXVirginFlag to -ini for fptex set TeXPassString to -progname=context -for fptex set TeXBatchString to -int=batchmode -for fptex set MpToTeXExecutable to mptotex +for fptex set TeXBatchFlag to -int=batchmode +for fptex set MpToTeXExecutable to mpto for fptex set MpVirginFlag to -ini for fptex set MpPassString to -progname=mpost -for fptex set MpBatchString to -int=batchmode +for fptex set MpBatchFlag to -int=batchmode % MikTeX users probably have to set up some paths too. @@ -98,11 +98,14 @@ for miktex set UsedInterfaces to en,nl,de,uk for miktex set UserInterface to en for miktex set TeXExecutable to pdftex for miktex set TeXVirginFlag to --initialize -for miktex set TeXBatchString to --interaction=batchmode +for miktex set TeXBatchFlag to --interaction=batchmode for miktex set MpToTeXExecutable to mptotex for miktex set MpVirginFlag to --initialize for miktex set MpPassString to -for miktex set MpBatchString to --interaction=batchmode +for miktex set MpBatchFlag to --interaction=batchmode + +for miktex set TeXFormatFlag to --undump= +for miktex set MpFormatFlag to --undump= % These are the settings used on some machines at PRAGMA ADE that % don't use the texmf tree. They can serve as an example for local diff --git a/context/perltk/texshow.pl b/context/perltk/texshow.pl index db1ce778c..d52508476 100644 --- a/context/perltk/texshow.pl +++ b/context/perltk/texshow.pl @@ -82,6 +82,8 @@ if (cont_set::setups_found) { cont_mis::warning ('no command specified') ; cont_set::set_setup_title('TeXShow : ConTeXt commands') } cont_mis::status ('entering main loop') ; +#$mw -> bind ('<ctrl-q>', exit ) ; +#$mw -> bind ('<esc>', exit ) ; MainLoop () } else { cont_mis::error ('no setup files found') } diff --git a/context/perltk/texutil.pl b/context/perltk/texutil.pl index 4aee6e93e..2b749123f 100644 --- a/context/perltk/texutil.pl +++ b/context/perltk/texutil.pl @@ -713,8 +713,9 @@ sub SanitizedString $string =~ s/([\^\"\`\'\~\,])([a-zA-Z])/$2/gio ; $string .= "\x00"; $string .= $copied } +$string =~ s/\<ent\:(.*?)\>/$1/go ; # reduce entities / will be table too $string =~ s/\\-|\|\|/\-/gio ; - $string =~ s/\\[a-zA-Z]*| |\{|\}//gio ; + $string =~ s/\\[a-zA-Z]*| |\{|\}//gio ; # ? return $string } #D This subroutine looks a bit complicated, which is due to the @@ -952,7 +953,7 @@ $RegStat{"e"} = 2 ; # end up between from and to $RegStat{"t"} = 3 ; $RegStat{"s"} = 4 ; -sub HandleRegister +sub HandleRegister # the } { makes sure that local {} is ok { ($SecondTag, $RestOfLine) = split(/ /, $RestOfLine, 2) ; ++$NOfEntries ; if ($SecondTag eq "s") @@ -981,7 +982,8 @@ sub HandleRegister # if ($Key eq "") { $Key = SanitizedString($Entry) } -if ($SortMethod ne '') { $ProcessHigh = 0 } + if ($SortMethod ne '') + { $ProcessHigh = 0 } if ($ProcessHigh) { $Key = HighConverted($Key) } $KeyTag = substr $Key, 0, 1 ; @@ -1010,6 +1012,8 @@ if ($SortMethod ne '') { $ProcessHigh = 0 } { $Entry =~ s/([^\\])\&/$1$SPLIT/go ; $Entry =~ s/([^\\])\+/$1$SPLIT/go } $Key =~ s/^([^a-zA-Z])/ $1/go ; +$Key =~ s/^\s*\{(.*)\}$SPLIT/$1$SPLIT/go ; ####### new +$Entry =~ s/^\{(.*)\}$SPLIT/$1$SPLIT/go ; ###### new if ($ProcessIJ) { $Key =~ s/ij/yy/go } $LCKey = lc $Key ; @@ -1060,6 +1064,10 @@ if ($SortMethod ne '') { $ProcessHigh = 0 } #D #D \testentry [pagehowto::key]{texthowto::entry} #D +#D % a very special case, when key has , and is constructed +#D +#D \testentry [pagehowto::{key}]{texthowto::{entry}} +#D #D \stopbuffer #D #D \typebuffer @@ -2362,15 +2370,22 @@ sub KeepContextFile ++$keptfiles ; print " kept : $filename\n" } -my @dontaskprefixes = sort glob "mpx-*" ; -push @dontaskprefixes , ("tex-form.tex","tex-edit.tex","tex-temp.tex", - "texexec.tex","texexec.tui","texexec.tuo", - "texexec.ps","texexec.pdf","texexec.dvi", - "cont-opt.tex","cont-opt.bak") ; -my @dontasksuffixes = ("mprun.mp","mpgraph.mp","mprun.mpd","mpgraph.mpd") ; -my @forsuresuffixes = ("tui","tup","ted","tes","top","log","tmp", "mpt", "mpx", "mpd") ; -my @texonlysuffixes = ("dvi","ps","pdf") ; -my @texnonesuffixes = ("tuo","tub","top") ; +my @dontaskprefixes = sort glob "mpx-*" ; push @dontaskprefixes , + ("tex-form.tex","tex-edit.tex","tex-temp.tex", + "texexec.tex","texexec.tui","texexec.tuo", + "texexec.ps","texexec.pdf","texexec.dvi", + "cont-opt.tex","cont-opt.bak") ; +my @dontasksuffixes = + ("mpgraph.mp","mpgraph.mpd","mpgraph.mpo","mpgraph.mpy", + "mprun.mp", "mprun.mpd", "mprun.mpo", "mprun.mpy") ; +my @forsuresuffixes = + ("tui","tup","ted","tes","top", + "log","tmp", + "mpt","mpx","mpd","mpo") ; +my @texonlysuffixes = + ("dvi","ps","pdf") ; +my @texnonesuffixes = + ("tuo","tub","top") ; sub PurgeFiles # no my in foreach { my $pattern = $ARGV[0] ; my $strippedname ; diff --git a/metapost/context/metafun.mp b/metapost/context/metafun.mp index 802264351..e8fd1a762 100644 --- a/metapost/context/metafun.mp +++ b/metapost/context/metafun.mp @@ -20,7 +20,7 @@ %D \type {context} (the \TEX\ one) could lead to lost strings %D (and as a result in buggy boundingbox and special %D handling). By using the name \type {metatex} we make sure -%D %D that we use (unless overloaded) the settings of \type +%D that we use (unless overloaded) the settings of \type %D {mpost}. if unknown ahangle : @@ -37,5 +37,6 @@ input mp-text.mp ; input mp-shap.mp ; input mp-butt.mp ; input mp-char.mp ; +input mp-grph.mp ; dump ; endinput . diff --git a/metapost/context/mp-char.mp b/metapost/context/mp-char.mp index 8c0d53f75..373200fc2 100644 --- a/metapost/context/mp-char.mp +++ b/metapost/context/mp-char.mp @@ -331,7 +331,7 @@ def collapse_points = fi ; enddef ; -vardef smoothed (expr a,b) = +vardef smooth_connection (expr a,b) = sx := connection_smooth_size/grid_width ; sy := connection_smooth_size/grid_height ; if ypart a = ypart b : @@ -377,9 +377,9 @@ vardef connection_path = if reverse_connection : reverse fi (xypoints[1]-- for i=2 upto xypoint-1 : if smooth : - smoothed(xypoints[i],xypoints[i-1]) .. + smooth_connection(xypoints[i],xypoints[i-1]) .. controls xypoints[i] and xypoints[i] .. - smoothed(xypoints[i],xypoints[i+1]) -- + smooth_connection(xypoints[i],xypoints[i+1]) -- else : xypoints[i]-- fi diff --git a/metapost/context/mp-grph.mp b/metapost/context/mp-grph.mp new file mode 100644 index 000000000..26202d61a --- /dev/null +++ b/metapost/context/mp-grph.mp @@ -0,0 +1,241 @@ +%D \module +%D [ file=mp-grph.mp, +%D version=2000.12.14, +%D title=\CONTEXT\ \METAPOST\ graphics, +%D subtitle=graphic text support, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See licen-en.pdf for +%C details. + +%D Under construction. + +if unknown context_tool : input mp-tool ; fi ; +if known context_grph : endinput ; fi ; + +boolean context_grph ; context_grph := true ; + +string CRLF ; CRLF := char 10 & char 13 ; + +picture _currentpicture_ ; + +def protectgraphicmacros = + save showtext ; + save beginfig ; let beginfig = begingraphictextfig ; + save endfig ; let endfig = endgraphictextfig ; + save end ; let end = relax ; + interim prologues := prologues ; + interim linecap := butt ; + interim linejoin := mitered ; +enddef ; + +numeric currentgraphictext ; currentgraphictext := 0 ; +string graphictextformat ; graphictextformat := "plain" ; +string graphictextstring ; graphictextstring := "" ; +string graphictextfile ; graphictextfile := "dummy.mpo" ; + +def savegraphictext (expr str) = + graphictextfile := jobname & ".mpo" ; + if (graphictextstring<>"") : + write graphictextstring to graphictextfile ; + graphictextstring := "" ; + fi ; + write str to graphictextfile ; + let erasegraphictextfile = relax ; +enddef ; + +def erasegraphictextfile = + graphictextfile := jobname & ".mpo" ; + write EOF to graphictextfile ; + let erasegraphictextfile = relax ; +enddef ; + +extra_beginfig := extra_beginfig & "erasegraphictextfile ;" ; + +def begingraphictextfig (expr n) = + foundpicture := n ; scratchpicture := nullpicture ; +enddef ; + +def endgraphictextfig = + if foundpicture = currentgraphictext : + expandafter endinput + else : + scratchpicture := nullpicture ; + fi ; +enddef ; + +% def loadfigure (expr filename, n) = +% begingroup ; +% protectgraphicmacros ; % also save linewidth, color, options etc ? +% save sp ; picture sp ; sp := currentpicture ; +% save ok ; boolean ok ; ok := false ; +% def beginfig (expr m) = +% if n=m : +% currentpicture := sp ; ok := true ; +% def endfig = endinput ; enddef ; +% else : +% currentpicture := nullpicture ; +% fi ; +% enddef ; +% let endfig = relax ; +% readfile(filename) ; +% if not ok : currentpicture := sp ; fi ; +% endgroup ; +% enddef ; + +def loadfigure primary filename = + doloadfigure (filename) +enddef ; + +def doloadfigure (expr filename) text figureattributes = + begingroup ; + save figurenumber, figurepicture, number ; + numeric figurenumber ; figurenumber := 1 ; + picture figurepicture ; figurepicture := currentpicture ; + def number primary n = hide(figurenumber := n) enddef ; + protectgraphicmacros ; + currentpicture := nullpicture ; + def beginfig (expr n) = + currentpicture := nullpicture ; + if figurenumber=n : let endfig = endinput ; fi ; + enddef ; + let endfig = relax ; + readfile(filename) ; + currentpicture := currentpicture shifted -llcorner currentpicture ; + addto figurepicture also currentpicture figureattributes ; + currentpicture := figurepicture ; + endgroup ; +enddef ; + +def graphictext primary t = + dographictext(t) +enddef ; + +def dographictext (expr t) text x_op_x = + begingroup ; + protectgraphicmacros ; + if graphictextformat<>"" : + graphictextstring := + "% format=" & graphictextformat & CRLF & graphictextstring ; + graphictextformat := "" ; + fi ; + let normalwithshade = withshade ; + save foundpicture, scratchpicture, str ; + save fill, draw, withshade, reversefill, outlinefill ; + numeric foundpicture ; picture scratchpicture ; string str ; + currentgraphictext := currentgraphictext + 1 ; + savegraphictext ("\startTEXpage[scale=10000]" & t & "\stopTEXpage") ; + def draw expr p = + addto scratchpicture doublepath p withpen currentpen ; + enddef ; + def fill expr p = + addto scratchpicture contour p withpen currentpen ; + enddef ; + def f_op_f = enddef ; boolean f_color ; f_color := false ; + def d_op_d = enddef ; boolean d_color ; d_color := false ; + def s_op_s = enddef ; boolean s_color ; s_color := false ; + boolean reverse_fill ; reverse_fill := false ; + boolean outline_fill ; outline_fill := false ; + def reversefill = + hide(reverse_fill := true ) + enddef ; + def outlinefill = + hide(outline_fill := true ) + enddef ; + def withshade primary c = + hide(def s_op_s = normalwithshade c enddef ; s_color := true ) + enddef ; + def withfillcolor primary c = + hide(def f_op_f = withcolor c enddef ; f_color := true ) + enddef ; + def withdrawcolor primary c = + hide(def d_op_d = withcolor c enddef ; d_color := true ) + enddef ; + scratchpicture := nullpicture ; + addto scratchpicture doublepath origin x_op_x ; % pre-roll + for i within scratchpicture : % Below here is a dirty tricky test! + if (urcorner dashpart i) = origin : outline_fill := false ; fi ; + endfor ; + scratchpicture := nullpicture ; + readfile(jobname & ".mpy") ; + scratchpicture := (scratchpicture shifted -llcorner scratchpicture) scaled (1/10) ; + if not d_color and not f_color : d_color := true ; fi + if s_color : d_color := false ; f_color := false ; fi ; + if d_color and not reverse_fill : + for i within scratchpicture : + if f_color and outline_fill : + addto currentpicture doublepath pathpart i _op_ x_op_x f_op_f + dashed nullpicture ; + fi ; + if filled i : + addto currentpicture doublepath pathpart i _op_ x_op_x d_op_d ; + fi ; + endfor ; + fi ; + if f_color : + for i within scratchpicture : + if filled i : + addto currentpicture contour pathpart i _op_ x_op_x f_op_f + withpen pencircle scaled 0 ; + fi ; + endfor ; + fi ; + if d_color and reverse_fill : + for i within scratchpicture : + if filled i : + addto currentpicture doublepath pathpart i _op_ x_op_x d_op_d ; + fi ; + endfor ; + fi ; + if s_color : + for i within scratchpicture : + if filled i : + addto currentpicture contour pathpart i _op_ x_op_x s_op_s ; + fi ; + endfor ; + else : + for i within scratchpicture : + if stroked i : + addto currentpicture doublepath pathpart i _op_ x_op_x d_op_d ; + fi ; + endfor ; + fi ; + endgroup ; +enddef ; + +def resetgraphictextdirective = + graphictextstring := "" ; +enddef ; + +def graphictextdirective text t = + graphictextstring := graphictextstring & t & CRLF ; +enddef ; + +endinput + +% example + +input mp-grph ; + + graphictextformat := "context" ; +% graphictextformat := "plain" ; +% graphictextformat := "latex" ; graphictextdirective "\documentclass[]{article}" ; + +beginfig (1) ; + graphictext + "\vbox{\hsize10cm \input tufte }" + scaled 8 + withdrawcolor blue + withfillcolor red + withpen pencircle scaled 2pt ; +endfig ; + +beginfig(1) ; + loadfigure "gracht.mp" rotated 20 ; + loadfigure "koe.mp" number 1 scaled 2 ; +endfig ; + +end diff --git a/metapost/context/mp-spec.mp b/metapost/context/mp-spec.mp index 7fa743cbc..b23164c14 100644 --- a/metapost/context/mp-spec.mp +++ b/metapost/context/mp-spec.mp @@ -144,4 +144,87 @@ primarydef p withshade sc = p withcolor (_special_signal_/1000,_color_counter_/1000,sc/1000) enddef ; +%D Figure inclusion. + +numeric cef ; cef := 0 ; + +def externalfigure primary filename = + doexternalfigure (filename) +enddef ; + +def doexternalfigure (expr filename) text transformation = + begingroup ; save p, t ; picture p ; transform t ; + p := nullpicture ; t := identity transformation ; + flush_special(10, 9, + dddecimal (xxpart t, yxpart t, xypart t) & " " & + dddecimal (yypart t, xpart t, ypart t) & " " & filename) ; + addto p contour unitsquare scaled 0 ; + setbounds p to unitsquare transformed t ; + _color_counter_ := _color_counter_ + 1 ; cef := cef + 1 ; + draw p withcolor (_special_signal_/1000,_color_counter_/1000,cef/1000) ; + endgroup ; +enddef ; + +%D Experimental: + +numeric currenthyperlink ; currenthyperlink := 0 ; + +def hyperlink primary t = dohyperlink(t) enddef ; +def hyperpath primary t = dohyperpath(t) enddef ; + +def dohyperlink (expr destination) text transformation = + begingroup ; save somepath ; path somepath ; + somepath := fullsquare transformation ; + dohyperpath(destination) somepath ; + endgroup ; +enddef ; + +def dohyperpath (expr destination) expr somepath = + begingroup ; + flush_special(20, 7, + ddecimal (xpart llcorner somepath, ypart llcorner somepath) & " " & + ddecimal (xpart urcorner somepath, ypart urcorner somepath) & " " & destination) ; + _color_counter_ := _color_counter_ + 1 ; + currenthyperlink := currenthyperlink + 1 ; + fill boundingbox unitsquare scaled 0 + withcolor + (_special_signal_/1000,_color_counter_/1000,currenthyperlink/1000) ; + endgroup ; +enddef ; + +% \setupinteraction[state=start] +% \setupcolors [state=start] +% +% Hello There! \blank +% +% \startMPcode +% pickup pencircle scaled 5 ; +% draw fullcircle scaled 4cm withcolor red ; +% hyperpath "nextpage" boundingbox currentpicture ; +% draw origin withcolor blue ; +% \stopMPcode +% +% \blank Does it work or not? +% +% \startMPcode +% pickup pencircle scaled 5 ; +% draw fullcircle scaled 4cm withcolor red ; +% hyperpath "nextpage" fullcircle scaled 4cm ; +% draw origin withcolor blue ; +% draw fullcircle scaled 4cm shifted (1cm,1cm); +% \stopMPcode +% +% \blank Does it work or not? \page Hello There! \blank +% +% \startMPcode +% pickup pencircle scaled 5 ; +% draw fullcircle scaled 2cm shifted (-2cm,-1cm) ; +% draw fullcircle scaled 3cm shifted (2cm,1cm) withcolor red ; +% draw fullcircle scaled 1cm ; +% hyperlink "previouspage" scaled 3cm shifted (2cm,1cm) ; +% draw origin withcolor blue ; +% \stopMPcode +% +% \blank Does it work or not? + endinput ; diff --git a/metapost/context/mp-tool.mp b/metapost/context/mp-tool.mp index a3ad4927e..958cc3903 100644 --- a/metapost/context/mp-tool.mp +++ b/metapost/context/mp-tool.mp @@ -107,7 +107,7 @@ def stopsavingdata = enddef ; %D Instead of a keystroke eating save and allocation -%D sequence, you can use the \quote {new} alternatives to +%D sequence, you can use the \citeer {new} alternatives to %D save and allocate in one command. def newcolor text v = forsuffixes i=v : save i ; color i ; endfor ; enddef ; @@ -527,6 +527,13 @@ enddef ; % (-width/2,+height/2)..(-width/2-offset,0)..(-width/2,-height/2)..cycle) %enddef ; +vardef roundedsquare (expr width, height, offset) = + ((offset,0)--(width-offset,0){right} .. + (width,offset)--(width,height-offset){up} .. + (width-offset,height)--(offset,height){left} .. + (0,height-offset)--(0,offset){down} .. cycle) +enddef ; + %D Some colors. color cyan ; cyan = (0,1,1) ; @@ -635,13 +642,32 @@ primarydef p randomshifted s = endgroup enddef ; +%primarydef p randomized s = +% for i=0 upto length(p)-1 : +% ((point i of p) randomshifted s) .. controls +% ((postcontrol i of p) randomshifted s) and +% ((precontrol (i+1) of p) randomshifted s) .. +% endfor cycle +%enddef ; + primarydef p randomized s = - for i=0 upto length(p)-1 : - ((point i of p) randomshifted s) .. controls - ((postcontrol i of p) randomshifted s) and - ((precontrol (i+1) of p) randomshifted s) .. - endfor cycle -enddef ; + (if path p : + for i=0 upto length(p)-1 : + ((point i of p) randomshifted s) .. controls + ((postcontrol i of p) randomshifted s) and + ((precontrol (i+1) of p) randomshifted s) .. + endfor + if cycle p : + cycle + else : + ((point length(p) of p) randomshifted s) + fi + elseif pair p : + p randomshifted s + else : + p + uniformdeviate s + fi) +enddef ; %D Rather fundamental. @@ -982,12 +1008,31 @@ vardef thefreelabel (expr str, loc, ori) = setbounds s to boundingbox s enlarged freelabeloffset ; p := fullcircle scaled (2*length(loc-ori)) shifted ori ; q := freesquare xyscaled (urcorner s - llcorner s) ; - l := point (xpart (p intersectiontimes (ori--loc))) of q ; -setbounds s to boundingbox s enlarged -freelabeloffset ; % new +% l := point (xpart (p intersectiontimes (ori--loc))) of q ; + l := point xpart (p intersectiontimes + (ori--((1+eps)*arclength(ori--loc)*unitvector(loc-ori)))) of q ; + setbounds s to boundingbox s enlarged -freelabeloffset ; % new %draw boundingbox s shifted -l withpen pencircle scaled .5pt withcolor red ; (s shifted -l) enddef ; +% better? + +vardef thefreelabel (expr str, loc, ori) = + save s, p, q, l ; picture s ; path p, q ; pair l ; + interim labeloffset := freelabeloffset ; + s := if string str : thelabel(str,loc) else : str shifted -center str shifted loc fi ; + setbounds s to boundingbox s enlarged freelabeloffset ; + p := fullcircle scaled (2*length(loc-ori)) shifted ori ; + q := freesquare xyscaled (urcorner s - llcorner s) ; + l := point xpart (p intersectiontimes (ori--loc shifted (loc-ori))) of q ; + setbounds s to boundingbox s enlarged -freelabeloffset ; % new + draw boundingbox s shifted -l withpen pencircle scaled .5pt withcolor red ; + (s shifted -l) +enddef ; + + + vardef freelabel (expr str, loc, ori) = draw thefreelabel(str,loc,ori) ; enddef ; @@ -1006,35 +1051,85 @@ enddef ; numeric anglelength ; anglelength := 20pt ; numeric anglemethod ; anglemethod := 1 ; -vardef anglebetween (expr a, b, str) = % path path string +% vardef anglebetween (expr a, b, str) = % path path string +% save pointa, pointb, common, middle, offset ; +% pair pointa, pointb, common, middle, offset ; +% save curve ; path curve ; +% save where ; numeric where ; +% if round point 0 of a = round point 0 of b : +% common := point 0 of a ; +% else : +% common := a intersectionpoint b ; +% fi ; +% pointa := point anglelength on a ; +% pointb := point anglelength on b ; +% where := turningnumber (common--pointa--pointb--cycle) ; +% middle := ((common--pointa) rotatedaround (pointa,-where*90)) +% intersectionpoint +% ((common--pointb) rotatedaround (pointb, where*90)) ; +% if anglemethod = 0 : +% curve := pointa{unitvector(middle-pointa)}.. pointb; +% middle := point .5 along curve ; +% curve := common ; +% elseif anglemethod = 1 : +% curve := pointa{unitvector(middle-pointa)}.. pointb; +% middle := point .5 along curve ; +% elseif anglemethod = 2 : +% middle := common rotatedaround(.5[pointa,pointb],180) ; +% curve := pointa--middle--pointb ; +% elseif anglemethod = 3 : +% curve := pointa--middle--pointb ; +% elseif anglemethod = 4 : +% curve := pointa..controls middle..pointb ; +% middle := point .5 along curve ; +% fi ; +% draw thefreelabel(str, middle, common) withcolor black ; +% curve +% enddef ; + +vardef anglebetween (expr a, b, str) = % path path string save pointa, pointb, common, middle, offset ; pair pointa, pointb, common, middle, offset ; - save curve ; path curve ; - save where ; numeric where ; - if round point 0 of a = round point 0 of b : + save curve ; path curve ; + save where ; numeric where ; + if round point 0 of a = round point 0 of b : common := point 0 of a ; else : common := a intersectionpoint b ; - fi ; - pointa := point anglelength on a ; - pointb := point anglelength on b ; - where := turningnumber (common--pointa--pointb--cycle) ; - if anglemethod = 1 : - curve := pointa{pointa rotated (where*90)} .. pointb ; - middle := point .5 along curve ; - elseif anglemethod = 2 : - middle := common rotatedaround(.5[pointa,pointb],180) ; - curve := pointa--middle--pointb ; - elseif anglemethod = 3 : - middle := ((common--pointa) rotatedaround (pointa,-where*90)) - intersectionpoint - ((common--pointb) rotatedaround (pointb, where*90)) ; - curve := pointa--middle--pointb ; - fi ; + fi ; + pointa := point anglelength on a ; + pointb := point anglelength on b ; + where := turningnumber (common--pointa--pointb--cycle) ; + middle := (reverse(common--pointa) rotatedaround (pointa,-where*90)) + intersection_point + (reverse(common--pointb) rotatedaround (pointb, where*90)) ; + if not intersection_found : + middle := point .5 along + ((reverse(common--pointa) rotatedaround (pointa,-where*90)) -- + ( (common--pointb) rotatedaround (pointb, where*90))) ; + fi ; + if anglemethod = 0 : + curve := pointa{unitvector(middle-pointa)}.. pointb; + middle := point .5 along curve ; + curve := common ; + elseif anglemethod = 1 : + curve := pointa{unitvector(middle-pointa)}.. pointb; + middle := point .5 along curve ; + elseif anglemethod = 2 : + middle := common rotatedaround(.5[pointa,pointb],180) ; + curve := pointa--middle--pointb ; + elseif anglemethod = 3 : + curve := pointa--middle--pointb ; + elseif anglemethod = 4 : + curve := pointa..controls middle..pointb ; + middle := point .5 along curve ; + fi ; draw thefreelabel(str, middle, common) withcolor black ; curve enddef ; + + % Stack picture currentpicturestack[] ; @@ -1213,4 +1308,157 @@ enddef ; def condition primary b = if b : "true" else : "false" fi enddef ; +% undocumented + +primarydef p stretched s = + begingroup + save pp ; path pp ; pp := p scaled s ; + (pp shifted ((point 0 of p) - (point 0 of pp))) + endgroup +enddef ; + +% yes or no, untested -) + +def xshifted expr dx = shifted(dx,0) enddef ; +def yshifted expr dy = shifted(0,dy) enddef ; + +% also handy + +% right: str = readfrom ("abc" & ".def" ) ; +% wrong: str = readfrom "abc" & ".def" ; + +def readfile (expr name) = + if (readfrom (name) <> EOF) : + scantokens("input " & name & " ") + fi +enddef ; + +% permits redefinition of end in macro + +inner end ; + +% real fun + +color color_map[][][] ; + +%color_map_resolution := 1000 ; +% +%def r_color primary c = round(color_map_resolution*redpart c) enddef ; +%def g_color primary c = round(color_map_resolution*greenpart c) enddef ; +%def b_color primary c = round(color_map_resolution*bluepart c) enddef ; + +def r_color primary c = redpart c enddef ; +def g_color primary c = greenpart c enddef ; +def b_color primary c = bluepart c enddef ; + +def remapcolor(expr old, new) = + color_map[r_color old][g_color old][b_color old] := new ; +enddef ; + +def remappedcolor(expr c) = + if known color_map[r_color c][g_color c][b_color c] : + color_map[r_color c][g_color c][b_color c] + else : + c + fi +enddef ; + +let normalwithcolor = withcolor ; + +def remapcolors = + def withcolor primary c = normalwithcolor remappedcolor(c) enddef ; +enddef ; + +def normalcolors = + let withcolor = normalwithcolor ; +enddef ; + +def refill suffix c = do_repath (1) (c) enddef ; +def redraw suffix c = do_repath (2) (c) enddef ; +def recolor suffix c = do_repath (0) (c) enddef ; + +def do_repath (expr mode) (suffix c) text t = + begingroup ; + if mode=0 : save withcolor ; remapcolors ; fi ; + save _c_, _f_, _b_ ; picture _c_ ; color _f_ ; path _b_ ; + _c_ := c ; _b_ := boundingbox c ; c := nullpicture ; + for i within _c_ : + _f_ := (redpart i, greenpart i, bluepart i) ; + if bounded i : + setbounds c to pathpart i ; + elseif clipped i : + clip c to pathpart i ; + elseif stroked i : + addto c doublepath pathpart i + dashed dashpart i withpen penpart i + withcolor (redpart i, greenpart i, bluepart i) + if mode=2 : t fi ; + elseif filled i : + addto c contour pathpart i + withcolor (redpart i, greenpart i, bluepart i) + if mode=1 : t if _f_ = background : withcolor background fi fi ; + fi ; + endfor ; + setbounds c to _b_ ; + endgroup ; +enddef ; + +% After a question of Denis on how to erase a z variable, Jacko +% suggested to assign whatever to x and y. So a clearz +% variable can be defined as: +% +% vardef clearz@# = +% x@# := whatever ; +% y@# := whatever ; +% enddef ; +% +% but Jacko suggested a redefinition of clearxy: +% +% def clearxy text s = +% clearxy_index_:=0; +% for $:=s: +% clearxy_index_:=clearxy_index_+1; endfor; +% if clearxy_index_=0: +% save x,y; +% else: +% forsuffixes $:=s: x$:=whatever; y$:=whatever; endfor; +% fi +% enddef; +% +% which i decided to simplify to: + +def clearxy text s = + if false for $ := s : or true endfor : + forsuffixes $ := s : x$ := whatever ; y$ := whatever ; endfor ; + else : + save x, y ; + fi +enddef ; + +% so now we can say: clearxy ; as well as clearxy 1, 2, 3 ; + +% show x0 ; z0 = (10,10) ; +% show x0 ; x0 := whatever ; y0 := whatever ; +% show x0 ; z0 = (20,20) ; +% show x0 ; clearxy 0 ; +% show x0 ; z0 = (30,30) ; + +primarydef p smoothed d = + (p llmoved (-xpart paired(d),0) -- p lrmoved (-xpart paired(d),0) {right} .. + p lrmoved (0,-ypart paired(d)) -- p urmoved (0,-ypart paired(d)) {up} .. + p urmoved (-xpart paired(d),0) -- p ulmoved (-xpart paired(d),0) {left} .. + p ulmoved (0,-ypart paired(d)) -- p llmoved (0,-ypart paired(d)) {down} .. cycle) +enddef ; + +primarydef p cornered c = + ((point 0 of p) shifted (c*(unitvector(point 1 of p - point 0 of p))) -- + for i=1 upto length(p) : + (point i-1 of p) shifted (c*(unitvector(point i of p - point i-1 of p))) -- + (point i of p) shifted (c*(unitvector(point i-1 of p - point i of p))) .. + controls point i of p .. + endfor cycle) +enddef ; + +% done + endinput ; diff --git a/tex/context/base/colo-ini.tex b/tex/context/base/colo-ini.tex index 02b6ca694..729629cea 100644 --- a/tex/context/base/colo-ini.tex +++ b/tex/context/base/colo-ini.tex @@ -13,6 +13,8 @@ \writestatus{loading}{Context Color Macros} +%D To do: stroke versus fill color + \unprotect %D Color support is not present in \TEX. Colorful output can @@ -153,6 +155,21 @@ 11: fargen vil bli vist som grå \stopmessages +\startmessages romanian library: colors + title: culori + 1: sistem -- este activata global + 2: sistem -- este activata local + 3: -- nu este definita + 4: sistem -- este incarcata + 5: sistem -- necunoscuta + 6: paleta -- este disponibila + 7: palette -- nu este disponibila + 8: specificatia -- la culoarea -- devine neagra + 9: spatiul de culoare -- nu este suportat + 10: spatiul de culoare -- este suportat + 11: culoarea este convertita la gri +\stopmessages + %D \macros %D {definecolor} %D @@ -362,26 +379,41 @@ %D reduction and thus a space||saving option. %D \macros -%D {startcolormode,stopcolormode} +%D {startcolormode,stopcolormode,permitcolormode} %D %D We use \type{\stopcolormode} to reset the color in %D whatever color space and do so by calling the corresponding %D special. Both commands can be used for fast color %D switching, like in colored verbatim, +\newif\ifpermitcolormode \permitcolormodetrue + \def\dostartcolormode#1:% {\getvalue{dostartcolormode#1}} \def\startcolormode#1% - {\ifincolor + {\ifincolor\ifpermitcolormode \doifcolorelse{#1} {\getcurrentcolorspecs{#1}% \expandafter\dostartcolormode\currentcolorspecs\od} {\dostopcolormode}% - \fi} + \fi\fi} \def\stopcolormode% - {\ifincolor\dostopcolormode\fi} + {\ifincolor\ifpermitcolormode\dostopcolormode\fi\fi} + +%D \macros +%D {startregistercolor,stopregistercolor,permitcolormode} +%D +%D If you only want to register a color, the switch \type +%D {\ifpermitcolormode} can be used. That way the nested +%D colors know where to go back to. + +\def\startregistercolor[#1]% + {\permitcolormodefalse\startcolor[#1]\permitcolormodetrue} + +\def\stopregistercolor% + {\permitcolormodefalse\stopcolor\permitcolormodetrue} %D We use some reserved names for local color components. %D Consistent use of these scratch variables saves us diff --git a/tex/context/base/colo-rgb.tex b/tex/context/base/colo-rgb.tex index 0b5a7de1c..20e72ff9f 100644 --- a/tex/context/base/colo-rgb.tex +++ b/tex/context/base/colo-rgb.tex @@ -224,6 +224,46 @@ \stopinterface +\startinterface romanian + + \definecolor [rosu] [red] + \definecolor [verde] [green] + \definecolor [albastru] [blue] + + \definecolor [cian] [cyan] + \definecolor [magenta] [magenta] + \definecolor [galben] [yellow] + + \definecolor [alb] [white] + \definecolor [gri] [gray] + \definecolor [negru] [black] + + \definecolor [rosuinchis] [darkred] + \definecolor [rosumediu] [middlered] + \definecolor [rosudeschis] [lightred] + + \definecolor [verdeinchis] [darkgreen] + \definecolor [verdemediu] [middlegreen] + \definecolor [verdedeschis] [lightgreen] + + \definecolor [albastruinchis] [darkblue] + \definecolor [albastrumediu] [middleblue] + \definecolor [albastrudeschis] [lightblue] + + \definecolor [cianinchis] [darkcyan] + \definecolor [cianmediu] [middlecyan] + + \definecolor [magentainchis] [darkmagenta] + \definecolor [magentamediu] [middlemagenta] + + \definecolor [galbeninchis] [darkyellow] + \definecolor [galbenmediu] [middleyellow] + + \definecolor [griinchis] [darkgray] + \definecolor [grimediu] [middlegray] + \definecolor [grideschis] [lightgray] + +\stopinterface %D Like colors, we first define the english colorgroups. These %D colorgroups are tuned for distinctive gray scale printing. @@ -411,7 +451,6 @@ \definecolorgroup [giallo*] [yellow*] \stopinterface - %D The next set of color palets is quite language independant. %D These palets are meant as examples. diff --git a/tex/context/base/cont-log.tex b/tex/context/base/cont-log.tex index 8fd0774f1..e048655ed 100644 --- a/tex/context/base/cont-log.tex +++ b/tex/context/base/cont-log.tex @@ -84,6 +84,12 @@ \kern-.1em{\AMSswitch S}% -\TeX} +\def\AmSLaTeX% + {\AMSswitch A% + \kern-.1667em\lower.5ex\hbox{\AMSswitch M}% + \kern-.125em\AMSswitch S% + -\LaTeX} + %D The \METAFONT\ and \METAPOST\ logos adapt themselves to the %D current fontsize, an ugly but usefull hack. diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex index b33c6cc56..88014d202 100644 --- a/tex/context/base/cont-new.tex +++ b/tex/context/base/cont-new.tex @@ -11,39 +11,197 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -%D This file is loaded at runtime, thereby providing an -%D excellent place for hacks and new features. +% manual : offsetbox alignbox + + +\def\placefloats{\doflushfloats} % keep this one + +% already patched, spurious space due to stupid optimization + +\def\unprotect% + {\ifcase\protectionlevel + \edef\doprotectcharacters% + {\catcode`\noexpand @=\the\catcode`@ % + \catcode`\noexpand !=\the\catcode`! % + \catcode`\noexpand ?=\the\catcode`?}% + \catcode`@=11 + \catcode`!=11 + \catcode`?=11 + \let\protect\doprotect + \fi + \advance\protectionlevel 1 + \ifnum\protectionlevel>1 + \message{<unprotect \the\protectionlevel>}% + \fi} +\def\dousemodules[#1]% + {\doifelsenothing{#1} + {\let\next\relax} + {\def\next{\processcommalist[#1]\dodousemodules}} + \next} + \unprotect + +% permits \stoptext inside module + +\def\dododousemodules#1#2% + {\ifconditional\moduleisloaded + \let\next\relax + \else + \makeshortfilename[#1\truefilename{#2}]% + \doifundefinedelse{\shortfilename\v!aan} + {\setgvalue{\shortfilename\v!aan}{}% + \def\next + {\startreadingfile + \readsysfile{\shortfilename}% + {\showmessage{\m!systems}{5}{#2}% + \settrue\moduleisloaded}% + {}% + \stopreadingfile}} + {\showmessage{\m!systems}{7}{#2}% + \settrue\moduleisloaded + \let\next\relax}% + \fi + \next} + + + +%D This file is loaded at runtime, thereby providing an +%D excellent place for hacks and new features. \writestatus{\m!systems}{beware: some patches loaded from cont-new.tex!} + +\definesystemvariable{en} + +\def\setupenv{\dodoubleargument\rawgetparameters[\??en]} + +\def\doifenvelse#1{\doifdefinedelse{\??en#1}} + +\def\env#1{\getvalue{\??en#1}} % geen (!) test hier -%D Interesting, saves keystrokes, but also dangerous. - -%\def\checkMPbackground% -% {\doifoverlayelse\currentbackground -% {} -% {\doifMPgraphicelse\currentbackground -% {\defineoverlay[\currentbackground][\useMPgraphic{\currentbackground}]} -% {}}} -% -%\appendtoks \checkMPbackground \to \everybackgroundbox - -%D Better (no zero dimension mp figs) and faster: - -\def\dododopagebodybackground#1#2#3#4% - {\ifsomebackgroundfound{#3#4}% - \ifdim#1>\!!zeropoint\relax - \ifdim#2>\!!zeropoint\relax - \localframed - [\??ma#3#4] - [\c!breedte=#1,\c!hoogte=#2,\c!offset=\v!overlay] - {\getvalue{\??ma#3#4\c!commando}}% {\hsize=#1\vsize=#2....} - \fi +\def\inputfilename{\@@svinputfile} + +\setupsystem[inputfile=\outputfilename] % yes or no + +% already patched + +\def\setdisplaydimensions% + {\displayindent=\leftdisplayskip + \advance\displayindent\leftdisplaymargin + \displaywidth=\hsize + \ifdim\hangindent>\!!zeropoint + \advance\displayindent\hangindent + \else + \advance\displaywidth\hangindent + \fi + \advance\displaywidth-\displayindent + \advance\displaywidth-\rightdisplayskip + \advance\displaywidth-\rightdisplaymargin} + +% already patched + +\def\setsidefloat% + {\vbox{\strut}\vskip-\lineheight + \kern\sidefloattopskip + \edef\presidefloatdepth{\the\prevdepth}% + \nointerlineskip + \bgroup + \everypar={}% + \parskip=\!!zeropoint + \logsidefloat + \ifrightfloat + \hfill + \ifmarginfloat + \rlap{\hskip\rechtermargeafstand\hskip\rightskip\unhbox\floatbox}% + \else + \unhbox\floatbox \fi \else - \hskip#1% + \noindent + \ifmarginfloat + \llap{\unhbox\floatbox\hskip\leftskip\hskip\linkermargeafstand}% + \else + \unhbox\floatbox + \fi + \hfill + \fi + \egroup + \par + \kern-\sidefloatheight + \penalty10001 + \normalbaselines + \prevdepth=\presidefloatdepth + %\noindent + \resetsidefloatparagraph + \ignorespaces} + +% already patched + +\def\doapplyfiguresize% + {\doifelsenothing{\@@efmaxhoogte} + {\figurevsize=\teksthoogte + \ifinner + \figurevsize =\vsize % \teksthoogte =\vsize + \scratchdimen=\vsize % \scratchdimen=\teksthoogte + \else\ifinsidefloat + \figurevsize =\vsize % \teksthoogte =\vsize + \scratchdimen=\vsize % \scratchdimen=\teksthoogte + \else\ifinpagebody + \figurevsize =\vsize % \teksthoogte =\vsize + \scratchdimen=\vsize % \scratchdimen=\teksthoogte + \else + \ifdim\pagegoal<\maxdimen + \ifdim\pagetotal<\pagegoal + \scratchdimen=\pagegoal + \advance\scratchdimen by -\pagetotal + \else + \scratchdimen=\figurevsize % \teksthoogte + \fi + \else + \scratchdimen=\figurevsize % \teksthoogte + \fi + \fi\fi\fi} + {\figurevsize=\@@efmaxhoogte}% + \doifelsenothing{\@@efhoogte} + {\edef\@@efvsize{\the\scratchdimen}} + {\let\@@efvsize=\@@efhoogte}% + \doifelsenothing{\@@efbreedte} + {\edef\@@efhsize{\the\hsize}} + {\let\@@efhsize=\@@efbreedte}} + +\def\setvariables% + {\dodoubleargument\dosetvariables} + +\def\dosetvariables[#1][#2]% + {\def\currentvariableclass{#1}% + \getparameters[vars:#1:][#2]} + +\def\getvariable#1#2% + {\ifundefined{vars:#1:#2}\else\getvalue{vars:#1:#2}\fi} + +\let\currentvariableclass\empty + +% in both (otr) modules ! + +\def\doifrightpageelse#1#2% + {\ifdubbelzijdig + \gettwopassdata{\s!paragraph}% + \iftwopassdatafound + \ifodd\twopassdata#1\else#2\fi + \else + \ifodd\realfolio#1\else#2\fi + \fi + \else + #1% was #2 + \fi} + +\def\signalrightpage% + {\ifdubbelzijdig + \doparagraphreference \fi} + +%D To be documented, \type {\includemenu[menu]}. +%D To be documented, \type {\emphbf} cum suis. %D A prelude to strategies. Note for myself: overloads %D previous stuff from local pragma test files. diff --git a/tex/context/base/cont-ro.tex b/tex/context/base/cont-ro.tex new file mode 100644 index 000000000..1e24d4844 --- /dev/null +++ b/tex/context/base/cont-ro.tex @@ -0,0 +1,30 @@ +%D \module +%D [ file=cont-ro, +%D version=2000.01.09, +%D title=\CONTEXT, +%D subtitle=\CONTEXT\ Romanian Format Generation, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\catcode`\{=1 \catcode`\}=2 \def\defaultinterface{romanian} + +\input context.tex + +\unprotect + +\setupcurrentlanguage[\s!ro] + +\loaduserspecifications + +\installlanguage [\s!en] [\c!status=\v!start] +\installlanguage [\s!de] [\c!status=\v!start] +\installlanguage [\s!ro] [\c!status=\v!start] + +\setupbodyfont [cmr,rm,12pt] + +\protect \errorstopmode \dump \endinput diff --git a/tex/context/base/cont-sys.rme b/tex/context/base/cont-sys.rme index 847f51d6b..d4be0d79a 100644 --- a/tex/context/base/cont-sys.rme +++ b/tex/context/base/cont-sys.rme @@ -36,15 +36,15 @@ % \setupoutput % [dviwindo] % -% Enabling \CONTEXT\ navigation symbols: +% Enabling \CONTEXT\ navigation symbols as well as \euro's. % % \usesymbols -% [nav] +% [nav,eur] % % \setupsymbolset % [navigation 1] % -% \stelinteractiein +% \setupinteraction % [\c!symboolset=navigation 1] % % Changing language defaults: @@ -54,8 +54,10 @@ % [\c!leftquote=\upperleftsinglesixquote, % \c!leftquotation=\upperleftdoublesixquote] % -% \protect -% +% So far for the settings. + +\protect + % Loading local preferences: % % \input prag-gen % company styles diff --git a/tex/context/base/cont-usr.ori b/tex/context/base/cont-usr.ori index a02a01429..4ced0fdc8 100644 --- a/tex/context/base/cont-usr.ori +++ b/tex/context/base/cont-usr.ori @@ -32,6 +32,7 @@ \definefilesynonym [lang-en.pat] [ushyph1.tex] \definefilesynonym [lang-fi.pat] [fihyph.tex] \definefilesynonym [lang-fr.pat] [frhyph.tex] +\definefilesynonym [lang-hu.pat] [huhyph.tex] \definefilesynonym [lang-hr.pat] [hrhyph.tex] \definefilesynonym [lang-it.pat] [ithyph.tex] \definefilesynonym [lang-la.pat] [lahyph7.tex] @@ -41,7 +42,7 @@ \definefilesynonym [lang-pt.pat] [pthyph.tex] \definefilesynonym [lang-ro.pat] [rohyph.tex] \definefilesynonym [lang-sk.pat] [skhyph.tex] -\definefilesynonym [lang-sp.pat] [sphyph.tex] +\definefilesynonym [lang-es.pat] [eshyph.tex] \definefilesynonym [lang-sv.pat] [sehyph.tex] \definefilesynonym [lang-tr.pat] [trhyph.tex] \definefilesynonym [lang-uk.pat] [ukhyphen.tex] @@ -95,8 +96,9 @@ % \installlanguage [\s!pl] [\c!status=\v!start] % polish % \installlanguage [\s!pt] [\c!status=\v!start] % portuguese % \installlanguage [\s!ro] [\c!status=\v!start] % romanian +% \installlanguage [\s!hu] [\c!status=\v!start] % hungarian % \installlanguage [\s!sk] [\c!status=\v!start] % slovak -% \installlanguage [\s!es] [\c!status=\v!start] % spanish + \installlanguage [\s!es] [\c!status=\v!start] % spanish % \installlanguage [\s!sv] [\c!status=\v!start] % swedish % \installlanguage [\s!tr] [\c!status=\v!start] % turkish % \installlanguage [\s!uk] [\c!status=\v!start] % english uk @@ -122,6 +124,7 @@ % \setupcurrentlanguage[\s!pl] % \setupcurrentlanguage[\s!pt] % \setupcurrentlanguage[\s!ro] +% \setupcurrentlanguage[\s!hu] % \setupcurrentlanguage[\s!sk] % \setupcurrentlanguage[\s!es] % \setupcurrentlanguage[\s!sv] diff --git a/tex/context/base/context.tex b/tex/context/base/context.tex index 098c55493..ba7aed004 100644 --- a/tex/context/base/context.tex +++ b/tex/context/base/context.tex @@ -13,7 +13,7 @@ \catcode`\{=1 \catcode`\}=2 -\def\contextversion{2000.10.22} +\def\contextversion{2001.3.27} %D Welcome to the main module. When this module is ran through %D \type{initex} or \type{tex -i} or \type{whatevertex} using @@ -32,6 +32,7 @@ \input syst-gen.tex \input syst-ext.tex \input syst-new.tex +\input syst-con.tex %D To enable selective loading, we say: @@ -112,7 +113,7 @@ %D load additional definition modules when needed. \input enco-ini.tex - +\input regi-ini.tex % new \input lang-ini.tex \input colo-ini.tex @@ -151,7 +152,6 @@ \input core-uti.tex \input core-mar.tex \input core-mak.tex -\input core-mat.tex \input core-dat.tex \input core-grd.tex \input core-ver.tex @@ -168,6 +168,7 @@ \input core-num.tex \input core-itm.tex \input core-des.tex +\input core-mat.tex \input core-syn.tex \input core-mul.tex % moved \input main-001.tex % still to be split @@ -178,6 +179,8 @@ \input core-int.tex \input core-ntb.tex +\input page-lyr.tex + %D Like languages, fonts, encodings and symbols, \METAPOST\ %D support is also organized in its own class of modules. @@ -223,6 +226,12 @@ \input core-fig.tex % after page body \input core-par.tex +%D Only the basic XML parser is part of the core. + +\input xtag-ini.tex +\input xtag-ext.tex +%input xtag-map.tex + %D The next two modules implement some additional %D functionality concenring classes of documents and output. %D These modules probably will be replaced some day. @@ -302,14 +311,28 @@ \writestring{Questo pacchetto è basato sul Plain TeX. Usa una versione adattata del} \writestring{meccanismo di marcatura esteso di J. Fox (1987) ad alcune parti del} -\writestring{meccanismo per i float laterali di D. Comenetz (1993). La maggior parte} -\writestring{Plain TeX di D.E. Knuth (\fmtversion) è disponibile e può essere usata} -\writestring{senza problemi. Questo pacchetto usa TaBlE, un pacchetto progettato e} -\writestring{con diritti di copia di M.J. Wichura (1988). Solo qualche file ausiliario} -\writestring{viene generato, alcuni dei quali devono essere elaborati da TeXUtil} -\writestring{(\utilityversion). La versione attuale del blocco è \blockversion.} +\writestring{meccanismo per gli oggetti mobili laterali di D. Comenetz (1993).} +\writestring{La maggior parte del Plain TeX (\fmtversion) di D.E. Knuth è disponibile} +\writestring{e può essere usata senza problemi. Questo pacchetto usa TaBlE,} +\writestring{un pacchetto progettato da e con diritti di copia di M.J. Wichura (1988).} +\writestring{Vengono generati pochi file ausiliari, alcuni dei quali devono essere} +\writestring{elaborati da TeXUtil (\utilityversion). La versione attuale del blocco} +\writestring{è \blockversion.} \writestring{} \writestring{L'INTERFACCIA UTENTE ITALIANA E' ANCORA IN VIA DI SVILUPPO!} +\writestring{THE ITALIAN USER INTERFACE IS STILL UNDER DEVELOPMENT!} + +\stopinterface + +\startinterface romanian + +\writestring{Acest pachet este bazat pe Plain TeX. Foloseste o versiune adaptata a} +\writestring{mecanismului extins de marcare a lui J. Fox (1987) si cateva parti a mecanismului } +\writestring{blocurilor marginale a lui D. Comenetz (1993). Cea mai mare parte a Plain Tex} +\writestring{(\fmtversion) a lui D.E. Knuth este disponibila si poate fi folosita fara probleme.} +\writestring{Acest pachet foloseste TaBlE, un pachet proiectat si creat de M.J. Wichura (1988).} +\writestring{Numai un numar de fisiere auxiliare sunt generate, din care unele trebuie procesate} +\writestring{de catre TeXUtil (\utilityversion). Versiunea curenta de blocuri este \blockversion.} \stopinterface @@ -391,6 +414,15 @@ \stopinterface +\startinterface romanian + + \installlanguage [\s!ro] [\c!status=\v!start] + + \appendtoks \language [\s!ro] \to \everyjob + \appendtoks \mainlanguage [\s!ro] \to \everyjob + +\stopinterface + \protect %D Finally we load some fonts. diff --git a/tex/context/base/core-buf.tex b/tex/context/base/core-buf.tex index 431669918..a43a8acb7 100644 --- a/tex/context/base/core-buf.tex +++ b/tex/context/base/core-buf.tex @@ -111,6 +111,22 @@ 12: -- utelatt \stopmessages +\startmessages romanian library: textblocks + title: blocuri de text + 1: o noua versiune, este nevoie de inca o trecere + 2: se scriu blocurile in -- + 3: se citesc blocurile din -- + 4: este nevoie de inca o trecere + 5: -- nu este ascuns + 6: -- ascuns si procesat + 7: -- ascuns + 8: -- cules + 9: -- nu este cules + 10: -- incarcat si procesat + 11: -- incarcat si cules + 12: -- sarit peste +\stopmessages + \unprotect % PAS OP! diff --git a/tex/context/base/core-con.tex b/tex/context/base/core-con.tex index 07a3072a8..4396e4366 100644 --- a/tex/context/base/core-con.tex +++ b/tex/context/base/core-con.tex @@ -447,8 +447,9 @@ {\bgroup \let\labellanguage=\currentlanguage \def\betweendates{\let\betweendates\space}% - \processallactionsinset - [#1] + \lowercase{\edef\!!stringa{#1}}% permits usage in \kap + \@EA\processallactionsinset\@EA + [\!!stringa] [ dd=>\ifnum\normalday>9 \else0\fi\the\normalday, mm=>\ifnum\normalmonth>9 \else0\fi\the\normalmonth, jj=>\expandafter\gobbletwoarguments\the\normalyear, @@ -461,14 +462,14 @@ \v!kenmerk=>\expanded{\complexcurrentdate[\kenmerkdatumpatroon]}, \v!dag=>\betweendates\the\normalday, \v!maand=>\betweendates\month\normalmonth, - \v!MAAND=>\betweendates\MONTH\normalmonth, +% \v!MAAND=>\betweendates\MONTH\normalmonth, \v!jaar=>\betweendates\the\normalyear, \v!weekdag=>\betweendates\dayoftheweek\normalday\normalmonth\normalyear, - \v!WEEKDAG=>\betweendates - \bgroup - \let\labeltext=\LABELTEXT - \dayoftheweek\normalday\normalmonth\normalyear - \egroup, +% \v!WEEKDAG=>\betweendates +% \bgroup +% \let\labeltext=\LABELTEXT +% \dayoftheweek\normalday\normalmonth\normalyear +% \egroup, \s!unknown=>\commalistelement \def\betweendates{\let\betweendates\space}]% \egroup} diff --git a/tex/context/base/core-dat.tex b/tex/context/base/core-dat.tex index dad330ebd..50aeb3bd9 100644 --- a/tex/context/base/core-dat.tex +++ b/tex/context/base/core-dat.tex @@ -63,6 +63,14 @@ 4: ukjent fil -- \stopmessages +\startmessages romanian library: databases + title: baze de date + 1: -- + 2: fisier local -- + 3: fisier global -- + 4: fisier necunoscut -- +\stopmessages + \unprotect %D This module is a (limited) rewrite of the original \type diff --git a/tex/context/base/core-des.tex b/tex/context/base/core-des.tex index 82799c7b7..d4fbbb670 100644 --- a/tex/context/base/core-des.tex +++ b/tex/context/base/core-des.tex @@ -455,52 +455,14 @@ \getvalue{\??dd#1\c!scheider}% \nummer[\v!sub\v!sub\v!sub\getvalue{\??dd#1\??dd\c!nummer}]} -\def\domakednnummer#1#2% - {\getvalue{\??dd#2\c!links}% - \strut#1{#2}% - \getvalue{\??dd#2\c!rechts}} +\def\domakednnummer#1#2#3% + {\getvalue{\??dd#2#1\c!links}% + \strut#3{#1}% + \getvalue{\??dd#2#1\c!afsluiter}% + \getvalue{\??dd#2#1\c!rechts}} % #1=name #2=level #3=\show #4[#5]#6#7=#1[#2]#3#4 van definitie -%\def\special@@definitiewoord#1#2#3#4[#5]#6#7% -% {\strut -% \doifelsevalue{\??dd#1\c!nummer}{\v!nee} -% {\!!doneafalse} -% {\doifelse{#5}{-} -% {\!!doneafalse} -% {\!!doneatrue}}% -% \if!!donea -% \getvalue{\e!volgende#2#1}% -% \iflocation -% \bgroup -% \setvalue{\??dd#1\c!sectienummer}{\v!ja}% -% \protectconversion -% \maakvoorafgaandenummer[#1]% -% \xdef\internaldoornummer{#3{#1}}% -% \rawreference{\s!num}{#1:\internaldoornummer}{}% -% \egroup -% \fi -% \maakvoorafgaandenummer[#1]% -% \hbox -% {\def\kap##1{##1}% \domakednnumer gaat hier fout binnen kap -% \doattributes -% {\??dd#1}\c!kopletter\c!kopkleur -% {\showdntext{#2#1}% -% \domakednnummer#3{#1}% -% \getvalue{\??dd#1\c!afsluiter}}% -% \iflocation -% \edef\localconnection{\getvalue{\??dd#1\c!koppeling}:\internaldoornummer}% -% \doifreferencefoundelse{\localconnection} -% {\in[\localconnection]}{}% genereert > of < -% \fi}% -% \rawreference{\s!num}{#5}{#3{#1}}% -% \else -% \edef\!!stringa{\showdnpuretext{#2#1}}% nog eens testen binnen \expanded -% \expanded{\doattributes{\??dd#1}\noexpand\c!kopletter\noexpand\c!kopkleur -% {\!!stringa}}% -% \rawreference{\s!num}{#5}{}% -% \fi} - \def\special@@definitiewoord#1#2#3#4[#5]#6#7% {\strut \doifelsevalue{\??dd#1\c!nummer}{\v!nee} @@ -544,8 +506,7 @@ {\??dd#1}\c!kopletter\c!kopkleur {\getvalue{\??dd#1\c!commando}% {\showdntext{#2#1}% - \domakednnummer#3{#1}% - \getvalue{\??dd#1\c!afsluiter}}% + \domakednnummer{#1}{#2}{#3}}% }% \iflocation\ifcase\definitiekoppeling \else \edef\localconnection{\getvalue{\??dd#1\c!koppeling}:\internaldoornummer}% @@ -648,11 +609,13 @@ {\doifelsenothing{#4} {\getparameters[\??dd#3#1]% [\c!tekst=#1,\??dd\c!nummer=#1,\c!conversie=, +\c!afsluiter=, \c!links=,\c!rechts=,\c!koppeling=,\c!koppelwijze=,#4]}% {\copyparameters[\??dd#3#1][\??dd#3#4] [\c!plaats,\c!kopletter,\c!letter,\c!kleur,\c!kopkleur, \c!breedte,\c!nummer,\c!afstand,\c!commando,\c!marge, \c!monster,\c!hang,\c!uitlijnen,\c!voor,\c!tussen,\c!na, +\c!afsluiter, \c!springvolgendein,\c!links,\c!rechts,\c!koppeling,\c!koppelwijze]% \getparameters[\??dd#3#1] [\c!tekst=#1,\??dd\c!nummer=#4,\c!conversie=,#5]}}% diff --git a/tex/context/base/core-fig.tex b/tex/context/base/core-fig.tex index 259acb0b7..6a1305675 100644 --- a/tex/context/base/core-fig.tex +++ b/tex/context/base/core-fig.tex @@ -44,7 +44,7 @@ 6: maten van -- berekend door TeXUtil 7: figuurfile -- moet opnieuw worden aangemaakt 8: figuurobject -- wordt opnieuw gebruikt - 9: suffix -- bij figuur -- wordt niet afgehandeld + 9: figuur -- wordt niet afgehandeld 10: figuur -- heeft geen afmetingen \stopmessages @@ -58,7 +58,7 @@ 6: dimensions of -- calculated by TeXUtil 7: you have to regenerate figure file -- 8: figureobject -- is reused - 9: suffix -- by figure -- is not handled + 9: figure -- is not handled 10: figure -- has zero dimensions \stopmessages @@ -72,7 +72,7 @@ 6: Dimensionen von -- ausgerechnet durch TeXUtil 7: Sie muessen eine neue Abbildungsdatei -- erstellen 8: Abbildungobjekt -- wurde wiederverwandt - 9: Dateiendung -- der Abbildung -- wird nicht unterstuetzt + 9: Abbildung -- wird nicht unterstuetzt 10: figure -- has zero dimensions \stopmessages @@ -88,7 +88,7 @@ 6: dimenze obrazu -- spocteny programem TeXUtil 7: musite znovu vygenerovat soubor obrazu -- 8: obrazovy objekt -- je znovu pouzit - 9: pripona -- obrazu -- neni uvazovana + 9: figure -- is not handled 10: figure -- has zero dimensions \stopmessages @@ -104,8 +104,22 @@ 6: dimensioni di -- calcolate TeXUtil 7: bisogna rigenerare il file di immagini -- 8: oggetto-figura -- riutilizzato - 9: suffisso -- per figura -- non gestito - 10: figura -- ha dimensioni nulle + 9: la figura -- non gestito + 10: la figura -- ha dimensioni nulle +\stopmessages + +\startmessages romanian library: figures + title: figuri + 1: figura -- nu poate fi gasita + 2: figura -- nu este presetata + 3: dimensiunea figurii -- se imprumuta din -- + 4: dimensiunea figurii -- se incarca din fisierul insusi + 5: dimensiunea figurii -- se incarca din fisierul -- + 6: dimensiunea figurii -- este calculata de TeXutil + 7: trebuie sa refaceti fisierul imagine -- + 8: obiectul figura -- este refolosit + 9: sufixul -- din figura -- nu este folosit + 10: figura -- are dimensiuni nule \stopmessages %D Due to the mere fact that \DVI|/|\PDF\ drivers differ in their @@ -234,7 +248,7 @@ {\assignfullfilename % needed {\@@efcurrentpath}% {\@@effilename.\figureextension{\@@efcurrenttype}}% - \to\@@efcurrentfile% + \to\@@efcurrentfile \dodododoanalyzefigurefiles} {}% \fi} @@ -354,7 +368,9 @@ for \@@effilenametype}% \pushendofline \let\presetfigure=\presetfigureA +\startreadingfile \readsetfile{\@@efcurrentpath}{\@@exfile}\relax\relax +\stopreadingfile \popendofline \@@eftrace{\ifcase\figurestatus not \fi found}% \fi\fi} @@ -383,8 +399,10 @@ {texutil --fig --out=\@@efloadname\space\@@effilenametype}% \@@eftrace{analyzing \@@efloadname\space on \@@effilenametype}% \pushendofline +\startreadingfile \let\presetfigure=\presetfigureB \readsetfile{.}{\@@efloadname}\relax\relax +\stopreadingfile \popendofline \@@eftrace{\ifcase\figurestatus not \fi found}} {}}% @@ -409,7 +427,9 @@ for \@@effilenametype}% \pushendofline \let\presetfigure=\presetfigureC +\startreadingfile \readsetfile{\@@efcurrentpath}{\@@exfile}\relax\relax +\stopreadingfile \popendofline \@@eftrace{\ifcase\figurestatus not \fi found}% \fi\fi} @@ -438,7 +458,9 @@ for \@@effilename.* surrogate}% \pushendofline \let\presetfigure=\presetfigureD +\startreadingfile \readsetfile{\@@efcurrentpath}{\@@exfile}\relax\relax +\stopreadingfile \popendofline \@@eftrace{\ifcase\figurestatus not \fi found}% \fi\fi} @@ -689,29 +711,61 @@ \newdimen\figurevsize % we cannot manipulate any global vsize ! +% \def\doapplyfiguresize% +% {\figurevsize=\teksthoogte +% \ifinner +% \figurevsize =\vsize % \teksthoogte =\vsize +% \scratchdimen=\vsize % \scratchdimen=\teksthoogte +% \else\ifinsidefloat +% \figurevsize =\vsize % \teksthoogte =\vsize +% \scratchdimen=\vsize % \scratchdimen=\teksthoogte +% \else\ifinpagebody +% \figurevsize =\vsize % \teksthoogte =\vsize +% \scratchdimen=\vsize % \scratchdimen=\teksthoogte +% \else +% \ifdim\pagegoal<\maxdimen +% \ifdim\pagetotal<\pagegoal +% \scratchdimen=\pagegoal +% \advance\scratchdimen by -\pagetotal +% \else +% \scratchdimen=\figurevsize % \teksthoogte +% \fi +% \else +% \scratchdimen=\figurevsize % \teksthoogte +% \fi +% \fi\fi\fi +% \doifelsenothing{\@@efhoogte} +% {\edef\@@efvsize{\the\scratchdimen}} +% {\let\@@efvsize=\@@efhoogte}% +% \doifelsenothing{\@@efbreedte} +% {\edef\@@efhsize{\the\hsize}} +% {\let\@@efhsize=\@@efbreedte}} + \def\doapplyfiguresize% - {\figurevsize=\teksthoogte - \ifinner - \figurevsize =\vsize % \teksthoogte =\vsize - \scratchdimen=\vsize % \scratchdimen=\teksthoogte - \else\ifinsidefloat - \figurevsize =\vsize % \teksthoogte =\vsize - \scratchdimen=\vsize % \scratchdimen=\teksthoogte - \else\ifinpagebody - \figurevsize =\vsize % \teksthoogte =\vsize - \scratchdimen=\vsize % \scratchdimen=\teksthoogte - \else - \ifdim\pagegoal<\maxdimen - \ifdim\pagetotal<\pagegoal - \scratchdimen=\pagegoal - \advance\scratchdimen by -\pagetotal - \else - \scratchdimen=\figurevsize % \teksthoogte - \fi - \else - \scratchdimen=\figurevsize % \teksthoogte - \fi - \fi\fi\fi + {\doifelsenothing{\@@efmaxhoogte} + {\figurevsize=\teksthoogte + \ifinner + \figurevsize =\vsize % \teksthoogte =\vsize + \scratchdimen=\vsize % \scratchdimen=\teksthoogte + \else\ifinsidefloat + \figurevsize =\vsize % \teksthoogte =\vsize + \scratchdimen=\vsize % \scratchdimen=\teksthoogte + \else\ifinpagebody + \figurevsize =\vsize % \teksthoogte =\vsize + \scratchdimen=\vsize % \scratchdimen=\teksthoogte + \else + \ifdim\pagegoal<\maxdimen + \ifdim\pagetotal<\pagegoal + \scratchdimen=\pagegoal + \advance\scratchdimen by -\pagetotal + \else + \scratchdimen=\figurevsize % \teksthoogte + \fi + \else + \scratchdimen=\figurevsize % \teksthoogte + \fi + \fi\fi\fi} + {\figurevsize=\@@efmaxhoogte}% \doifelsenothing{\@@efhoogte} {\edef\@@efvsize{\the\scratchdimen}} {\let\@@efvsize=\@@efhoogte}% @@ -768,8 +822,9 @@ \global\figwid=\!!zeropoint \figxsca=1 % see note * \global\fighei=\!!zeropoint \figysca=1 % see note * \global\setbox\foundexternalfigure=\box\voidb@x - \expandafter\beforesplitstring#3\at.\to\@@effilename - \expandafter\aftersplitstring #3\at.\to\@@efextension + \edef\expandedfigurename{#3}% needed e.g. in [\get...] cases + \expandafter\beforesplitstring\expandedfigurename\at.\to\@@effilename + \expandafter\aftersplitstring \expandedfigurename\at.\to\@@efextension \doifelse{\@@effilename}{mprun} {\edef\@@effilepref{\bufferprefix}} {\let \@@effilepref\empty}% @@ -789,7 +844,7 @@ \c!object=\@@exobject,\c!preset=\v!ja, % old \c!achtergrond=,\c!achtergrondkleur=,\c!achtergrondraster=\@@rsraster, % old \c!hoek=,\c!straal=.5\korpsgrootte,\c!kader=\v!uit, - \c!pagina=0,\c!preview=\v!nee,\c!herhaal=\v!nee, + \c!pagina=0,\c!sturing=\v!nee,\c!preview=\v!nee,\c!herhaal=\v!nee, \c!maxbreedte=\@@exmaxbreedte,\c!maxhoogte=\@@exmaxhoogte, \c!schaal=,\c!breedte=,\c!hoogte=,\c!scherm=, \c!factor=,\c!hfactor=,\c!bfactor=]% @@ -799,6 +854,9 @@ \doif{\@@efreset}{\v!ja}{\resetexternalfigures}% \doif{\@@eftype}{\c!mov}{\presetfiguremov}% \doif{\@@eftype}{\c!avi}{\presetfigureavi}% +% hack +\doif{\@@efmethode}{\c!mov}{\doifsomething{\@@efextension}{\presetundefinedfigure\@@efextension}}% +% \doif{\@@eftype}{\v!buffer} {\ifx\@@efextension\empty \let\@@efextension\c!tmp @@ -821,10 +879,11 @@ \doifobjectfoundelse{FIG}{\@@efobjectname}{\donetrue}{\donefalse}} {\donefalse}} {\donefalse}}% + % redo message, only filename \doifparentfileelse{\@@effilename} {\@EA\removefromcommalist\@EA{\jobsuffix}\figuretypes \let\@@efextension=\empty - \showmessage{\m!figures}{9}{\@@effilename,\jobsuffix}% + \showmessage{\m!figures}{9}{\@@effilename}% \donefalse} {}% \ifdone @@ -885,7 +944,7 @@ \edef\@@efextension{\figureextension{\@@eftype}}% dirty trick \global\figwid=\!!zeropoint \figxsca=1 \global\fighei=\!!zeropoint \figysca=1 - \doif{\@@exoptie}{\v!kader} + \doif{\v!kader}{\@@exoptie} {\let\@@efkader=\v!aan}% \fi \ifcase\figurestatus @@ -927,14 +986,16 @@ w=\number\figwid\space h=\number\fighei\space sx=\scax\space sy=\scay\space ox=\figx\space oy=\figy]}% \fi - \doif{\@@exoptie}{\v!leeg} + \doif{\v!leeg}{\@@exoptie} {\skipexternalfigurestrue \let\@@efkader=\v!uit}% - \doifelsenothing{\@@efpagina} % NIEUW + \doifelsenothing{\@@efpagina} % NIEUW ?? {\let\@@efoptions\empty} {\let\@@efoptions\@@efpagina}% \doif{\@@efpreview}{\v!ja} {\addtocommalist\v!preview\@@efoptions}% + \doif{\@@efsturing}{\v!ja} + {\addtocommalist\v!sturing\@@efoptions}% \doif{\@@efherhaal}{\v!ja} {\addtocommalist\v!herhaal\@@efoptions}% \doif{\@@eftype}{\c!mps} @@ -1433,7 +1494,7 @@ \box\colorbarbox}} \def\dodostartfigure[#1][#2][#3]#4\stopfigure% - {\doifelse{\@@exoptie}{\v!test} + {\doifelse{\v!test}{\@@exoptie} {\teststartfigure[#1][#2][#3]#4\teststopfigure \def\@@exhokjes{\v!aan}} {\def\@@exhokjes{\v!uit}}% @@ -1510,7 +1571,7 @@ \endgroup} \def\dodostartfigure[#1][#2][#3]#4\stopfigure% - {\doifelse{\@@exoptie}{\v!test} + {\doifelse{\v!test}{\@@exoptie} {\teststartfigure[#1][#2][#3]#4\teststopfigure \def\@@exhokjes{\v!aan}} {\def\@@exhokjes{\v!uit}}% diff --git a/tex/context/base/core-fil.tex b/tex/context/base/core-fil.tex index 50a05693a..9e47412d2 100644 --- a/tex/context/base/core-fil.tex +++ b/tex/context/base/core-fil.tex @@ -49,6 +49,11 @@ 1: filesynonym -- er allerede brukt for -- \stopmessages +\startmessages romanian library: files + title: fisiere + 1: sinonimul fisierelor -- este folosit deja pentru -- +\stopmessages + %D \macros %D {definefilesynonym} %D @@ -153,6 +158,7 @@ {\setfalse\moduleisloaded \dododousemodules\f!moduleprefix {#1}% \dododousemodules\f!styleprefix {#1}% + \dododousemodules\f!xstyleprefix {#1}% \dododousemodules\f!privateprefix{#1}% \ifconditional\moduleisloaded\else \showmessage{\m!systems}{6}{#1}% @@ -199,7 +205,7 @@ \def\convertMPcolorfile% {\bufferprefix metacmyk.tmp} -%D Temporarily here: +%D Temporarilly here: \def\definieerfilegroep% {\dodoubleargument\dodefinieerfilegroep} @@ -230,6 +236,21 @@ {\getvalue{\e!stop#1#2}% \getvalue{\??fp#1\c!na}} +% usage: +% +% \fetchruntimecommand\showaccents{\f!encodingprefix ...} + +\def\fetchruntimecommand#1#2% + {\def#1{\dofetchruntimecommand#1{#2}}} + +\def\dofetchruntimecommand#1#2% + {\doifundefined{@@@#2@@@}{\let#1\undefined\doinputonce{#2}}% + \ifx#1\undefined + \writestatus{\m!systems}{command \string#1 not found in file #2}% + \def#1{{\infofont[unknown command \string#1]}}% + \fi + #1} + %D This will be perfected / changed / weeded. \protect diff --git a/tex/context/base/core-fld.tex b/tex/context/base/core-fld.tex index d7957fc85..a240bfa2b 100644 --- a/tex/context/base/core-fld.tex +++ b/tex/context/base/core-fld.tex @@ -17,6 +17,8 @@ % messages +\definemessageconstant{fields} + \unprotect %D Internal command, linked to \type{\definesymbol}. @@ -28,7 +30,7 @@ {\checkobjectreferences \doifobjectfoundelse{SYM}{#1} {} - {\setobject{SYM}{#1}\hbox{\symbol[#1]}% + {\settightobject{SYM}{#1}\hbox{\symbol[#1]}% \flushatshipout {\setbox0=\hbox{\hskip-\maxdimen\getobject{SYM}{#1}}% \smashbox0\box0}}} @@ -38,7 +40,7 @@ {\processcommalist[##1]\dopresetfieldsymbol}% \@EA\processcommalist\@EA[#1]\dopresetfieldsymbols} -\def\definedefaultsymbols +\def\definedefaultsymbols% {\definesymbol[defaultyes][$\times$]% \definesymbol[defaultno][$\cdot$]} @@ -273,9 +275,13 @@ \newif\ifdefinemainfield \definemainfieldfalse -%D We used to have: +%D We need to keep track of cloned (related) fields and so by +%D maintaining lists of field clones. +%D +%D The first alternative used a two pass data list and was +%D implemented as follows: %D -%D \starttyping +%D \starttypen %D \def\getmainfieldkids#1% %D {\let\@@FieldKids\empty %D \ifdefinemainfield @@ -289,35 +295,86 @@ %D \exitloop %D \fi}% %D \fi} -%D \stoptyping +%D \stoptypen %D -%D The next alternative is much faster when we have a field -%D with thousands of clones, somthing not that imaginary. +%D However, the next alternative is much faster when we have +%D a field with thousands of clones, something not that +%D imaginary. +%D +%D \starttypen +%D \def\getmainfieldkids#1% +%D {\let\@@FieldKids\empty +%D \ifdefinemainfield +%D \definerawpasslist{fld:#1}% runtime defined by system +%D \moverawpasslist{fld:#1}\@@FieldKids +%D \fi} +%D \stoptypen +%D +%D The data is written by file using: +%D +%D \starttypen +%D \newcounter\nofmainfieldkids +%D +%D \def\setmainfieldkid#1#2% +%D {\doglobal\increment\nofmainfieldkids +%D \immediatewriteutilitycommand +%D {\twopassentry% +%D {fld:#1}% +%D {\nofmainfieldkids}% +%D {#2}}} +%D \stoptypen +%D +%D The trade of of this mechanism is that for each cloned or +%D copied field, the uitlity file is to be read in order to +%D fetch the data. +%D +%D The next, much faster alternative uses a dedicated % +%D reference mechanism. + +\def\setmainfieldkid#1#2% + {\immediatewriteutilitycommand{\fieldreference{#1}{#2}}} + +\def\checkfieldreferences% + {\bgroup + \setbox0=\hbox + {\doutilities{fieldreferences}{\jobname}{}{}{}}% + \global\let\checkfieldreferences=\relax + \egroup} + +\def\setfieldreferences% + {\def\fieldreference##1##2% + {\ifundefined{\r!widget##1} + \setxvalue{\r!widget##1}{##2}% + \else + \edef\!!stringa{\getvalue{\r!widget##1}}% + \setxvalue{\r!widget##1}{\!!stringa,##2}% + \fi}} + +\def\resetfieldreferences% + {\let\fieldreference=\gobbletwoarguments} \def\getmainfieldkids#1% - {\let\@@FieldKids\empty + {\checkfieldreferences \ifdefinemainfield - \definerawpasslist{fld:#1}% runtime defined by system - \moverawpasslist{fld:#1}\@@FieldKids + \doifundefinedelse{\r!widget#1}% + {\let\@@FieldKids\empty} + {\@EA\let\@EA\@@FieldKids\csname\r!widget#1\endcsname}% + \else + \let\@@FieldKids\empty \fi} -\newcounter\nofmainfieldkids +\resetfieldreferences -\def\setmainfieldkid#1#2% - {\doglobal\increment\nofmainfieldkids - \immediatewriteutilitycommand - {\twopassentry% - {fld:#1}% - {\nofmainfieldkids}% - {#2}}} - -\def\definemainfield% - {\definemainfieldtrue - \doquintupleempty\dodefinefield} +%D Of course it costs a few more tokens to implement, but it's +%D worth the memory: running for instance the 2000 page +%D english examns publishing on demand document went down from +%D 1350 seconds to less than 950 on a 650 Mhz pentium. \def\definefield% - {\definemainfieldfalse - \doquintupleempty\dodefinefield} + {\definemainfieldfalse\doquintupleempty\dodefinefield} + +\def\definemainfield% + {\definemainfieldtrue \doquintupleempty\dodefinefield} \let\collectedfields=\empty \newcounter\numberoffields @@ -343,7 +400,7 @@ {\ifsecondargument \edef\currentfieldname{#1}% just in case we're inside a loop \doifundefinedelse{define#2field} - {\writestatus{fields}{unknown field type #2}} + {\writestatus{\m!fields}{unknown field type #2}} {\doifundefined{fielddata\currentfieldname} {\getmainfieldkids{\currentfieldname}% \ifdefinemainfield @@ -360,7 +417,7 @@ \def\@@FieldFree{0}% \getvalue{define#2field}{\currentfieldname}{#2}{#3}{#4}{#5}}}% \else - \writestatus{fields}{pass fieldname and fieldtype}% + \writestatus{\m!fields}{pass fieldname and fieldtype}% \fi} \def\definelinefield#1#2#3#4#5% @@ -412,7 +469,7 @@ \setfield{##1}{#2}{#1}{}{}{#3}{\@@FieldMode\@@FieldFree\@@FieldAuto}{}{\@@FieldDefault}}% \processcommalist[#4]\docommando \else - \writestatus{fields}{pass values too}% + \writestatus{\m!fields}{pass values too}% \fi} \def\definesubfield% @@ -423,7 +480,7 @@ \def\docommando##1% {\getfield{##1}% \ifx\@@FieldType\empty - \writestatus{fields}{unknown field ##1}% + \writestatus{\m!fields}{unknown field ##1}% to do \else \doifsomething{#2} {\edef\@@FieldGroup{#2}}% @@ -439,14 +496,14 @@ \fi}% \processcommalist[#1]\docommando \else - \writestatus{fields}{pass fieldname, setupgroup, values and default}% + \writestatus{\m!fields}{pass fieldname, setupgroup, values and default}% \fi} \def\doclonefield[#1][#2][#3][#4]% parent children setupgroup values {\ifsecondargument \getfield{#1}% \ifx\@@FieldType\empty - \writestatus{fields}{unknown field #1}% + \writestatus{\m!fields}{unknown field #1}% \else \let\@@FieldMode=\fieldparentmode %\def\docommando##1{\addtocommalist{##1}\@@FieldKids}% @@ -470,7 +527,7 @@ \processcommalist[#2]\docommando \fi \else - \writestatus{fields}{pass parent field and clones}% + \writestatus{\m!fields}{pass parent field and clones}% \fi} \def\clonefield% @@ -480,7 +537,7 @@ {\ifsecondargument \getfield{#1}% \ifx\@@FieldType\empty - \writestatus{fields}{unknown field #1}% + \writestatus{\m!fields}{unknown field #1}% \else \let\@@FieldMode=\fieldparentmode %\def\docommando##1{\addtocommalist{##1}\@@FieldKids}% @@ -502,7 +559,7 @@ \processcommalist[#2]\docommando \fi \else - \writestatus{fields}{pass parent field and copies}% + \writestatus{\m!fields}{pass parent field and copies}% \fi} \def\copyfield% @@ -524,17 +581,17 @@ \let\@@FieldLabel=\@@FieldName \fi \ifx\@@FieldType\empty - \writestatus{fields}{unknown field #2}% + \writestatus{\m!fields}{unknown field #2}% \else\ifcase\@@FieldFree - \doifdefinedelse{setupfield\@@FieldGroup} - {\let\dosetupfield=#1\getvalue{setupfield\@@FieldGroup}} + \doifdefinedelse{\strippedcsname\setupfield\@@FieldGroup} + {\let\dosetupfield=#1\getvalue{\strippedcsname\setupfield\@@FieldGroup}} {#1[\@@FieldName][\v!label,\v!kader,\v!horizontaal][][][]}% \def\@@FieldFree{1}% \changefield{#2}% \else\ifcase\@@FieldAuto - \writestatus{fields}{field #2 already typeset}% + \writestatus{\m!fields}{field #2 already typeset}% \else - \writestatus{fields}{field #2 automatically copied}% + \writestatus{\m!fields}{field #2 automatically copied}% \nextsystemfield \copyfield[\@@FieldName][\currentsystemfield]% \dotripleempty\dofield[#1][\currentsystemfield][#3]% get the if's right @@ -578,18 +635,18 @@ {\dodoubleargument\dodefinethefieldset} \def\normaldodosetupfield[#1][#2][#3][#4][#5]% - {\doifdefinedelse{setupfield#1} + {\doifdefinedelse{\strippedcsname\setupfield#1} {\pushmacro\dosetupfield \def\dosetupfield[##1][##2][##3][##4][##5]% - {\setvalue{setupfield#1}{\dosetupfield[#1][##2,#2][##3,#3][##4,#4][##5,#5]}}% - \getvalue{setupfield#1}% + {\setvalue{\strippedcsname\setupfield#1}{\dosetupfield[#1][##2,#2][##3,#3][##4,#4][##5,#5]}}% + \getvalue{\strippedcsname\setupfield#1}% \popmacro\dosetupfield} - {\setvalue{setupfield#1}{\dosetupfield[#1][#2][#3][#4][#5]}}} + {\setvalue{\strippedcsname\setupfield#1}{\dosetupfield[#1][#2][#3][#4][#5]}}} \let\dodosetupfield\normaldodosetupfield \def\donosetupfield[#1][#2][#3][#4][#5]% - {\setvalue{setupfield#1}{\dosetupfield[#1][#2][#3][#4][#5]}} + {\setvalue{\strippedcsname\setupfield#1}{\dosetupfield[#1][#2][#3][#4][#5]}} \def\dosetupfield[#1][#2][#3][#4][#5]% {\iffifthargument @@ -607,7 +664,7 @@ \def\docommando##1{\dodosetupfield[##1][][][][]}% \processcommalist[#1]\docommando \else - \writestatus{fields}{provide either 1, 2, 3 or 5 arguments}% + \writestatus{\m!fields}{provide either 1, 2, 3 or 5 arguments}% \fi\fi\fi\fi} \def\setupfield% @@ -616,17 +673,17 @@ \def\dosetupfields[#1][#2][#3][#4]% {\ifsecondargument \def\dodosetupfield[##1][##2][##3][##4][##5]% - {\doifdefinedelse{setupfield##1} + {\doifdefinedelse{\strippedcsname\setupfield##1} {\def\dosetupfield[####1][####2][####3][####4][####5]% - {\setvalue{setupfield##1}{\dosetupfield[##1][#1,####2,##2][#2,####3,##3][#3,####4,##4][#4,####5,##5]}}% - \getvalue{setupfield##1}} - {\setvalue{setupfield##1}{\dosetupfield[##1][#1,##2][#2,##3][#3,##4][#4,##5]}}}% + {\setvalue{\strippedcsname\setupfield##1}{\dosetupfield[##1][#1,####2,##2][#2,####3,##3][#3,####4,##4][#4,####5,##5]}}% + \getvalue{\strippedcsname\setupfield##1}} + {\setvalue{\strippedcsname\setupfield##1}{\dosetupfield[##1][#1,##2][#2,##3][#3,##4][#4,##5]}}}% \else\iffirstargument \doifelse{#1}{\v!reset} {\let\dodosetupfield\normaldodosetupfield} {\setupfields[][][][#1]}% checken \else - \writestatus{fields}{provide either 1 or 4 arguments}% + \writestatus{\m!fields}{provide either 1 or 4 arguments}% \fi\fi} \def\setupfields% diff --git a/tex/context/base/core-fnt.tex b/tex/context/base/core-fnt.tex index 9928d64ee..8d9119f25 100644 --- a/tex/context/base/core-fnt.tex +++ b/tex/context/base/core-fnt.tex @@ -90,7 +90,7 @@ \cap@@uppercase{#1{#2}}% \egroup} -\def\nokap#1% +\unexpanded\def\nokap#1% {\cap@@lowercase{#1}} \unexpanded\def\kap% @@ -246,7 +246,7 @@ \def\stretched% {\ifvmode\hbox to \hsize\else\ifinner\else\hbox\fi\fi - \processtokens\relax\hss\relax\normalspace} + \processtokens\relax\hss\relax{\hss\hss}}% \normalspace} %D \startbuffer %D \stretched{Unknown Box} @@ -264,7 +264,7 @@ %D \typebuffer %D \macros -%D {stretcheduppercase} +%D {stretchednormalcase, stretcheduppercase, stretchedlowercase} %D %D A convenient alternative is: %D @@ -306,10 +306,18 @@ \def\stretchedspaceamount{.25em} \def\stretchedbreaktokens{.@/} -\unexpanded\def\stretcheduppercase#1% +\unexpanded\def\stretchednormalcase% + {\stretchedsomecase\firstofoneargument} + +\unexpanded\def\stretcheduppercase + {\stretchedsomecase{\the\everyuppercase\uppercase}} + +\unexpanded\def\stretchedlowercase + {\stretchedsomecase{\the\everylowercase\lowercase}} + +\def\stretchedsomecase#1#2% {\bgroup - \the\everyuppercase - \uppercase{\def\textstring{#1}}% + #1{\def\textstring{#2}}% \ifdim\stretchedspaceamount>\!!zeropoint \def\textkern##1% {\determinemidwordbreak{##1}{\stretchedbreaktokens}% @@ -527,7 +535,7 @@ %D %D \typebuffer %D -%D \getbuffer +%D \haalbuffer %D %D Note the different placement of \type {\lohi}, where we %D need a bit more space. The implementation looks a bit diff --git a/tex/context/base/core-grd.tex b/tex/context/base/core-grd.tex index 2fe0b971a..f3877e679 100644 --- a/tex/context/base/core-grd.tex +++ b/tex/context/base/core-grd.tex @@ -208,7 +208,7 @@ %D An old one, still to be translated: %D %D \macros -%D {getnoflines} +%D {getnoflines, getrawnoflines} %D %D Het commando \type{\getnoflines} converteert een hoogte %D (dimensie) in een aantal regels en kent dit toe aan @@ -219,23 +219,27 @@ %D \stoptypen %D %D Er wordt gedeeld door \type{\openlineheight} en een hoogte -%D van~0pt komt overeen met 0~regels. +%D van~0pt komt overeen met 0~regels. The raw alternative +%D does not round. \newcount\noflines \newdimen\noflinesheight -\def\getnoflines#1% - {\noflinesheight=#1\relax +\def\dogetnoflines#1#2% + {\noflinesheight=#2\relax \ifdim\noflinesheight=\!!zeropoint\relax \noflines=0 \else \divide\noflinesheight by \openlineheight \noflines=\noflinesheight - \ifdim\noflines\openlineheight=#1\relax \else + #1\ifdim\noflines\openlineheight=#2\relax \else \advance\noflines by 1 - \fi + \fi\fi \fi} +\def\getnoflines {\dogetnoflines\iftrue } % compensated +\def\getrawnoflines{\dogetnoflines\iffalse} % no compensation + %D Still very experimental and therefore undocumented. \newif\ifgridsnapping % UNDER DEVELOPMENT, USE WITH CARE @@ -447,6 +451,7 @@ {\forgetall \offinterlineskip \hsize=#2 + \baselinerulefalse \ruledvbox % calculated size {\getnoflines{#3}% \vskip\topskip diff --git a/tex/context/base/core-int.tex b/tex/context/base/core-int.tex index 7ae8ab6d5..85d258de3 100644 --- a/tex/context/base/core-int.tex +++ b/tex/context/base/core-int.tex @@ -63,6 +63,14 @@ 4: ingen sidesynkronisering (--) i hmode \stopmessages +\startmessages romanian library: interactions + title: interactiuni + 1: aspectul -- x -- (b x h) + 2: activ + 3: inactiv + 4: nu exista sincronizare pt. pagini (--) in hmode +\stopmessages + \startmessages dutch library: versions title: versie 1: er mankeert een @+ @@ -105,6 +113,13 @@ 3: valgte sider: -- \stopmessages +\startmessages romanian library: versions + title: versiuni + 1: lipseste @+ + 2: pagini marcate + 3: pagini selectate: -- +\stopmessages + \unprotect \definesystemconstant {link} @@ -264,7 +279,7 @@ {\doifelse{\@@scbreedte}{\v!passend} {\!!widtha=\linkerrandbreedte \advance\!!widtha by \linkerrandafstand - \advance\!!widtha by \paginascheiding +% \advance\!!widtha by \paginascheiding \advance\!!widtha by \linkermargebreedte \advance\!!widtha by \linkermargeafstand \ifdim\rugwit>\!!widtha\ifdim\rugwit>\!!zeropoint\relax @@ -273,7 +288,7 @@ \advance\!!widtha by \zetbreedte \advance\!!widtha by \rechtermargeafstand \advance\!!widtha by \rechtermargebreedte - \advance\!!widtha by \paginascheiding +% \advance\!!widtha by \paginascheiding \advance\!!widtha by \rechterrandafstand \advance\!!widtha by \rechterrandbreedte \scratchdimen=\@@scrugwit @@ -942,6 +957,32 @@ \setvalue{\??am\v!boven }{} \setvalue{\??am\v!onder }{} +%D This can save complicated menu macros when one want to +%D keep control over parts of a menu (i.e.\ turn them on and +%D off). We could have achieved something similar with modes. + +\def\local@@ambox#1#2#3#4% don't change skipping, this one works! + {\bgroup + \testinteractiemenu{#3}% + \iflocationmenupermitted + \executeamboxcommands{#3}{#4}\c!voor\c!tussen\c!na + \else + #1\relax + \fi + \egroup} + +\unprotected\def\includemenu[#1]% + {\doifvalue{\??am#1\c!status}{\v!lokaal} + {\bgroup + \doassign[\??am#1][\c!status=\v!start]% + \let\@@amvbox\local@@ambox + \let\@@amhbox\local@@ambox + \getvalue{\??am\c!menu#1}% + \egroup}} + +%D We also need an explicit position control some day. I'll +%D do that when I need it. [The stacking order.] + \newif\ifextendedmenu \def\dodefinieerinteractiemenu[#1][#2][#3]% @@ -1984,44 +2025,70 @@ \setvalue{\e!start\e!commentaar}% the dummy triple gobbles trailing spaces {\dotripleempty\dostartcommentaar} -\def\dostartcommentaar[#1][#2][#3]% - {\bgroup - \doifassignmentelse{#1} +\def\commentaar% + {\dodoubleempty\docommentaar} + +\def\dodocommentaar#1% + {\!!widtha=\@@ccbreedte + \!!heighta=\@@cchoogte + \doifelse{\@@ccoptie}{\v!max} + {\def\@@ccoptie{1}}{\def\@@ccoptie{0}}% + \doPDFinsertcomment + {\@@cctitel}{\number\!!widtha}{\number\!!heighta} + {\@@cckleur}{\@@ccoptie}{\@@ccsymbool}{#1}} + +%\def\dopreparecommentaar#1#2% +% {\doifassignmentelse{#1} +% {\getparameters[\??cc][#1]} +% {\getparameters[\??cc][\c!titel=#1,#2]}} +% +%\def\dostartcommentaar[#1][#2][#3]% +% {\bgroup +% \dopreparecommentaar{#1}{#2}% +% \bgroup +% \obeylines +% \doif{\@@ccspatie}{\v!ja}{\obeyspaces}% +% \long\def\docommando##1% +% {\egroup +% \global\setbox\commentbox=\hbox +% {\dodocommentaar{##1}% +% \hskip\ifvoid\commentbox\@@ccmarge\else\@@ccafstand\fi +% \box\commentbox}% +% \egroup}% +% \grabuntil{\e!stop\e!commentaar}\docommando} +% +%\def\docommentaar[#1][#2]#3% +% {\bgroup +% \dopreparecommentaar{#1}{#2}% +% \hbox to \!!zeropoint +% {\hskip-\@@ccmarge +% \raise\ht\strutbox\hbox{\dodocommentaar{#3}}}% +% \egroup +% \ignorespaces} + +\def\dopreparecommentaar#1#2% + {\doifassignmentelse{#1} {\getparameters[\??cc][#1]} {\getparameters[\??cc][\c!titel=#1,#2]}% - \bgroup \obeylines - \doif{\@@ccspatie}{\v!ja}{\obeyspaces}% + \doif{\@@ccspatie}{\v!ja}{\obeyspaces}} + +\def\dostartcommentaar[#1][#2][#3]% + {\bgroup + \dopreparecommentaar{#1}{#2}% \long\def\docommando##1% - {\egroup - \global\setbox\commentbox=\hbox - {\!!widtha=\@@ccbreedte - \!!heighta=\@@cchoogte - \doinsertcomment - {\@@cctitel}{\number\!!widtha}{\number\!!heighta} - {\@@cckleur}{0}{\@@ccsymbool}{##1}% - \hskip\ifvoid\commentbox\@@ccmarge\else\@@ccafstand\fi - \box\commentbox - \egroup}}% + {\global\setbox\commentbox=\hbox + {\dodocommentaar{##1}% + \hskip\ifvoid\commentbox\@@ccmarge\else\@@ccafstand\fi + \box\commentbox}% + \egroup}% \grabuntil{\e!stop\e!commentaar}\docommando} -\def\commentaar% - {\dodoubleempty\docommentaar} - \def\docommentaar[#1][#2]#3% - {\bgroup - \doifassignmentelse{#1} - {\getparameters[\??cc][#1]} - {\getparameters[\??cc][\c!titel=#1,#2]}% - \!!widtha=\@@ccbreedte - \!!heighta=\@@cchoogte - \hbox to \!!zeropoint - {\hskip-\@@ccmarge - \raise\ht\strutbox\hbox - {\doPDFinsertcomment - {\@@cctitel}{\number\!!widtha}{\number\!!heighta} - {\@@cckleur}{0}{\@@ccsymbool}{#3}}}% - \egroup + {\hbox to \!!zeropoint + {\dopreparecommentaar{#1}{#2}% + \hskip-\@@ccmarge + \raise\ht\strutbox\hbox{\dodocommentaar{#3}}}% \ignorespaces} % \startcommentaar @@ -2247,7 +2314,8 @@ \c!kleur=\@@iakleur, \c!titel=, \c!spatie=\v!nee, - \c!symbool=\v!normaal] + \c!symbool=\v!normaal, + \c!optie=] \stelversiesin % beware, @ is made active here, [\c!nummer=1, % therefore we set this one at the end diff --git a/tex/context/base/core-itm.tex b/tex/context/base/core-itm.tex index d62127e42..49f4940a5 100644 --- a/tex/context/base/core-itm.tex +++ b/tex/context/base/core-itm.tex @@ -37,6 +37,10 @@ 9: for øyeblikket maksimalt -- nivåer i opplisting \stopmessages +\startmessages romanian library: layouts + 9: acum nu se supota mai mult de -- nivele de adancime la iteratii +\stopmessages + \unprotect % - meerdere niveaus (moet niet moeilijk zijn) @@ -89,7 +93,6 @@ {\getparameters[\??oo][\c!niveaus=4,#1]% \ifnum\@@ooniveaus>\maxitemlevel \edef\maxitemlevel{\@@ooniveaus}% - %\herhaal[\maxitemlevel*\setnextitemlevel{\herhaler}]% \dorecurse{\maxitemlevel}{\setnextitemlevel\recurselevel}% \fi} @@ -161,7 +164,8 @@ \def\dostelopsomminginconstant[#1][#2]% {\def\dodostelopsomminginconstant##1% {\dododostelopsomminginconstant[#1][##1*]}% - \processcommalist[#2]\dodostelopsomminginconstant} +% \processcommalist[#2]\dodostelopsomminginconstant} + \processcommacommand[#2]\dodostelopsomminginconstant} % expansion of #2 is handy for xml \def\dodododostelopsommingin[#1][#2]% {\ConvertToConstant\doifinstringelse{=}{#2} @@ -171,8 +175,7 @@ \def\dododostelopsommingin[#1][#2]% {\ConvertToConstant\doifnot{#2}{} {\doifelse{#1}{\v!elk} - {\herhaal[\maxitemlevel*{\ExpandFirstAfter\dodododostelopsommingin[\herhaler][#2]}]} -% {\dorecurse{\maxitemlevel}{\ExpandFirstAfter\dodododostelopsommingin[\recurselevel][#2]}} + {\dorecurse{\maxitemlevel}{\ExpandFirstAfter\dodododostelopsommingin[\recurselevel][#2]}} {\ExpandFirstAfter\dodododostelopsommingin[#1][#2]}}} \def\dodostelopsommingin[#1][#2]% @@ -252,6 +255,139 @@ \newconditional\autoconcatnextitem \settrue \autoconcatnextitem \newsignal \itemsignal +% \def\dodostartopsomming[#1][#2]% +% {\setfalse\inlinelistitem % new, no indent (leftskip) +% \setfalse\concatnextitem % new, concat +% \ifhmode +% \ifconditional\autoconcatnextitem % new, concat +% \ifdim\lastskip=\itemsignal % new, concat +% \settrue\concatnextitem % new, concat +% \fi % new, concat +% \fi % new, concat +% \par +% \fi +% \ifnum\itemlevel=\maxitemlevel\relax +% \showmessage{\m!layouts}{9}{\maxitemlevel}% +% \def\itemincrement{0}% +% \else +% \def\itemincrement{1}% +% \fi +% \doglobal\increment(\itemlevel,\itemincrement)% +% \begingroup +% \ifnum\itemlevel=1 % NIEUW +% \doadaptleftskip{\getvalue{\??op1\c!marge}}% +% \dosetraggedcommand{\@@oouitlijnen}\raggedcommand +% \fi +% \dosetraggedcommand{\getvalue{\??op\itemlevel\c!uitlijnen}}\raggedcommand +% \doifvaluesomething{\??op\itemlevel\c!inspringen} +% {\expanded{\stelinspringenin[\getvalue{\??op\itemlevel\c!inspringen}]}}% +% \doifinset{\v!kolommen}{#1}% +% {\ifbinnenkolommen\else\ifnum\itemcolumndepth=0 +% \global\let\itemcolumndepth\itemlevel +% \getvalue{\??op\itemlevel\c!voor}% +% \processfirstactioninset +% [#1] +% [ \v!een=>\!!counta=1\relax, +% \v!twee=>\!!counta=2\relax, +% \v!drie=>\!!counta=3\relax, +% \v!vier=>\!!counta=4\relax, +% \v!vijf=>\!!counta=5\relax, +% \s!unknown=>\@EA\!!counta\getvalue{\??op\itemlevel\c!n}]% +% \startkolommen +% [\c!n=\!!counta, % netter \??op\itemlevel\c!n +% \c!hoogte=, +% \c!lijn=\v!uit, +% \c!balanceren=\v!ja, +% \c!uitlijnen=\v!nee]% +% \fi\fi}% +% \doifinsetelse{\v!intro}{#1} +% {\somintrotrue} +% {\somintrofalse}% +% \doglobal\increment\noflists +% \let\currentlist=\noflists +% \newcounter\noflistelements +% \kopsomfalse +% \subsomfalse +% \symsomfalse +% \let\marsymbol=\relax +% \global\let\somdestination=\empty +% \def\symsymbol{}% +% \def\som% +% {\dosom}% +% \def\but[##1]% +% {\gdef\somdestination{##1}% +% \dosom}% +% \def\nop% +% {\sym{\strut}\strut}% +% \definecomplexorsimple\its +% \setvalue{\v!mar}##1% +% {\def\marsymbol% +% {\llap +% {\doattributes{\??op\itemlevel}\c!marletter\c!markleur{##1}% +% \hskip\leftskip\hskip\linkermargeafstand}}% +% \dosom}% +% \setvalue{\v!kop}% +% {\kopsomtrue\dokop}% +% \setvalue{\v!sub}% +% {\subsomtrue\dosom}% +% \setvalue{\v!sym}##1% +% {\def\symsymbol% +% {\doattributes{\??op\itemlevel}\c!symletter\c!symkleur{##1}}% +% \symsomtrue +% \dosom}% +% % \setvalue{\v!its}% +% % {\getvalue{\v!sym}% +% % {\calculatelistwidth{\itemlevel}{\dimen0}% +% % \hbox to \dimen0 +% % {\dorecurse{\getvalue{\??op\itemlevel\c!items}} +% % {\listitem\hss}% +% % \unskip +% % \hskip\getvalue{\??op\itemlevel\c!afstand}}}}% +% \setvalue{\v!its}% +% {\getvalue{\v!ran}% +% {\dorecurse{\getvalue{\??op\itemlevel\c!items}}{\listitem\hss}% +% \unskip}}% +% \setvalue{\v!ran}##1% +% {\getvalue{\v!sym}% +% {\calculatelistwidth{\itemlevel}{\dimen0}% +% \hbox to \dimen0 +% {##1\hskip\getvalue{\??op\itemlevel\c!afstand}}}}% +% \setitemlevel{#1}% +% \getvalue{\??op\itemlevel}% +% \doifelsenothing{#1} % iffirstargument +% {\edef\@@opsymbool{\getvalue{\??op\itemlevel\c!symbool}}% +% \setgvalue{\??op\c!symbool\s!global\itemlevel}{}% +% \setgvalue{\??op\v!verder\itemlevel}{}% +% \setitemmark{\@@opsymbool}% +% \dostelopsomminginvariable[\itemlevel][#2]} +% {\dostelopsomminginconstant[\itemlevel][#1]% +% \dostelopsomminginvariable[\itemlevel][#2]% +% \doifinsetelse{\v!verder}{#1}% \noexpand, else problems in non-etex with chinese +% %{\edef\@@opsymbool{\getvalue{\??op\c!symbool\s!global\itemlevel}}% +% {\edef\@@opsymbool{\noexpand\getvalue{\??op\c!symbool\s!global\itemlevel}}% +% \getvalue{\??op\v!verder\itemlevel}} +% %{\edef\@@opsymbool{\getvalue{\??op\itemlevel\c!symbool}}% +% {\edef\@@opsymbool{\noexpand\getvalue{\??op\itemlevel\c!symbool}}% +% \setgvalue{\??op\v!verder\itemlevel}% +% {\dostelopsomminginconstant[\itemlevel][#1]% +% \dostelopsomminginvariable[\itemlevel][#2]}}% +% \def\docommando{\setitemmark}% \setitemmark resets \docommando +% \processcommalist[#1,\@@opsymbool]\docommando}% +% \ifsomautointro\ifnum\prevgraf<3 +% \somintrotrue +% \fi\fi +% \ifparagraphitems +% \ifnum\itemlevel>1 \doassign[\??op\itemlevel][\c!tussen=]\fi +% \else\ifpackeditems +% \doassign[\??op\itemlevel][\c!tussen=]% +% \fi\fi +% \calculatelistwidth{\itemlevel}{\dimen0}% +% \ifdim\dimen0>\!!zeropoint\relax +% \ifconditional\inlinelistitem\else +% \advance\leftskip by \dimen0\relax +% \fi +% \fi} + \def\dodostartopsomming[#1][#2]% {\setfalse\inlinelistitem % new, no indent (leftskip) \setfalse\concatnextitem % new, concat @@ -290,6 +426,19 @@ \v!vier=>\!!counta=4\relax, \v!vijf=>\!!counta=5\relax, \s!unknown=>\@EA\!!counta\getvalue{\??op\itemlevel\c!n}]% +% new +\edef\columneditemleftskip{\the\leftskip}% +\def\postprocesscolumnbox##1% + {\scratchdimen=\columneditemleftskip + \divide\scratchdimen by \nofcolumns + \hbox{\hskip\columneditemleftskip\hbox{\box##1}}}% +\scratchdimen=-\columneditemleftskip +\multiply\scratchdimen by \nofcolumns +\advance\scratchdimen by \columneditemleftskip +\advance\scratchdimen by \hsize +\edef\columntextwidth{\the\scratchdimen}% +\leftskip\!!zeropoint +% so far \startkolommen [\c!n=\!!counta, % netter \??op\itemlevel\c!n \c!hoogte=, diff --git a/tex/context/base/core-lst.tex b/tex/context/base/core-lst.tex index 75d8e8649..ada4d147b 100644 --- a/tex/context/base/core-lst.tex +++ b/tex/context/base/core-lst.tex @@ -376,9 +376,10 @@ \def\dodofreelijstelement#1#2#3#4#5#6#7#8% {\def\makelijstelement##1##2% - {\hbox - {\doifelsevalue{\??li#1\c!interactie}{##1} - {\setbox0=\hbox{\showcontrastlocation{\??ia}{#6}{##2}}% + {\noindent % new and needed + \hbox + {\doifelsevalue{\??li#1\c!interactie}{##1} % \??li ipv \??ia + {\setbox0=\hbox{\showcontrastlocation{\??li#1}{#6}{##2}}% \linklisttoelement{#1}{#2}{#5}{#6}{\box0}}%{\copy0}}% {##2}}}% \getvalue{\??li#1\c!voor}% can be \hskip @@ -513,7 +514,7 @@ \fi \bgroup \ifvmode - \noindent\leavevmode + \noindent\leavevmode % leavevmode ? ? ? \fi \doifvalue{\??li#1\c!interactie}{\v!tekst} % not supported {\doassign[\??li#1][\c!interactie=\v!sectienummer]}% @@ -532,7 +533,10 @@ {\getvalue{\??li#1\c!paginacommando} {\paginaprefix\??li#1[#5]% \translatednumber[#5]}}}}}}% - \hbox +\donetrue +\doifnothing{#3}{\doifvaluenothing{\??li#1\c!symbool}{\donefalse}}% +\ifdone + \hbox {\getvalue{\??li#1\c!links}% \makelijstelement\v!sectienummer {\dolistattributes{#1}\c!nummerletter\c!nummerkleur @@ -540,6 +544,7 @@ \getvalue{\??li#1\c!rechts}% \hskip.5em}% \nobreak +\fi \tolerance3500 % niet zomaar veranderen \dolistattributes{#1}\c!tekstletter\c!tekstkleur {\let\\=\newlineinlist @@ -593,7 +598,7 @@ \endstrut % struts new \dostopattributes}}}% \linklisttoelement{#3}{#4}{#7}{#8}{\box0}}%{\copy0}}% - \par + \par % should be an option \getvalue{\??li#3\c!tussen}} \def\strippedlistentry[#1::#2::#3]{#1::#2}% diff --git a/tex/context/base/core-mat.tex b/tex/context/base/core-mat.tex index 76f60ff41..15aaf49c4 100644 --- a/tex/context/base/core-mat.tex +++ b/tex/context/base/core-mat.tex @@ -11,10 +11,426 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. +% engels maken + \writestatus{loading}{Context Core Macros / Math Fundamentals} \unprotect +% will move to page-ini + +\newevery \everybeginofpar \EveryBeginOfPar +\newevery \everyendofpar \EveryEndOfPar + +\def\bpar{\the\everybeginofpar} +\def\epar{\the\everyendofpar\endgraf} + +\newdimen\lastlinewidth + +\def\setlastlinewidth% + {\resetlastlinewidth + \ifmmode\else\ifhmode\else\ifoptimizedisplayspacing + \bgroup + \forgetdisplayskips + $$\global\lastlinewidth\predisplaysize$$ + \vskip-\baselineskip + \egroup + \fi\fi\fi} + +\def\resetlastlinewidth% + {\global\lastlinewidth\!!zeropoint\relax} + +\appendtoks \setlastlinewidth \to \everyendofpar + +%D moved from main-001 + +%\def\EveryMathPar{\EveryPar} +% +%\newevery \everymath \EveryMath + +\abovedisplayskip = \!!zeropoint +\abovedisplayshortskip = \!!zeropoint % evt. 0pt minus 3pt +\belowdisplayskip = \!!zeropoint +\belowdisplayshortskip = \!!zeropoint % evt. 0pt minus 3pt + +\predisplaypenalty = 0 +\postdisplaypenalty = 0 % -5000 gaat mis, zie penalty bij \paragraaf + +% we don't use the skip's + +\def\displayskipsize#1#2% obsolete + {\ifdim\tussenwit>\!!zeropoint + #1\tussenwit\!!plus#2\tussenwit\!!minus#2\tussenwit\relax + \else + #1\lineheight\!!plus#2\lineheight\!!minus#2\lineheight\relax + \fi} + +\def\displayskipfactor {1.0} % obsolete +\def\displayshortskipfactor {0.8} % obsolete +\def\displayskipgluefactor {0.3} % obsolete +\def\displayshortskipgluefactor {0.2} % obsolete + +\def\abovedisplayskipsize% obsolete + {\displayskipsize\displayskipfactor\displayskipgluefactor} + +\def\belowdisplayskipsize% obsolete + {\displayskipsize\displayskipfactor\displayskipgluefactor} + +\def\abovedisplayshortskipsize% obsolete + {\displayskipsize\displayshortskipfactor\displayshortskipgluefactor} + +\def\belowdisplayshortskipsize% obsolete + {\displayskipsize\displayshortskipfactor\displayshortskipgluefactor} + +\def\setdisplayskip#1#2#3% obsolete + {#1=#2\relax + \advance#1 by -\parskip + \advance#1 by -#3\relax} + +\def\setdisplayskips% obsolete + {\setdisplayskip\abovedisplayskip \abovedisplayskipsize \!!zeropoint + \setdisplayskip\belowdisplayskip \belowdisplayskipsize \!!zeropoint + \setdisplayskip\abovedisplayshortskip\abovedisplayshortskipsize\baselineskip + \setdisplayskip\belowdisplayshortskip\belowdisplayshortskipsize\baselineskip} + +% so far for unused stuff + +\def\forgetdisplayskips% to do + {\abovedisplayskip \!!zeropoint + \belowdisplayskip \!!zeropoint + \abovedisplayshortskip\!!zeropoint + \belowdisplayshortskip\!!zeropoint} + +\doorlabelen + [\v!formule] + [\c!tekst=\v!formule, + \c!wijze=\@@fmwijze, + \c!blokwijze=\@@fmblokwijze, + \c!plaats=\v!intekst] + +\def\stelformulesin% + {\dodoubleargument\getparameters[\??fm]} + +\newconditional\handleformulanumber +\newconditional\incrementformulanumber + +\def\dododoformulenummer#1#2#3#4% (#1,#2)=outer(ref,sub) (#3,#4)=inner(ref,sub) + {\hbox\bgroup + \ifconditional\handleformulanumber + \ifconditional\incrementformulanumber + \verhoognummer[\v!formule]% + \fi + \maakhetnummer[\v!formule]% + \setbox0=\hbox{\ignorespaces#2\unskip}% + \ifdim\wd0>\!!zeropoint + \edef\hetsubnummer{#2}% + \else + \let\hetsubnummer\empty + \fi + \doifsomething{#1}{\rawreference{\s!for}{#1}{\hetnummer\hetsubnummer}}% + \setbox0=\hbox{\ignorespaces#4\unskip}% + \ifdim\wd0>\!!zeropoint + \edef\hetsubnummer{#4}% + \fi + \doifsomething{#3}{\rawreference{\s!for}{#3}{\hetnummer\hetsubnummer}}% + \rm % nodig ? + \@@fmnummercommando + {\dostartattributes\??fm\c!nummerletter\c!nummerkleur + \strut + \@@fmlinks + \labeltexts\v!formule + {\ignorespaces\hetnummer\ignorespaces\hetsubnummer\unskip}% + \@@fmrechts + \dostopattributes}% + \fi + \egroup} + +\def\dodoformulenummer[#1][#2][#3]% + {\doquadruplegroupempty\dododoformulenummer{#1}{#2}{#3}} + +\def\doformulenummer% + {\dotripleempty\dodoformulenummer} + +\setvalue{\e!start\e!formule}{\dostartformula{}} +\setvalue{\e!stop \e!formule}{\dostopformula} + +\def\definieerformule% + {\dodoubleempty\dodefinieerformule} + +\def\dodefinieerformule[#1][#2]% + {\doifsomething{#1} + {\copyparameters + [\??fm#1][\??fm] + [\c!voorwit,\c!nawit, + \c!linkermarge,\c!rechtermarge, + \c!springvolgendein,\c!variant]% + \stelformulesin[#1][#2]% + \setvalue{\e!start#1\e!formule}% + {\dostartformula{#1}}% + \setvalue{\e!stop #1\e!formule}% + {\dostopformula}}} + +\def\stelformulesin% + {\dodoubleempty\dostelformulesin} + +\def\dostelformulesin[#1][#2]% + {\ifsecondargument + \getparameters[\??fm#1][#2]% + \else + \getparameters[\??fm][#1]% + \fi} + +\stelformulesin + [\c!wijze=\@@nrwijze, + \c!blokwijze=, + \c!sectienummer=\@@nrsectienummer, + \c!plaats=\v!rechts, + \c!links=(, + \c!rechts=), + \c!voorwit=, + \c!nawit=\@@fmvoorwit, + \c!linkermarge=\!!zeropoint, + \c!rechtermarge=\!!zeropoint, + \c!springvolgendein=\v!nee, + \c!variant=\s!default] + +\def\currentformula {} +\def\predisplaysizethreshhold{3em} + +\def\leftdisplayskip {\leftskip} +\def\rightdisplayskip {\rightskip} +\def\leftdisplaymargin {\getvalue{\??fm\currentformula\c!linkermarge}} +\def\rightdisplaymargin{\getvalue{\??fm\currentformula\c!rechtermarge}} + +\def\beforedisplayspace + {\doifnotvalue{\??fm\currentformula\c!voorwit}{\v!geen} + {\blanko[\getvalue{\??fm\currentformula\c!voorwit}]}} + +\def\afterdisplayspace + {\doifnotvalue{\??fm\currentformula\c!nawit}{\v!geen} + {\blanko[\getvalue{\??fm\currentformula\c!nawit}]}} + +\def\setpredisplaysize#1% + {\predisplaysize=#1\relax + \ifdim\predisplaysize>\!!zeropoint + \advance\predisplaysize \predisplaysizethreshhold + \fi + \advance\predisplaysize \displayindent % needed ? + \ifdim\predisplaysize>\hsize + \predisplaysize\hsize + \fi} + +\def\setdisplaydimensions% + {\displayindent=\leftdisplayskip + \advance\displayindent\leftdisplaymargin + \displaywidth=\hsize + \ifdim\hangindent>\!!zeropoint + \advance\displayindent\hangindent + \else + \advance\displaywidth\hangindent + \fi + \advance\displaywidth-\displayindent + \advance\displaywidth-\rightdisplayskip + \advance\displaywidth-\rightdisplaymargin} + +\newif\ifoptimizedisplayspacing + +\def\dostartformula#1% + {\bgroup + \long\def\dostartformula##1{\bgroup\let\dostopformula\egroup}% + \def\currentformula{#1}% + \freezedimenmacro\leftdisplayskip + \freezedimenmacro\rightdisplayskip + \freezedimenmacro\leftdisplaymargin + \freezedimenmacro\rightdisplaymargin + \freezedimenmacro\predisplaysizethreshhold + \forgetdisplayskips + \let\setdisplayskips\relax + \ifoptimizedisplayspacing + \ifdim\lastlinewidth>\!!zeropoint\relax + \abovedisplayshortskip-\ht\strutbox\relax + \fi + \else + \resetlastlinewidth + \fi + \getvalue{\e!start\getvalue{\??fm\currentformula\c!variant}\e!formule}} + +\let\doplaceformulanumber\empty + +\def\dostopformula% + {\doplaceformulanumber + \getvalue{\e!stop\getvalue{\??fm\currentformula\c!variant}\e!formule}% + \egroup + \resetlastlinewidth + \nonoindentation + \doifvalue{\??fm\currentformula\c!springvolgendein}{\v!nee} + {\noindentation}} + +% \def\predisplaycorrection% +% {\par\ifvmode\vbox{\strut}\vskip-2\baselineskip\fi} +% +% \def\startdisplaymath% +% {\ifgridsnapping +% \beforedisplayspace +% \snaptogrid\vbox\bgroup +% % \vskip\parskip +% \forgetall +% \else +% \bgroup +% \par\ifvmode\vskip-\parskip\fi +% \beforedisplayspace +% \predisplaycorrection +% \fi +% $$\setdisplaydimensions +% \setpredisplaysize\lastlinewidth} +% +% \def\stopdisplaymath% +% {$$\egroup +% \par\ifvmode\vskip-\parskip\fi +% \afterdisplayspace} + +\def\startdisplaymath% + {\ifgridsnapping + \beforedisplayspace + \snaptogrid\vbox\bgroup + % \vskip\parskip + \forgetall + \else + \bgroup + \ifdim\lastskip<\!!zeropoint\else + \par\ifvmode\ifdim\parskip>\!!zeropoint\relax\vskip-\parskip\fi\fi + \fi + \beforedisplayspace + \par\ifvmode\vbox{\strut}\vskip-2\baselineskip\fi + \fi + $$\setdisplaydimensions + \setpredisplaysize\lastlinewidth} + +\def\stopdisplaymath% + {$$\egroup + \par\ifvmode\ifdim\parskip>\!!zeropoint\relax\vskip-\parskip\fi\fi + \afterdisplayspace} + +\def\defineformulaalternative% + {\dotripleargument\dodefineformulaalternative} + +\def\dodefineformulaalternative[#1][#2][#3]% + {\setvalue{\e!start#1\e!formule}{#2}% + \setvalue{\e!stop #1\e!formule}{#3}} + +\defineformulaalternative[\s!default][\startdisplaymath][\stopdisplaymath] + +% sp = single line paragraph sd = single line display +% mp = multi line paragraph md = multy line display + +\defineformulaalternative[single][\startdisplaymath][\stopdisplaymath] +\defineformulaalternative[multi] [\startdisplaymath][\stopdisplaymath] + +\definieerformule + [sp] + [\c!voorwit=\v!geen,\c!nawit=\v!geen, + \c!springvolgendein=\v!nee, + \c!variant=single] + +\definieerformule + [sd] + [\c!voorwit=\v!geen,\c!nawit=\v!geen, + \c!springvolgendein=\v!ja, + \c!variant=single] + +\definieerformule + [mp] + [%\c!voorwit=,\c!nawit=, + \c!springvolgendein=\v!nee, + \c!variant=multi] + +\definieerformule + [md] + [%\c!voorwit=,\c!nawit=, + \c!springvolgendein=\v!ja, + \c!variant=multi] + +% in m-math +% +% \defineformulaalternative[multi][\begindmath][\enddmath] +% +% \fakewords{20}{40}\epar +% \plaatsformule {a} $$ \fakeformula $$ +% \fakewords{20}{40}\epar +% \plaatsformule {b} \startformule \fakeformula \stopformule +% \plaatsformule {b} \startformule \fakeformula \stopformule +% \fakewords{20}{40}\epar +% \plaatsformule {c} \startmdformule \fakeformula \stopmdformule +% \plaatsformule {c} \startmdformule \fakeformula \stopmdformule +% \fakewords{20}{40}\epar +% \plaatsformule {d} \startmpformule \fakeformula \stopmpformule +% \plaatsformule {d} \startmpformule \fakeformula \stopmpformule +% \fakewords{20}{40}\epar +% \plaatsformule {e} \startsdformule \fakeformula \stopsdformule +% \plaatsformule {e} \startsdformule \fakeformula \stopsdformule +% \fakewords{20}{40}\epar +% \plaatsformule {f} \startspformule \fakeformula \stopspformule +% \plaatsformule {f} \startspformule \fakeformula \stopspformule +% \fakewords{20}{40} + +\def\plaatsformule% + {\settrue\incrementformulanumber + \dodoubleempty\doplaatsformule} + +\def\plaatssubformule% + {\setfalse\incrementformulanumber + \dodoubleempty\doplaatsformule} + +\def\doplaatsformule[#1][#2]% #2 = dummy, gobbles spaces + {\def\redoplaatsformule% + {\bgroup\def\dostartformula####1{\relax}% + \ifx\next\bgroup + \@EA\moreplaatsformule % [ref]{} + \else\if\next\relax % a \cs + \egroup \@EA\@EA\@EA\dodoplaatsformule % [ref]\start + \else + \egroup \@EA\@EA\@EA\dispplaatsformule % [ref]$$ + \fi\fi + [#1]{}}% + \futurelet\next\redoplaatsformule} + +\long\def\moreplaatsformule[#1]#2#3#4% #2 dummy #4 gobbles spaces + {\def\redoplaatsformule% + {\if\next\relax % a \cs + \egroup \expandafter\dodoplaatsformule % [ref]{}\start + \else + \egroup \expandafter\dispplaatsformule % [ref]{}$$ + \fi + [#1]{#3}}% + \futurelet\next\redoplaatsformule#4} + +\def\dispplaatsformule[#1]#2$$#3$$% + {\dodoplaatsformule[#1]{#2}\dostartformula{}#3\dostopformula} + +\def\dodoplaatsformule[#1]#2% + {\doifelse{#1}{-} + {\setfalse\handleformulanumber} + {\doifelse{#2}{-} + {\setfalse\handleformulanumber} + {\settrue\handleformulanumber}}% + \ifconditional\handleformulanumber + \def\formulenummer% + {\global\let\subformulenummer\doformulenummer + \doformulenummer[#1][#2]}% + \def\subformulenummer% + {\setfalse\incrementformulanumber + \formulenummer}% + \gdef\doplaceformulanumber% + {\global\let\doplaceformulanumber\empty + \doifelse{\@@fmplaats}{\v!links} + {\leqno{\doformulenummer[#1][#2][]{}}} + {\eqno {\doformulenummer[#1][#2][]{}}}}% + \else + \def\formulenummer{\doformulenummer[#1][#2]}% + \global\let\subformulenummer\doformulenummer + \global\let\doplaceformulanumber\empty + \fi} + %D \macros %D {big..} %D @@ -163,6 +579,72 @@ \egroup -\protect +%D These macros were first needed by Frits Spijker (also +%D known as Gajes) for typesetting the minus sign that is +%D keyed into scientific calculators. + +% This is the first alternative, which works okay for the +% minus, but less for the plus. +% +% \def\dodoraisedmathord#1#2#3% +% {\mathord{{#2\raise.#1ex\hbox{#2#3}}}} +% +% \def\doraisedmathord#1% +% {\mathchoice +% {\dodoraisedmathord5\tf #1}% +% {\dodoraisedmathord5\tf #1}% +% {\dodoraisedmathord4\tfx #1}% +% {\dodoraisedmathord3\tfxx#1}} +% +% \def\negative{\doraisedmathord-} +% \def\positive{\doraisedmathord+} +% +% So, now we use the monospaced signs, that we also +% define as symbol, so that they can be overloaded. + +\def\dodoraisedmathord#1#2#3% + {\mathord{{#2\raise.#1ex\hbox{#2\symbol[#3]}}}} + +\def\doraisedmathord#1% + {\mathchoice + {\dodoraisedmathord5\tf {#1}}% + {\dodoraisedmathord5\tf {#1}}% + {\dodoraisedmathord4\tx {#1}}% + {\dodoraisedmathord3\txx{#1}}} + +\def\dodonumbermathord#1#2% + {\setbox\scratchbox\hbox{0}% + \mathord{\hbox to \wd\scratchbox{\hss#1\symbol[#2]\hss}}} + +\def\donumbermathord#1% + {\mathchoice + {\dodonumbermathord\tf {#1}}% + {\dodonumbermathord\tf {#1}}% + {\dodonumbermathord\tx {#1}}% + {\dodonumbermathord\txx{#1}}} + +\definesymbol[positive] [\getglyph{Mono}{+}] +\definesymbol[negative] [\getglyph{Mono}{-}] +\definesymbol[zeroamount][\getglyph{Mono}{-}] + +\def\negative {\doraisedmathord{negative}} +\def\positive {\doraisedmathord{positive}} +\def\zeroamount{\donumbermathord{zeroamount}} + +%D How negative such a symbol looks is demonstrated in: +%D $\negative 10^{\negative 10^{\negative 10}}$. + +\stelformulesin + [\c!wijze=\@@nrwijze, + \c!blokwijze=, + \c!sectienummer=\@@nrsectienummer, + \c!plaats=\v!rechts, + \c!links=(, + \c!rechts=), + \c!nummerletter=, + \c!nummerkleur=, + \c!nummercommando=, + \c!voorwit=\v!groot, + \c!nawit=\@@fmvoorwit] -\endinput +\protect \endinput diff --git a/tex/context/base/core-mis.tex b/tex/context/base/core-mis.tex index a3594a9a7..72c8ac66b 100644 --- a/tex/context/base/core-mis.tex +++ b/tex/context/base/core-mis.tex @@ -21,7 +21,7 @@ %D I first needed this simplification in bookmarks. Users can %D add their own if needed. -\newtoks\simplifiedcommands +\ifx\simplifiedcommands\undefined \newtoks\simplifiedcommands \fi \def\simplifycommands{\the\simplifiedcommands} @@ -31,8 +31,10 @@ \appendtoks \def\ { }\to\simplifiedcommands \appendtoks\def\type#1{\string\\\strippedcsname#1}\to\simplifiedcommands \appendtoks \def\TeX{TeX}\to\simplifiedcommands +\appendtoks \def\ConTeXt{ConTeXt}\to\simplifiedcommands \appendtoks \def\MetaPost{MetaPost}\to\simplifiedcommands \appendtoks \def\MetaPost{MetaFont}\to\simplifiedcommands +\appendtoks \def\MetaPost{MetaFun}\to\simplifiedcommands \appendtoks \def||{-}\to\simplifiedcommands \protect diff --git a/tex/context/base/core-mul.tex b/tex/context/base/core-mul.tex index ec5578012..d971889ce 100644 --- a/tex/context/base/core-mul.tex +++ b/tex/context/base/core-mul.tex @@ -135,6 +135,23 @@ 13: bred flytblokk forksjøvet til toppen av kolonnene \stopmessages +\startmessages romanian library: columns + title: coloane + 1: este posibil numai -- coloane + 2: folositi \string\filbreak\space ca alternativa + 3: probleme, se dezactiveaza alinierea + 4: cadrele top (top float) nu sunt inca suportate + 5: cadrele bottom (bottom float) nu sunt inca suportate + 6: -- blocurile sunt amanate + 7: alinierea este oprita dupa 100 de incercari + 8: aliniat in -- pas(i) + 9: verificat alinierea + 10: a mai ramas (mai putin de) 1 linie + 11: blocul este prea lat pentru coloana + 12: blocul este mutat pe urmatoarea coloana / -- + 13: blocul lat este mutat in partea de sus a coloanelor +\stopmessages + %D This completely new implementation can handle enough %D situations for everyday documents, but is still far from %D perfect. While at the moment the routine doesn't support @@ -538,6 +555,7 @@ %\setcolumntextheight\relax \widowpenalty=0 % is gewoon beter \clubpenalty=0 % zeker bij grids + \brokenpenalty=0 % new \ifsomefloatwaiting \showmessage{\m!columns}{6}{\the\savednoffloats}% \global\setbox\savedfloatlist=\box\floatlist @@ -571,7 +589,8 @@ \fi \global\savedpagetotal=\pagetotal \global\singlecolumnout=\output - \global\output={\global\setbox\partialpage=\vbox{\unvbox\normalpagebox}}% +% \global\output={\global\setbox\partialpage=\vbox{\unvbox\normalpagebox}}% +\global\output={\global\setbox\partialpage=\vbox{\dotopinsertions\unvbox\normalpagebox}}% \eject % no \holdinginserts=1, can make footnote disappear ! \global\partialpageheight=\ht\partialpage \global\output={\continuousmulticolumnsout}% diff --git a/tex/context/base/core-nav.tex b/tex/context/base/core-nav.tex index 5bb611bf6..2f7343ab3 100644 --- a/tex/context/base/core-nav.tex +++ b/tex/context/base/core-nav.tex @@ -51,7 +51,6 @@ \def\dodosetupinteraction[#1]% % \dosetupinteraction == special {\getparameters[\??ia][#1]% - \dosetuppageview{\@@iascherm}% \doifelse{\@@iastatus}{\v!start} {\iflocation\else \showmessage{\m!interactions}{2}{\ifusepagedestinations\space(PAGE)\fi}% @@ -66,6 +65,7 @@ \else \disablemode[\systemmodeprefix\v!interactie]% \fi + \dosetuppageview{\@@iafocus}% \doifsomething{\@@iabereken} {\doregistercalculationset\@@iabereken}% \doifelse{\@@iastrut}{\v!ja} @@ -324,11 +324,13 @@ \c!scherm=, %\c!openactie={\v!eerstepagina,AtOpenInitializeForm}, %\c!openactie={\v!eerstepagina,\v!ResetForm}, - \c!openactie=\v!ResetForm, + %\c!openactie=\v!ResetForm, % too buggy in reader 4.05 + \c!openactie=, \c!sluitactie=, \c!openpaginaactie=, \c!sluitpaginaactie=, - \c!scherm=\v!passend, + \c!scherm=\v!normaal, + \c!focus=\v!passend, \c!menu=\v!uit, \c!letter=\v!vet, \c!bereken=, diff --git a/tex/context/base/core-new.tex b/tex/context/base/core-new.tex index 3119af447..92b7c9e4e 100644 --- a/tex/context/base/core-new.tex +++ b/tex/context/base/core-new.tex @@ -69,36 +69,113 @@ \def\disablemode[#1]% {\expanded{\removefromcommalist{#1}\noexpand\currentmode}} -\def\doifmodeelse% - {\unprotect\dodoifmodeelse} +\def\doifmodeelse{\unprotect\dodoifmodeelse} +\def\doifmode {\unprotect\dodoifmode} +\def\doifnotmode {\unprotect\dodoifnotmode} +\def\startmode {\unprotect\dostartmode} +\def\startnotmode{\unprotect\dostartnotmode} \long\def\dodoifmodeelse#1#2#3% - {\protect\ExpandBothAfter\doifcommonelse{\currentmode}{#1}{#2}{#3}} - -\def\doifmode% - {\unprotect\dodoifmode} + {\protect\ExpandBothAfter\doifcommonelse{#1}{\currentmode}{#2}{#3}} \long\def\dodoifmode#1#2% - {\protect\ExpandBothAfter\doifcommonelse{\currentmode}{#1}{#2}{}} - -\def\doifnotmode% - {\unprotect\dodoifnotmode} + {\protect\ExpandBothAfter\doifcommonelse{#1}{\currentmode}{#2}{}} \long\def\dodoifnotmode#1#2% - {\protect\ExpandBothAfter\doifcommonelse{\currentmode}{#1}{}{#2}} - -\def\startmode% - {\unprotect\dostartmode} + {\protect\ExpandBothAfter\doifcommonelse{#1}{\currentmode}{}{#2}} -\long\def\dostartmode[#1]#2\stopmode% +\long\def\dostartmode[#1]#2\stopmode% {\dodoifmode{#1}{#2}} -\def\startnotmode% - {\unprotect\dostartnotmode} - \long\def\dostartnotmode[#1]#2\stopnotmode% {\dodoifnotmode{#1}{#2}} +% new +% +% \startnointerference +% all kind of code +% \stopnointerference + +\newbox\nointerferencebox + +\def\startnointerference% + {\setbox\nointerferencebox\vbox + \bgroup} + +\def\stopnointerference% + {\egroup + \setbox\nointerferencebox\box\voidb@x} + +% new + +\def\doifallmodeselse{\unprotect\dodoifallmodeselse} +\def\doifallmodes {\unprotect\dodoifallmodes} +\def\doifnotallmodes {\unprotect\dodoifnotallmodes} +\def\startallmodes {\unprotect\dostartallmodes} +\def\startnotallmodes{\unprotect\dostartnotallmodes} + +\long\def\dodoifallmodeselse#1#2#3% + {\protect\ExpandBothAfter\doifallcommonelse{#1}{\currentmode}{#2}{#3}} + +\long\def\dodoifallmodes#1#2% + {\protect\ExpandBothAfter\doifallcommonelse{#1}{\currentmode}{#2}{}} + +\long\def\dodoifnotallmodes#1#2% + {\protect\ExpandBothAfter\doifallcommonelse{#1}{\currentmode}{}{#2}} + +\long\def\dostartallmodes[#1]#2\stopallmodes + {\dodoifallmodes{#1}{#2}} + +\long\def\dostartnotallmodes[#1]#2\stopnotallmodes + {\dodoifnotallmodes{#1}{#2}} + +% will go to ... + +\def\alignedbox% + {\dodoubleempty\doalignedbox[]} + +\def\doalignedbox[#1][#2]% + {\bgroup + \let\iftraceboxplacement\iftracelayers + \dowithnextbox + {\let\next\middlebox + \processaction + [#2] + [ t=>\let\next\topbox , b=>\let\next\bottombox , + l=>\let\next\leftbox , r=>\let\next\rightbox , + bl=>\let\next\bottomleftbox,br=>\let\next\bottomrightbox, + tl=>\let\next\topleftbox ,tr=>\let\next\toprightbox , + lt=>\let\next\lefttopbox ,lb=>\let\next\leftbottombox , + rt=>\let\next\righttopbox ,rb=>\let\next\rightbottombox]% + \next{\box\nextbox}% + \egroup}#1} + +\def\offsetbox% + {\dodoubleempty\dooffsetbox[]} + +\def\dooffsetbox[#1][#2]% + {\bgroup + \dowithnextbox + {\getparameters[\??ox] + [\c!x=\!!zeropoint,\c!y=\!!zeropoint,\c!plaats=,#2]% + \edef\next% + {\wd\nextbox\the\wd\nextbox + \ht\nextbox\the\ht\nextbox + \dp\nextbox\the\dp\nextbox}% + \setbox\nextbox\hbox + {\hskip\@@oxx\lower\@@oxy\hbox + {\doifelsenothing{\@@oxplaats} + {\box\nextbox} + {\alignedbox[\@@oxplaats]\hbox{\box\nextbox}}}}% + \next\box\nextbox + \egroup}#1} + +\def\offset {\dodoubleempty\dooffsetbox [\hbox]} % yes or no +\def\aligned{\dosingleempty\doalignedbox[\hbox]} % yes or no + +%\ruledhbox{\offsetbox[x=-1cm,y=-1cm,location=c] +% {\framed[width=4cm,height=4cm]{x}}} + % actually this is pretty old, but temporary moved here \installdiscretionaries || \@@kpteken @@ -159,41 +236,89 @@ %D new and beta -\def\defineshortcut% - {\dodoubleargument\dodefineshortcut} - -\bgroup - - \catcode`\<=\@@active - - \gdef\dodefineshortcut[#1][#2]% - {\ifsecondargument - \catcode`\<=\@@active - \def<{\ifmmode\expandafter\normalless\else\expandafter\doshortcut\fi}% - \getparameters[\??te#1][\c!commandos=,\c!commando=,\c!letter=,\c!kleur=,#2]% - \else - \defineshortcut[][#1]% - \fi} - -\egroup - -\def\doshortcut% - {\bgroup - \catcode`\>=\@@other - \dodoshortcut} - -\def\dodoshortcut#1>% - {\def\shortcut{#1}% - \dododoshortcut#1:\end} +% \def\defineshortcut% +% {\dodoubleargument\dodefineshortcut} +% +% \bgroup +% +% \catcode`\<=\@@active +% +% \gdef\dodefineshortcut[#1][#2]% +% {\ifsecondargument +% \catcode`\<=\@@active +% \def<{\ifmmode\expandafter\normalless\else\expandafter\doshortcut\fi}% +% \getparameters[\??te#1][\c!commandos=,\c!commando=,\c!letter=,\c!kleur=,#2]% +% \else +% \defineshortcut[][#1]% +% \fi} +% +% \egroup +% +% \def\doshortcut% +% {\bgroup +% \catcode`\>=\@@other +% \dodoshortcut} +% +% \def\dodoshortcut#1>% +% {\def\shortcut{#1}% +% \dododoshortcut#1:\end} +% +% \def\dododoshortcut#1:#2\end +% {\doifelsenothing{#2} +% {\doifundefinedelse{\??te\c!commandos} +% {\shortcut} +% {\@EA\dodododoshortcut\@EA\??te\@EA:\shortcut:\end}} +% {\doifundefinedelse{\??te#1\c!commandos} +% {\shortcut} +% {\dodododoshortcut\??te#1:#2\end}}% +% \egroup} +% +% \def\dodododoshortcut#1:#2:\end +% {\getvalue{#1\c!commandos}% +% \doattributes{#1}\c!letter\c!kleur{\getvalue{#1\c!commando}{#2}}} +\def\defineshortcut% + {\dotripleargument\dodefineshortcut} + +\def\dodefineshortcut[#1][#2][#3]% + {\ifthirdargument + \ConvertConstantAfter\doifelse{#1}{} + {\dododefineshortcut[<>][#2][#3]} + {\dododefineshortcut[#1][#2][#3]}% + \else\ifsecondargument + \dododefineshortcut[<>][#1][#2]% + \else + \dododefineshortcut[<>][][#1]% + \fi\fi} + +\def\dododefineshortcut[#1#2][#3][#4]% #1 is the trigger, #2 the delimiter/tag + {\doifundefined{\??te\??te\string#2}{\letvalue{\??te\??te\string#2}=#1}% + \defineactivecharacter #1 {\@EA\doshortcut\string#2} % + \getparameters + [\??te\string#2#3] + [\c!commandos=,\c!commando=,\c!letter=,\c!kleur=,#4]} + +\def\doshortcut#1% + {\ifmmode + \getvalue{\??te\??te#1}% + \else + \bgroup + \catcode`#1=\@@other + \def\dodoshortcut##1#1% + {\def\shorttag{\??te#1}% + \def\shortcut{##1}% + \dododoshortcut##1:\end}% + \@EA\dodoshortcut + \fi} + \def\dododoshortcut#1:#2\end {\doifelsenothing{#2} - {\doifundefinedelse{\??te\c!commandos} + {\doifundefinedelse{\shorttag\c!commandos} {\shortcut} - {\@EA\dodododoshortcut\@EA\??te\@EA:\shortcut:\end}} - {\doifundefinedelse{\??te#1\c!commandos} + {\@EA\dodododoshortcut\@EA\shorttag\@EA:\shortcut:\end}} + {\doifundefinedelse{\shorttag#1\c!commandos} {\shortcut} - {\dodododoshortcut\??te#1:#2\end}}% + {\dodododoshortcut\shorttag#1:#2\end}}% \egroup} \def\dodododoshortcut#1:#2:\end @@ -208,17 +333,33 @@ %D \defineshortcut [k] [\c!letter=\v!kap] %D \defineshortcut [u] [\c!letter=\v!type,\c!commando=\hyphenatedurl] %D -%D test <ziezo> test \par -%D test test <t:ziezo> \par -%D test test <b:ziezo> \par -%D test test <w:ziezo> \par -%D zus<>zo zus<:>zo zus<::>zo \par -%D test test <t:ziezo> dat (ziezo) \par -%D test test <t::ziezo> dat (:ziezo) \par -%D test test <t:ziezo:> dat (ziezo:) \par -%D test test <t:zi:ezo:> dat (zi:ezo:) \par -%D well, <u:http://www.pragma-ade.nl> looks fuzzy \par +%D \startregels +%D test <ziezo> test +%D test test <t:ziezo> +%D test test <b:ziezo> +%D test test <w:ziezo> +%D zus<>zo zus<:>zo zus<::>zo +%D test test <t:ziezo> dat (ziezo) +%D test test <t::ziezo> dat (:ziezo) +%D test test <t:ziezo:> dat (ziezo:) +%D test test <t:zi:ezo:> dat (zi:ezo:) +%D well, <u:http://www.pragma-ade.nl> looks fuzzy %D $10<20$ +%D \stopregels +%D +%D \defineshortcut [<>] [i] [\c!letter=\it] +%D \defineshortcut [()] [b] [\c!letter=\bf] +%D \defineshortcut [++] [s] [\c!letter=\sl] +%D \defineshortcut [//] [u] [\c!letter=\underbars] +%D \defineshortcut [--] [a] [\c!letter=\overstrike] +%D +%D \startregels +%D it seems <i:to work> well +%D it seems (b:to work) well +%D it seems +s:to work+ well +%D it seems /u:to work/ well +%D it seems -a:to work- well +%D \stopregels \protect diff --git a/tex/context/base/core-not.tex b/tex/context/base/core-not.tex index 89b411f7f..f0ac4080a 100644 --- a/tex/context/base/core-not.tex +++ b/tex/context/base/core-not.tex @@ -105,6 +105,12 @@ \kern\strutdepth \fi} +%D The following switch can be used to disable limiting the +%D height of the footnote area, something that is needed in +%D multi column balancing. Use this switch with care. + +\newif\iffootnotelimit \footnotelimittrue + \def\dosetupfootnotes[#1]% {\getparameters[\??vn][#1]% \processaction @@ -113,14 +119,14 @@ \v!uit=>\let\dofootnoterule=\relax, \s!default=>\let\dofootnoterule=\relax, \s!unknown=>\let\dofootnoterule=\@@vnlijn]% - \setbox0=\vbox + \setbox\scratchbox=\vbox {\forgetall \@@vnvoor \dofootnoterule \@@vnna}% - \skip\footins=\ht0 + \skip\footins=\ht\scratchbox \count\footins=1000 - \setbox0=\box\voidb@x % \somehow \box0 is used + \setbox\scratchbox=\box\voidb@x % scratchbox can be in use \ExpandBothAfter\doifinsetelse{\v!kolommen}{\@@vnplaats} {\cleverfootnotestrue % global ? \ifnum\@@kln=0 @@ -149,8 +155,10 @@ {\global\endnotestrue \global\bottomnotestrue \postponefootnotes}}% - \dimen\footins=\@@vnhoogte - \multiply\dimen\footins by \scratchcounter} + \iffootnotelimit + \dimen\footins=\@@vnhoogte + \multiply\dimen\footins by \scratchcounter + \fi} \ifx\setfootnotehsize\undefined @@ -175,8 +183,11 @@ \getvalue{\e!start\??vn\??vn}}% \def\stoppushfootnote {\getvalue{\e!stop\??vn\??vn}% \egroup}% - \def\startpopfootnotes {\setbox0=\vbox\bgroup}% - \def\stoppopfootnotes {\egroup\rigidcolumnbalance0}} + \def\startpopfootnotes {\bgroup + \setfootnotehsize + \setrigidcolumnhsize\hsize\@@vnkolomafstand\@@vnn + \setbox0=\vbox\bgroup} + \def\stoppopfootnotes {\egroup\rigidcolumnbalance0\egroup}} \def\settextfootnotes% {\def\startpushfootnote {\startvboxtohbox @@ -242,21 +253,36 @@ %D %D Typesetting footnotes is, at least for the moment, disabled %D when reshaping boxes. +%D +%D The additional macro \type {\footnotetext} and the +%D associated \type {\note} macro were implemented at +%D request of users on the mailing list and a suggestion by +%D taco to split of the symbol placement. I decided to +%D merge this functionality with the existing \type {\note} +%D functionality. + +\newif\iffootnotesymbol -\definecomplexorsimpleempty\footnote +\unexpanded\def\footnote {\dodoubleempty\dofootnote[1]} +\unexpanded\def\footnotetext{\dodoubleempty\dofootnote[0]} -\def\complexfootnote[#1]% +\def\dofootnote[#1][#2]% {\unskip + \ifcase#1\relax + \global\footnotesymbolfalse + \else + \global\footnotesymboltrue + \fi \ifvisible \ifreshapingbox \let\next=\gobbletwoarguments \else - \let\next=\dofootnote + \let\next=\dodofootnote \fi \else \let\next=\gobbletwoarguments \fi - \next{#1}} + \next{#2}} %D \macros %D {footnotesenabled} @@ -274,21 +300,6 @@ %D of contents. The pagewise footnote numbering is dedicated %D to Han The Thanh, who needed it first. -%\newif\iffootnotesenabled \footnotesenabledtrue -% -%\def\dofootnote#1% -% {\iffootnotesenabled -% \doifelse{#1}{-} -% {\let\footnotenumber=\empty} -% {\verhoognummer[\v!voetnoot]% -% \maakhetnummer[\v!voetnoot]% -% \rawtextreference{\s!fnt}{#1}{\hetnummer}% -% \let\footnotenumber=\hetnummer}% -% \expandafter\dostartfootnote -% \else -% \expandafter\gobbleoneargument -% \fi} - \newif\iffootnotesenabled \footnotesenabledtrue \newconditional\pagewisefootnotes % saves two hash entries @@ -306,7 +317,7 @@ {} \fi} -\def\dofootnote#1% +\def\dodofootnote#1% {\iffootnotesenabled \doglobal\increment\internalfootreference \doifelse{\@@vnwijze}{\v!per\v!pagina} @@ -324,7 +335,7 @@ \fi \verhoognummer[\v!voetnoot]% \maakhetnummer[\v!voetnoot]% - \rawtextreference{\s!fnt}{#1}{\hetnummer}% + \rawreference{\s!fnt}{#1}{\hetnummer}% \let\footnotenumber=\hetnummer}% \expandafter\dostartfootnote \else @@ -358,25 +369,18 @@ \def\dostartfootnote% nog gobble als in pagebody {\bgroup %\restorecatcodes % to be tested first - \ignorelines % makes footnotes work in \startlines ... \stoplines - \unskip\unskip - \ifdim\lastkern=\footnotesignal - \high{\kern\@@vnafstand}% gets the font right, hack ! + \ifinregels % otherwise problems with \type <crlf> {xxx} + \ignorelines % makes footnotes work in \startlines ... \stoplines \fi - \ignorespaces - \nobreak - \iflocation - \naarbox - {\high{\tx\footnotenumber\domovednote\v!vorigepagina\v!volgendepagina}} - [\s!fnt:t:\internalfootreference]% - \rawreference{\s!fnt}{\s!fnt:f:\internalfootreference}{}% + \iffootnotesymbol + \dolastnotesymbol \else - \high{\tx\footnotenumber\domovednote\v!vorigepagina\v!volgendepagina}% - \ifconditional\pagewisefootnotes - \rawreference{\s!fnt}{\s!fnt:f:\internalfootreference}{}% - \fi + \unskip\unskip + \global\let\lastnotesymbol\dolastnotesymbol \fi + \ignorespaces \localfootinsert\footins\bgroup + \allowbreak % needed in order to split in otrset \forgetall \setfootnotebodyfont \redoconvertfont % to undo \undo calls in in headings etc @@ -405,6 +409,7 @@ \rawreference{\s!fnt}{\s!fnt:t:\internalfootreference}{}% \fi\fi}% \bgroup + \postponefootnotes \aftergroup\dostopfootnote \begstrut \let\next} @@ -416,6 +421,29 @@ \egroup \kern\footnotesignal\relax} % \relax is needed to honor spaces +\let\lastnotesymbol\empty + +\def\dolastnotesymbol% + {\unskip\unskip + \ifdim\lastkern=\footnotesignal + \high{\kern\@@vnafstand}% gets the font right, hack ! + \fi + \nobreak + \iflocation + \naarbox + {\high{\tx\footnotenumber\domovednote\v!vorigepagina\v!volgendepagina}}% + [\s!fnt:t:\internalfootreference]% + \rawreference{\s!fnt}{\s!fnt:f:\internalfootreference}{}% + \else + \high{\tx\footnotenumber\domovednote\v!vorigepagina\v!volgendepagina}% + \ifconditional\pagewisefootnotes + \rawreference{\s!fnt}{\s!fnt:f:\internalfootreference}{}% + \fi + \fi + \global\let\lastnotesymbol\relax} + +\let\lastnotesymbol\relax + %D \macros %D {note} %D @@ -426,14 +454,23 @@ %D %D This command is implemented rather straightforward as: -\def\note[#1]% +\definecomplexorsimple\note + +\def\complexnote[#1]% {\iffootnotesenabled - \bgroup - \unskip - \naarbox{\high{\tx\currenttextreference}}[#1]% - \egroup + \ifx\lastnotesymbol\relax + \bgroup + \unskip + \naarbox{\high{\tx\currenttextreference}}[#1]% + \egroup + \else + \lastnotesymbol + \fi \fi} +\def\simplenote% + {\lastnotesymbol} + %D Normally footnotes are saved as inserts that are called upon %D as soon as the pagebody is constructed. The footnote %D insertion routine looks just like the \PLAIN\ \TEX\ one, @@ -453,7 +490,10 @@ \setbox0=\hbox {\startpopfootnotes \setfootnotebodyfont - \ifcase\@@vnn\unvbox\else\box\fi\footins + % this should be checked, smells like a mix-up + % does not split: \ifcase\@@vnn\unvbox\else\box\fi\footins + \ifcase\@@vnn\box\else\unvbox\fi\footins + % this is too ugly actually \stoppopfootnotes}% \localframed [\??vn] @@ -673,8 +713,7 @@ \def\doplacefootnotes[#1]% {\bgroup - \let\@@vnhoogte=\teksthoogte - \setupfootnotes[#1]% + \setupfootnotes[#1,\c!hoogte=\teksthoogte]% \ifendnotes \ifinpagebody \else \placefootnotesintext\postponedfootnotes @@ -715,10 +754,17 @@ %D from the global document bodyfont size. In the previous macros %D we already used a footnote specific font setting macro. +%\def\setfootnotebodyfont% +% {\let\setfootnotebodyfont\relax +% \restoreglobalbodyfont +% \switchtobodyfont[\@@vnkorps]} + \def\setfootnotebodyfont% {\let\setfootnotebodyfont\relax \restoreglobalbodyfont - \switchtobodyfont[\@@vnkorps]} + \switchtobodyfont[\@@vnkorps]% + \steltolerantiein[\@@vntolerantie]% + \steluitlijnenin[\@@vnuitlijnen]} %D The footnote mechanism defaults to a traditional one %D column way of showing them. By default we precede them by @@ -741,6 +787,8 @@ \c!margeafstand=.5em, \c!kolomafstand=1em, \c!afstand=.125em, + \c!uitlijnen=\v!normaal, + \c!tolerantie=\v!soepel, %\c!breedte=\zetbreedte, %\c!breedte=\ifdim\hsize<\zetbreedte\hsize\else\zetbreedte\fi, \c!breedte=\defaultfootnotewidth, diff --git a/tex/context/base/core-ntb.tex b/tex/context/base/core-ntb.tex index 7a3119c17..83d1c166b 100644 --- a/tex/context/base/core-ntb.tex +++ b/tex/context/base/core-ntb.tex @@ -1,5 +1,5 @@ %D \module -%D [ file=core-tbl, +%D [ file=core-ntb, %D version=2000.04.18, %D title=\CONTEXT\ Core Macros, %D subtitle=Natural Tables, @@ -399,6 +399,9 @@ \expanded{\doTBL{\row}{\col}}}% \eTBL}% \endTBL +\ifnum\TBLlevel>1 + \vskip-\dp\strutbox +\fi \egroup \popTBL} diff --git a/tex/context/base/core-obj.tex b/tex/context/base/core-obj.tex index d44235a22..58315aeba 100644 --- a/tex/context/base/core-obj.tex +++ b/tex/context/base/core-obj.tex @@ -45,6 +45,11 @@ 31: duplikat objekt -- \stopmessages +\startmessages romanian library: references + 30: obiect necunoscut -- + 31: obiect duplicat -- +\stopmessages + %D \macros %D {setobject,getobject,ifinobject} %D @@ -85,30 +90,89 @@ {\doifundefined{\r!object#1::#2} {\setxvalue{\r!object#1::#2}{NOT YET FLUSHED}}} -\def\setobject#1#2% evt \initializepaper naar \everyshipout +\def\dosetobject#1#2#3% evt \initializepaper naar \everyshipout {\initializepaper - \ifundefined{\r!object#1::#2}% - \expandafter\dosetobject + \ifundefined{\r!object#2::#3}% + \expandafter\dodosetobject \else - \expandafter\gobblefourarguments + \expandafter\gobblefivearguments \fi - {#1}{#2}} - -\def\dosetobject#1#2% + {#1}{#2}{#3}} + +\let\objectoffset\!!zeropoint + +% \def\dodosetobject#1#2#3% +% {\bgroup +% \inobjecttrue +% \dowithnextbox +% {\bgroup +% \dontshowcomposition % rather fuzzy in \setxvalue ... \hbox +% \setxvalue{\r!object#2::#3}% +% {\noexpand\dohandleobject{#2}{#3} +% {\ifhbox\nextbox\hbox\else\vbox\fi} +% %{\the\wd\nextbox}{\the\ht\nextbox}{\the\dp\nextbox}}% +% {\number\wd\nextbox}{\number\ht\nextbox}{\number\dp\nextbox}}% +% \expanded % fix the dimensions since \dostartobject may use \nextbox +% {\dostartobject +% {#2}{#3} +% {\number\wd\nextbox}{\number\ht\nextbox}{\number\dp\nextbox}}% +% \ifcase#1\relax\else\ifdim\objectoffset>\!!zeropoint\relax +% \scratchdimen=\objectoffset +% \edef\next% +% {\wd\nextbox\the\wd\nextbox +% \ht\nextbox\the\ht\nextbox +% \dp\nextbox\the\dp\nextbox}% +% \setbox\nextbox=\vbox spread 2\scratchdimen +% {\forgetall +% \vss +% \hbox spread 2\scratchdimen{\hss\box\nextbox\hss}% +% \vss}% +% \setbox\nextbox=\hbox +% {\hskip-\scratchdimen\lower\scratchdimen\box\nextbox}% +% \next +% \fi\fi +% \box\nextbox +% \dostopobject +% \egroup +% \egroup}} + +\def\dodosetobject#1#2#3% {\bgroup \inobjecttrue \dowithnextbox {\bgroup \dontshowcomposition % rather fuzzy in \setxvalue ... \hbox - \setxvalue{\r!object#1::#2}% - {\noexpand\dohandleobject{#1}{#2} + \setxvalue{\r!object#2::#3}% + {\noexpand\dohandleobject{#2}{#3} {\ifhbox\nextbox\hbox\else\vbox\fi} %{\the\wd\nextbox}{\the\ht\nextbox}{\the\dp\nextbox}}% {\number\wd\nextbox}{\number\ht\nextbox}{\number\dp\nextbox}}% - \dostartobject - {#1}{#2} - {\number\wd\nextbox}{\number\ht\nextbox}{\number\dp\nextbox}% - \box\nextbox + \expanded % fix the dimensions since \dostartobject may use \nextbox + {\dostartobject + {#2}{#3} + {\number\wd\nextbox}{\number\ht\nextbox}{\number\dp\nextbox}}% + \ifcase#1\relax + \box\nextbox + \else\ifdim\objectoffset>\!!zeropoint + \scratchdimen=\objectoffset + \edef\width {\the\wd\nextbox}% + \edef\height{\the\ht\nextbox}% + \edef\depth {\the\dp\nextbox}% + \setbox\nextbox= + \vbox spread 2\scratchdimen + {\forgetall + \vss + \hbox spread 2\scratchdimen{\hss\box\nextbox\hss}% + \vss}% + \setbox\nextbox=\hbox + {\hskip-\scratchdimen\lower\scratchdimen\box\nextbox}% + \wd\nextbox=\width + \ht\nextbox=\height + \dp\nextbox=\depth + \box\nextbox + \else + \box\nextbox + \fi\fi \dostopobject \egroup \egroup}} @@ -116,12 +180,20 @@ \def\dogetobject#1#2#3#4#5#6% {\initializepaper \bgroup + \forgetall \dontshowcomposition -% \setbox0=\vbox to #5{\vfill\doinsertobject{#1}{#2}}% - \setbox0=\vbox to #5sp{\vfill\doinsertobject{#1}{#2}}% - \setbox0=#3{\box0}% -% \wd0=#4\ht0=#5\dp0=#6\relax - \wd0=#4sp\ht0=#5sp\dp0=#6sp% + \setbox0=\vbox + {\doinsertobject{#1}{#2}}% + \setbox0=#3% + {\vbox to #5\s!sp + {\ifdim\ht0>#5\s!sp % or \ifdim\wd0>#4\s!sp + \vss\hbox to #4\s!sp{\hss\box0\hss}\vss + \else + \vss\box0 + \fi}}% + \wd0=#4\s!sp + \ht0=#5\s!sp + \dp0=#6\s!sp \box0 \egroup} @@ -139,12 +211,9 @@ %D {\objectheight} and \type {\objectdepth}. \def\dogetobjectdimensions#1#2#3#4#5#6% -% {\def\objectwidth {#4}% -% \def\objectheight{#5}% -% \def\objectdepth {#6}} - {\def\objectwidth {#4sp}% - \def\objectheight{#5sp}% - \def\objectdepth {#6sp}} + {\def\objectwidth {#4\s!sp}% + \def\objectheight{#5\s!sp}% + \def\objectdepth {#6\s!sp}} \def\getobjectdimensions#1#2% {\let\dohandleobject\dogetobjectdimensions @@ -211,13 +280,8 @@ {\showmessage{\m!references}{30}{[#1 #2=>\defaultobjectreference{#1}{#2}]}% \xdef#3{\defaultobjectreference{#1}{#2}}}} -\let\normalsetobject=\setobject - -\def\setobject% - {\global\objectreferencingfalse\normalsetobject} - -\def\setreferenceobject% - {\global\objectreferencingtrue\normalsetobject} +\def\setobject {\global\objectreferencingfalse\dosetobject1} +\def\settightobject{\global\objectreferencingfalse\dosetobject0} %D \macros %D {doifobjectfoundelse,doifobjectreferencefoundelse} diff --git a/tex/context/base/core-pos.tex b/tex/context/base/core-pos.tex index 761acf08d..11d7ef1d2 100644 --- a/tex/context/base/core-pos.tex +++ b/tex/context/base/core-pos.tex @@ -327,7 +327,7 @@ %D The macros \type {\lpos} and \type {\rpos} share some code. \def\lrpos#1#2% - {\dontleavehmode\vadjust + {\dontleavehmode\vadjust % may disappear if buried {\setbox0=\hbox{\raise\dp\strutbox\hbox{\hpos{#1}{\strut}}}% \smashbox0 \rlap{#2\box0}}} @@ -430,7 +430,7 @@ %D \defineoverlay [sample] [\positionoverlay{sample}] %D %D \startpositionoverlay{sample} -%D \setMPpositiongraphic{A-1}{connectcenter}{from=A-1m,to=A-2} +%D \setMPpositiongraphic{A-1}{connectcenter}{from=A-1,to=A-2} %D \stoppositionoverlay %D \stopbuffer %D @@ -439,8 +439,8 @@ %D \startbuffer[graphic] %D \startMPpositiongraphic{connectcenter} %D path pa, pb ; pair ca, cb ; -%D initialize_box(\MPvar{from}) ; pa := pxy ; ca := cxy ; -%D initialize_box(\MPvar{to}) ; pb := pxy ; cb := cxy ; +%D initialize_box(\MPpos{\MPvar{from}}) ; pa := pxy ; ca := cxy ; +%D initialize_box(\MPpos{\MPvar{to}}) ; pb := pxy ; cb := cxy ; %D draw pa withcolor red ; %D draw pb withcolor red ; %D draw ca -- cb withcolor blue ; @@ -661,6 +661,10 @@ linewidth=\linewidth, backgroundcolor=lightgray] +\startuseMPgraphic{mpos:par:shape} + draw_par ; +\stopuseMPgraphic + \startMPpositionmethod{mpos:par} \ifnum\MPp{b:\MPvar{self}}=\MPp{e:\MPvar{self}}\relax \startMPpositiongraphic{mpos:par}{backgroundcolor,linecolor} @@ -668,25 +672,35 @@ \MPpos{r:\MPvar{self}},\MPpos{e:\MPvar{self}}) ; boxfillcolor := \MPvar{backgroundcolor} ; boxlinecolor := \MPvar{linecolor} ; - draw_par ; + \includeMPgraphic{mpos:par:shape} ; +if not (\MPx{head:\realfolio}=\MPx{head:\MPp{l:\MPvar{self}}}) : + LoadPageState ; currentpicture := currentpicture shifted + if odd \realfolio : - fi (PaperWidth-MakeupWidth-2BackSpace,0) ; +fi ; anchor_par(\MPanchor{b:\MPvar{self}}) ; \stopMPpositiongraphic \MPpositiongraphic{mpos:par}{}% - \else + \else\ifnum\MPp{b:\MPvar{self}}<\MPp{e:\MPvar{self}}\relax \startMPpositiongraphic{mpos:par}{backgroundcolor,linecolor} initialize_par(\MPpos{b:\MPvar{self}},\MPpos{l:\MPvar{self}}, \MPpos{r:\MPvar{self}},\MPpos{tail:\realfolio}) ; boxfillcolor := \MPvar{backgroundcolor} ; boxlinecolor := \MPvar{linecolor} ; - draw_par ; + \includeMPgraphic{mpos:par:shape} ; +if not (\MPx{head:\realfolio}=\MPx{head:\MPp{l:\MPvar{self}}}) : + LoadPageState ; currentpicture := currentpicture shifted + if odd \realfolio : - fi (PaperWidth-MakeupWidth-2BackSpace,0) ; +fi ; anchor_par(\MPanchor{b:\MPvar{self}}) ; \stopMPpositiongraphic \MPpositiongraphic{mpos:par}{}% - \advance\realpageno by 1 - \dosetpositionaction{head:\realfolio}% - {\copyposition{b:\MPvar{self}}{head:\realfolio}% - \doshowpositionpar{\MPvar{self}}}% - \fi + \ifnum\MPp{e:\MPvar{self}}>\realpageno + \bgroup + \advance\realpageno by 1 + \copyposition{b:\MPvar{self}}{head:\realfolio}% + \egroup + \fi + \fi\fi \stopMPpositionmethod % lelijk, aanpassen diff --git a/tex/context/base/core-ref.tex b/tex/context/base/core-ref.tex index c4705cd0e..107b1b518 100644 --- a/tex/context/base/core-ref.tex +++ b/tex/context/base/core-ref.tex @@ -109,6 +109,17 @@ 23: obskur referanse -- (Prefix=--) \stopmessages +\startmessages romanian library: references + title: referinte + 1: referinta necunoscuta -- + 2: referinta duplicat -- la pagina -- + 3: tip necunoscut de referinta -- + 4: referinta eronata -- + 21: documentul -- este incarcat + 22: documentul -- nu este interactiv + 23: referinta obscura -- (prefix=--) +\stopmessages + %D This module deals with referencing. In \CONTEXT\ referencing %D is one of the core features, although at a first glance %D probably nobody will notice. This is good, because @@ -395,6 +406,7 @@ \fi}} \egroup\egroup} + %D As mentioned we will also use the cross reference mechanism %D for navigational purposes. The main reason for this is that %D we want to treat both categories alike: @@ -1707,6 +1719,8 @@ \setglobalsystemreference \rt!exec \v!GotoPage {gotopage} \setglobalsystemreference \rt!exec \v!Query {query} \setglobalsystemreference \rt!exec \v!QueryAgain {queryagain} +\setglobalsystemreference \rt!exec \v!FitWidth {fitwidth} +\setglobalsystemreference \rt!exec \v!FitHeight {fitheight} %D Executing the command looks alike the previous goto macros. @@ -1965,7 +1979,7 @@ %D in a different color and typeface). \def\doinatreference#1% - {\doifnextcharelse{[} + {\doifnextcharelse[% {[} {\dodoinatreference{#1}{}} {\dodoinatreference{#1}}} @@ -3100,7 +3114,9 @@ \c!links=\citaat\bgroup, \c!rechts=\egroup, \c!globaal=\v!nee, - \c!scheider=~] + \c!scheider=\nonbreakablespace] + +\let\nonbreakablespace=~ \setupurl [\c!variant=\v!beide, diff --git a/tex/context/base/core-reg.tex b/tex/context/base/core-reg.tex index c978983c8..3b996ee09 100644 --- a/tex/context/base/core-reg.tex +++ b/tex/context/base/core-reg.tex @@ -152,7 +152,7 @@ \def\doschrijfnaarregister[#1]% % de twee-traps-aanroep is nodig {\edef\currentregister{#1}% % om gebruik van \ExpandBothAfter - \doprocesspageregister} % mogelijk te maken + \doprocesspageregister} % mogelijk te maken \def\schrijfnaarregister% {\dodoubleempty\doschrijfnaarregister} diff --git a/tex/context/base/core-rul.tex b/tex/context/base/core-rul.tex index 26f93fb9d..44531a39a 100644 --- a/tex/context/base/core-rul.tex +++ b/tex/context/base/core-rul.tex @@ -574,7 +574,7 @@ [\c!breedte,\c!hoogte,\c!offset,\c!leeg, \c!straal,\c!hoek,\c!diepte,\c!kader,\c!kaderkleur, \c!bovenkader,\c!onderkader,\c!linkerkader,\c!rechterkader, - \c!lijndikte,\c!kaderoffset,\c!achtergrond, + \c!lijndikte,\c!kaderoffset,\c!voorgrondkleur,\c!achtergrond, \c!achtergrondoffset,\c!achtergrondraster,\c!achtergrondkleur, \c!uitlijnen,\c!onder,\c!boven,\c!strut,\c!plaats]% \copyparameters[#1\c!achtergrond][#1] @@ -616,139 +616,6 @@ %D backgrounds, when \type {#2} sets the offset to \type %D {overlay}, both offsets become invalid. -% \def\startlocalframed[#1][#2]% beware, also on cont-loc! -% {\bgroup -% \inframedtrue -% \edef\@@framed{#1}% -% % this piece of pre expansion is needed -% \scratchdimen\getvalue{\@@framed\c!kaderoffset}% -% \setevalue{\@@framed\c!kaderoffset}{\the\scratchdimen}% -% \doifnotvalue{\@@framed\c!achtergrondoffset}{\v!kader} -% {\scratchdimen\getvalue{\@@framed\c!achtergrondoffset}% -% \setevalue{\@@framed\c!achtergrondoffset}{\the\scratchdimen}}% -% % to prevent deadlock in case of self refering -% \ifsecondargument % faster -% \getparameters[\@@framed][#2]% here ! -% \fi -% % beware, both the frame and background offset can be overruled -% \edef\localoffset{\getvalue{\@@framed\c!offset}}% -% \edef\localwidth {\getvalue{\@@framed\c!breedte}}% -% \edef\localheight{\getvalue{\@@framed\c!hoogte}}% -% \edef\localformat{\getvalue{\@@framed\c!uitlijnen}}% -% \edef\localstrut {\getvalue{\@@framed\c!strut}}% -% \doifvaluesomething{\@@framed\c!lijndikte} % nested \framed inherits -% {\linewidth=\getvalue{\@@framed\c!lijndikte}}% -% \doifelsenothing{\localformat} -% {\boxhasformatfalse} -% {\boxhasformattrue -% \dosetraggedcommand{\localformat}% -% \edef\beforeframedbox{\raggedtopcommand\getvalue{\@@framed\c!boven}}% -% \edef\afterframedbox {\getvalue{\@@framed\c!onder}\raggedbottomcommand}}% -% \doifelse{\localoffset}{\v!geen} -% {\boxhasoffsetfalse -% \boxhasstrutfalse -% \boxisoverlaidfalse -% \@@localoffset=\linewidth} -% {\doifelse{\localoffset}{\v!overlay} -% {\boxhasoffsetfalse -% \boxhasstrutfalse -% \boxisoverlaidtrue -% \@@localoffset=\!!zeropoint} -% {\boxhasoffsettrue -% \boxhasstruttrue -% \boxisoverlaidfalse -% \ifx\localoffset\v!default % new per 2-6-2000 -% \let\localoffset\defaultframeoffset -% \letvalue{\@@framed\c!offset}\defaultframeoffset -% \else -% \let\defaultframeoffset\localoffset -% \fi -% \@@localoffset=\localoffset -% \advance\@@localoffset by \linewidth}}% -% \doifelse{\localwidth}{\v!passend} -% {\ifboxhasformat -% \boxhaswidthtrue -% \!!widtha=\hsize -% \else -% \boxhaswidthfalse -% \fi} -% {\boxhaswidthtrue -% \doifelse{\localwidth}{\v!ruim} -% {\!!widtha=\hsize} -% {\!!widtha=\localwidth}}% -% \doifelse{\localheight}{\v!passend} -% {\boxhasheightfalse} % no longer: \boxhasstrutfalse -% {\doifelse{\localheight}{\v!ruim} -% {\boxhasheightfalse} -% {\boxhasheighttrue -% \!!heighta=\localheight}}% -% \ifdim\!!widtha=\hsize -% \parindent=\!!zeropoint -% \setlocalhsize -% \!!widtha=\localhsize -% \fi -% \advance\!!widtha by -2\@@localoffset -% \advance\!!heighta by -2\@@localoffset -% \doif{\localstrut}{\v!nee} -% {\boxhasstrutfalse}% -% \ifboxhasstrut -% \setstrut -% \let\localbegstrut=\begstrut -% \let\localendstrut=\endstrut -% \let\localstrut =\strut -% \else -% \let\localbegstrut=\pseudobegstrut % was: \relax -% \let\localendstrut=\pseudoendstrut % was: \relax -% \let\localstrut =\pseudostrut % was: \relax -% %\ifboxhasheight\ifdim\!!heighta<\ht\strutbox % saveguard -% % \let\localbegstrut=\relax % but not that -% % \let\localstrut =\relax % save afterall -% %\fi\fi -% \fi -% \ifboxhasheight -% \let\\=\vboxednewline -% \ifboxhaswidth -% \let\hairline=\vboxedhairline -% \ifboxhasformat -% \let\next=\doformatboxSomeFormat -% \else -% \let\next=\doformatboxNoFormat -% \fi -% \else -% \let\hairline=\hboxedhairline -% \ifboxhasformat -% \let\next=\doformatboxHeight -% \else -% \let\next=\doformatboxVSize -% \fi -% \fi -% \else -% \ifboxhaswidth -% \ifboxhasformat -% \let\hairline=\vboxedhairline -% \let\\=\vboxednewline -% \let\next=\doformatboxWidth -% \else -% \let\hairline=\hboxedhairline -% \let\\=\hboxednewline -% \let\next=\doformatboxHSize -% \fi -% \else -% \let\hairline=\hboxedhairline -% \let\\=\hboxednewline -% \let\next=\doformatboxNoSize -% \fi -% \fi -% \def\dowithframedbox% -% {\let\postprocessframebox\undefined %new -% \aftergroup\stoplocalframed}% -% \edef\framedwidth % a new feature -% {\ifdim\!!widtha >\!!zeropoint\the\!!widtha \else\!!zeropoint\fi}% -% \edef\framedheight% a new feature -% {\ifdim\!!heighta>\!!zeropoint\the\!!heighta\else\!!zeropoint\fi}% -% \afterassignment\dowithframedbox -% \setbox\framebox=\next} - \def\startlocalframed[#1][#2]% {\bgroup \inframedtrue @@ -759,6 +626,8 @@ \doifnotvalue{\@@framed\c!achtergrondoffset}{\v!kader} {\scratchdimen\getvalue{\@@framed\c!achtergrondoffset}% \setevalue{\@@framed\c!achtergrondoffset}{\the\scratchdimen}}% + % we need to register the (outer) color + \startregistercolor[\getvalue{\@@framed\c!voorgrondkleur}]% % to prevent deadlock in case of self refering \ifsecondargument % faster \getparameters[\@@framed][#2]% here ! @@ -915,10 +784,11 @@ \def\stoplocalframed% {\dontshowcomposition \ifboxhasformat - \doif{\localwidth}{\v!passend} + \doifelse{\localwidth}{\v!passend} {\ifreshapeframebox\doreshapeframedbox\fi \boxhaswidthfalse}% - \else + {\resetshapeframebox}% + \else \resetshapeframebox \fi \ifboxhaswidth @@ -931,6 +801,8 @@ {\setbox0=\null \wd0=\wd\framebox \ht0=\ht\framebox \dp0=\dp\framebox \setbox\framebox=\box0\relax}% + \stopregistercolor + \docolorframebox \ifboxhasoffset \dooffsetframebox \fi @@ -968,6 +840,17 @@ %D ourselves a frame and/or background, but no content, so %D actually we have a sort of phantom framed box. +%D Because color marks and specials can interfere with +%D spacing, we provide a way to specify a foregroundcolor. + +\def\docolorframebox% + {\doifvaluesomething{\@@framed\c!voorgrondkleur} + {\doifcolorelse{\getvalue{\@@framed\c!voorgrondkleur}} + {\setbox\framebox=\hbox + {\localcolortrue + \color[\getvalue{\@@framed\c!voorgrondkleur}]{\box\framebox}}} + {}}} + %D \macros %D {mframed, minframed} %D @@ -1090,13 +973,13 @@ %D %D \haalbuffer %D -%D Therefore, we can best use \type {\super} and \type {\sub} +%D Therefore, we can best use \type {\super} and \type {\suber} %D instead of \type {^} and \type {_}. Both commands take care %D of proper font switching. %D %D \startbuffer %D \startformule -%D x \times \mframed{y} \times y\super{\mframed{z}\sub{\mframed{z}}} +%D x \times \mframed{y} \times y\super{\mframed{z}\suber{\mframed{z}}} %D \stopformule %D \stopbuffer %D @@ -1112,7 +995,7 @@ %D %D \startbuffer %D \startformule -%D x \times y\super{\mframed[kaderkleur=rood]{z}\sub{z}} +%D x \times y\super{\mframed[kaderkleur=rood]{z}\suber{z}} %D \stopformule %D \stopbuffer %D @@ -1395,6 +1278,44 @@ {\framednoflines=0 \framedlastlength=\!!zeropoint} +% \def\doreshapeframedbox% +% {\beginofshapebox +% \unvcopy\framebox +% \endofshapebox +% \global\@@globalwidth=\!!zeropoint +% \resetshapeframebox +% \reshapebox +% {\setbox0=\hbox +% {\strut\ifhbox\shapebox\unhbox\else\box\fi\shapebox}% +% \global\advance\framednoflines by 1 +% \ifdim\framedlastlength>\!!zeropoint\else +% \global\framedlastlength=\wd0 +% \fi +% \ifdim\wd0>\@@globalwidth +% \global\@@globalwidth=\wd0 +% \fi}% +% \dosetraggedcommand{\localformat}% +% \raggedcommand +% \ifboxhasheight +% \setbox\framebox=\vbox to \localheight +% {\hsize\@@globalwidth +% \reshapebox{\hbox to \hsize{\ifhbox\shapebox\unhbox\else\box\fi\shapebox}}% +% \beforeframedbox +% \innerflushshapebox +% \afterframedbox}% +% \else +% \setbox\framebox=\vbox +% {\hsize\@@globalwidth +% \reshapebox{\hbox to \hsize{\ifhbox\shapebox\unhbox\else\box\fi\shapebox}}% +% \innerflushshapebox}% +% \dp\framebox=\dp\strutbox +% \fi +% \ifdim\framedlastlength=\!!zeropoint\global\framednoflines=\wd\framebox\fi +% \ifcase\framednoflines\global\framednoflines=1\fi} + +% better depth preserving, else problems with framed display +% math and auto width + \def\doreshapeframedbox% {\beginofshapebox \unvcopy\framebox @@ -1421,11 +1342,12 @@ \innerflushshapebox \afterframedbox}% \else - \setbox\framebox=\vbox + \scratchdimen=\dp\framebox + \setbox\framebox=\vbox to \ht\framebox {\hsize\@@globalwidth \reshapebox{\hbox to \hsize{\ifhbox\shapebox\unhbox\else\box\fi\shapebox}}% \innerflushshapebox}% - \dp\framebox=\dp\strutbox + \dp\framebox=\scratchdimen % \dp\strutbox otherwise problem with math \fi \ifdim\framedlastlength=\!!zeropoint\global\framednoflines=\wd\framebox\fi \ifcase\framednoflines\global\framednoflines=1\fi} @@ -2092,10 +2014,12 @@ \c!rechterkader=, \c!straal=.5\bodyfontsize, \c!hoek=\v!recht, + \c!voorgrondkleur=, \c!achtergrond=, \c!achtergrondkleur=, \c!achtergrondraster=\@@rsraster, \c!regelcorrectie=\v!aan, + \c!dieptecorrectie=\v!aan, \c!marge=\v!standaard, #2]% \setvalue{\e!start#1}{\dostartframedtext[#1]}% @@ -2155,7 +2079,7 @@ {\endgraf \removelastskip \dostopattributes - \baselinecorrection % new, inside box + \doifvalue{\??kd#1\c!dieptecorrectie}{\v!aan}{\baselinecorrection} % new, inside box \egroup \egroup \ifinsidefloat @@ -2580,72 +2504,58 @@ %D \lineheight}. That way \type{\topskip} takes care of the %D lineheight. I'll probably forget to apply this trick %D elsewhere. -%D -%D {\em Beware: especially the bottom depth handling needs -%D a more advanced implementation, consistent with main -%D document features. Future versions therefore can break a -%D bit different.} -\def\dostopbackground% +\def\dostopbackground% improved version (i hope) {\endgraf \removelastskip \egroup - \everypar{} + \forgetall \splitmaxdepth=\boxmaxdepth \splittopskip=\topskip - \setbox2=\vsplit0 to \lineheight + \setbox2=\vsplit0 to \lineheight % get rid of fake line \loop - \ifdim\prevdepth<\dp\strutbox - \dimen8=\dp\strutbox - \else - \dimen8=\prevdepth - \fi - %\advance\dimen0 by \topskip - %\advance\dimen0 by -\baselineskip - \ifdim\pagegoal=\maxdimen - \dimen0=\teksthoogte - \advance\dimen0 by \topskip - \advance\dimen0 by -\baselineskip - \advance\dimen0 by -\dp\strutbox + \ifdim\pagetotal=\!!zeropoint % empty page + \scratchdimen=\teksthoogte + \chardef\backgroundsplit=1 % split to max height \else - \dimen0=\pagegoal - \advance\dimen0 by -\dimen8 - \advance\dimen0 by -\parskip + \scratchdimen=\pagegoal + \setbox\scratchbox=\vbox{\@@agvoor}% + \advance\scratchdimen -\ht\scratchbox + \advance\scratchdimen -\pagetotal + \chardef\backgroundsplit=2 % split to partial height \fi - \advance\dimen0 by -\pagetotal - \advance\dimen0 by -\@@agbovenoffset - \advance\dimen0 by -\@@agonderoffset - \ifdim\dimen0>2\lineheight - \ifdim\ht0>\dimen0 - \setbox2=\vsplit0 to \dimen0 - \backgroundsplittrue + \advance\scratchdimen -\@@agbovenoffset + \advance\scratchdimen -\@@agonderoffset \relax + \ifdim\scratchdimen>2\lineheight\relax % reasonable, will be configurable + \ifdim\ht0>\scratchdimen % larger than page + \setbox2=\vsplit0 to \scratchdimen \else \setbox2=\box0 - \backgroundsplitfalse + \chardef\backgroundsplit=0 % no split \fi - \else - \setbox2=\box0 - \backgroundsplitfalse - \fi - \setbox2=\vbox \ifbackgroundsplit to \dimen0 \fi - {\vskip\@@agbovenoffset - \dimen0=\dp\strutbox - \advance\dimen0 by -\dp0 - \popsplitcolor - \ifbackgroundsplit\unvbox\else\box\fi2 - \ifdim\dimen0>\!!zeropoint - \vskip\dimen0 - \fi - \vskip\@@agonderoffset - \vss} - \vskip\dimen8 % looks better - \witruimte - \ifbackgroundsplit\ifdim\pagegoal<\maxdimen - \pagegoal=1.1\pagegoal % be a bit more tolerant - \fi\fi - \localframed[\??ag][\c!offset=\v!overlay] - {\hskip\@@aglinkeroffset\box2\hskip\@@agrechteroffset}% - \ifbackgroundsplit + \setbox2=\vbox \ifcase\backgroundsplit\or to \teksthoogte \fi % max split + {\vskip\@@agbovenoffset + \popsplitcolor + \unvcopy2 + \prevdepth\dp2 + \obeydepth + \vskip\@@agonderoffset + \vfill} + \@@agvoor + \ifcase\backgroundsplit\or\or % partial split + \pagegoal=1.2\pagegoal % be a bit more tolerant + \fi + \startregelcorrectie + \localframed + [\??ag][\c!offset=\v!overlay] + {\hskip\@@aglinkeroffset\box2\hskip\@@agrechteroffset}% + \stopregelcorrectie + \ifcase\backgroundsplit % no split + \@@agna + \else % some split + \vfill\eject % geen \pagina ! + \fi + \else \pagina \fi \ifdim\ht0>\!!zeropoint \repeat @@ -2705,6 +2615,7 @@ \c!lijndikte=\linewidth, \c!hoek=\v!recht, \c!diepte=\!!zeropoint, + \c!voorgrondkleur=, \c!achtergrond=, \c!achtergrondraster=\@@rsraster, \c!achtergrondkleur=, @@ -2783,7 +2694,9 @@ \c!diepte=\!!zeropoint, \c!achtergrond=\v!raster, \c!achtergrondkleur=\@@agkleur, - \c!raster=\@@rsraster] + \c!raster=\@@rsraster, + \c!voor=, + \c!na=] \protect diff --git a/tex/context/base/core-sec.tex b/tex/context/base/core-sec.tex index e37f015fa..d0be70d10 100644 --- a/tex/context/base/core-sec.tex +++ b/tex/context/base/core-sec.tex @@ -49,6 +49,12 @@ 2: slutten av blokk -- (seksjon) \stopmessages +\startmessages romanian library: structures + title: structuri + 1: inceput de bloc sectiune -- + 2: sfarsit de bloc sectiune -- +\stopmessages + \unprotect \def\dodochecknummer#1#2#3% @@ -118,10 +124,20 @@ \fi \egroup} +% \def\maakhetnummer[#1]% +% {\maakvoorafgaandenummer[#1]% +% \xdef\hetnummer% +% {\voorafgaandenummer\nummer[#1]}}% +% +% hack needed for chinese and oldstyle in normal tex, will change + \def\maakhetnummer[#1]% - {\maakvoorafgaandenummer[#1]% - \xdef\hetnummer% - {\voorafgaandenummer\nummer[#1]}}% + {\bgroup + \forceunexpanded % i don't like this hack + \maakvoorafgaandenummer[#1]% + \xdef\hetnummer% was \xdef maar dat gaat fout met font switches + {\voorafgaandenummer\nummer[#1]}% + \egroup} \def\lossenummer[#1]% {\maakhetnummer[#1]% @@ -914,10 +930,13 @@ % \onderwerp{test} \strut \input tufte % \onderwerp{test} \plaatslijst[...] +\newif\ifheadnumbercontent + \def\doplaatskoptekst#1#2#3#4% {\beginheadplacement{#1}% \setbox0=\ifvertical\vbox\else\hbox\fi % \vhbox - {\getvalue{\??ko#1\c!commando} + {\headnumbercontentfalse + \getvalue{\??ko#1\c!commando} {} % no number {\doattributes {\??ko#1}\c!letter\c!kleur @@ -931,13 +950,13 @@ \fi #2% \getvalue{\??ko#1\c!voorcommando}% - \getvalue{\??ko#1\c!tekstcommando}% - {\ifdisplaysectionhead - \setstrut\begstrut#3\endstrut - \xdef\localheaddepth{\the\dp\strutbox}% - \else - #3% - \fi}% + \ifdisplaysectionhead + \getvalue{\??ko#1\c!tekstcommando}% + {\setstrut\begstrut#3\endstrut} + \xdef\localheaddepth{\the\dp\strutbox}% + \else + \getvalue{\??ko#1\c!tekstcommando}{#3}% + \fi \getvalue{\??ko#1\c!nacommando}% \ifdisplaysectionhead\endgraf\fi}}}}% \endheadplacement{#1}{#4}} @@ -945,16 +964,18 @@ \def\doplaatskopnummertekst#1#2#3#4#5% {\beginheadplacement{#1}% \setbox0=\ifvertical\vbox\else\hbox\fi % \vhbox - {\getvalue{\??ko#1\c!commando}% + {\doiftextelse{#3} + {\headnumbercontenttrue}{\headnumbercontentfalse}% + \getvalue{\??ko#1\c!commando}% {\doattributes{\??ko#1}\c!letter\c!kleur {\doattributes{\??ko#1}\c!nummerletter\c!nummerkleur {\getvalue{\??ko#1\c!voorcommando}% - \getvalue{\??ko#1\c!nummercommando}% - {\ifdisplaysectionhead - \setstrut\begstrut#3\endstrut - \else - #3% - \fi}}}} + \ifdisplaysectionhead + \getvalue{\??ko#1\c!nummercommando}% + {\setstrut\begstrut#3\endstrut}% + \else + \getvalue{\??ko#1\c!nummercommando}{#3}% + \fi}}} {\doattributes{\??ko#1}\c!letter\c!kleur {\doattributes{\??ko#1}\c!tekstletter\c!tekstkleur {\dontconvertfont @@ -964,13 +985,13 @@ \stelspatieringin \fi #2% - \getvalue{\??ko#1\c!tekstcommando}% - {\ifdisplaysectionhead - \setstrut\begstrut#4\endstrut - \xdef\localheaddepth{\the\dp\strutbox}% - \else - #4% - \fi}% + \ifdisplaysectionhead + \getvalue{\??ko#1\c!tekstcommando}% + {\setstrut\begstrut#4\endstrut}% + \xdef\localheaddepth{\the\dp\strutbox}% + \else + \getvalue{\??ko#1\c!tekstcommando}{#4}% + \fi \getvalue{\??ko#1\c!nacommando}% \ifdisplaysectionhead\endgraf\fi}}}}% \endheadplacement{#1}{#5}} @@ -1143,29 +1164,30 @@ \def\plaatskopalinea#1#2% {\vbox {\localkopsetup - \begstrut\doifsomething{#1}{#1\hskip\numberheaddistance}#2}} + \begstrut\ifheadnumbercontent#1\hskip\numberheaddistance\fi#2}} \def\plaatskopnormaal#1#2% - {\doifelsenothing{#1} - {\vbox - {\localkopsetup - \noindent - #2}}% - {\setbox0=\hbox{{#1}\hskip\numberheaddistance}% - \vbox - {\localkopsetup - \hangindent 1\wd0 - \hangafter 1 - \noindent - \unhbox0 % don't use \strut's here! - #2}}} + {\ifheadnumbercontent + \setbox0=\hbox{{#1}\hskip\numberheaddistance}% + \vbox + {\localkopsetup + \hangindent 1\wd0 + \hangafter 1 + \noindent + \unhbox0 % don't use \strut's here! + #2}% + \else + \vbox + {\localkopsetup\noindent#2}% + \fi} \def\plaatskopinmarge#1#2% {\vbox {\localkopsetup \begstrut % but use one \strut here! - \doifsomething{#1} - {\llap{\hbox to 5em{\hfill{#1}\hskip\linkermargeafstand}}}% + \ifheadnumbercontent + \llap{\hbox to 5em{\hfill{#1}\hskip\linkermargeafstand}}% + \fi {#2}}} \def\plaatskopmidden#1#2% @@ -1174,12 +1196,12 @@ \veryraggedcenter \let\\\endgraf \let\crlf\endgraf - \doifsomething{#1}{\strut#1\par}\begstrut#2}} + \ifheadnumbercontent\strut#1\par\fi\begstrut#2}} \def\plaatskopintekst#1#2% {\bgroup \localkopsetup % no stretch in distance - \doifsomething{#1}{{#1}\kern\numberheaddistance}{\begstrut#2}% + \ifheadnumbercontent{#1}\kern\numberheaddistance\fi{\begstrut#2}% \egroup} % default == instellingen diff --git a/tex/context/base/core-tab.tex b/tex/context/base/core-tab.tex index 58025c2b5..4dc8fff7e 100644 --- a/tex/context/base/core-tab.tex +++ b/tex/context/base/core-tab.tex @@ -315,7 +315,7 @@ \def\c!Table {Table} -%D We alraady saw that the table macros report errors and +%D We already saw that the table macros report errors and %D provide automatic spacing. These features can only be %D implemented by keeping track of the state, often the last %D command on a row. @@ -1918,10 +1918,25 @@ #1% \fi} +%\def\TableDR% +% {\ifnum\currentTABLEcolumn<\maxTABLEcolumn % silent recovery +% \setTABLEerror\TABLEmissingcolumn % some day warning +% \handleTABLEerror +% \else +% \global\currentTABLEcolumn=0 % nog check +% \normalTABLElineending +% \fi +% \TABLEnoalign +% {\nobreak +% \global\TABLEdivisionfalse +% \accountTABLElinewidth % temporary solution +% \setTABLEaction\TABLErule}} + \def\TableDR% {\ifnum\currentTABLEcolumn<\maxTABLEcolumn % silent recovery - \setTABLEerror\TABLEmissingcolumn % some day warning - \handleTABLEerror + %\setTABLEerror\TABLEmissingcolumn % some day warning + %\handleTABLEerror + \finishTABLErow \else \global\currentTABLEcolumn=0 % nog check \normalTABLElineending @@ -2013,7 +2028,7 @@ {\doanalyzeTABLEcr[#1,,]} \def\doanalyzeTABLEcr[#1,#2,#3]% - {\doifnumberelse{#1x} % x ??????????????? + {\doifnumberelse{#1x} % Is the x still needed here? {\dodoanalyzeTABLEcr[#1,#2,#3]} {\dodoanalyzeTABLEcr[1,#1,#2]}} diff --git a/tex/context/base/core-tbl.tex b/tex/context/base/core-tbl.tex index 9776464ac..ff569f77b 100644 --- a/tex/context/base/core-tbl.tex +++ b/tex/context/base/core-tbl.tex @@ -139,13 +139,13 @@ \fi % force hsize \setsecondpasscharacteralign\checkalignment{#1}} -\def\noftabcolumns{16} % quick and dirty stack +\def\noftabcolumns{16} \def\@@tabbox@@ {@@tabbox@} \def\@@tabhook@@ {@@tabhook@} \def\@@tabalign@@{@@tabalign@} -\dorecurse\noftabcolumns +\dorecurse\noftabcolumns % quick and dirty stack {\@EA\newbox\csname\@@tabbox@@\recurselevel\endcsname} \def\dotabulatenobreak% @@ -164,6 +164,8 @@ {\ifnum\tabulatetype<2 %\global\let\tabulatehook\relax \global\let\tabulatehook\notabulatehook +\else + \global\let\tabulatehook\dotabulatehook \fi} \def\dodosettabulatepreamble#1#2% @@ -195,9 +197,10 @@ % 2 = HC column hook HQ equal column hook \@EA\appendtoks \@EA&\@EA\hskip\pretabskip##&\to\!!toksa \@EA\appendtoks\@EA\xdef\@EA\tabulatecolumn\@EA{\tabulatecolumns}\to\!!toksa +\appendtoks \checktabulatehook\to\!!toksa \@EA\appendtoks \preamblebox\to\!!toksa \appendtoks \bgroup\bbskip\bgroup#1\to\!!toksa - \appendtoks \checktabulatehook\to\!!toksa +% \appendtoks \checktabulatehook\to\!!toksa \appendtoks\ifnum\tabulatetype=1 \else \to\!!toksa \@EA\appendtoks \the\tabulatebmath\to\!!toksa \@EA\appendtoks \the\tabulatefont\to\!!toksa @@ -519,7 +522,10 @@ \getvalue{\??tt\currenttabulate\c!voor}% \fi \bgroup +\postponefootnotes % new, to be tested \chardef\tabulatepass=1 + \widowpenalty=0 % otherwise lines are not broken + \clubpenalty =0 % but overlap in funny ways \the\everytabulate \getvalue{\??tt\currenttabulate\c!binnen}% \scratchdimen=\leftskip @@ -623,8 +629,6 @@ \v!midden=>\def\@@tabulatealign{3}, \s!default=>\def\@@tabulatealign{0}, \s!unknown=>\def\@@tabulatealign{0}]% - \dorecurse\noftabcolumns % NEW - {\global\setbox\csname\@@tabbox@@\recurselevel\endcsname=\box\voidb@x}% \let\pretabskip\!!zeropoint \def\postabskip{.5\tabulateunit}% \doglobal\newcounter\tabulatecolumns @@ -668,6 +672,11 @@ \!!toksa{&\hbox to \tabulateindent{}##\strut&##}% \tabulatewidth\!!zeropoint |#1X|\relax + \tabulatewidth\!!zeropoint + \dorecurse\tabulatecolumns + {\doifundefinedelse{\@@tabbox@@\recurselevel} + {\expandafter\newbox\csname\@@tabbox@@\recurselevel\endcsname}% + {\global\setbox\csname\@@tabbox@@\recurselevel\endcsname\box\voidb@x}}% \appendtoks&##\to\!!toksa \appendtoks\doglobal\increment\tabulatecolumn\to\!!toksa \appendtoks\NC\unskip\unskip\crcr\flushtabulated\to\tabulatedummy % no count diff --git a/tex/context/base/core-uti.tex b/tex/context/base/core-uti.tex index 8bd490fb8..4cd2a81f8 100644 --- a/tex/context/base/core-uti.tex +++ b/tex/context/base/core-uti.tex @@ -93,21 +93,36 @@ \let\utilityresetlist=\empty -%\def\addutilityreset#1% -% {\addtocommalist{\s!reset#1}\utilityresetlist} +% the original % -%\def\resetutilities% -% {\processcommacommand[\utilityresetlist]\getvalue} +% \def\addutilityreset#1% +% {\addtocommalist{\s!reset#1}\utilityresetlist} +% +% \def\resetutilities% +% {\processcommacommand[\utilityresetlist]\getvalue} +% +% the more efficient +% +% \def\addutilityreset#1% +% {\addtocommalist{#1}\utilityresetlist} +% +% \def\doresetutility#1% +% {\getvalue{\s!reset#1}} +% +% \def\resetutilities% +% {\processcommacommand[\utilityresetlist]\doresetutility} +% +% the fastest, about two times, but who cares, since this +% can be neglected -\def\addutilityreset#1% - {\addtocommalist{#1}\utilityresetlist} +\newtoks\utilityresetlist -\def\doresetutility#1% - {\getvalue{\s!reset#1}} +\def\addutilityreset#1% + {\@EA\appendtoks\csname\s!reset#1\endcsname\to\utilityresetlist} \def\resetutilities% - {\processcommacommand[\utilityresetlist]\doresetutility} - + {\the\utilityresetlist} + % #1=type % #2=file % #3=melding @@ -123,21 +138,21 @@ \newif\ifdoinpututilities \newif\ifunprotectutilities % voor't geval er \v!xxxxxx's zijn -\def\utilitycheckmessage% - {\showmessage{\m!systems}{12}{}% - \global\let\utilitycheckmessage=\relax} - -\def\saveutilityline#1 #2\txen% tricky maar ok, want achter \command - {\if #1c% commands % in \ascii staat een spatie; #1 kan - \write\scratchwrite{#2}% % \par in stringvorm zijn (eof)! - \else\if#1s% synoniems - \utilitycheckmessage - \else\if#1r% registers - \utilitycheckmessage - \fi\fi\fi} - % no longer needed, since texutil is now multi platform % +% \def\utilitycheckmessage% +% {\showmessage{\m!systems}{12}{}% +% \global\let\utilitycheckmessage=\relax} +% +% \def\saveutilityline#1 #2\txen% tricky maar ok, want achter \command +% {\if #1c% commands % in \ascii staat een spatie; #1 kan +% \write\scratchwrite{#2}% % \par in stringvorm zijn (eof)! +% \else\if#1s% synoniems +% \utilitycheckmessage +% \else\if#1r% registers +% \utilitycheckmessage +% \fi\fi\fi} +% % \def\checkutilityfile% % {\doiflocfileelse{\jobname.\f!outputextension} % {} @@ -160,9 +175,6 @@ % \egroup} % {}}} -\def\checkutilityfile% - {} - \def\currentutilityfilename{\jobname} \long\def\doutilities#1#2#3#4#5% % introduceren in utility file diff --git a/tex/context/base/core-ver.tex b/tex/context/base/core-ver.tex index 31a32f408..84e6c857d 100644 --- a/tex/context/base/core-ver.tex +++ b/tex/context/base/core-ver.tex @@ -43,6 +43,11 @@ 1: fil -- eksisterer ikke \stopmessages +\startmessages romanian library: verbatims + title: verbatim + 1: fisierul -- nu exista +\stopmessages + \unprotect % \type{ <crlf> char} geeft bagger @@ -224,24 +229,61 @@ %D set the catcodes of \type{<} and \type{>} and then we start %D looking ahead. +%\unexpanded\def\type% +% {\bgroup +%% \verbatimcolor +% \catcode`\<=\@@other +% \catcode`\>=\@@other +% \futurelet\next\dotype} + \unexpanded\def\type% + {\dotype\empty} + +\def\dotype#1% {\bgroup - \verbatimcolor + \edef\@@currenttype{#1}% \catcode`\<=\@@other \catcode`\>=\@@other - \futurelet\next\dotype} + \futurelet\next\dodotype} %D Next we distinguish between the three alternatives and call %D for the appropriate macros. -\def\dotype% +% \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 \initializetypegrouping \def\next% {\afterassignment\protectfirsttype\let\next=}% \else\if\next<% - \doifelse{\@@tyoptie}{\v!geen} + \doifelsevalue{\??ty\@@currenttype\c!optie}{\v!geen} {\initializetype \setupnotypegrouping \def\next% @@ -258,6 +300,7 @@ {\initializetype \catcode`##1=\@@endgroup}% \fi\fi + \verbatimcolor \next} \bgroup @@ -454,9 +497,16 @@ %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% {\let\obeylines=\ignorelines - \setupcommonverbatim\??ty + \setupcommonverbatim{\??ty\@@currenttype}% \setupinlineverbatim} %D \macros @@ -464,15 +514,25 @@ %D %D Some characteristics of \type{\type} can be set up by: +%\def\setuptype% +% {\dodoubleargument\getparameters[\??ty]} + \def\setuptype% - {\dodoubleargument\getparameters[\??ty]} + {\dodoubleempty\dosetuptype} + +\def\dosetuptype[#1][#2]% + {\ifsecondargument + \getparameters[\??ty#1][#2]% + \else + \getparameters[\??ty][#1]% + \fi} %D The setups for inline verbatim default to: \setuptype [\c!spatie=\v!uit, \c!kleur=, - \c!letter=\tttf, + \c!letter=\tt\tf, % \tttf gives problems with {\tx \type...} \c!pagina=\v!nee, \c!tab=\v!nee, \c!optie=\v!normaal] @@ -495,10 +555,15 @@ \savedfont \spaceskip.5em\!!plus.25em\!!minus.25em\relax} +%\unexpanded\def\typ% +% {\bgroup +% \obeyhyphens +% \futurelet\next\dotype} + \unexpanded\def\typ% {\bgroup \obeyhyphens - \futurelet\next\dotype} + \futurelet\next\dodotype} %D \macros %D {tex,arg,mat,dis} @@ -584,7 +649,9 @@ %D documented support module. \def\initializetyping#1% - {\donefalse + {%\donefalse +\switchtobodyfont[\getvalue{\??tp#1\c!korps}]% + \donefalse \scratchskip=\getvalue{\??tp#1\c!onevenmarge}\relax \ifzeropt\scratchskip\else\donetrue\fi \scratchskip=\getvalue{\??tp#1\c!evenmarge}\relax @@ -681,6 +748,7 @@ \setuptyping [ \c!voor=\blanko, \c!na=\blanko, + \c!korps=, \c!kleur=, \c!spatie=\v!uit, \c!pagina=\v!nee, @@ -688,7 +756,7 @@ \c!optie=\v!geen, \c!palet=colorpretty, \c!tekst=\v!nee, - \c!letter=\tttf, + \c!letter=\tttf, \c!icommando=\ttsl, \c!vcommando=, \c!ccommando=\tttf, @@ -700,6 +768,22 @@ \c!escape=/] %D \macros +%D {definetype} +%D +%D Specific inline verbatim commands can be defined with the +%D following command. + +\def\definetype% + {\dodoubleempty\dodefinetype} + +\def\dodefinetype[#1][#2]% + {\unexpanded\setvalue{#1}{\dotype{#1}}% + \copyparameters + [\??ty#1][\??ty] + [\c!spatie,\c!kleur,\c!letter,\c!pagina,\c!tab,\c!optie]% + \getparameters[\??ty#1][#2]} + +%D \macros %D {definetyping} %D %D For most users the standard \type{\start}||\type{\stop}||pair @@ -720,7 +804,7 @@ {\copyparameters [\??tp#1][\??tp] [\c!voor,\c!na,\c!spatie,\c!pagina,\c!tab,\c!kleur,\c!letter, - \c!tekst,\c!icommando,\c!vcommando,\c!ccommando, + \c!tekst,\c!icommando,\c!vcommando,\c!ccommando,\c!korps, \c!optie,\c!palet,\c!marge,\c!evenmarge,\c!onevenmarge, \c!springvolgendein,\c!blanko,\c!escape]% \getparameters diff --git a/tex/context/base/enco-acc.tex b/tex/context/base/enco-acc.tex new file mode 100644 index 000000000..db9552693 --- /dev/null +++ b/tex/context/base/enco-acc.tex @@ -0,0 +1,115 @@ +%D \module +%D [ file=enco-acc, +%D version=2000.20.12, % split from base file +%D title=\CONTEXT\ Encoding Macros, +%D subtitle=Composed Characters Commands, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright=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. + +%D Although it is technically possible to redefine the commands +%D that are responsible for building composed characters, this +%D is seldom needed, since they map onto named glyphs. The +%D meaning of these names glyphs may change, although their +%D visual appearance seldom will. + +\startencoding[default] + +\defineaccent ^ A {\Acircumflex} \defineaccent ^ a {\acircumflex} +\defineaccent ^ C {\Ccircumflex} \defineaccent ^ c {\ccircumflex} +\defineaccent ^ E {\Ecircumflex} \defineaccent ^ e {\ecircumflex} +\defineaccent ^ G {\Gcircumflex} \defineaccent ^ g {\gcircumflex} +\defineaccent ^ H {\Hcircumflex} \defineaccent ^ h {\hcircumflex} +\defineaccent ^ I {\Icircumflex} \defineaccent ^ i {\icircumflex} +\defineaccent ^ J {\Jcircumflex} \defineaccent ^ j {\jcircumflex} +\defineaccent ^ O {\Ocircumflex} \defineaccent ^ o {\ocircumflex} +\defineaccent ^ S {\Scircumflex} \defineaccent ^ s {\scircumflex} +\defineaccent ^ U {\Ucircumflex} \defineaccent ^ u {\ucircumflex} +\defineaccent ^ W {\Wcircumflex} \defineaccent ^ w {\wcircumflex} +\defineaccent ^ Y {\Ycircumflex} \defineaccent ^ y {\ycircumflex} + +\defineaccent ` A {\Agrave} \defineaccent ` a {\agrave} +\defineaccent ` E {\Egrave} \defineaccent ` e {\egrave} +\defineaccent ` I {\Igrave} \defineaccent ` i {\igrave} +\defineaccent ` O {\Ograve} \defineaccent ` o {\ograve} +\defineaccent ` U {\Ugrave} \defineaccent ` u {\ugrave} + +\defineaccent ~ A {\Atilde} \defineaccent ~ a {\atilde} +\defineaccent ~ I {\Itilde} \defineaccent ~ i {\itilde} +\defineaccent ~ O {\Otilde} \defineaccent ~ o {\otilde} +\defineaccent ~ U {\Utilde} \defineaccent ~ u {\utilde} + +\defineaccent " A {\Adiaeresis} \defineaccent " a {\adiaeresis} +\defineaccent " E {\Ediaeresis} \defineaccent " e {\ediaeresis} +\defineaccent " I {\Idiaeresis} \defineaccent " i {\idiaeresis} +\defineaccent " O {\Odiaeresis} \defineaccent " o {\odiaeresis} +\defineaccent " U {\Udiaeresis} \defineaccent " u {\udiaeresis} +\defineaccent " Y {\Ydiaeresis} \defineaccent " y {\ydiaeresis} + +\defineaccent ' A {\Aacute} \defineaccent ' a {\aacute} +\defineaccent ' C {\Cacute} \defineaccent ' c {\cacute} +\defineaccent ' E {\Eacute} \defineaccent ' e {\eacute} +\defineaccent ' I {\Iacute} \defineaccent ' i {\iacute} +\defineaccent ' L {\Lacute} \defineaccent ' l {\lacute} +\defineaccent ' N {\Nacute} \defineaccent ' n {\nacute} +\defineaccent ' O {\Oacute} \defineaccent ' o {\oacute} +\defineaccent ' R {\Racute} \defineaccent ' r {\racute} +\defineaccent ' S {\Sacute} \defineaccent ' s {\sacute} +\defineaccent ' u {\uacute} \defineaccent ' U {\Uacute} +\defineaccent ' Z {\Zacute} \defineaccent ' z {\zacute} + +\defineaccent . C {\Cdotaccent} \defineaccent . c {\cdotaccent} +\defineaccent . E {\Edotaccent} \defineaccent . e {\edotaccent} +\defineaccent . G {\Gdotaccent} \defineaccent . g {\gdotaccent} +\defineaccent . I {\Idotaccent} \defineaccent . i {\idotaccent} +\defineaccent . Z {\Zdotaccent} \defineaccent . z {\zdotaccent} + +\defineaccent = A {\Amacron} \defineaccent = a {\amacron} +\defineaccent = E {\Emacron} \defineaccent = e {\emacron} +\defineaccent = I {\Imacron} \defineaccent = i {\imacron} +\defineaccent = O {\Omacron} \defineaccent = o {\omacron} +\defineaccent = U {\Umacron} \defineaccent = u {\umacron} + +\defineaccent c C {\Ccedilla} \defineaccent c c {\ccedilla} +\defineaccent c K {\Kcedilla} \defineaccent c k {\kcedilla} +\defineaccent c L {\Lcedilla} \defineaccent c l {\lcedilla} +\defineaccent c N {\Ncedilla} \defineaccent c n {\ncedilla} +\defineaccent c R {\Rcedilla} \defineaccent c r {\rcedilla} +\defineaccent c S {\Scedilla} \defineaccent c s {\scedilla} +\defineaccent c T {\Tcedilla} \defineaccent c t {\tcedilla} + +\defineaccent H O {\Ohungarumlaut} \defineaccent H o {\ohungarumlaut} +\defineaccent H u {\uhungarumlaut} \defineaccent H U {\Uhungarumlaut} + +\defineaccent k A {\Aogonek} \defineaccent k a {\aogonek} +\defineaccent k E {\Eogonek} \defineaccent k e {\eogonek} +\defineaccent k I {\Iogonek} \defineaccent k i {\iogonek} +\defineaccent k U {\Uogonek} \defineaccent k u {\uogonek} + +\defineaccent r A {\Aring} \defineaccent r a {\aring} +\defineaccent r U {\Uring} \defineaccent r u {\uring} + +\defineaccent u A {\Abreve} \defineaccent u a {\abreve} +\defineaccent u E {\Ebreve} \defineaccent u e {\ebreve} +\defineaccent u G {\Gbreve} \defineaccent u g {\gbreve} +\defineaccent u I {\Ibreve} \defineaccent u i {\ibreve} +\defineaccent u O {\Obreve} \defineaccent u o {\obreve} +\defineaccent u U {\Ubreve} \defineaccent u u {\ubreve} + +\defineaccent v C {\Ccaron} \defineaccent v c {\ccaron} +\defineaccent v D {\Dcaron} \defineaccent v d {\dcaron} +\defineaccent v E {\Ecaron} \defineaccent v e {\ecaron} +\defineaccent v L {\Lcaron} \defineaccent v l {\lcaron} +\defineaccent v N {\Ncaron} \defineaccent v n {\ncaron} +\defineaccent v R {\Rcaron} \defineaccent v r {\rcaron} +\defineaccent v S {\Scaron} \defineaccent v s {\scaron} +\defineaccent v T {\Tcaron} \defineaccent v t {\tcaron} +\defineaccent v Z {\Zcaron} \defineaccent v z {\zcaron} + +\stopencoding + +\endinput diff --git a/tex/context/base/enco-ans.tex b/tex/context/base/enco-ans.tex index 7936a9b18..4e8063f63 100644 --- a/tex/context/base/enco-ans.tex +++ b/tex/context/base/enco-ans.tex @@ -51,130 +51,114 @@ \startencoding[texnansi] -\defineaccent " a 228 -\defineaccent " e 235 -\defineaccent " i 239 -\defineaccent " o 246 -\defineaccent " u 252 -\defineaccent " y 255 - -\defineaccent " A 196 -\defineaccent " E 203 -\defineaccent " I 207 -\defineaccent " O 214 -\defineaccent " U 220 -\defineaccent " Y 159 - -\defineaccent ' a 225 -\defineaccent ' e 233 -\defineaccent ' i 237 -\defineaccent ' o 243 -\defineaccent ' u 250 -\defineaccent ' y 253 - -\defineaccent ' A 193 -\defineaccent ' E 201 -\defineaccent ' I 205 -\defineaccent ' O 211 -\defineaccent ' U 218 -\defineaccent ' Y 221 - -\defineaccent ` a 224 -\defineaccent ` e 232 -\defineaccent ` i 236 -\defineaccent ` o 242 -\defineaccent ` u 249 - -\defineaccent ` A 192 -\defineaccent ` E 200 -\defineaccent ` I 204 -\defineaccent ` O 210 -\defineaccent ` U 217 - -\defineaccent ^ a 226 -\defineaccent ^ e 234 -\defineaccent ^ i 238 -\defineaccent ^ o 244 -\defineaccent ^ u 251 - -\defineaccent ^ A 194 -\defineaccent ^ E 202 -\defineaccent ^ I 206 -\defineaccent ^ O 212 -\defineaccent ^ U 219 - -\defineaccent ~ a 227 -\defineaccent ~ n 241 -\defineaccent ~ o 245 - -\defineaccent ~ A 195 -\defineaccent ~ N 209 -\defineaccent ~ O 213 - -\defineaccent ` {\dotlessi} 236 -\defineaccent ' {\dotlessi} 237 -\defineaccent " {\dotlessi} 239 -\defineaccent ^ {\dotlessi} 238 - -\defineaccent ` {\i} 236 -\defineaccent ' {\i} 237 -\defineaccent " {\i} 239 -\defineaccent ^ {\i} 238 - -\defineaccent c C 199 -\defineaccent c c 231 - -\definecharacter AE 198 -\definecharacter ae 230 -\definecharacter OE 140 -\definecharacter oe 156 -\definecharacter O 216 -\definecharacter o 248 -\definecharacter sz 223 -\definecharacter SS 223 - -\definecharacter aa 229 -\definecharacter AA 197 - -%D Some accents are positioned somewhere else. - -\defineaccentcommand . 5 -\defineaccentcommand H 6 - -%D The next piece of code is rather ugly: - -\defineaccentcommand b {\texnansiencodedb} -\defineaccentcommand c {\texnansiencodedc} - -\def\texnansiencodedb#1% - {\oalign{#1\crcr\hidewidth\vbox to.2ex{\hbox{\char175}\vss}\hidewidth}} - -\def\texnansiencodedc#1% - {\setbox0\hbox{#1}\ifdim\ht0=1ex\accent184 #1\else - {\ooalign{\hidewidth\char184\hidewidth\crcr\unhbox0}}\fi} - -%D We still have to take care of: -%D -%D \starttypen -%D \bgroup -%D \catcode146=\active -%D \gdef^^92{{^\bgroup\prim@s}} -%D \egroup -%D -%D \mathcode146="8000 -%D -%D \chardef\i=105 -%D \stoptypen - -%D We have to redefine some commands too: - -\redefinecommand grave \definecommand grave {\mathaccent"7060 } -\redefinecommand acute \definecommand acute {\mathaccent"70B4 } -\redefinecommand hat \definecommand hat {\mathaccent"7088 } -\redefinecommand tilde \definecommand tilde {\mathaccent"7098 } -\redefinecommand ddot \definecommand ddot {\mathaccent"70A8 } -\redefinecommand bar \definecommand bar {\mathaccent"70AF } +\definecharacter textdotaccent 5 +\definecharacter texthungarumlaut 6 +\definecharacter textmacron 175 +\definecharacter textcedilla 184 + +\definecharacter dotlessi 105 + +\definecharacter OEligature 140 + +\definecharacter oeligature 156 + +\definecharacter Ydiaeresis 159 + +\definecharacter Agrave 192 +\definecharacter Aacute 193 +\definecharacter Acircumflex 194 +\definecharacter Atilde 195 +\definecharacter Adiaeresis 196 +\definecharacter Aring 197 +\definecharacter AEligature 198 +\definecharacter cCedile 199 +\definecharacter Egrave 200 +\definecharacter Eacute 201 +\definecharacter Ecircumflex 202 +\definecharacter Ediaeresis 203 +\definecharacter Igrave 204 +\definecharacter Iacute 205 +\definecharacter Icircumflex 206 +\definecharacter Idiaeresis 207 + +\definecharacter Ntilde 209 +\definecharacter Ograve 210 +\definecharacter Oacute 211 +\definecharacter Ocircumflex 212 +\definecharacter Otilde 213 +\definecharacter Odiaeresis 214 + +\definecharacter Ostoke 216 +\definecharacter Ugrave 217 +\definecharacter Uacute 218 +\definecharacter Ucircumflex 219 +\definecharacter Udiaeresis 220 +\definecharacter Yacute 221 + +\definecharacter ssharp 223 +\definecharacter agrave 224 +\definecharacter aacute 225 +\definecharacter acircumflex 226 +\definecharacter atilde 227 +\definecharacter adiaeresis 228 +\definecharacter aring 229 +\definecharacter aeligature 230 +\definecharacter ccedile 231 +\definecharacter egrave 232 +\definecharacter eacute 233 +\definecharacter ecircumflex 234 +\definecharacter ediaeresis 235 +\definecharacter igrave 236 +\definecharacter iacute 237 +\definecharacter icircumflex 238 +\definecharacter idiaeresis 239 + +\definecharacter ntilde 241 +\definecharacter ograve 242 +\definecharacter oacute 243 +\definecharacter ocircumflex 244 +\definecharacter otilde 245 +\definecharacter odiaeresis 246 + +\definecharacter ostroke 248 +\definecharacter ugrave 249 +\definecharacter uacute 250 +\definecharacter ucircumflex 251 +\definecharacter udiaeresis 252 +\definecharacter yacute 253 + +\definecharacter ydiaeresis 255 + +\stopencoding + +\startencoding[texnansi] + +\definecharacter mathgrave "7060 +\definecharacter mathacute "70B4 +\definecharacter mathhat "7088 +\definecharacter mathtilde "7098 +\definecharacter mathddot "70A8 +\definecharacter mathbar "70AF \stopencoding \endinput + +% \startencoding[texnansi] +% +% \definecommand b {\texnansiencodedb} +% \definecommand c {\texnansiencodedc} +% +% \stopencoding +% +% \def\texnansiencodedb#1% +% {\oalign{#1\crcr\hidewidth\vbox to.2ex{\hbox{\textmacron}\vss}\hidewidth}} +% +% \def\texnansiencodedc#1% +% {\setbox\scratchbox\hbox{#1}% +% \ifdim\ht\scratchbox=1ex +% \buildtextaccent\textcedilla{#1}% +% \else +% {\ooalign{\hidewidth\textcedilla\hidewidth\crcr +% \unhbox\scratchbox}}% +% \fi} diff --git a/tex/context/base/enco-cas.tex b/tex/context/base/enco-cas.tex new file mode 100644 index 000000000..8ca17a56f --- /dev/null +++ b/tex/context/base/enco-cas.tex @@ -0,0 +1,124 @@ +%D \module +%D [ file=enco-cas, +%D version=2000.20.12, +%D title=\CONTEXT\ Encoding Macros, +%D subtitle=Named Glyph Case Mapping, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright=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. + +%D For quite some years \CONTEXT\ used a rather compact way of +%D defining encoded characters as well as case maps. When late +%D 2000 more advanced remapping features were needed (like pdf +%D unicode remapping), named glyphs were introduced to keep the +%D coding tables more readable. At the same time, we introduced +%D named glyph case mapping. + +\defineULcharacter Acircumflex acircumflex +\defineULcharacter Ccircumflex ccircumflex +\defineULcharacter Ecircumflex ecircumflex +\defineULcharacter Gcircumflex gcircumflex +\defineULcharacter Hcircumflex hcircumflex +\defineULcharacter Icircumflex icircumflex +\defineULcharacter Jcircumflex jcircumflex +\defineULcharacter Ocircumflex ocircumflex +\defineULcharacter Scircumflex scircumflex +\defineULcharacter Ucircumflex ucircumflex +\defineULcharacter Wcircumflex wcircumflex +\defineULcharacter Ycircumflex ycircumflex + +\defineULcharacter Agrave agrave +\defineULcharacter Egrave egrave +\defineULcharacter Igrave igrave +\defineULcharacter Ograve ograve +\defineULcharacter Ugrave ugrave + +\defineULcharacter Atilde atilde +\defineULcharacter Itilde itilde +\defineULcharacter Otilde otilde +\defineULcharacter Utilde utilde + +\defineULcharacter Adiaeresis adiaeresis +\defineULcharacter Ediaeresis ediaeresis +\defineULcharacter Idiaeresis idiaeresis +\defineULcharacter Odiaeresis odiaeresis +\defineULcharacter Udiaeresis udiaeresis +\defineULcharacter Ydiaeresis ydiaeresis + +\defineULcharacter Aacute aacute +\defineULcharacter Cacute cacute +\defineULcharacter Eacute eacute +\defineULcharacter Iacute iacute +\defineULcharacter Lacute lacute +\defineULcharacter Nacute nacute +\defineULcharacter Oacute oacute +\defineULcharacter Racute racute +\defineULcharacter Sacute sacute +\defineULcharacter Uacute uacute +\defineULcharacter Zacute zacute + +\defineULcharacter Dstroke dstroke +\defineULcharacter Hstroke hstroke +\defineULcharacter Tstroke tstroke + +\defineULcharacter Cdotaccent cdotaccent +\defineULcharacter Edotaccent edotaccent +\defineULcharacter Gdotaccent gdotaccent +\defineULcharacter Idotaccent idotaccent +\defineULcharacter Zdotaccent zdotaccent + +\defineULcharacter Amacron amacron +\defineULcharacter Emacron emacron +\defineULcharacter Imacron imacron +\defineULcharacter Omacron omacron +\defineULcharacter Umacron umacron + +\defineULcharacter Kcedilla kcedilla +\defineULcharacter Lcedilla lcedilla +\defineULcharacter Ncedilla ncedilla +\defineULcharacter Rcedilla rcedilla +\defineULcharacter Scedilla scedilla +\defineULcharacter Tcedilla tcedilla + +\defineULcharacter Ohungarumlaut ohungarumlaut +\defineULcharacter Uhungarumlaut uhungarumlaut + +\defineULcharacter Aogonek aogonek +\defineULcharacter Eogonek eogonek +\defineULcharacter Iogonek iogonek +\defineULcharacter Uogonek uogonek + +\defineULcharacter Aring aring +\defineULcharacter Uring uring + +\defineULcharacter Abreve abreve +\defineULcharacter Ebreve ebreve +\defineULcharacter Gbreve gbreve +\defineULcharacter Ibreve ibreve +\defineULcharacter Obreve obreve +\defineULcharacter Ubreve ubreve + +\defineULcharacter Ccaron ccaron +\defineULcharacter Dcaron dcaron +\defineULcharacter Ecaron ecaron +\defineULcharacter Lcaron lcaron +\defineULcharacter Ncaron ncaron +\defineULcharacter Rcaron rcaron +\defineULcharacter Scaron scaron +\defineULcharacter Tcaron tcaron +\defineULcharacter Zcaron zcaron + +\defineULcharacter dotlessI dotlessi +\defineULcharacter dotlessJ dotlessj + +\defineULcharacter AEligature aeligature +\defineULcharacter OEligature oeligature +\defineULcharacter Ostroke ostroke +\defineULcharacter Ssharp ssharp +\defineULcharacter IJligature ijligature + +\endinput diff --git a/tex/context/base/enco-com.tex b/tex/context/base/enco-com.tex new file mode 100644 index 000000000..271b6ccbb --- /dev/null +++ b/tex/context/base/enco-com.tex @@ -0,0 +1,41 @@ +%D \module +%D [ file=enco-com, +%D version=2000.20.12, % split from base file +%D title=\CONTEXT\ Encoding Macros, +%D subtitle=Composed Characters Commands, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright=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. + +%D Here we map some \quote {short} names onto the more +%D verbose glyph names. Unless one wants special effects, +%D these definitions are only needed in the default encoding +%D vector. + +\startencoding[default] + +\definecharacter AA {\Aring} +\definecharacter aa {\aring} +\definecharacter AE {\AEligature} +\definecharacter ae {\aeligature} +\definecharacter CC {\Ccedilla} +\definecharacter cc {\ccedilla} +\definecharacter L {\Lstroke} +\definecharacter l {\lstroke} +\definecharacter O {\Ostroke} +\definecharacter o {\ostroke} +\definecharacter OE {\OEligature} +\definecharacter oe {\oeligature} +\definecharacter SZ {\Ssharp} +\definecharacter sz {\ssharp} +\definecharacter SS {\ssharp} +\definecharacter IJ {\IJligature} +\definecharacter ij {\ijligature} + +\stopencoding + +\endinput diff --git a/tex/context/base/enco-def.tex b/tex/context/base/enco-def.tex new file mode 100644 index 000000000..dda6c5364 --- /dev/null +++ b/tex/context/base/enco-def.tex @@ -0,0 +1,279 @@ +%D \module +%D [ file=enco-def, +%D version=2000.20.12, % split from less verbose base file +%D title=\CONTEXT\ Encoding Macros, +%D subtitle=Default Character Definitions, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright=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. + +%D Instead of overloading plain \TEX\ macros (and keeping them +%D available as an escape), we now use the more verbose +%D definitions in this file. Since memory is less a problem +%D these days, this verbosity has only a small price, but we +%D gain readability. The following definitions are based on +%D usage of the the original \TEX\ fonts, where composed +%D characters were not part of the design. So, occasionally +%D we have to revert to hacks. + +\startencoding[default] + +\definecharacter textgrave 18 +\definecharacter textacute 19 +\definecharacter textcaron 20 +\definecharacter textbreve 21 +\definecharacter textmacron 22 +\definecharacter textcedilla 24 +\definecharacter textogonek 24 % no ! +\definecharacter textbottomdot 46 +\definecharacter textcircumflex 94 +\definecharacter textdotaccent 95 +\definecharacter texthungarumlaut 125 +\definecharacter texttilde 126 +\definecharacter textdiaeresis 127 + +\definecharacter Acircumflex {\buildtextaccent\textcircumflex A} +\definecharacter acircumflex {\buildtextaccent\textcircumflex a} +\definecharacter Ccircumflex {\buildtextaccent\textcircumflex C} +\definecharacter ccircumflex {\buildtextaccent\textcircumflex c} +\definecharacter Ecircumflex {\buildtextaccent\textcircumflex E} +\definecharacter ecircumflex {\buildtextaccent\textcircumflex e} +\definecharacter Gcircumflex {\buildtextaccent\textcircumflex G} +\definecharacter gcircumflex {\buildtextaccent\textcircumflex g} +\definecharacter Hcircumflex {\buildtextaccent\textcircumflex H} +\definecharacter hcircumflex {\buildtextaccent\textcircumflex h} +\definecharacter Icircumflex {\buildtextaccent\textcircumflex \dotlessI} +\definecharacter icircumflex {\buildtextaccent\textcircumflex \dotlessi} +\definecharacter Jcircumflex {\buildtextaccent\textcircumflex \dotlessJ} +\definecharacter jcircumflex {\buildtextaccent\textcircumflex \dotlessj} +\definecharacter Ocircumflex {\buildtextaccent\textcircumflex O} +\definecharacter ocircumflex {\buildtextaccent\textcircumflex o} +\definecharacter Scircumflex {\buildtextaccent\textcircumflex S} +\definecharacter scircumflex {\buildtextaccent\textcircumflex s} +\definecharacter Ucircumflex {\buildtextaccent\textcircumflex U} +\definecharacter ucircumflex {\buildtextaccent\textcircumflex u} +\definecharacter Wcircumflex {\buildtextaccent\textcircumflex W} +\definecharacter wcircumflex {\buildtextaccent\textcircumflex w} +\definecharacter Ycircumflex {\buildtextaccent\textcircumflex Y} +\definecharacter ycircumflex {\buildtextaccent\textcircumflex y} + +\definecharacter Agrave {\buildtextaccent\textgrave A} +\definecharacter agrave {\buildtextaccent\textgrave a} +\definecharacter Egrave {\buildtextaccent\textgrave E} +\definecharacter egrave {\buildtextaccent\textgrave e} +\definecharacter Igrave {\buildtextaccent\textgrave \dotlessI} +\definecharacter igrave {\buildtextaccent\textgrave \dotlessi} +\definecharacter Ograve {\buildtextaccent\textgrave O} +\definecharacter ograve {\buildtextaccent\textgrave o} +\definecharacter Ugrave {\buildtextaccent\textgrave U} +\definecharacter ugrave {\buildtextaccent\textgrave u} + +\definecharacter Atilde {\buildtextaccent\texttilde A} +\definecharacter atilde {\buildtextaccent\texttilde a} +\definecharacter Itilde {\buildtextaccent\texttilde \dotlessI} +\definecharacter itilde {\buildtextaccent\texttilde \dotlessi} +\definecharacter Otilde {\buildtextaccent\texttilde O} +\definecharacter otilde {\buildtextaccent\texttilde o} +\definecharacter Utilde {\buildtextaccent\texttilde U} +\definecharacter utilde {\buildtextaccent\texttilde u} + +\definecharacter Adiaeresis {\buildtextaccent\textdiaeresis A} +\definecharacter adiaeresis {\buildtextaccent\textdiaeresis a} +\definecharacter Ediaeresis {\buildtextaccent\textdiaeresis E} +\definecharacter ediaeresis {\buildtextaccent\textdiaeresis e} +\definecharacter Idiaeresis {\buildtextaccent\textdiaeresis \dotlessI} +\definecharacter idiaeresis {\buildtextaccent\textdiaeresis \dotlessi} +\definecharacter Odiaeresis {\buildtextaccent\textdiaeresis O} +\definecharacter odiaeresis {\buildtextaccent\textdiaeresis o} +\definecharacter Udiaeresis {\buildtextaccent\textdiaeresis U} +\definecharacter udiaeresis {\buildtextaccent\textdiaeresis u} +\definecharacter Ydiaeresis {\buildtextaccent\textdiaeresis Y} +\definecharacter ydiaeresis {\buildtextaccent\textdiaeresis y} + +\definecharacter Aacute {\buildtextaccent\textacute A} +\definecharacter aacute {\buildtextaccent\textacute a} +\definecharacter Cacute {\buildtextaccent\textacute C} +\definecharacter cacute {\buildtextaccent\textacute c} +\definecharacter Eacute {\buildtextaccent\textacute E} +\definecharacter eacute {\buildtextaccent\textacute e} +\definecharacter Iacute {\buildtextaccent\textacute \dotlessI} +\definecharacter iacute {\buildtextaccent\textacute \dotlessi} +\definecharacter Lacute {\buildtextaccent\textacute L} +\definecharacter lacute {\buildtextaccent\textacute l} +\definecharacter Nacute {\buildtextaccent\textacute N} +\definecharacter nacute {\buildtextaccent\textacute n} +\definecharacter Oacute {\buildtextaccent\textacute O} +\definecharacter oacute {\buildtextaccent\textacute o} +\definecharacter Racute {\buildtextaccent\textacute R} +\definecharacter racute {\buildtextaccent\textacute r} +\definecharacter Sacute {\buildtextaccent\textacute S} +\definecharacter sacute {\buildtextaccent\textacute s} +\definecharacter Uacute {\buildtextaccent\textacute U} +\definecharacter uacute {\buildtextaccent\textacute u} +\definecharacter Zacute {\buildtextaccent\textacute Z} +\definecharacter zacute {\buildtextaccent\textacute z} + +\definecharacter Dstroke {D} +\definecharacter dstroke {d} +\definecharacter Hstroke {H} +\definecharacter hstroke {h} +\definecharacter Tstroke {T} +\definecharacter tstroke {t} + +\definecharacter Cdotaccent {\buildtextaccent\textdotaccent C} +\definecharacter cdotaccent {\buildtextaccent\textdotaccent c} +\definecharacter Edotaccent {\buildtextaccent\textdotaccent E} +\definecharacter edotaccent {\buildtextaccent\textdotaccent e} +\definecharacter Gdotaccent {\buildtextaccent\textdotaccent G} +\definecharacter gdotaccent {\buildtextaccent\textdotaccent g} +\definecharacter Idotaccent {\buildtextaccent\textdotaccent \dotlessI} +\definecharacter idotaccent {\buildtextaccent\textdotaccent \dotlessi} +\definecharacter Zdotaccent {\buildtextaccent\textdotaccent Z} +\definecharacter zdotaccent {\buildtextaccent\textdotaccent z} + +\definecharacter Amacron {\buildtextaccent\textmacron A} +\definecharacter amacron {\buildtextaccent\textmacron a} +\definecharacter Emacron {\buildtextaccent\textmacron E} +\definecharacter emacron {\buildtextaccent\textmacron e} +\definecharacter Imacron {\buildtextaccent\textmacron \dotlessI} +\definecharacter imacron {\buildtextaccent\textmacron \dotlessi} +\definecharacter Omacron {\buildtextaccent\textmacron O} +\definecharacter omacron {\buildtextaccent\textmacron o} +\definecharacter Umacron {\buildtextaccent\textmacron U} +\definecharacter umacron {\buildtextaccent\textmacron u} + +\definecharacter Ccedilla {\buildtextcedilla C} +\definecharacter ccedilla {\buildtextcedilla c} +\definecharacter Kcedilla {\buildtextcedilla K} +\definecharacter kcedilla {\buildtextcedilla k} +\definecharacter Lcedilla {\buildtextcedilla L} +\definecharacter lcedilla {\buildtextcedilla l} +\definecharacter Ncedilla {\buildtextcedilla N} +\definecharacter ncedilla {\buildtextcedilla n} +\definecharacter Rcedilla {\buildtextcedilla R} +\definecharacter rcedilla {\buildtextcedilla r} +\definecharacter Scedilla {\buildtextcedilla S} +\definecharacter scedilla {\buildtextcedilla s} +\definecharacter Tcedilla {\buildtextcedilla T} +\definecharacter tcedilla {\buildtextcedilla t} + +\definecharacter Ohungarumlaut {\buildtextaccent\texthungarumlaut O} +\definecharacter ohungarumlaut {\buildtextaccent\texthungarumlaut o} +\definecharacter Uhungarumlaut {\buildtextaccent\texthungarumlaut U} +\definecharacter uhungarumlaut {\buildtextaccent\texthungarumlaut u} + +\definecharacter Aogonek {\buildtextogonek A} +\definecharacter aogonek {\buildtextogonek a} +\definecharacter Eogonek {\buildtextogonek E} +\definecharacter eogonek {\buildtextogonek e} +\definecharacter Iogonek {\buildtextogonek I} +\definecharacter iogonek {\buildtextogonek i} +\definecharacter Uogonek {\buildtextogonek U} +\definecharacter uogonek {\buildtextogonek u} + +\definecharacter Aring {A} +\definecharacter aring {a} +\definecharacter Uring {U} +\definecharacter uring {u} + +\definecharacter Abreve {\buildtextaccent\textbreve A} +\definecharacter abreve {\buildtextaccent\textbreve a} +\definecharacter Ebreve {\buildtextaccent\textbreve E} +\definecharacter ebreve {\buildtextaccent\textbreve e} +\definecharacter Gbreve {\buildtextaccent\textbreve G} +\definecharacter gbreve {\buildtextaccent\textbreve g} +\definecharacter Ibreve {\buildtextaccent\textbreve \dotlessI} +\definecharacter ibreve {\buildtextaccent\textbreve \dotlessi} +\definecharacter Obreve {\buildtextaccent\textbreve O} +\definecharacter obreve {\buildtextaccent\textbreve o} +\definecharacter Ubreve {\buildtextaccent\textbreve U} +\definecharacter ubreve {\buildtextaccent\textbreve u} + +\definecharacter Ccaron {\buildtextaccent\textcaron C} +\definecharacter ccaron {\buildtextaccent\textcaron c} +\definecharacter Dcaron {\buildtextaccent\textcaron D} +\definecharacter dcaron {\buildtextaccent\textcaron d} +\definecharacter Ecaron {\buildtextaccent\textcaron E} +\definecharacter ecaron {\buildtextaccent\textcaron e} +\definecharacter Lcaron {\buildtextaccent\textcaron L} +\definecharacter lcaron {\buildtextaccent\textcaron l} +\definecharacter Ncaron {\buildtextaccent\textcaron N} +\definecharacter ncaron {\buildtextaccent\textcaron n} +\definecharacter Rcaron {\buildtextaccent\textcaron R} +\definecharacter rcaron {\buildtextaccent\textcaron r} +\definecharacter Scaron {\buildtextaccent\textcaron S} +\definecharacter scaron {\buildtextaccent\textcaron s} +\definecharacter Tcaron {\buildtextaccent\textcaron T} +\definecharacter tcaron {\buildtextaccent\textcaron t} +\definecharacter Zcaron {\buildtextaccent\textcaron Z} +\definecharacter zcaron {\buildtextaccent\textcaron z} + +\definecharacter dotlessi {\char"10 } +\definecharacter dotlessj {\char"11 } +\definecharacter dotlessI {I} +\definecharacter dotlessJ {J} + +\definecharacter AEligature {\char"1D } +\definecharacter aeligature {\char"1A } +\definecharacter Lstroke {\char32L} +\definecharacter lstroke {\char32l} +\definecharacter Ostroke {\char"1F } +\definecharacter ostroke {\char"1C } +\definecharacter OEligature {\char"1E } +\definecharacter oeligature {\char"1B } +\definecharacter Ssharp {SS} +\definecharacter ssharp {\char"19 } +\definecharacter IJligature {IJ} +\definecharacter ijligature {ij} + +\definecharacter aumlaut {\moveaccent{-.1ex}\adiaeresis} +\definecharacter eumlaut {\moveaccent{-.1ex}\ediaeresis} +\definecharacter iumlaut {\moveaccent{-.1ex}\idiaeresis} +\definecharacter oumlaut {\moveaccent{-.1ex}\odiaeresis} +\definecharacter uumlaut {\moveaccent{-.1ex}\udiaeresis} + +\definecharacter Aumlaut {\smashaccent\Adiaeresis} +\definecharacter Eumlaut {\smashaccent\Ediaeresis} +\definecharacter Iumlaut {\smashaccent\Idiaeresis} +\definecharacter Oumlaut {\smashaccent\Odiaeresis} +\definecharacter Uumlaut {\smashaccent\Udiaeresis} + +\definecharacter Lslash {\Lstroke} +\definecharacter lslash {\lstroke} +\definecharacter Dslash {\Lstroke} +\definecharacter dslash {\lstroke} +\definecharacter Oslash {\Lstroke} +\definecharacter oslash {\lstroke} + +\definecharacter Eszett {\Ssharp} +\definecharacter eszett {\ssharp} + +\definecharacter Thorn {[]} +\definecharacter thorn {[]} + +\stopencoding + +%D We also use symbolic names for math accents. + +\startencoding[default] + +\definecharacter mathacute "7013 +\definecharacter mathgrave "7012 +\definecharacter mathddot "707F +\definecharacter mathtilde "707E +\definecharacter mathbar "7016 +\definecharacter mathbreve "7015 +\definecharacter mathcheck "7014 +\definecharacter mathhat "705E +\definecharacter mathvec "017E +\definecharacter mathdot "705F +\definecharacter mathwidetilde "0365 +\definecharacter mathwidehat "0362 + +\stopencoding + +\endinput diff --git a/tex/context/base/enco-ec.tex b/tex/context/base/enco-ec.tex index 83cbf0174..af9bfc7c6 100644 --- a/tex/context/base/enco-ec.tex +++ b/tex/context/base/enco-ec.tex @@ -25,7 +25,7 @@ %D The case mappings are fairly simple. -\definecasemaps 128 to 156 lc 0 uc 0 +%\definecasemaps 128 to 156 lc 0 uc 0 %D 157 Idotaccent %D 158 dcroat (with bar) @@ -43,193 +43,151 @@ \stopmapping -\startencoding[ec] - -\defineaccent u A 128 -\defineaccent v C 131 -\defineaccent v D 132 -\defineaccent v E 133 -\defineaccent u G 135 -\defineaccent v l 137 % Lcaron -\defineaccent v N 140 -\defineaccent H O 142 -\defineaccent v R 144 -\defineaccent v S 146 -\defineaccent v T 148 -\defineaccent H U 150 -\defineaccent r U 151 -\defineaccent v Z 154 -\defineaccent . Z 155 -\defineaccent . I 157 -\defineaccent = d 158 - -\defineaccent u a 160 -\defineaccent v c 163 -\defineaccent v d 164 -\defineaccent v e 165 -\defineaccent u g 167 -\defineaccent v l 169 -\defineaccent v n 172 -\defineaccent H o 174 -\defineaccent v r 176 -\defineaccent v s 178 -\defineaccent v t 180 -\defineaccent H u 182 -\defineaccent r u 183 -\defineaccent v z 186 -\defineaccent . z 187 - -\defineaccent ' C 130 -\defineaccent ' L 136 -\defineaccent ' N 139 -\defineaccent ' R 143 -\defineaccent ' S 145 -\defineaccent " Y 152 -\defineaccent ' Z 153 -\defineaccent ' c 162 -\defineaccent ' l 168 -\defineaccent ' n 171 -\defineaccent ' r 175 -\defineaccent ' s 177 -\defineaccent " y 184 -\defineaccent ' z 185 -\defineaccent ` A 192 -\defineaccent ' A 193 -\defineaccent ^ A 194 -\defineaccent ~ A 195 -\defineaccent " A 196 -\defineaccent r A 197 -\defineaccent ` E 200 -\defineaccent ' E 201 -\defineaccent ^ E 202 -\defineaccent " E 203 -\defineaccent ` I 204 -\defineaccent ' I 205 -\defineaccent ^ I 206 -\defineaccent " I 207 -\defineaccent ~ N 209 -\defineaccent ` O 210 -\defineaccent ' O 211 -\defineaccent ^ O 212 -\defineaccent ~ O 213 -\defineaccent " O 214 -\defineaccent ` U 217 -\defineaccent ' U 218 -\defineaccent ^ U 219 -\defineaccent " U 220 -\defineaccent ' Y 221 -\defineaccent ` a 224 -\defineaccent ' a 225 -\defineaccent ^ a 226 -\defineaccent ~ a 227 -\defineaccent " a 228 -\defineaccent r a 229 -\defineaccent ` e 232 -\defineaccent ' e 233 -\defineaccent ^ e 234 -\defineaccent " e 235 -\defineaccent ` i 236 -\defineaccent ' i 237 -\defineaccent ^ i 238 -\defineaccent " i 239 -\defineaccent ~ n 241 -\defineaccent ` o 242 -\defineaccent ' o 243 -\defineaccent ^ o 244 -\defineaccent ~ o 245 -\defineaccent " o 246 -\defineaccent ` u 249 -\defineaccent ' u 250 -\defineaccent ^ u 251 -\defineaccent " u 252 -\defineaccent ' y 253 - -\defineaccent ` {\dotlessi} 236 -\defineaccent ' {\dotlessi} 237 -\defineaccent " {\dotlessi} 239 -\defineaccent ^ {\dotlessi} 238 - -\defineaccent ` {\i} 236 -\defineaccent ' {\i} 237 -\defineaccent " {\i} 239 -\defineaccent ^ {\i} 238 - -%D These are special, see below. - -\defineaccent k A 129 -\defineaccent k E 134 -\defineaccent k a 161 -\defineaccent k e 166 -\defineaccent c T 149 -\defineaccent c S 147 -\defineaccent c C 199 -\defineaccent c c 231 -\defineaccent c s 179 -\defineaccent c t 181 - -\definecharacter ae 230 -\definecharacter AE 198 -\definecharacter oe 247 -\definecharacter OE 215 -\definecharacter o 248 -\definecharacter O 216 -\definecharacter sz 255 -\definecharacter SS 223 - -\definecharacter th 254 -\definecharacter TH 222 - -\definecharacter ng 173 -\definecharacter NG 141 - -\definecharacter ij 188 -\definecharacter IJ 156 - -%D These two are strictly unneeded: - -\definecharacter aa 229 -\definecharacter AA 197 - -\definecharacter l 170 -\definecharacter L 138 - -\definecharacter i 25 -\definecharacter j 26 - -%D Next come the accent||commands. - -\defineaccentcommand ` 0 -\defineaccentcommand ' 1 -\defineaccentcommand ^ 2 -\defineaccentcommand ~ 3 -\defineaccentcommand " 4 -\defineaccentcommand H 5 -\defineaccentcommand r 6 -\defineaccentcommand v 7 -\defineaccentcommand u 8 -\defineaccentcommand = 9 -\defineaccentcommand . 10 - -%D The ogonek does not normally exist in \CONTEXT. - -% The rather weird construction that follows is needed because -% otherwise (using \type {\definecommand}) the pre||built -% chars are never used. - -\defineaccentcommand b {\ecencodedb} -\defineaccentcommand c {\ecencodedc} -\defineaccentcommand k {\ecencodedk} - -\def\ecencodedb#1% - {\oalign{#1\crcr\hidewidth\vbox to.2ex{\hbox{\char9}\vss}\hidewidth}} - -\def\ecencodedc#1% - {\setbox0\hbox{#1}\ifdim\ht0=1ex\accent11 #1\else - {\ooalign{\hidewidth\char11\hidewidth\crcr\unhbox0}}\fi} - -\def\ecencodedk#1% - {\setbox0\hbox{#1}\ifdim\ht0=1ex\accent12 #1\else - {\ooalign{\hidewidth\char12\hidewidth\crcr\unhbox0}}\fi} +\startencoding[ec][ec] % second arg defines auto regime + +\definecharacter textgrave 0 +\definecharacter textacute 1 +\definecharacter textcircumflex 2 +\definecharacter texttilde 3 +\definecharacter textdiaeresis 4 +\definecharacter texthungarumlaut 5 +\definecharacter textring 6 +\definecharacter textcaron 7 +\definecharacter textbreve 8 +\definecharacter textmacron 9 +\definecharacter textdotaccent 10 +\definecharacter textcedilla 11 +\definecharacter textogonek 12 + +\definecharacter dotlessi 25 +\definecharacter dotlessj 26 + +\definecharacter Abreve 128 +\definecharacter Aogonek 129 +\definecharacter Cacute 130 +\definecharacter Ccaron 131 +\definecharacter Dcaron 132 +\definecharacter Ecaron 133 +\definecharacter Eogonek 134 +\definecharacter Gbreve 135 +\definecharacter Lacute 136 +\definecharacter Lcaron 137 +\definecharacter Lstroke 138 +\definecharacter Nacute 139 +\definecharacter Ncaron 140 +%definecharacter NG 141 +\definecharacter Ohungarumlaut 142 +\definecharacter Racute 143 +\definecharacter Rcaron 144 +\definecharacter Sacute 145 +\definecharacter Scaron 146 +\definecharacter Scedilla 147 +\definecharacter Tcaron 148 +\definecharacter Tcedilla 149 +\definecharacter Uhungarumlaut 150 +\definecharacter Uring 151 +\definecharacter Ydiaeresis 152 +\definecharacter Zacute 153 +\definecharacter Zcaron 154 +\definecharacter Zdotaccent 155 +\definecharacter IJligature 156 +\definecharacter Idotaccent 157 +\definecharacter dmacron 158 + +\definecharacter abreve 160 +\definecharacter aogonek 161 +\definecharacter cacute 162 +\definecharacter ccaron 163 +\definecharacter dcaron 164 +\definecharacter ecaron 165 +\definecharacter eogonek 166 +\definecharacter gbreve 167 +\definecharacter lacute 168 +\definecharacter lcaron 169 +\definecharacter lstroke 170 +\definecharacter nacute 171 +\definecharacter ncaron 172 +%definecharacter ng 173 +\definecharacter ohungarumlaut 174 +\definecharacter racute 175 +\definecharacter rcaron 176 +\definecharacter sacute 177 +\definecharacter scaron 178 +\definecharacter scedilla 179 +\definecharacter tcaron 180 +\definecharacter tcedilla 181 +\definecharacter uhungarumlaut 182 +\definecharacter uring 183 +\definecharacter ydiaeresis 184 +\definecharacter zacute 185 +\definecharacter zcaron 186 +\definecharacter zdotaccent 187 +\definecharacter ijligature 188 + +\definecharacter Agrave 192 +\definecharacter Aacute 193 +\definecharacter Acircumflex 194 +\definecharacter Atilde 195 +\definecharacter Adiaeresis 196 +\definecharacter Aring 197 +\definecharacter AEligature 198 +\definecharacter Ccedilla 199 +\definecharacter Egrave 200 +\definecharacter Eacute 201 +\definecharacter Ecircumflex 202 +\definecharacter Ediaeresis 203 +\definecharacter Igrave 204 +\definecharacter Iacute 205 +\definecharacter Icircumflex 206 +\definecharacter Idiaeresis 207 + +\definecharacter Ntilde 209 +\definecharacter Ograve 210 +\definecharacter Oacute 211 +\definecharacter Ocircumflex 212 +\definecharacter Otilde 213 +\definecharacter Odiaeresis 214 +\definecharacter OEligature 215 +\definecharacter Ostroke 216 +\definecharacter Ugrave 217 +\definecharacter Uacute 218 +\definecharacter Ucircumflex 219 +\definecharacter Udiaeresis 220 +\definecharacter Yacute 221 +%definecharacter THorn 222 +\definecharacter Ssharp 223 +\definecharacter agrave 224 +\definecharacter aacute 225 +\definecharacter acircumflex 226 +\definecharacter atilde 227 +\definecharacter adiaeresis 228 +\definecharacter aring 229 +\definecharacter aeligature 230 +\definecharacter ccedilla 231 +\definecharacter egrave 232 +\definecharacter eacute 233 +\definecharacter ecircumflex 234 +\definecharacter ediaeresis 235 +\definecharacter igrave 236 +\definecharacter iacute 237 +\definecharacter icircumflex 238 +\definecharacter idiaeresis 239 + +\definecharacter ntilde 241 +\definecharacter ograve 242 +\definecharacter oacute 243 +\definecharacter ocircumflex 244 +\definecharacter otilde 245 +\definecharacter odiaeresis 246 +\definecharacter oeligature 247 +\definecharacter ostroke 248 +\definecharacter ugrave 249 +\definecharacter uacute 250 +\definecharacter ucircumflex 251 +\definecharacter udiaeresis 252 +\definecharacter yacute 253 +\definecharacter thorn 254 +\definecharacter ssharp 255 \stopencoding diff --git a/tex/context/base/enco-fde.tex b/tex/context/base/enco-fde.tex index fe6ea0312..70301668b 100644 --- a/tex/context/base/enco-fde.tex +++ b/tex/context/base/enco-fde.tex @@ -17,20 +17,19 @@ \startlanguagespecifics[\s!de] - \installcompoundcharacter "a {\moveaccent{-.1ex}\"a\midworddiscretionary} - \installcompoundcharacter "e {\moveaccent{-.1ex}\"e\midworddiscretionary} - \installcompoundcharacter "i {\moveaccent{-.1ex}\"\i\midworddiscretionary} - \installcompoundcharacter "o {\moveaccent{-.1ex}\"o\midworddiscretionary} - \installcompoundcharacter "u {\moveaccent{-.1ex}\"u\midworddiscretionary} - \installcompoundcharacter "s {\sz} - \installcompoundcharacter "z {\sz} - - - \installcompoundcharacter "A {\smashaccent\"A} - \installcompoundcharacter "E {\smashaccent\"E} - \installcompoundcharacter "I {\smashaccent\"I} - \installcompoundcharacter "O {\smashaccent\"O} - \installcompoundcharacter "U {\smashaccent\"U} + \installcompoundcharacter "a {\aumlaut\midworddiscretionary} + \installcompoundcharacter "e {\eumlaut\midworddiscretionary} + \installcompoundcharacter "i {\iumlaut\midworddiscretionary} + \installcompoundcharacter "o {\oumlaut\midworddiscretionary} + \installcompoundcharacter "u {\uumlaut\midworddiscretionary} + \installcompoundcharacter "s {\ssharp} + \installcompoundcharacter "z {\ssharp} + + \installcompoundcharacter "A {\Aumlaut} + \installcompoundcharacter "E {\Eumlaut} + \installcompoundcharacter "I {\Iumlaut} + \installcompoundcharacter "O {\Oumlaut} + \installcompoundcharacter "U {\Uumlaut} \installcompoundcharacter "Z {SZ} \installcompoundcharacter "S {SS} @@ -87,31 +86,31 @@ \startencoding[ec] \startlanguagespecifics[\s!de]% - \installcompoundcharacter "a {\"a} - \installcompoundcharacter "e {\"e} - \installcompoundcharacter "i {\"\i} - \installcompoundcharacter "o {\"o} - \installcompoundcharacter "u {\"u} - \installcompoundcharacter "A {\"A} - \installcompoundcharacter "E {\"E} - \installcompoundcharacter "I {\"I} - \installcompoundcharacter "O {\"O} - \installcompoundcharacter "U {\"U} + \installcompoundcharacter "a {\adiaeresis} + \installcompoundcharacter "e {\ediaeresis} + \installcompoundcharacter "i {\idiaeresis} + \installcompoundcharacter "o {\odiaeresis} + \installcompoundcharacter "u {\udiaeresis} + \installcompoundcharacter "A {\Adiaeresis} + \installcompoundcharacter "E {\Ediaeresis} + \installcompoundcharacter "I {\Idiaeresis} + \installcompoundcharacter "O {\Odiaeresis} + \installcompoundcharacter "U {\Udiaeresis} \stoplanguagespecifics \stopencoding \startencoding[texnansi] \startlanguagespecifics[\s!de]% - \installcompoundcharacter "a {\"a} - \installcompoundcharacter "e {\"e} - \installcompoundcharacter "i {\"\i} - \installcompoundcharacter "o {\"o} - \installcompoundcharacter "u {\"u} - \installcompoundcharacter "A {\"A} - \installcompoundcharacter "E {\"E} - \installcompoundcharacter "I {\"I} - \installcompoundcharacter "O {\"O} - \installcompoundcharacter "U {\"U} + \installcompoundcharacter "a {\adiaeresis} + \installcompoundcharacter "e {\ediaeresis} + \installcompoundcharacter "i {\idiaeresis} + \installcompoundcharacter "o {\odiaeresis} + \installcompoundcharacter "u {\udiaeresis} + \installcompoundcharacter "A {\Adiaeresis} + \installcompoundcharacter "E {\Ediaeresis} + \installcompoundcharacter "I {\Idiaeresis} + \installcompoundcharacter "O {\Odiaeresis} + \installcompoundcharacter "U {\Udiaeresis} \stoplanguagespecifics \stopencoding diff --git a/tex/context/base/enco-fro.tex b/tex/context/base/enco-fro.tex index 8b12dfefd..b811e207e 100644 --- a/tex/context/base/enco-fro.tex +++ b/tex/context/base/enco-fro.tex @@ -17,14 +17,14 @@ \startlanguagespecifics[\s!ro] - \installcompoundcharacter "a {\u{a}} - \installcompoundcharacter "i {\^{\i}} - \installcompoundcharacter "s {\c{s}} - \installcompoundcharacter "t {\c{t}} - \installcompoundcharacter "A {\^{a}} - \installcompoundcharacter "I {\^{I}} - \installcompoundcharacter "S {\c{S}} - \installcompoundcharacter "T {\c{T}} + \installcompoundcharacter "a {\acircumflex} + \installcompoundcharacter "i {\icircumflex} + \installcompoundcharacter "s {\scedilla} + \installcompoundcharacter "t {\tcedilla} + \installcompoundcharacter "A {\Acircumflex} + \installcompoundcharacter "I {\Icircumflex} + \installcompoundcharacter "S {\Scedilla} + \installcompoundcharacter "T {\Tcedilla} \installcompoundcharacter "` {\handlequotation\c!leftquotation} \installcompoundcharacter "' {\handlequotation\c!rightquotation} diff --git a/tex/context/base/enco-ibm.tex b/tex/context/base/enco-ibm.tex index 24c7cfb9d..48695ca52 100644 --- a/tex/context/base/enco-ibm.tex +++ b/tex/context/base/enco-ibm.tex @@ -1,106 +1,7 @@ -%D \module -%D [ file=enco-ibm, -%D version=1995.1.1, -%D title=\CONTEXT\ Encoding Macros, -%D subtitle=The Good Old MSDOS IBM codepage, -%D author=Hans Hagen, -%D date=\currentdate, -%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] -%C -%C This module is part of the \CONTEXT\ macro||package and is -%C therefore copyrighted by \PRAGMA. See mreadme.pdf for -%C details. +% temporary module, needed for downward compatibility -%D This module activates the \kap{IBM PC} high \ASCII\ -%D characters, such as ‰ and á. +%\input regi-ibm.tex -\startregime [ibm] +\enableregime[ibm] -\defineactivecharacter ‰ {\"e} -\defineactivecharacter ‚ {\'e} -\defineactivecharacter Š {\`e} -\defineactivecharacter ˆ {\^e} - -\defineactivecharacter „ {\"a} -\defineactivecharacter {\'a} -\defineactivecharacter … {\`a} -\defineactivecharacter ƒ {\^a} - -\defineactivecharacter ” {\"o} -\defineactivecharacter ¢ {\'o} -\defineactivecharacter • {\`o} -\defineactivecharacter “ {\^o} - -\defineactivecharacter ‹ {\"\dotlessi} -\defineactivecharacter ¡ {\'\dotlessi} -\defineactivecharacter {\`\dotlessi} -\defineactivecharacter Œ {\^\dotlessi} - -\defineactivecharacter {\"u} -\defineactivecharacter £ {\'u} -\defineactivecharacter — {\`u} -\defineactivecharacter – {\^u} - -\defineactivecharacter {\'E} -\defineactivecharacter Ž {\"A} -\defineactivecharacter š {\"U} - -\defineactivecharacter ‡ {\c c} -\defineactivecharacter € {\c C} - -\defineactivecharacter ¤ {\~n} - -\defineactivecharacter á {\SS{}} - -\defineactivecharacter ® {\ifvmode\leavevmode\fi\leftguillemot\prewordbreak} -\defineactivecharacter ¯ {\prewordbreak\rightguillemot} - -\stopregime - -\enableregime[ibm] - -%D The next section will be changed as soon as we get grip on -%D the other encodings. -%D -%D \starttypen -%D \appendtoks\lccode`\"=0\to\everysanitize -%D -%D \appendtoks\lccode`‰=`e\to\everysanitize -%D \appendtoks\lccode`‚=`e\to\everysanitize -%D \appendtoks\lccode`Š=`e\to\everysanitize -%D \appendtoks\lccode`ˆ=`e\to\everysanitize -%D -%D \appendtoks\lccode`„=`a\to\everysanitize -%D \appendtoks\lccode` =`a\to\everysanitize -%D \appendtoks\lccode`…=`a\to\everysanitize -%D \appendtoks\lccode`ƒ=`a\to\everysanitize -%D -%D \appendtoks\lccode`”=`o\to\everysanitize -%D \appendtoks\lccode`¢=`o\to\everysanitize -%D \appendtoks\lccode`•=`o\to\everysanitize -%D \appendtoks\lccode`“=`o\to\everysanitize -%D -%D \appendtoks\lccode`‹=`i\to\everysanitize -%D \appendtoks\lccode`¡=`i\to\everysanitize -%D \appendtoks\lccode`=`i\to\everysanitize -%D \appendtoks\lccode`Œ=`i\to\everysanitize -%D -%D \appendtoks\lccode`=`u\to\everysanitize -%D \appendtoks\lccode`£=`u\to\everysanitize -%D \appendtoks\lccode`—=`u\to\everysanitize -%D \appendtoks\lccode`–=`u\to\everysanitize -%D -%D \appendtoks\lccode`=`E\to\everysanitize -%D \appendtoks\lccode`Ž=`A\to\everysanitize -%D \appendtoks\lccode`š=`U\to\everysanitize -%D -%D \appendtoks\lccode`‡=`c\to\everysanitize -%D \appendtoks\lccode`€=`c\to\everysanitize -%D \appendtoks\lccode`¤=`n\to\everysanitize -%D \appendtoks\lccode`á=`s\to\everysanitize -%D -%D \appendtoks\lccode`®=`<\to\everysanitize -%D \appendtoks\lccode`¯=`<\to\everysanitize -%D \stoptypen - -\endinput +\endinput diff --git a/tex/context/base/enco-il2.tex b/tex/context/base/enco-il2.tex index 4230f04bc..62a926038 100644 --- a/tex/context/base/enco-il2.tex +++ b/tex/context/base/enco-il2.tex @@ -46,52 +46,84 @@ \startcoding[il2] -%D Most accents are located at their normal position as set -%D in \PLAIN\ \TEX; only \type {\r} is new. - -\defineaccentcommand " 127 -\defineaccentcommand ' 19 -\defineaccentcommand . 95 -\defineaccentcommand = 22 -\defineaccentcommand ^ 94 -\defineaccentcommand ` 18 -\defineaccentcommand ~ 126 -\defineaccentcommand H 125 -\defineaccentcommand u 21 -\defineaccentcommand v 20 -\defineaccentcommand r 23 - -\defineaccent ' a ^^e1 \defineaccent ' A ^^c1 -\defineaccent ' e ^^e9 \defineaccent ' E ^^c9 -\defineaccent ' i ^^ed \defineaccent ' I ^^cd -\defineaccent ' {\i} ^^ed -\defineaccent ' l ^^e5 \defineaccent ' L ^^c5 -\defineaccent ' o ^^f3 \defineaccent ' O ^^d3 -\defineaccent ' r ^^e0 \defineaccent ' R ^^c0 -\defineaccent ' u ^^fa \defineaccent ' U ^^da -\defineaccent ' y ^^fd \defineaccent ' Y ^^dd - -\defineaccent ` a ^^b8 \defineaccent ` A ^^98 - -\defineaccent ^ o ^^f4 \defineaccent ^ O ^^d4 - -\defineaccent " a ^^e4 \defineaccent " A ^^c4 -\defineaccent " o ^^f6 \defineaccent " O ^^d6 -\defineaccent " u ^^fc \defineaccent " U ^^dc - -\defineaccent v c ^^e8 \defineaccent v C ^^c8 -\defineaccent v d ^^ef \defineaccent v D ^^cf -\defineaccent v e ^^ec \defineaccent v E ^^cc -\defineaccent v l ^^b5 \defineaccent v L ^^a5 -\defineaccent v n ^^f2 \defineaccent v N ^^d2 -\defineaccent v r ^^f8 \defineaccent v R ^^d8 -\defineaccent v s ^^b9 \defineaccent v S ^^a9 -\defineaccent v t ^^bb \defineaccent v T ^^ab -\defineaccent v z ^^be \defineaccent v Z ^^ae - -\defineaccent r u ^^f9 \defineaccent r U ^^d9 - -\defineaccent r A {\ilencodedrA} +\definecharacter textgrave 18 +\definecharacter textacute 19 +\definecharacter textcaron 20 +\definecharacter textbreve 21 +\definecharacter textmacron 22 +\definecharacter textring 23 +\definecharacter textcedilla 24 +\definecharacter textcircumflex 94 +\definecharacter textdotaccent 95 +\definecharacter texthunagrumlaut 125 +\definecharacter texttilde 126 +\definecharacter textdiaeresis 127 + +\definecharacter aeligature 26 +\definecharacter AEligature 29 +\definecharacter oeligature 27 +\definecharacter OEligature 30 +\definecharacter ostroke 28 +\definecharacter Ostroke 31 +\definecharacter dotlessi 16 +\definecharacter dotlessj 17 +\definecharacter ssharp 25 + +\definecharacter Agrave 152 +\definecharacter Lcaron 165 +\definecharacter Scaron 169 +\definecharacter Tcaron 171 +\definecharacter Zcaron 174 +\definecharacter lcaron 181 +\definecharacter agrave 184 +\definecharacter scaron 185 +\definecharacter tcaron 187 +\definecharacter zcaron 190 +\definecharacter Racute 192 +\definecharacter Aacute 193 +\definecharacter Adiaeresis 196 +\definecharacter Lacute 197 +\definecharacter Ccaron 200 +\definecharacter Eacute 201 +\definecharacter Ecaron 204 +\definecharacter Iacute 205 +\definecharacter Dcaron 207 +\definecharacter Ncaron 210 +\definecharacter Oacute 211 +\definecharacter Ocircumflex 212 +\definecharacter Ohungarumlaut 213 +\definecharacter Odiaeresis 214 +\definecharacter Rcaron 216 +\definecharacter Uring 217 +\definecharacter Uacute 218 +\definecharacter Uhungarumlaut 219 +\definecharacter Udiaeresis 220 +\definecharacter Yacute 221 +\definecharacter racute 224 +\definecharacter aacute 225 +\definecharacter adiaeresis 228 +\definecharacter lacute 229 +\definecharacter ccaron 232 +\definecharacter eacute 233 +\definecharacter ecaron 236 +\definecharacter iacute 237 +\definecharacter iacute 237 +\definecharacter dcaron 239 +\definecharacter ncaron 242 +\definecharacter oacute 243 +\definecharacter ocircumflex 244 +\definecharacter ohungarumlaut 245 +\definecharacter odiaeresis 246 +\definecharacter rcaron 248 +\definecharacter uring 249 +\definecharacter uacute 250 +\definecharacter uhungarumlaut 251 +\definecharacter udiaeresis 252 +\definecharacter yacute 253 + +\definecharacter Aring {\ilencodedrA} +\definecharacter lstroke {\ilencodedl} +\definecharacter Lstroke {\ilencodedL} \def\ilencodedrA% {\leavevmode\hbox\bgroup @@ -101,36 +133,6 @@ \rlap{\raise.67\dimen0\hbox{\char'27}}A% \egroup} -\definecharacter ae 26 \definecharacter AE 29 -\definecharacter oe 27 \definecharacter OE 30 -\definecharacter o 28 \definecharacter O 31 -\definecharacter i 16 \definecharacter sz 25 -\definecharacter j 17 \definecharacter SS 25 - - -%D Some rather \PLAIN\ \TEX\ redefinitions. - -\defineaccentcommand b {\ilencodedb} -\defineaccentcommand c {\ilencodedc} -\defineaccentcommand d {\ilencodedd} - -\def\ilencodedb#1 - {\oalign% - {\null#1\crcr\hidewidth\sh@ft{29}% - \vbox to.2ex{\hbox{\char22}\vss}\hidewidth}} - -\def\ilencodedc#1 - {\setbox\z@\hbox{#1}\ifdim\ht\z@=1ex\accent24 #1\else - {\ooalign{\unhbox\z@\crcr\hidewidth\char24\hidewidth}}\fi} - -\def\ilencodedd#1% - {\oalign{\null#1\crcr\hidewidth\sh@ft{08}.\hidewidth}} - -%D Some less \PLAIN\ ones: - -\definecharacter l {\ilencodedl} -\definecharacter L {\ilencodedL} - \def\ilencodedl% {{\char32l}} @@ -141,47 +143,3 @@ \egroup} \stopcoding - -% \everyuppercase, font/language specifics ? - -% \uccode152=152 \lccode152=184 -% \uccode184=152 \lccode184=184 -% \uccode165=165 \lccode165=181 -% \uccode181=165 \lccode181=181 -% \uccode169=169 \lccode169=185 -% \uccode185=169 \lccode185=185 -% \uccode171=171 \lccode171=187 -% \uccode187=171 \lccode187=187 -% \uccode174=174 \lccode174=190 -% \uccode190=174 \lccode190=190 -% \sfcode254=0 \lccode254=0 -% \sfcode255=0 \lccode255=0 -% \sfcode158=0 \lccode158=0 -% \sfcode159=0 \lccode159=0 - -% \defineaccent v c '350 \defineaccent v C '310 -% \defineaccent v d '357 \defineaccent v D '317 -% \defineaccent v e '354 \defineaccent v E '314 -% \defineaccent v l '265 \defineaccent v L '245 -% \defineaccent v n '362 \defineaccent v N '322 -% \defineaccent v r '370 \defineaccent v R '330 -% \defineaccent v s '271 \defineaccent v S '251 -% \defineaccent v t '273 \defineaccent v T '253 -% \defineaccent v z '276 \defineaccent v Z '256 -% \defineaccent ' a '341 \defineaccent ' A '301 -% \defineaccent ' e '351 \defineaccent ' E '311 -% \defineaccent ' i '355 \defineaccent ' I '315 -% \defineaccent ' {\i} '355 -% \defineaccent ' l '345 \defineaccent ' L '305 -% \defineaccent ' o '363 \defineaccent ' O '323 -% \defineaccent ' r '340 \defineaccent ' R '300 -% \defineaccent ' u '372 \defineaccent ' U '332 -% \defineaccent ' y '375 \defineaccent ' Y '335 -% \defineaccent ` a '270 \defineaccent ` A '230 -% \defineaccent ^ o '364 \defineaccent ^ O '324 -% \defineaccent " a '344 \defineaccent " A '304 -% \defineaccent " o '366 \defineaccent " O '326 -% \defineaccent " u '374 \defineaccent " U '334 -% \defineaccent r u '371 \defineaccent r U '331 - -\endinput diff --git a/tex/context/base/enco-ini.tex b/tex/context/base/enco-ini.tex index 533852389..5ed98df54 100644 --- a/tex/context/base/enco-ini.tex +++ b/tex/context/base/enco-ini.tex @@ -1,6 +1,6 @@ %D \module %D [ file=enco-ini, -%D version=1998.12.03, +%D version=2000.12.27, % 1998.12.03, %D title=\CONTEXT\ Encoding Macros, %D subtitle=Initialization, %D author=Hans Hagen, @@ -11,6 +11,13 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. +%D This module is a reimplementation of the module that handled +%D composed characters and non \ASCII\ characters. The changed +%D are not that fundamental, and mainly concerns moving +%D definitions of specific glyphs and accents to other files as +%D well as moving plain handling of accents to this module +%D instead of overloading plain \TEX\ commands. + % \everyuppercase % \dotlessi % single/double quotes @@ -96,6 +103,13 @@ 3: ukjent koding -- \stopmessages +\startmessages romanian library: encodings + title: codificari + 1: codificarea -- + 2: codificarea -- este Œncarcata + 3: codificarea -- este necunoscuta +\stopmessages + %D First we define a few local or not yet initialized constants. \def\@map@{@m@ap@} % mapping prefix @@ -104,7 +118,7 @@ \ifx\currentlanguage\undefined \let\currentlanguage\s!en \fi -%D \macro +%D \macros %D {protectregime} %D %D The next boolean is used later on to prevent unwanted @@ -189,18 +203,55 @@ \uppercase{\unexpanded\edef~{\noexpand#2{\number#1}}}% \uccode`~=\scratchcounter} -\def\defineactivedecimal#1 #2 % +\long\def\defineactivedecimal#1 #2 % {\setregimetoks \appendtoks\dodefineactivedecimal{#1}{#2}\to\regimetoks} -\def\defineactivedecimals#1 to #2 as #3 % +\long\def\defineactivedecimals#1 to #2 as #3 % {\setregimetoks \dostepwiserecurse{#1}{#2}{1} {\@EA\appendtoks\@EA\dodefineactivedecimal\@EA{\recurselevel}{#3}\to\regimetoks}} -\def\defineactivetoken #1 #2% +\long\def\defineactivetoken #1 #2% watch the {} {\setregimetoks - \appendtoks\defineactivecharacter#1 {#2}\to\regimetoks} + \appendtoks\defineactivecharacter#1 {#2{}}\to\regimetoks} + +%D .... + +\edef\nocharacterregime{@\s!default @} + +\def\definetoken #1 % #1 = rawtoken or number + {\doifnumberelse{\string#1} + {\expanded{\dodefinetoken{\rawcharacter{#1}}}} + {\expanded{\dodefinetoken{\string#1}}}} + +\def\dodefinetoken#1#2% + {\defineactivecharacter#1 {\dohandletoken{#1}} % + \setvalue{\characterregime#1}{#2}} + +\beginTEX + +\def\dohandletoken#1% + {\csname\expandafter\ifx\csname\characterregime#1\endcsname\relax + \nocharacterregime\else\characterregime\fi#1\endcsname} + +\endTEX + +\beginETEX \ifcsname + +\def\dohandletoken#1% + {\csname\ifcsname\characterregime#1\endcsname + \characterregime\else\nocharacterregime\fi#1\endcsname} + +\endETEX + +%D .... + +\def\doautosetregime#1#2% + {\ifnum#2>127 + \def\!!stringa{#2 }% + \@EA\@EA\@EA\defineactivetoken\@EA\!!stringa\@EA{\csname#1\endcsname}% + \fi} %D \macros %D {useencoding} @@ -446,12 +497,12 @@ %D \type {\reduceto}||command for local switching to %D simplified commands. -\def\donthandleaccent#1#2% \empty makes #2={} save % no \unexpanded - {\ifundefined{\characterencoding#1\string#2\empty}% - #2% - \else - \getvalue{\characterencoding#1\string#2\empty}% - \fi} +%\def\donthandleaccent#1#2% \empty makes #2={} save % no \unexpanded +% {\ifundefined{\characterencoding#1\string#2\empty}% +% #2% +% \else +% \getvalue{\characterencoding#1\string#2\empty}% +% \fi} \def\donthandlecommand#1% % no \unexpanded, otherwise pdfdoc will fail {\ifundefined{\characterencoding#1}% @@ -460,10 +511,17 @@ \getvalue{\characterencoding#1}% \fi} -\def\enablecoding[#1]% - {\edef\characterencoding{@#1@}} +\def\enablecoding% + {\dodoubleempty\doenableencoding} -\def\startcoding[#1]% +\def\doenableencoding[#1][#2]% main fallback + {\iffirstargument\edef\characterencoding{@#1@}\fi + \edef\nocharacterencoding{@\ifsecondargument#2\else\s!default\fi @}} + +\def\startcoding% + {\dodoubleempty\dostartcoding} + +\def\dostartcoding[#1][#2]% encoding regime {\doifelsenothing{#1} {\let\stopcoding\relax} {%\protectfontcharacters % problematic in language loading @@ -471,16 +529,26 @@ \pushmacro\dohandleaccent \pushmacro\dohandlecommand \pushmacro\definesortkey + \pushmacro\currentcharacterregime + \pushmacro\dosetautoregime \let\dohandleaccent\donthandleaccent \let\dohandlecommand\donthandlecommand \let\definesortkey\savesortkey + \doifelsenothing{#2}% + {% message + \let\doautosetregime\gobbletwoarguments} + {\def\currentcharacterregime{@#2@}}% \enablecoding[#1]% \def\stopcoding% - {\popmacro\definesortkey + {\popmacro\dosetautoregime + \popmacro\currentcharacterregime + \popmacro\definesortkey \popmacro\dohandlecommand \popmacro\dohandleaccent \enablecoding[\s!default]% - \unprotectfontcharacters}}} % ?? + }}}% \unprotectfontcharacters}}} % ?? + +% probably obsolete \def\reducetocoding[#1]% use grouped! {\doifsomething{#1} @@ -554,23 +622,94 @@ {\unprotectfontcharacters \dododefineaccent#1 #2 } +% obsolete +% +% \def\dododefineaccent#1 #2 #3 % +% {\redefineaccent #1 % just to be sure +% \doifnumberelse{\string#3} +% {\setvalue{\characterencoding#1\string#2}{\char#3 }} % space added +% {\setvalue{\characterencoding#1\string#2}{#3}}% +% \unprotectfontcharacters} + \def\dododefineaccent#1 #2 #3 % - {\redefineaccent #1 % just to be sure + {\setvalue{#1}{\dohandleaccent{#1}}% \doifnumberelse{\string#3} - {\setvalue{\characterencoding#1\string#2}{\char#3}} + {\setvalue{\characterencoding#1\string#2}{\char#3 }} % space added {\setvalue{\characterencoding#1\string#2}{#3}}% \unprotectfontcharacters} +\beginTEX + +\def\dohandleaccent#1#2% + {\@EA\ifx\csname\characterencoding#1\string#2\empty\endcsname\relax + \@EA\ifx\csname\nocharacterencoding#1\string#2\empty\endcsname\relax + \@EA\ifx\csname\characterencoding#1\endcsname\relax +% \@EA\ifx\csname\nocharacterencoding#1\endcsname\relax +% \donormaltextaccent{#1}{#2}% +% \else + \csname\nocharacterencoding#1\endcsname#2% +% \fi + \else + \csname\characterencoding#1\endcsname#2% + \fi + \else + \csname\nocharacterencoding#1\string#2\empty\endcsname + \fi + \else + \csname\characterencoding#1\string#2\endcsname + \fi} + +\endTEX + +\beginETEX \ifcsname + +\def\dohandleaccent#1#2% + {\ifcsname\characterencoding#1\string#2\empty\endcsname + \csname\characterencoding#1\string#2\endcsname + \else\ifcsname\nocharacterencoding#1\string#2\empty\endcsname + \csname\nocharacterencoding#1\string#2\empty\endcsname + \else\ifcsname\characterencoding#1\endcsname + \csname\characterencoding#1\endcsname#2% + \else%\ifcsname\nocharacterencoding#1\endcsname + \csname\nocharacterencoding#1\endcsname#2% +% \else +% \donormaltextaccent{#1}{#2}% + \fi\fi\fi}%\fi} + +\endETEX + +%\def\presetcharacter#1% +% {\setvalue{#1}{\dohandlecharacter{#1}}} + \def\definecharacter#1 #2 % - {\redefinecharacter #1 % just to be sure + {\setvalue{#1}{\dohandlecharacter{#1}}% +% {\@EA\presetcharacter\@EA{\@EA\strippedcsname\csname#1\endcsname}% \doifnumberelse{\string#2} - {\setvalue{\characterencoding\string#1}{\char#2}} + {\setvalue{\characterencoding\string#1}{\char#2 }% watch the space + \doautosetregime{#1}{#2}} {\setvalue{\characterencoding\string#1}{#2}}} +\beginTEX + +\def\dohandlecharacter#1% + {\csname\expandafter\ifx\csname\characterencoding#1\endcsname\relax + \nocharacterencoding\else\characterencoding\fi#1\endcsname} + +\endTEX + +\beginETEX \ifcsname + +\def\dohandlecharacter#1% + {\csname\ifcsname\characterencoding#1\endcsname + \characterencoding\else\nocharacterencoding\fi#1\endcsname} + +\endETEX + %D Instead of numbers, a command may be entered. \def\definecommand#1 #2 % - {\redefinecommand #1 % just to be sure + {\setvalue{\string#1}{\dohandlecommand{#1}}% + %\redefinecommand #1 % just to be sure \setvalue{\characterencoding\string#1}{#2}} %D Here we see that redefining accents is characters is more @@ -582,41 +721,47 @@ %D \def\definecharacter#1 {\definecommand#1 \char} %D \stoptypen -%D \macros -%D {redefineaccent} -%D -%D Telling \CONTEXT\ how to treat accents and special -%D characters is a two stage process. First we signal the -%D system which commands are to be adapted, after which we can -%D redefine their behavior when needed. We showed this in the -%D previous paragraphs. These redefinitions are grouped at the -%D end of this file, but we show some examples here. -%D -%D Accents or accent generating commands are redefined by: -%D -%D \starttypen -%D \redefineaccent ' % grave -%D \redefineaccent " % dieresis -%D \redefineaccent ^ % circumflex -%D \redefineaccent v % caron -%D \stoptypen -%D -%D The original \PLAIN\ \TEX\ meaning of each accent generating -%D command is saved first. Next these commands are redefined to -%D do an indirect call to a macro that acts according to the -%D encoding vector in use. - -\def\redefineaccent% - {\protectfontcharacters - \doredefineaccent} - -\def\doredefineaccent#1 % - {\def\!!stringa{\nocharacterencoding\string#1}% - \doifundefined{\!!stringa} - {\@EA\letvalue\@EA\!!stringa\@EA=\csname\string#1\endcsname}% - % no \unexpanded, else pdfdoc fails - \setvalue{\string#1}{\dohandleaccent#1}% - \unprotectfontcharacters} +% obsolete +% +% %D \macros +% %D {redefineaccent} +% %D +% %D Telling \CONTEXT\ how to treat accents and special +% %D characters is a two stage process. First we signal the +% %D system which commands are to be adapted, after which we can +% %D redefine their behavior when needed. We showed this in the +% %D previous paragraphs. These redefinitions are grouped at the +% %D end of this file, but we show some examples here. +% %D +% %D Accents or accent generating commands are redefined by: +% %D +% %D \starttypen +% %D \redefineaccent ' % grave +% %D \redefineaccent " % diaeresis +% %D \redefineaccent ^ % circumflex +% %D \redefineaccent v % caron +% %D \stoptypen +% %D +% %D The original \PLAIN\ \TEX\ meaning of each accent generating +% %D command is saved first. Next these commands are redefined to +% %D do an indirect call to a macro that acts according to the +% %D encoding vector in use. +% +% \def\redefineaccent% +% {\protectfontcharacters +% \doredefineaccent} +% +% \def\doredefineaccent#1 % +% {\def\!!stringa{\nocharacterencoding\string#1}% +% \doifundefined{\!!stringa} +% {\@EA\letvalue\@EA\!!stringa\@EA=\csname\string#1\endcsname}% +% % no \unexpanded, else pdfdoc fails +% \setvalue{\string#1}{\dohandleaccent#1}% +% \unprotectfontcharacters} +% +% \def\doredefineaccent#1 % +% {\setvalue{#1}{\dohandleaccent{#1}}% +% \unprotectfontcharacters} %D \macros %D {defineaccentcommand} @@ -651,62 +796,62 @@ %D Commands may be used instead of character codes. %D \macros -%D {normalaccent} -%D +%D {normalaccent,normalchar} %D %D Accents are either placed by \TEX's \type {\accent} %D primitive, or part of the glyph. By default the former %D method is used, unless overruled in the encoding %D definitions. +\let\normalchar =\char \let\normalaccent=\accent -\beginETEX \ifcsname - -\unexpanded\def\dohandleaccent#1#2% - {\def\glyph{#2}% - \ifx\glyph\empty - \dohandleaccent#1\relax - \else\ifx\glyph\space - \dohandleaccent#1\relax - \else\ifcsname\characterencoding#1\string#2\empty\endcsname - \csname\characterencoding#1\string#2\endcsname - \else\ifcsname\characterencoding#1\endcsname - \csname\characterencoding#1\endcsname#2% - \else - \csname\nocharacterencoding#1\endcsname#2% - \fi\fi\fi\fi - \relax} % prevents further reading - -\endETEX - -\beginTEX - -\unexpanded\def\dohandleaccent#1#2% - {\def\glyph{#2}% - \ifx\glyph\empty - \dohandleaccent#1\relax - \else\ifx\glyph\space - \dohandleaccent#1\relax - \else\expandafter\ifx\csname\characterencoding#1\string#2\empty\endcsname\relax - \expandafter\ifx\csname\characterencoding#1\endcsname\relax - \csname\nocharacterencoding#1\endcsname#2% - \else - \csname\characterencoding#1\endcsname#2% - \fi - \else - \csname\characterencoding#1\string#2\endcsname - \fi\fi\fi - \relax} % prevents further reading - -\endTEX - -%D The trick with \type{\\} is needed to prevent spaces from -%D being gobbled after the accented character, should we have -%D used \type{\next}, we should have ended up with gobbled -%D spaces. The \type {\empty} after \type {#2} takes care of -%D empty arguments, so that we can savely say~\type{\"{}} -%D and alike. +% \beginETEX \ifcsname +% +% \unexpanded\def\dohandleaccent#1#2% +% {\def\glyph{#2}% +% \ifx\glyph\empty +% \dohandleaccent#1\relax +% \else\ifx\glyph\space +% \dohandleaccent#1\relax +% \else\ifcsname\characterencoding#1\string#2\empty\endcsname +% \csname\characterencoding#1\string#2\endcsname +% \else\ifcsname\characterencoding#1\endcsname +% \csname\characterencoding#1\endcsname#2% +% \else +% \csname\nocharacterencoding#1\endcsname#2% +% \fi\fi\fi\fi +% \relax} % prevents further reading +% +% \endETEX +% +% \beginTEX +% +% \unexpanded\def\dohandleaccent#1#2% +% {\def\glyph{#2}% +% \ifx\glyph\empty +% \dohandleaccent#1\relax +% \else\ifx\glyph\space +% \dohandleaccent#1\relax +% \else\expandafter\ifx\csname\characterencoding#1\string#2\empty\endcsname\relax +% \expandafter\ifx\csname\characterencoding#1\endcsname\relax +% \csname\nocharacterencoding#1\endcsname#2% +% \else +% \csname\characterencoding#1\endcsname#2% +% \fi +% \else +% \csname\characterencoding#1\string#2\endcsname +% \fi\fi\fi +% \relax} % prevents further reading +% +% \endTEX +% +% %D The trick with \type{\\} is needed to prevent spaces from +% %D being gobbled after the accented character, should we have +% %D used \type{\next}, we should have ended up with gobbled +% %D spaces. The \type {\empty} after \type {#2} takes care of +% %D empty arguments, so that we can savely say~\type{\"{}} +% %D and alike. %D \macros %D {redefinecommand} @@ -728,12 +873,12 @@ %D command to redefine accent handling commands too. \def\redefinecommand#1 % - {\def\!!stringa{\nocharacterencoding#1}% - \doifundefined{\!!stringa} - {\doifundefined{#1}{\letvalue{#1}\relax}% - \@EA\letvalue\@EA\!!stringa\csname#1\endcsname}% + {%{\def\!!stringa{\nocharacterencoding#1}% + % \doifundefined{\!!stringa} + % {\doifundefined{#1}{\letvalue{#1}\relax}% + % \@EA\letvalue\@EA\!!stringa\csname#1\endcsname}% % no \unexpanded, else pdfdoc fails - \setvalue{#1}{\dohandlecommand{#1}}}% + \setvalue{\string#1}{\dohandlecommand{#1}}}% \unexpanded\def\dohandlecommand#1% {\doifdefinedelse{\characterencoding#1} @@ -741,83 +886,57 @@ {\def\next{\getvalue{\nocharacterencoding#1}}}% \next} -%D \macros -%D {redefinecharacter} -%D -%D Special characters, which differ from accented characters -%D in that they are to be presented as they are, are redefined -%D by -%D -%D \starttypen -%D \redefinecharacter ae % ae -%D \redefinecharacter cc % ccedilla -%D \stoptypen +% %D \macros +% %D {redefinecharacter} +% %D +% %D Special characters, which differ from accented characters +% %D in that they are to be presented as they are, are redefined +% %D by +% %D +% %D \starttypen +% %D \redefinecharacter ae % ae +% %D \redefinecharacter cc % ccedilla +% %D \stoptypen +% %D +% %D To keep things simple, we just copy this command: +% +% \let\redefinecharacter=\redefinecommand + +%D \macros +%D {currentencoding, currentregime, currentmapping} %D -%D To keep things simple, we just copy this command: +%D When we show 'm, we don't want to see the protection +%D measures. + +\def\currentencoding{\@EA\docurrentencoding\characterencoding} +\def\currentregime {\@EA\docurrentencoding\characterregime } +\def\currentmapping {\@EA\docurrentencoding\charactermapping } -\let\redefinecharacter=\redefinecommand +\def\docurrentencoding @#1@{#1} %D \macros -%D {currentencoding, currentmapping, showencoding} +%D {showaccents, showcharacters} %D %D Encoding is a tricky business. Therefore we provide a -%D macro that show most of the characters involved. The next -%D two tables show the result of \type {\showencoding}. +%D a few macros that show most of the characters involved. The +%D next two tables show the result of \type {\showaccents}. %D %D \plaatstabel %D {The special glyphs in default encoding.} -%D {\showencoding} +%D {\showaccents} %D %D \plaatstabel %D {The special glyphs in texnansi encoding.} -%D {\switchtobodyfont[lbr]\showencoding} - -\def\currentencoding% - {\expandafter\docurrentencoding\characterencoding} - -\def\currentmapping% - {\expandafter\docurrentencoding\charactermapping} - -\def\docurrentencoding @#1@% - {#1} - -\def\showencoding% - {\bgroup - \setupcolors[\c!status=\v!lokaal] - \starttextrule{\currentencoding:\ {\red accent}\ {\blue char}\ hardcoded} - \let\normalaccent=\accent - \def\accent% - {\red\normalaccent} - \let\normalchar =\char - \def\char% - {\bgroup - \def\char{\blue\normalchar\scratchcounter\egroup}% - \afterassignment\char\scratchcounter=}% - \def\do##1% - {\def\dodo####1% - {\hbox spread .5em{\hss##1####1\hss}}% - \hbox - {\hbox to 2em{\tttf\string##1\hss}% - \handletokens abcdefghijklmnopqrstuvwxyz\i\j\with\dodo} - \par - \hbox - {\hskip2em - \handletokens ABCDEFGHIJKLMNOPQRSTUVWXYZ\i\j\with\dodo} - \par} - \do\'\do\`\do\^\do\~\do\" - \do\H\do\r\do\v\do\u\do\= - \do\.\do\b\do\d\do\k\do\c - \def\do##1{\hbox spread .5em{\hss##1\hss}} - \hbox - {\hskip2em - \handletokens\ae\AE\oe\OE\o\O\SS\aa\AA\cc\CC\i\j\with\do} - \par - \stoptextrule - \egroup} - -%D {\em The next section is experimental and implemnts font +%D {\switchtobodyfont[lbr]\showaccents} + +\fetchruntimecommand \showaccents {\f!encodingprefix run} +\fetchruntimecommand \showcharacters {\f!encodingprefix run} + +%D {\em The next section is experimental and implements font %D specific features, like hanging punctuation.} +\let\fonthandling\empty + \def\startfonthandling[#1]% {\def\fonthandling{#1}% \doifundefined{\@fha@\fonthandling} @@ -852,7 +971,8 @@ {\getvalue{\@fha@\@fha@#1\c!rechts}}% \edef\fonthandling{\getvalue{\@fha@\@fha@#1}}% \@EA\rawprocesscommalist\@EA[\fonthandling]\doenablehandling} - {\doenablehandling{#1}}} + {\edef\fonthandling{#1}% new + \doenablehandling{#1}}} \ifx\undefined\pdfprotrudechars % we don't use pdftex @@ -929,23 +1049,36 @@ \newevery \everyuppercase \EveryUppercase \newevery \everylowercase \EveryLowercase -%\appendtoks \def\i{I}\to \everyuppercase -%\appendtoks \def\j{J}\to \everyuppercase -%\appendtoks \def\sz{sz}\to \everyuppercase % \sz <= \ss -%\appendtoks \def\SS{SS}\to \everyuppercase % \SS <= \ss -% -%\appendtoks \let\l=\L \to \everyuppercase -%\appendtoks \let\ae=\AE \to \everyuppercase -%\appendtoks \let\aa=\AA \to \everyuppercase -%\appendtoks \let\o=\O \to \everyuppercase -%\appendtoks \let\oe=\OE \to \everyuppercase - %D This magic trick maps takes care of mapping from lower to %D upper case and reverse. \appendtoks\let\setuppercasecom\setcasecom\to\everyuppercase \appendtoks\let\setlowercasecom\setcasecom\to\everylowercase +\newtoks\everyULmap + +\appendtoks\let\remapcase\remapuppercase\the\everyULmap\to\everyuppercase +\appendtoks\let\remapcase\remaplowercase\the\everyULmap\to\everylowercase + +\let\remapcase\gobbletwoarguments +\def\remapuppercase#1#2{\let#2#1} +\def\remaplowercase#1#2{\let#1#2} + +\def\defineLCcharacter #1 #2 % + {\appendtoks\let\to\everylowercase + \@EA\appendtoks\csname#1\endcsname\to\everylowercase + \@EA\appendtoks\csname#2\endcsname\to\everylowercase} + +\def\defineUCcharacter #1 #2 % + {\appendtoks\let\to\everyuppercase + \@EA\appendtoks\csname#1\endcsname\to\everyuppercase + \@EA\appendtoks\csname#2\endcsname\to\everyuppercase} + +\def\defineULcharacter #1 #2 % + {\appendtoks\remapcase\to\everyULmap + \@EA\appendtoks\csname#1\endcsname\to\everyULmap + \@EA\appendtoks\csname#2\endcsname\to\everyULmap} + %D \macros %D {everysanitize, EverySanitize} %D @@ -978,23 +1111,23 @@ \repeat \fi} -%D \macros -%D {cc,CC} -%D -%D Hm, not in plain at all, those \cc's and \CC's. - -\def\CC{\c{C}} -\def\cc{\c{c}} - -%D \macros -%D {dotlessi,dotlessj} -%D -%D We also save both dotless~\dotlessi\ and~\dotlessj. This -%D way we still have them were we expect them, even when -%D macros of font providers redefine them. - -\let\dotlessi=\i -\let\dotlessj=\j +% %D \macros +% %D {cc,CC} +% %D +% %D Hm, not in plain at all, those \cc's and \CC's. +% +% \def\CC{\c{C}} +% \def\cc{\c{c}} +% +% %D \macros +% %D {dotlessi,dotlessj} +% %D +% %D We also save both dotless~\dotlessi\ and~\dotlessj. This +% %D way we still have them were we expect them, even when +% %D macros of font providers redefine them. +% +% \let\dotlessi=\i +% \let\dotlessj=\j %D \macros %D {defineuclass,defineudigit,udigit} @@ -1010,90 +1143,252 @@ \unexpanded\def\udigit#1#2{\getvalue{@#1@uc\number#2}} -%D Just to be sure, we save the original values of \type {\ss}. - -\ifx\undefined\SS \let\SS=\ss \fi -\ifx\undefined\sz \let\sz=\ss \fi - -%D Here come the definitions. - -\redefineaccent ' % grave -\redefineaccent ` % acute -\redefineaccent " % dieresis -\redefineaccent ^ % circumflex -\redefineaccent ~ % tilde -\redefineaccent v % caron -\redefineaccent u % breve -\redefineaccent . % dotaccent -\redefineaccent H % hungarumlaut -\redefineaccent t % ........ -\redefineaccent r % ........ -\redefineaccent = -\redefineaccent b -\redefineaccent c -\redefineaccent d -\redefineaccent k - -\redefinecharacter ae % ae -\redefinecharacter AE % AE -\redefinecharacter oe % oe -\redefinecharacter OE % OE -\redefinecharacter o % oslash -\redefinecharacter O % Oslash -\redefinecharacter sz % germandbls -\redefinecharacter SS % germandbls -\redefinecharacter aa % aring -\redefinecharacter AA % Aring - -\redefinecharacter th -\redefinecharacter TH -\redefinecharacter ng -\redefinecharacter NG -\redefinecharacter ij -\redefinecharacter IJ - -\redefinecharacter i \redefinecharacter dotlessi -\redefinecharacter j \redefinecharacter dotlessj - -\redefinecharacter l -\redefinecharacter L - -\defineaccent " i {\"\i} \defineaccent " j {\"\j} -\defineaccent ^ i {\^\i} \defineaccent ^ j {\^\j} -\defineaccent ` i {\`\i} \defineaccent ` j {\`\j} -\defineaccent ' i {\'\i} \defineaccent ' j {\'\j} -\defineaccent ~ i {\~\i} \defineaccent ~ j {\~\j} - -\redefinecharacter leftguillemot -\redefinecharacter rightguillemot -\redefinecharacter leftsubguillemot -\redefinecharacter rightsubguillemot - -%D Some more: - -\startmapping[\s!default] - -\defineuppercasecom \i {I} -\defineuppercasecom \j {J} -\defineuppercasecom \sz {SS} -\defineuppercasecom \SS {SS} -\defineuppercasecom \l \L -\defineuppercasecom \ae \AE -\defineuppercasecom \aa \AA -\defineuppercasecom \o \O -\defineuppercasecom \oe \OE -\definelowercasecom \L \l -\definelowercasecom \AE \ae -\definelowercasecom \AA \aa -\definelowercasecom \O \o -\definelowercasecom \OE \oe - -\stopmapping +%D \macros +%D {uchar, octuchar, hexuchar} + +\ifx\uchar\undefined \def\uchar#1#2{(\number#1,\number#2)} \fi + +\def\octuchar#1#2{\uchar{`#1}{`#2}} +\def\hexuchar#1#2{\uchar{"#1}{"#2}} + +% %D Just to be sure, we save the original values of \type {\ss}. +% +% \ifx\undefined\SS \let\SS=\ss \fi +% \ifx\undefined\sz \let\sz=\ss \fi +% +% %D Here come the definitions. +% +% \redefineaccent ' % grave +% \redefineaccent ` % acute +% \redefineaccent " % diaeresis +% \redefineaccent ^ % circumflex +% \redefineaccent ~ % tilde +% \redefineaccent v % caron +% \redefineaccent u % breve +% \redefineaccent . % dotaccent +% \redefineaccent H % hungarumlaut +% \redefineaccent t % ........ +% \redefineaccent r % ........ +% \redefineaccent = +% \redefineaccent b +% \redefineaccent c +% \redefineaccent d +% \redefineaccent k + +% obsolete (moved) +% +% \redefinecharacter ae % ae +% \redefinecharacter AE % AE +% \redefinecharacter oe % oe +% \redefinecharacter OE % OE +% \redefinecharacter o % ostroke +% \redefinecharacter O % Ostroke +% \redefinecharacter sz % germandbls +% \redefinecharacter SS % germandbls +% \redefinecharacter aa % aring +% \redefinecharacter AA % Aring + +% \redefinecharacter th +% \redefinecharacter TH +% \redefinecharacter ng +% \redefinecharacter NG +% \redefinecharacter ij +% \redefinecharacter IJ +% +% \redefinecharacter i \redefinecharacter dotlessi +% \redefinecharacter j \redefinecharacter dotlessj +% +% \redefinecharacter l +% \redefinecharacter L + +% replaced +% +% \defineaccent " i {\"\i} \defineaccent " j {\"\j} +% \defineaccent ^ i {\^\i} \defineaccent ^ j {\^\j} +% \defineaccent ` i {\`\i} \defineaccent ` j {\`\j} +% \defineaccent ' i {\'\i} \defineaccent ' j {\'\j} +% \defineaccent ~ i {\~\i} \defineaccent ~ j {\~\j} + +% \redefinecharacter leftguillemot +% \redefinecharacter rightguillemot +% \redefinecharacter leftsubguillemot +% \redefinecharacter rightsubguillemot + +% obsolete +% +% %D Some more: +% +% \startmapping[\s!default] +% +% \defineuppercasecom \i {I} +% \defineuppercasecom \j {J} +% \defineuppercasecom \sz {SS} +% \defineuppercasecom \SS {SS} +% \defineuppercasecom \l \L +% \defineuppercasecom \ae \AE +% \defineuppercasecom \aa \AA +% \defineuppercasecom \o \O +% \defineuppercasecom \oe \OE +% \definelowercasecom \L \l +% \definelowercasecom \AE \ae +% \definelowercasecom \AA \aa +% \definelowercasecom \O \o +% \definelowercasecom \OE \oe +% +% \stopmapping + +%D Basics and fallbacks. + +\newif\ifignoreaccent + +\let\textaccent \accent + +\let\normalaccent \accent +\let\normaltextaccent\textaccent +\let\normalmathaccent\mathaccent +\let\normalchar \char + +\def\buildtextaccent% + {\ifignoreaccent + \expandafter\nobuildtextaccent + \else + \expandafter\dobuildtextaccent + \fi} + +\unexpanded\def\dobuildtextaccent#1#2% + {{\let\char\normalaccent#1\let\char\normalchar#2}} + +\unexpanded\def\nobuildtextaccent#1#2% + {#2} + +\def\buildmathaccent#1% + {\mathaccent#1 } + +% will be overloaded later + +%\def\definetextaccent#1 #2% +% {\setvalue{\string#1}{#2}% will be overloaded +% \setvalue{normaltextaccent\string#1}{#2}} +% +%\def\donormaltextaccent#1% +% {\getvalue{normaltextaccent\string#1}} +% +%\definetextaccent ` {\buildtextaccent\textgrave} +%\definetextaccent ' {\buildtextaccent\textacute} +%\definetextaccent v {\buildtextaccent\textcaron} +%\definetextaccent u {\buildtextaccent\textbreve} +%\definetextaccent = {\buildtextaccent\textmacron} +%\definetextaccent ^ {\buildtextaccent\textcircumflex} +%\definetextaccent . {\buildtextaccent\textdotaccent} +%\definetextaccent H {\buildtextaccent\texthungarumlaut} +%\definetextaccent ~ {\buildtextaccent\texttilde} +%\definetextaccent " {\buildtextaccent\textdiaeresis} + +\definecommand ` {\buildtextaccent\textgrave} +\definecommand ' {\buildtextaccent\textacute} +\definecommand v {\buildtextaccent\textcaron} +\definecommand u {\buildtextaccent\textbreve} +\definecommand = {\buildtextaccent\textmacron} +\definecommand ^ {\buildtextaccent\textcircumflex} +\definecommand . {\buildtextaccent\textdotaccent} +\definecommand H {\buildtextaccent\texthungarumlaut} +\definecommand ~ {\buildtextaccent\texttilde} +\definecommand " {\buildtextaccent\textdiaeresis} + +% some fake ones, name will change into build + +\def\bottomaccent#1#2#3#4#5% down right slantcorrection accent char + {\leavevmode + \vtop + {\forgetall + \baselineskip\!!zeropoint + \lineskip#1% + \everycr\emptytoks + \tabskip\!!zeropoint + \lineskiplimit\!!zeropoint + \setbox0=\hbox{#4}% + \halign + {##\crcr#5\crcr + \hidewidth + \hskip#2\wd0 + \hskip-#3\fontdimen1\font % in plain 1ex * dimenless value + \vbox to .2ex{\box0\vss}\hidewidth + \crcr}}} + +\def\buildtextmacron {\bottomaccent{.25ex}{0}{15}{\textmacron}} +\def\buildtextbottomdot{\bottomaccent{.25ex}{0}{5}{\textbottomdot}} +\def\buildtextcedilla {\bottomaccent{0ex}{0}{5}{\textcedilla}} +\def\buildtextogonek {\bottomaccent{-.1ex}{.5}{0}{\textogonek}} + +%\definetextaccent c {\buildtextcedilla} +%\definetextaccent b {\buildtextmacron} +%\definetextaccent d {\buildtextbottomdot} +%\definetextaccent k {\buildtextogonek} + +\definecommand c {\buildtextcedilla} +\definecommand b {\buildtextmacron} +\definecommand d {\buildtextbottomdot} +\definecommand k {\buildtextogonek} + +% math stuff, will change + +\def\definemathaccent#1 #2% + {\setvalue{\string#1}{#2}% + \setvalue{normalmathaccent\string#1}{#2}} + +\def\donormalmathaccent#1% + {\getvalue{normalmathaccent\string#1}} + +\definemathaccent acute {\buildmathaccent\mathacute} +\definemathaccent grave {\buildmathaccent\mathgrave} +\definemathaccent ddot {\buildmathaccent\mathddot} +\definemathaccent tilde {\buildmathaccent\mathtilde} +\definemathaccent bar {\buildmathaccent\mathbar} +\definemathaccent breve {\buildmathaccent\mathbreve} +\definemathaccent check {\buildmathaccent\mathcheck} +\definemathaccent hat {\buildmathaccent\mathhat} +\definemathaccent vec {\buildmathaccent\mathvec} +\definemathaccent dot {\buildmathaccent\mathdot} +\definemathaccent widetilde {\buildmathaccent\mathwidetilde} +\definemathaccent widehat {\buildmathaccent\mathwidehat} + +%D Some precautions: + +\ifx\usepdffontresource\undefined + \def\usepdffontresource #1 {} % this will be defined elsewhere +\fi + +%D Some day \unknown\ + +% \def\useencodingvector #1 % file tag +% {\pushmacro\definecharacter +% \pushmacro\startencoding +% \pushmacro\stopencoding +% \def\definecharacter ##1 ##2 % +% {\doifnumberelse{##2} +% {\ifnum##2>127 +% \def\!!stringa{##2 }% +% \@EA\@EA\@EA\defineactivetoken\@EA\!!stringa\@EA{\csname##1\endcsname}% +% \fi} +% {}}% +% \def\startencoding[##1]{} +% \def\stopencoding{\endinput} +% \readfile{xxxx-#1}{}{}% +% \popmacro\stopencoding +% \popmacro\startencoding +% \popmacro\definecharacter} +% +% \startregime[ec] +% \useencodingvector ec +% \stopregime %D We preload several encodings: -\useencoding[mis,ans,il2,ec,x5,pol,pdf,uni] +%\input enco-def \input enco-acc \input enco-raw +%\input enco-com \input enco-cas \input enco-mis + +\useencoding[def,acc,raw,com,cas,mis] -\protect +\useencoding[ans,il2,ec,pdf,uc,pol,x5] -\endinput +\protect \endinput diff --git a/tex/context/base/enco-lat.tex b/tex/context/base/enco-lat.tex index a8e1525c1..41f57a14d 100644 --- a/tex/context/base/enco-lat.tex +++ b/tex/context/base/enco-lat.tex @@ -16,16 +16,16 @@ \startregime[latin2] -\defineactivecharacter è {\v{c}} -\defineactivecharacter È {\v{C}} -\defineactivecharacter æ {\'{c}} -\defineactivecharacter Æ {\'{C}} -\defineactivecharacter ¹ {\v{s}} -\defineactivecharacter © {\v{S}} -\defineactivecharacter ¾ {\v{z}} -\defineactivecharacter ® {\v{Z}} -\defineactivecharacter ð {\pseudoencodeddj{}} -\defineactivecharacter Ð {\pseudoencodedDJ{}} +\defineactivetoken è {\ccaron} +\defineactivetoken È {\Ccaron} +\defineactivetoken æ {\cacute} +\defineactivetoken Æ {\Cacute} +\defineactivetoken ¹ {\scaron} +\defineactivetoken © {\Scaron} +\defineactivetoken ¾ {\zcaron} +\defineactivetoken ® {\Zcaron} +\defineactivetoken ð {\pseudoencodeddj} +\defineactivetoken Ð {\pseudoencodedDJ} \stopregime diff --git a/tex/context/base/enco-pdf.tex b/tex/context/base/enco-pdf.tex index c8f03e3d0..4579c0b54 100644 --- a/tex/context/base/enco-pdf.tex +++ b/tex/context/base/enco-pdf.tex @@ -1,5 +1,5 @@ %D \module -%D [ file=enco-ans, +%D [ file=enco-pdf, %D version=1995.1.1, %D title=\CONTEXT\ Encoding Macros, %D subtitle=\YandY\ texnansi Encoding, @@ -8,99 +8,88 @@ %D copyright=Hans Hagen] %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 is the \PDF\ document encoding. -\startencoding[pdfdoc] +\startencoding[pdfdoc] % \rawcharacter{number} + +\definecharacter oeligature ^^9c -\defineaccent " A ^^c4 -\defineaccent " a ^^e4 -\defineaccent " E ^^cb -\defineaccent " e ^^eb -\defineaccent " I ^^cf -\defineaccent " i ^^ef -\defineaccent " O ^^d6 -\defineaccent " o ^^f6 -\defineaccent " U ^^dc -\defineaccent " u ^^fc -\defineaccent " y ^^ff - -\defineaccent ' A ^^c1 -\defineaccent ' a ^^e1 -\defineaccent ' E ^^c9 -\defineaccent ' e ^^e9 -\defineaccent ' I ^^cd -\defineaccent ' i ^^ed -\defineaccent ' O ^^d3 -\defineaccent ' o ^^f3 -\defineaccent ' U ^^da -\defineaccent ' u ^^fa -\defineaccent ' Y ^^dd -\defineaccent ' y ^^fd +\definecharacter leftguillemot ^^ab +\definecharacter rightguillemot ^^bb -\defineaccent ^ A ^^c2 -\defineaccent ^ a ^^e2 -\defineaccent ^ E ^^ca -\defineaccent ^ e ^^ea -\defineaccent ^ I ^^ce -\defineaccent ^ i ^^ee -\defineaccent ^ O ^^d4 -\defineaccent ^ o ^^f4 -\defineaccent ^ U ^^db -\defineaccent ^ u ^^fb - -\defineaccent ` A ^^c0 -\defineaccent ` a ^^e0 -\defineaccent ` E ^^c8 -\defineaccent ` e ^^e8 -\defineaccent ` I ^^cc -\defineaccent ` i ^^ec -\defineaccent ` O ^^d2 -\defineaccent ` o ^^f2 -\defineaccent ` U ^^d9 -\defineaccent ` u ^^f9 - -\defineaccent ~ A ^^c3 -\defineaccent ~ a ^^e3 -\defineaccent ~ N ^^d1 -\defineaccent ~ n ^^f1 -\defineaccent ~ O ^^d5 -\defineaccent ~ o ^^f5 +\definecharacter Agrave ^^c0 +\definecharacter Aacute ^^c1 +\definecharacter Acircumflex ^^c2 +\definecharacter Atilde ^^c3 +\definecharacter Adiaeresis ^^c4 +\definecharacter OAligature ^^c5 +\definecharacter AEligature ^^c6 +\definecharacter Ccedilla ^^c7 +\definecharacter Egrave ^^c8 +\definecharacter Eacute ^^c9 +\definecharacter Ecircumflex ^^ca +\definecharacter Ediaeresis ^^cb +\definecharacter Igrave ^^cc +\definecharacter Iacute ^^cd +\definecharacter Icircumflex ^^ce +\definecharacter Idiaeresis ^^cf -\defineaccent c c ^^e7 -\defineaccent C C ^^c7 +\definecharacter Ntilde ^^d1 +\definecharacter Ograve ^^d2 +\definecharacter Oacute ^^d3 +\definecharacter Ocircumflex ^^d4 +\definecharacter Otilde ^^d5 +\definecharacter Odiaeresis ^^d6 -\defineaccent ' c c % c acute -\defineaccent ' C C % C acute -\defineaccent ' n n % n acute -\defineaccent ' N N % N acute -\defineaccent ' S S % S acute -\defineaccent ' s s % s acute -\defineaccent ' Z Z % Z acute -\defineaccent ' z z % z acute +\definecharacter Ugrave ^^d9 +\definecharacter Uacute ^^da +\definecharacter Ucircumflex ^^db +\definecharacter Udiaeresis ^^dc +\definecharacter Yacute ^^dd -\defineaccent . Z Z % Z dot -\defineaccent . z z % z dot +\definecharacter ssharp ^^df +\definecharacter agrave ^^e0 +\definecharacter aacute ^^e1 +\definecharacter acircumflex ^^e2 +\definecharacter atilde ^^e3 +\definecharacter adiaeresis ^^e4 +\definecharacter oaligature ^^e5 +\definecharacter aeligature ^^e6 +\definecharacter ccedilla ^^e7 +\definecharacter egrave ^^e8 +\definecharacter eacute ^^e9 +\definecharacter ecircumflex ^^ea +\definecharacter ediaeresis ^^eb +\definecharacter igrave ^^ec +\definecharacter iacute ^^ed +\definecharacter icircumflex ^^ee +\definecharacter idiaeresis ^^ef -\defineaccent k a a % a ogonek -\defineaccent k A A % A ogonek -\defineaccent k e e % e ogonek -\defineaccent k E E % E ogonek +\definecharacter ntilde ^^f1 +\definecharacter ograve ^^f2 +\definecharacter oacute ^^f3 +\definecharacter ocircumflex ^^f4 +\definecharacter otilde ^^f5 +\definecharacter odiaeresis ^^f6 -\definecharacter AE ^^c6 -\definecharacter ae ^^e6 -\definecharacter OA ^^c5 -\definecharacter oa ^^e5 -\definecharacter oe ^^9c -\definecharacter sz ^^df -\definecharacter SS ^^df +\definecharacter ugrave ^^f9 +\definecharacter uacute ^^fa +\definecharacter ucircumflex ^^fb +\definecharacter udiaeresis ^^fc +\definecharacter yacute ^^fd -\definecharacter leftguillemot ^^ab -\definecharacter rightguillemot ^^bb -\definecharacter leftsubguillemot ^^ab -\definecharacter rightsubguillemot ^^bb +\definecharacter ydiaeresis ^^ff + +\definecharacter leftsubguillemot {\leftguillemot} +\definecharacter rightsubguillemot {\rightguillemot} + +\definecharacter Uhungarumlaut {\Ucircumflex} +\definecharacter uhungarumlaut {\ucircumflex} +\definecharacter Ohungarumlaut {\Ocircumflex} +\definecharacter ohungarumlaut {\ocircumflex} \stopencoding diff --git a/tex/context/base/enco-pfr.tex b/tex/context/base/enco-pfr.tex new file mode 100644 index 000000000..16012a281 --- /dev/null +++ b/tex/context/base/enco-pfr.tex @@ -0,0 +1,187 @@ +%D \module +%D [ file=enco-pfr, +%D version=2000.12.10, +%D title=\CONTEXT\ Encoding Macros, +%D subtitle=PDF Font Resource Inclusion, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +%D This is an experimental module in which we implement +%D font resource inclusion in \PDF. One reason to include +%D font resources is that it enables a search engine to +%D perform a search (I'm told). This feature ws requested by +%D Petr Ferdus from Czech. + +%D A simple test file may look like this (watch how we first +%D load the encoding and then the font; previous font +%D definitions are left untouched.) +%D +%D \starttypen +%D % output=pdftex interface=en +%D +%D \useencoding[pfr] +%D \setupbodyfont[csr] +%D +%D \starttext +%D test \`z \'z \bf test \sl test \bs quite funny \`z \page +%D test \`z \'z \bf test \sl test \bs quite funny \`z \page +%D \stoptext +%D \stoptypen +%D +%D We do our best to include a (often large) font resources +%D only once. The current implementation is not that +%D general which is also due to the fact that \type +%D {\pdffontattr} is expanded instantly and persistent. A +%D more versatile (but also slower) approach is to keep track +%D of the fonts and either flush the information at shipout +%D time, or at the end of the document. + +\unprotect + +%D \macros +%D {ifincludepdffontresources} +%D +%D You can turn of this feature using the following switch. + +\newif\ifincludepdffontresources \includepdffontresourcestrue + +%D The name of the resource is stored in a macro, as is its +%D object reference. A resource is only processed once. When +%D done, the resource name is erased, and we use this fact to +%D prevent redefinition as well as well as reloading. So, a +%D macro defined with \type {\pdffontfileresource} can have +%D three states: +%D +%D \startopsomming[opelkaar] +%D \som undefined: not yet loaded, and not yet included +%D \som some value: loaded, but not yet included +%D \som empty: loaded, and already included +%D \stopopsomming + +\def\pdffontresource% + {\strippedcsname\pdffontresource\currentencoding} + +\def\pdffontfileresource% + {pdfr:\pdffontresource} + +%D A resource is defined in a file prefixed by \type {pdfr-}. +%D The following \PDF\ code is compsed by Ondrej Koala Vacha (i +%D probably mispelled this name). +%D +%D \starttypen +%D \startpdffontresource[il2] +%D /CIDInit /ProcSet findresource begin +%D 12 dict begin +%D begincmap +%D /CIDSystemInfo +%D << /Registry (Adobe) +%D /Ordering (T1UV) +%D /Supplement 0 +%D >> def +%D /CMapName /Adobe-Identity-UCS def +%D /CMapType 1 def +%D 1 begincodespacerange +%D <00> <FF> +%D endcodespacerange +%D %%FontSpecificEncoding +%D 191 beginbfrange +%D <20> <20> <0020> % space dec: 32 oct:040 hex:20 +%D .... .... ...... . ........ .... .. ....... ...... +%D <ff> <ff> <00ff> % dotaccent dec:255 oct:377 hex:ff +%D endbfrange +%D endcmap +%D CMapName currentdict /CMap defineresource pop end +%D end +%D \stoppdffontresource +%D \stoptypen +%D +%D We don't preload such huge definitions, and process them +%D run||time to save memory. Therefore, in the encoding +%D vector, we only add an entry like: +%D +%D \starttypen +%D \startencoding [il2] +%D \usepdffontresource il2 +%D \stopencoding +%D \stoptypen +%D +%D This macro is defined as follows. + +\def\usepdffontresource #1 % + {\doifundefinedelse{\pdffontfileresource} % okay, undefined, so either + {\setxvalue{\pdffontfileresource}{#1}} % band new, or not yet loaded + {\doifvaluesomething{\pdffontfileresource} % only if not loaded in which + {\setxvalue{\pdffontfileresource}{#1}}}} % case it's made empty + +%D Watch how we check for duplicated loading. The resource +%D itself, when asked for, is included immediately, after which +%D we save its reference. Normally a document will have one +%D such a resource. + +\long\def\startpdffontresource[#1]#2\stoppdffontresource% + {\donefalse % we use boolean due to \par + \doifundefined{\pdffontresource}% should be \long + {\doif{#1}{\currentencoding}{\donetrue}}% + \ifdone + \immediate\pdfobj stream {#2}% + \setxvalue{\pdffontresource}{\the\pdflastobj}% + \fi} + +%D The reference to such a vector is to be handled at font +%D definition time, which is why we hook it into the font +%D loading routine. A little bit of indirectness speeds up +%D the process when this feature is disabled and keeps the +%D macros readable. + +\appendtoksonce \includepdffontresource \to \everyfont + +\def\includepdffontresource% + {\ifincludepdffontresources + \ifx\pdffontattr\undefined + % we're not using (a recent version of) pdftex + \else\ifcase\pdfoutput + % we're not in pdf mode + \else + \doincludepdffontresource + \fi\fi + \fi} + +\def\doincludepdffontresource% + {% does this font has an special encoding entry + \doifdefined{\purefontname\font\s!encoding} + {% does this encoding entry has a value + \doifvaluesomething{\purefontname\font\s!encoding} + {\bgroup + % quick and dirty switch + \edef\currentencoding{\getvalue{\purefontname\font\s!encoding}}% okay? + % is there a pdf font encoding resource file defined + \doifdefined{\pdffontfileresource} + {% load the pdf font resource + \doifvaluesomething{\pdffontfileresource} + {% but load it only once + \startreadingfile + \readsysfile{pdfr-\getvalue{\pdffontfileresource}}{}{}% messages + \stopreadingfile + % but do that only once, so forget the flag, empty==loaded + \global\letvalue{\pdffontfileresource}\empty}}% + % is there a resource indeed, i.e. an object reference + \doifdefined{\pdffontresource} + {% if so, create a reference to the object + \expanded{\pdffontattr\font % current font + {/ToUnicode \getvalue{\pdffontresource}\space0 R}}}% + \egroup}}} + +%D For the moment, we keep this definition here, if only +%D because \type {\usepdffontencoding} is not defined in the +%D core. In the end, this will go to enco-il2. + +\startencoding [il2] + \usepdffontresource il2 +\stopencoding + +\protect \endinput diff --git a/tex/context/base/enco-pol.tex b/tex/context/base/enco-pol.tex index 283d074a8..e64540392 100644 --- a/tex/context/base/enco-pol.tex +++ b/tex/context/base/enco-pol.tex @@ -53,24 +53,24 @@ \startencoding[pl0] -\defineaccent k a 161 % a ogonek -\defineaccent ' c 162 % c acute -\defineaccent k e 166 % e ogonek -\definecharacter l 170 % l crossed -\defineaccent ' n 171 % n acute -\defineaccent ' o 243 % o acute -\defineaccent ' s 177 % s acute -\defineaccent ' z 185 % z acute -\defineaccent . z 187 % z dot -\defineaccent k A 129 % A ogonek -\defineaccent ' C 130 % C accute -\defineaccent k E 134 % E ogonek -\definecharacter L 138 % L crossed -\defineaccent ' N 139 % N accute -\defineaccent ' O 211 % O acute -\defineaccent ' S 145 % S acute -\defineaccent ' Z 153 % Z acute -\defineaccent . Z 155 % Z dot +\definecharacter Aogonek 129 +\definecharacter Caccute 130 +\definecharacter Eogonek 134 +\definecharacter Lstroke 138 +\definecharacter Naccute 139 +\definecharacter Sacute 145 +\definecharacter Zacute 153 +\definecharacter Zdot 155 +\definecharacter aogonek 161 +\definecharacter cacute 162 +\definecharacter eogonek 166 +\definecharacter lstroke 170 +\definecharacter nacute 171 +\definecharacter sacute 177 +\definecharacter zacute 185 +\definecharacter zdot 187 +\definecharacter Oacute 211 +\definecharacter oacute 243 \stopencoding @@ -149,24 +149,24 @@ \startencoding[pl1] -\defineaccent k a 185 % a ogonek -\defineaccent ' c 230 % c acute -\defineaccent k e 234 % e ogonek -\definecharacter l 179 % l crossed -\defineaccent ' n 241 % n acute -\defineaccent ' o 243 % o acute -\defineaccent ' s 156 % s acute -\defineaccent ' z 159 % z acute -\defineaccent . z 191 % z dot -\defineaccent k A 165 % A ogonek -\defineaccent ' C 198 % C accute -\defineaccent k E 202 % E ogonek -\definecharacter L 163 % L crossed -\defineaccent ' N 209 % N accute -\defineaccent ' O 211 % O acute -\defineaccent ' S 140 % S acute -\defineaccent ' Z 143 % Z acute -\defineaccent . Z 175 % Z dot +\definecharacter Sacute 140 +\definecharacter Zacute 143 +\definecharacter sacute 156 +\definecharacter zacute 159 +\definecharacter Lstroke 163 +\definecharacter Aogonek 165 +\definecharacter Zdot 175 +\definecharacter lstroke 179 +\definecharacter aogonek 185 +\definecharacter zdot 191 +\definecharacter Caccute 198 +\definecharacter Eogonek 202 +\definecharacter Naccute 209 +\definecharacter Oacute 211 +\definecharacter cacute 230 +\definecharacter eogonek 234 +\definecharacter nacute 241 +\definecharacter oacute 243 \stopencoding @@ -221,24 +221,24 @@ \startencoding[pl2] -\defineaccent k a 177 % a ogonek -\defineaccent ' c 230 % c acute -\defineaccent k e 234 % e ogonek -\definecharacter l 179 % l crossed -\defineaccent ' n 241 % n acute -\defineaccent ' o 243 % o acute -\defineaccent ' s 182 % s acute -\defineaccent ' z 188 % z acute -\defineaccent . z 191 % z dot -\defineaccent k A 161 % A ogonek -\defineaccent ' C 198 % C accute -\defineaccent k E 202 % E ogonek -\definecharacter L 163 % L crossed -\defineaccent ' N 209 % N accute -\defineaccent ' O 211 % O acute -\defineaccent ' S 166 % S acute -\defineaccent ' Z 172 % Z acute -\defineaccent . Z 175 % Z dot +\definecharacter Aogonek 161 +\definecharacter Lstroke 163 +\definecharacter Sacute 166 +\definecharacter Zacute 172 +\definecharacter Zdot 175 +\definecharacter aogonek 177 +\definecharacter lstroke 179 +\definecharacter sacute 182 +\definecharacter zacute 188 +\definecharacter zdot 191 +\definecharacter Caccute 198 +\definecharacter Eogonek 202 +\definecharacter Naccute 209 +\definecharacter Oacute 211 +\definecharacter cacute 230 +\definecharacter eogonek 234 +\definecharacter nacute 241 +\definecharacter oacute 243 \stopencoding diff --git a/tex/context/base/enco-raw.tex b/tex/context/base/enco-raw.tex new file mode 100644 index 000000000..e880eee8c --- /dev/null +++ b/tex/context/base/enco-raw.tex @@ -0,0 +1,116 @@ +% default instelbaar maken: \enableencoding[main][fallback] + +\startencoding[raw] + +\definecharacter Acircumflex {A} \definecharacter acircumflex {a} +\definecharacter Ccircumflex {C} \definecharacter ccircumflex {c} +\definecharacter Ecircumflex {E} \definecharacter ecircumflex {e} +\definecharacter Gcircumflex {G} \definecharacter gcircumflex {g} +\definecharacter Hcircumflex {H} \definecharacter hcircumflex {h} +\definecharacter Icircumflex {I} \definecharacter icircumflex {i} +\definecharacter Jcircumflex {J} \definecharacter jcircumflex {j} +\definecharacter Ocircumflex {O} \definecharacter ocircumflex {o} +\definecharacter Scircumflex {S} \definecharacter scircumflex {s} +\definecharacter Ucircumflex {U} \definecharacter ucircumflex {u} +\definecharacter Wcircumflex {W} \definecharacter wcircumflex {w} +\definecharacter Ycircumflex {Y} \definecharacter ycircumflex {y} + +\definecharacter Agrave {A} \definecharacter agrave {a} +\definecharacter Egrave {E} \definecharacter egrave {e} +\definecharacter Igrave {I} \definecharacter igrave {i} +\definecharacter Ograve {O} \definecharacter ograve {o} +\definecharacter Ugrave {U} \definecharacter ugrave {u} + +\definecharacter Atilde {A} \definecharacter atilde {a} +\definecharacter Itilde {I} \definecharacter itilde {i} +\definecharacter Otilde {O} \definecharacter otilde {o} +\definecharacter Utilde {U} \definecharacter utilde {u} + +\definecharacter Adiaeresis {A} \definecharacter adiaeresis {a} +\definecharacter Ediaeresis {E} \definecharacter ediaeresis {e} +\definecharacter Idiaeresis {I} \definecharacter idiaeresis {i} +\definecharacter Odiaeresis {O} \definecharacter odiaeresis {o} +\definecharacter Udiaeresis {U} \definecharacter udiaeresis {u} +\definecharacter Ydiaeresis {Y} \definecharacter ydiaeresis {y} + +\definecharacter Aacute {A} \definecharacter aacute {a} +\definecharacter Cacute {C} \definecharacter cacute {c} +\definecharacter Eacute {E} \definecharacter eacute {e} +\definecharacter Iacute {I} \definecharacter iacute {i} +\definecharacter Lacute {L} \definecharacter lacute {l} +\definecharacter Nacute {N} \definecharacter nacute {n} +\definecharacter Oacute {O} \definecharacter oacute {o} +\definecharacter Racute {R} \definecharacter racute {r} +\definecharacter Sacute {S} \definecharacter sacute {s} +\definecharacter Uacute {U} \definecharacter uacute {u} +\definecharacter Zacute {Z} \definecharacter zacute {z} + +\definecharacter Dstroke {D} \definecharacter dstroke {d} +\definecharacter Hstroke {H} \definecharacter hstroke {h} +\definecharacter Tstroke {T} \definecharacter tstroke {t} + +\definecharacter Cdotaccent {C} \definecharacter cdotaccent {c} +\definecharacter Edotaccent {E} \definecharacter edotaccent {e} +\definecharacter Gdotaccent {G} \definecharacter gdotaccent {g} +\definecharacter Idotaccent {I} \definecharacter idotaccent {i} +\definecharacter Zdotaccent {Z} \definecharacter zdotaccent {z} + +\definecharacter Amacron {A} \definecharacter amacron {a} +\definecharacter Emacron {E} \definecharacter emacron {e} +\definecharacter Imacron {I} \definecharacter imacron {i} +\definecharacter Omacron {O} \definecharacter omacron {o} +\definecharacter Umacron {U} \definecharacter umacron {u} + +\definecharacter Ccedilla {C} \definecharacter ccedilla {c} +\definecharacter Kcedilla {K} \definecharacter kcedilla {k} +\definecharacter Lcedilla {L} \definecharacter lcedilla {l} +\definecharacter Ncedilla {N} \definecharacter ncedilla {n} +\definecharacter Rcedilla {R} \definecharacter rcedilla {r} +\definecharacter Scedilla {S} \definecharacter scedilla {s} +\definecharacter Tcedilla {T} \definecharacter tcedilla {t} + +\definecharacter Ohungarumlaut {O} \definecharacter ohungarumlaut {o} +\definecharacter Uhungarumlaut {U} \definecharacter uhungarumlaut {u} + +\definecharacter Aogonek {A} \definecharacter aogonek {a} +\definecharacter Eogonek {E} \definecharacter eogonek {e} +\definecharacter Iogonek {I} \definecharacter iogonek {i} +\definecharacter Uogonek {U} \definecharacter uogonek {u} + +\definecharacter Aring {A} \definecharacter aring {a} +\definecharacter Uring {U} \definecharacter uring {u} + +\definecharacter Abreve {A} \definecharacter abreve {a} +\definecharacter Ebreve {E} \definecharacter ebreve {e} +\definecharacter Gbreve {G} \definecharacter gbreve {g} +\definecharacter Ibreve {I} \definecharacter ibreve {i} +\definecharacter Obreve {O} \definecharacter obreve {o} +\definecharacter Ubreve {U} \definecharacter ubreve {u} + +\definecharacter Ccaron {C} \definecharacter ccaron {c} +\definecharacter Dcaron {D} \definecharacter dcaron {d} +\definecharacter Ecaron {E} \definecharacter ecaron {e} +\definecharacter Lcaron {L} \definecharacter lcaron {l} +\definecharacter Ncaron {N} \definecharacter ncaron {n} +\definecharacter Rcaron {R} \definecharacter rcaron {r} +\definecharacter Scaron {S} \definecharacter scaron {s} +\definecharacter Tcaron {T} \definecharacter tcaron {t} +\definecharacter Zcaron {Z} \definecharacter zcaron {z} + +\definecharacter dotlessI {I} \definecharacter dotlessi {i} +\definecharacter dotlessJ {J} \definecharacter dotlessj {j} + +\definecharacter AEligature {AE} \definecharacter aeligature {ae} +\definecharacter Lstroke {L} \definecharacter lstroke {l} +\definecharacter Ostroke {O} \definecharacter ostroke {o} +\definecharacter OEligature {OE} \definecharacter oeligature {oe} +\definecharacter Ssharp {SS} \definecharacter ssharp {ss} +\definecharacter IJligature {IJ} \definecharacter ijligature {ij} + +\definecharacter Aumlaut {A} \definecharacter aumlaut {a} +\definecharacter Eumlaut {E} \definecharacter eumlaut {e} +\definecharacter Iumlaut {I} \definecharacter iumlaut {i} +\definecharacter Oumlaut {O} \definecharacter oumlaut {o} +\definecharacter Uumlaut {U} \definecharacter uumlaut {u} + +\stopencoding diff --git a/tex/context/base/enco-run.tex b/tex/context/base/enco-run.tex new file mode 100644 index 000000000..074518165 --- /dev/null +++ b/tex/context/base/enco-run.tex @@ -0,0 +1,83 @@ +%D \module +%D [ file=enco-inf, +%D version=2000.27.12, % moved to runtime module +%D title=\CONTEXT\ Encoding Macros, +%D subtitle=Ending Related Tracing, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright=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. + +\unprotect + +\gdef\visualizecharacters% {}'s needed + {\def\uchar##1##2{\hbox to 2.5em + {\ifcase##1\relax\red\or\blue\else\green\fi##1\hss##2}}% + \let\normalbuildtextaccent\buildtextaccent + \let\normalbottomaccent \bottomaccent +% \def\char{\green\normalchar}% + \def\char% can be used in \oalign + {\bgroup\def\char{\green\normalchar\scratchcounter\egroup}% + \afterassignment\char\scratchcounter}% + \def\buildtextaccent{\let\green\empty\blue\normalbuildtextaccent}% + \def\bottomaccent{\let\green\empty\red\normalbottomaccent}} + +\gdef\visualizecharacterslegend% + {\hbox{\currentencoding:\space + {\blue composed}\space{\red bottom}\space{\green char}\space raw}} + +\gdef\showaccents% + {\bgroup + \starttextrule{\visualizecharacterslegend} + \visualizecharacters + \def\do##1% + {{\def\dodo####1% + {\hss\hbox to 1em{\hss\expanded{##1####1\recurselevel}\hss}}% + \hbox to \hsize + {\localcolortrue + \hbox to 2em{\tttf\string##1\hss}% + \dorecurse{26}{\dodo\character}}% + \hbox to \hsize + {\localcolortrue + \hskip2em + \dorecurse{26}{\dodo\Character}}}% + \par} + \do\'\do\`\do\^\do\~\do\" + \do\H\do\r\do\v\do\u\do\= + \do\.\do\b\do\d\do\k\do\c + \stoptextrule + \egroup} + +\gdef\showcharacters% + {\bgroup + \dontcomplain + \forgetall + \def\startencoding[##1]{} + \def\stopencoding{\endinput} + \dimen0=\!!zeropoint + \dimen2=\!!zeropoint + \def\definecharacter ##1 ##2 % + {\setbox0=\hbox{\getvalue{##1}}% + \ifdim\wd0>\dimen0 \dimen0=\wd0 \fi + \setbox2=\hbox spread 1em{\box0 ##1} + \ifdim\wd2>\dimen2 \dimen2=\wd2 \fi}% + \readsysfile{\f!encodingprefix def}{}{} + \advance\dimen0 by 1em + \edef\encwidth{\the\dimen0} + \dimen0=\hsize + \advance\dimen0 2em + \advance\dimen2 2em + \divide \dimen0 by \dimen2 + \edef\enccols{\number\dimen0} + \visualizecharacters + \startcolumns[\c!n=\enccols,\c!afstand=2em] + \def\definecharacter ##1 ##2 % + {\hbox{\localcolortrue\hbox to \encwidth{\getvalue{##1}\hss}##1}\par} + \readsysfile{\f!encodingprefix def}{}{} + \stopcolumns + \egroup} + +\protect \endinput diff --git a/tex/context/base/enco-uc.tex b/tex/context/base/enco-uc.tex new file mode 100644 index 000000000..87121a29d --- /dev/null +++ b/tex/context/base/enco-uc.tex @@ -0,0 +1,198 @@ +\startencoding[uc] + +\definecharacter Agrave {\uchar0{192}} +\definecharacter Aacute {\uchar0{193}} +\definecharacter Acircumflex {\uchar0{194}} +\definecharacter Atilde {\uchar0{195}} +\definecharacter Adiaeresis {\uchar0{196}} +\definecharacter Aring {\uchar0{197}} +\definecharacter AEligature {\uchar0{198}} +\definecharacter Ccedilla {\uchar0{199}} +\definecharacter Egrave {\uchar0{200}} +\definecharacter Eacute {\uchar0{201}} +\definecharacter Ediaeresis {\uchar0{203}} +\definecharacter Igrave {\uchar0{204}} +\definecharacter Iacute {\uchar0{205}} +\definecharacter Icircumflex {\uchar0{206}} +\definecharacter Idiaeresis {\uchar0{207}} +\definecharacter Dstroke {\uchar0{208}} +\definecharacter Ntilde {\uchar0{209}} +\definecharacter Ograve {\uchar0{210}} +\definecharacter Oacute {\uchar0{211}} +\definecharacter Ocircumflex {\uchar0{212}} +\definecharacter Otilde {\uchar0{213}} +\definecharacter Odiaeresis {\uchar0{214}} + +\definecharacter Ostroke {\uchar0{216}} +\definecharacter Ugrave {\uchar0{217}} +\definecharacter Uacute {\uchar0{218}} +\definecharacter Uhungarumlaut {\uchar0{219}} +\definecharacter Udiaeresis {\uchar0{220}} +\definecharacter Yacute {\uchar0{221}} +\definecharacter Thorn {\uchar0{222}} +\definecharacter ssharp {\uchar0{223}} +\definecharacter agrave {\uchar0{224}} +\definecharacter aacute {\uchar0{225}} +\definecharacter acircumflex {\uchar0{226}} +\definecharacter atilde {\uchar0{227}} +\definecharacter adiaeresis {\uchar0{228}} +\definecharacter aring {\uchar0{229}} +\definecharacter aeligature {\uchar0{230}} +\definecharacter ccedilla {\uchar0{231}} +\definecharacter egrave {\uchar0{232}} +\definecharacter eacute {\uchar0{233}} +\definecharacter ecircumflex {\uchar0{234}} +\definecharacter ediaeresis {\uchar0{235}} +\definecharacter igrave {\uchar0{236}} +\definecharacter iacute {\uchar0{237}} +\definecharacter icircumflex {\uchar0{238}} +\definecharacter idiaeresis {\uchar0{239}} +\definecharacter dmacron {\uchar0{240}} +\definecharacter ntilde {\uchar0{241}} +\definecharacter ograve {\uchar0{242}} +\definecharacter oacute {\uchar0{243}} +\definecharacter ocircumflex {\uchar0{244}} +\definecharacter ohungarumlaut {\uchar0{245}} +\definecharacter odiaeresis {\uchar0{246}} + +\definecharacter ostroke {\uchar0{248}} +\definecharacter ugrave {\uchar0{249}} +\definecharacter uacute {\uchar0{250}} +\definecharacter ucircumflex {\uchar0{251}} +\definecharacter udiaeresis {\uchar0{252}} +\definecharacter yacute {\uchar0{253}} +\definecharacter thorn {\uchar0{254}} +\definecharacter ydiaeresis {\uchar0{255}} + +\definecharacter Amacron {\uchar1{0}} +\definecharacter amacron {\uchar1{1}} +\definecharacter Abreve {\uchar1{2}} +\definecharacter abreve {\uchar1{3}} +\definecharacter Aogonek {\uchar1{4}} +\definecharacter aogonek {\uchar1{5}} +\definecharacter Cacute {\uchar1{6}} +\definecharacter cacute {\uchar1{7}} +\definecharacter Ccircumflex {\uchar1{8}} +\definecharacter ccircumflex {\uchar1{9}} +\definecharacter Cdotaccent {\uchar1{10}} +\definecharacter cdotaccent {\uchar1{11}} +\definecharacter Ccaron {\uchar1{12}} +\definecharacter ccaron {\uchar1{13}} +\definecharacter Dcaron {\uchar1{14}} +\definecharacter dcaron {\uchar1{15}} +\definecharacter Dstroke {\uchar1{16}} +\definecharacter dstroke {\uchar1{17}} +\definecharacter Emacron {\uchar1{18}} +\definecharacter emacron {\uchar1{19}} +\definecharacter Ebreve {\uchar1{20}} +\definecharacter ebreve {\uchar1{21}} +\definecharacter Edotaccent {\uchar1{22}} +\definecharacter edotaccent {\uchar1{23}} +\definecharacter Eogonek {\uchar1{24}} +\definecharacter eogonek {\uchar1{25}} +\definecharacter Ecaron {\uchar1{26}} +\definecharacter ecaron {\uchar1{27}} +\definecharacter Gcircumflex {\uchar1{28}} +\definecharacter gcircumflex {\uchar1{29}} +\definecharacter Gbreve {\uchar1{30}} +\definecharacter gbreve {\uchar1{31}} +\definecharacter Gdotaccent {\uchar1{32}} +\definecharacter gdotaccent {\uchar1{33}} +\definecharacter Gdotaccent {\uchar1{34}} +\definecharacter gdotaccent {\uchar1{35}} +\definecharacter Hcircumflex {\uchar1{36}} +\definecharacter hcircumflex {\uchar1{37}} +\definecharacter Hstroke {\uchar1{38}} +\definecharacter hstroke {\uchar1{39}} +\definecharacter Itilde {\uchar1{40}} +\definecharacter itilde {\uchar1{41}} +\definecharacter Imacron {\uchar1{42}} +\definecharacter imacron {\uchar1{43}} +\definecharacter Ibreve {\uchar1{44}} +\definecharacter ibreve {\uchar1{45}} +\definecharacter Iogonek {\uchar1{46}} +\definecharacter iogonek {\uchar1{47}} +\definecharacter Idotaccent {\uchar1{48}} +\definecharacter idotless {\uchar1{49}} +\definecharacter IJligature {\uchar1{50}} +\definecharacter ijligature {\uchar1{51}} +\definecharacter Jcircumflex {\uchar1{52}} +\definecharacter jcircumflex {\uchar1{53}} +\definecharacter Kcedilla {\uchar1{54}} +\definecharacter kcedilla {\uchar1{55}} +\definecharacter kkra {\uchar1{56}} +\definecharacter Lacute {\uchar1{57}} +\definecharacter lacute {\uchar1{58}} +\definecharacter Lcedilla {\uchar1{59}} +\definecharacter lcedilla {\uchar1{60}} +\definecharacter Lcaron {\uchar1{61}} +\definecharacter lcaron {\uchar1{62}} +\definecharacter Ldotmiddle {\uchar1{63}} +\definecharacter ldotmiddle {\uchar1{64}} +\definecharacter Lstroke {\uchar1{65}} +\definecharacter lstroke {\uchar1{66}} +\definecharacter Nacute {\uchar1{67}} +\definecharacter nacute {\uchar1{68}} +\definecharacter Ncedilla {\uchar1{69}} +\definecharacter ncedilla {\uchar1{70}} +\definecharacter Ncaron {\uchar1{71}} +\definecharacter ncaron {\uchar1{72}} +\definecharacter napostrophe {\uchar1{73}} +\definecharacter Neng {\uchar1{74}} +\definecharacter neng {\uchar1{75}} +\definecharacter Omacron {\uchar1{76}} +\definecharacter omacron {\uchar1{77}} +\definecharacter Obreve {\uchar1{78}} +\definecharacter obreve {\uchar1{79}} +\definecharacter Ohungarumlaut {\uchar1{80}} +\definecharacter ohungarumlaut {\uchar1{81}} +\definecharacter OEligature {\uchar1{82}} +\definecharacter oeligature {\uchar1{83}} +\definecharacter Racute {\uchar1{84}} +\definecharacter racute {\uchar1{85}} +\definecharacter Rcedilla {\uchar1{86}} +\definecharacter rcedilla {\uchar1{87}} +\definecharacter Rcaron {\uchar1{88}} +\definecharacter rcaron {\uchar1{89}} +\definecharacter Sacute {\uchar1{90}} +\definecharacter sacute {\uchar1{91}} +\definecharacter Scircumflex {\uchar1{92}} +\definecharacter scircumflex {\uchar1{93}} +\definecharacter Scedilla {\uchar1{94}} +\definecharacter scedilla {\uchar1{95}} +\definecharacter Scaron {\uchar1{96}} +\definecharacter scaron {\uchar1{97}} +\definecharacter Tcedilla {\uchar1{98}} +\definecharacter tcedilla {\uchar1{99}} +\definecharacter Tcaron {\uchar1{100}} +\definecharacter tcaron {\uchar1{101}} +\definecharacter Tstroke {\uchar1{102}} +\definecharacter tstroke {\uchar1{103}} +\definecharacter Utilde {\uchar1{104}} +\definecharacter utilde {\uchar1{105}} +\definecharacter Umacron {\uchar1{106}} +\definecharacter umacron {\uchar1{107}} +\definecharacter Ubreve {\uchar1{108}} +\definecharacter ubreve {\uchar1{109}} +\definecharacter Uring {\uchar1{110}} +\definecharacter uring {\uchar1{111}} +\definecharacter Uhungarumlaut {\uchar1{112}} +\definecharacter uhungarumlaut {\uchar1{113}} +\definecharacter Uogonek {\uchar1{114}} +\definecharacter uogonek {\uchar1{115}} +\definecharacter Wcircumflex {\uchar1{116}} +\definecharacter wcircumflex {\uchar1{117}} +\definecharacter Ycircumflex {\uchar1{118}} +\definecharacter ycircumflex {\uchar1{119}} +\definecharacter Ydiaeresis {\uchar1{120}} +\definecharacter Zacute {\uchar1{121}} +\definecharacter zacute {\uchar1{122}} +\definecharacter Zdotaccent {\uchar1{123}} +\definecharacter zdotaccent {\uchar1{124}} +\definecharacter Zcaron {\uchar1{125}} +\definecharacter zcaron {\uchar1{126}} +\definecharacter slong {\uchar1{127}} + +\stopencoding + +\endinput diff --git a/tex/context/base/enco-uni.tex b/tex/context/base/enco-uni.tex index 2b749967f..c09c2e1bf 100644 --- a/tex/context/base/enco-uni.tex +++ b/tex/context/base/enco-uni.tex @@ -1,23 +1,5 @@ -%D \module -%D [ file=enco-uni, -%D version=1998.10.18, -%D title=\CONTEXT\ Encoding Macros, -%D subtitle=Unicode, -%D author=Hans Hagen, -%D date=\currentdate, -%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] -%C -%C This module is part of the \CONTEXT\ macro||package and is -%C therefore copyrighted by \PRAGMA. See mreadme.pdf for -%C details. +% temporary module, needed for downward compatibility -%D This module activates all characters in the upper range -%D and sets them to the basic unicodehandler. - -\startregime[unicode] - -\defineactivedecimals 128 to 255 as {\handleunicodeflowglyph} - -\stopregime +% \input regi-uni.tex \endinput diff --git a/tex/context/base/enco-vis.tex b/tex/context/base/enco-vis.tex index 77f18fdb2..3c1fd7765 100644 --- a/tex/context/base/enco-vis.tex +++ b/tex/context/base/enco-vis.tex @@ -1,154 +1,3 @@ -% temporary module +% temporary module, needed for downward compatibility -\startregime[viscii] - -\defineactivecharacter 2 {\h{uA}} -\defineactivecharacter 5 {\~{uA}} -\defineactivecharacter 6 {\~{^A}} -\defineactivecharacter 20 {\h{Y}} -\defineactivecharacter 23 {\h{Y}} -\defineactivecharacter 24 {\d{Y}} -\defineactivecharacter 25 {\~{Y}} -\defineactivecharacter 30 {\d{Y}} - -\defineactivecharacter 128 {\d{A}} -\defineactivecharacter 129 {\'{uA}} -\defineactivecharacter 130 {\`{uA}} -\defineactivecharacter 131 {\d{uA}} -\defineactivecharacter 132 {\'{^A}} -\defineactivecharacter 133 {\`{^A}} -\defineactivecharacter 134 {\h{^A}} -\defineactivecharacter 135 {\d{^A}} -\defineactivecharacter 136 {\~{E}} -\defineactivecharacter 137 {\d{E}} -\defineactivecharacter 138 {\'{^E}} -\defineactivecharacter 139 {\`{^E}} -\defineactivecharacter 140 {\h{^E}} -\defineactivecharacter 141 {\~{^E}} -\defineactivecharacter 142 {\d{^E}} -\defineactivecharacter 143 {\'{^O}} - -\defineactivecharacter 144 {\`{^O}} -\defineactivecharacter 145 {\h{^O}} -\defineactivecharacter 146 {\~{^O}} -\defineactivecharacter 147 {\d{^O}} -\defineactivecharacter 148 {\d{hO}} -\defineactivecharacter 149 {\'{hO}} -\defineactivecharacter 150 {\`{hO}} -\defineactivecharacter 151 {\h{hO}} -\defineactivecharacter 152 {\d{I}} -\defineactivecharacter 153 {\h{O}} -\defineactivecharacter 154 {\d{O}} -\defineactivecharacter 155 {\h{I}} -\defineactivecharacter 156 {\h{U}} -\defineactivecharacter 157 {\~{U}} -\defineactivecharacter 158 {\d{U}} -\defineactivecharacter 159 {\`{Y}} - -\defineactivecharacter 160 {\~{O}} -\defineactivecharacter 161 {\'{ua}} -\defineactivecharacter 162 {\`{ua}} -\defineactivecharacter 163 {\d{ua}} -\defineactivecharacter 164 {\'{^a}} -\defineactivecharacter 165 {\`{^a}} -\defineactivecharacter 166 {\h{^a}} -\defineactivecharacter 167 {\d{^a}} -\defineactivecharacter 168 {\~{e}} -\defineactivecharacter 169 {\d{ e}} -\defineactivecharacter 170 {\'{^e}} -\defineactivecharacter 171 {\`{^e}} -\defineactivecharacter 172 {\h{^e}} -\defineactivecharacter 173 {\~{^e}} -\defineactivecharacter 174 {\d{^e}} -\defineactivecharacter 175 {\'{^o}} - -\defineactivecharacter 176 {\`{^o}} -\defineactivecharacter 177 {\h{^o}} -\defineactivecharacter 178 {\~{^o}} -\defineactivecharacter 179 {\~{hO}} -\defineactivecharacter 180 {\h{O}} -\defineactivecharacter 181 {\d{^o}} -\defineactivecharacter 182 {\`{ho}} -\defineactivecharacter 183 {\h{ho}} -\defineactivecharacter 184 {\d{i}} -\defineactivecharacter 185 {\d{hU}} -\defineactivecharacter 186 {\'{hU}} -\defineactivecharacter 187 {\`{hU}} -\defineactivecharacter 188 {\h{hU}} -\defineactivecharacter 189 {\h{o}} -\defineactivecharacter 190 {\'{ho}} -\defineactivecharacter 191 {\h{U}} - -\defineactivecharacter 192 {\`{A}} -\defineactivecharacter 193 {\'{A}} -\defineactivecharacter 194 {\^{A}} -\defineactivecharacter 195 {\~{A}} -\defineactivecharacter 196 {\h{A}} -\defineactivecharacter 197 {\u{A}} -\defineactivecharacter 198 {\h{ua}} -\defineactivecharacter 199 {\~{ua}} -\defineactivecharacter 200 {\`{E}} -\defineactivecharacter 201 {\'{E}} -\defineactivecharacter 202 {\^{E}} -\defineactivecharacter 203 {\h{E}} -\defineactivecharacter 204 {\`{I}} -\defineactivecharacter 205 {\'{I}} -\defineactivecharacter 206 {\~{I}} -\defineactivecharacter 207 {\`{y}} - -\defineactivecharacter 208 {\DJ{}} -\defineactivecharacter 209 {\'{hu}} -\defineactivecharacter 210 {\`{O}} -\defineactivecharacter 211 {\'{O}} -\defineactivecharacter 212 {\^{O}} -\defineactivecharacter 213 {\d{a}} -\defineactivecharacter 214 {\h{y}} -\defineactivecharacter 215 {\`{hu}} -\defineactivecharacter 216 {\h{hu}} -\defineactivecharacter 217 {\`{U}} -\defineactivecharacter 218 {\'{U}} -\defineactivecharacter 219 {\~{y}} -\defineactivecharacter 220 {\d{y}} -\defineactivecharacter 221 {\'{Y}} -\defineactivecharacter 222 {\~{ho}} -\defineactivecharacter 223 {\h{u}} - -\defineactivecharacter 224 {\`{a}} -\defineactivecharacter 225 {\'{a}} -\defineactivecharacter 226 {\^{a}} -\defineactivecharacter 227 {\~{a}} -\defineactivecharacter 228 {\h{a}} -\defineactivecharacter 229 {\u{a}} -\defineactivecharacter 230 {\~{hu}} -\defineactivecharacter 231 {\~{^a}} -\defineactivecharacter 232 {\`{e}} -\defineactivecharacter 233 {\'{e}} -\defineactivecharacter 234 {\^{e}} -\defineactivecharacter 235 {\h{e}} -\defineactivecharacter 236 {\`{i}} -\defineactivecharacter 237 {\'{i}} -\defineactivecharacter 238 {\~{i}} -\defineactivecharacter 239 {\h{i}} - -\defineactivecharacter 240 {\dj{}} -\defineactivecharacter 241 {\d{hu}} -\defineactivecharacter 242 {\`{o}} -\defineactivecharacter 243 {\'{o}} -\defineactivecharacter 244 {\^{o}} -\defineactivecharacter 245 {\~{o}} -\defineactivecharacter 246 {\h{o}} -\defineactivecharacter 247 {\d{o}} -\defineactivecharacter 248 {\d{u}} -\defineactivecharacter 249 {\`{u}} -\defineactivecharacter 250 {\'{u}} -\defineactivecharacter 251 {\~{u}} -\defineactivecharacter 252 {\h{u}} -\defineactivecharacter 253 {\'{y}} -\defineactivecharacter 254 {\d{ho}} -\defineactivecharacter 255 {\~{hU}} - -\stopregime - -\enableregime[viscii] - -\endinput +\input regi-vis.tex \enableregime[viscii] \endinput diff --git a/tex/context/base/enco-win.tex b/tex/context/base/enco-win.tex index 06f8ab41f..826371d8a 100644 --- a/tex/context/base/enco-win.tex +++ b/tex/context/base/enco-win.tex @@ -1,122 +1,7 @@ -%D \module -%D [ file=enco-win, -%D version=1997.08.29, -%D title=\CONTEXT\ Encoding Macros, -%D subtitle=Windows 1252 ANSI keys, -%D author={Tobias Burnus \& Hans Hagen}, -%D date=\currentdate, -%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] -%C -%C This module is part of the \CONTEXT\ macro||package and is -%C therefore copyrighted by \PRAGMA. See mreadme.pdf for -%C details. +% temporary module, needed for downward compatibility -%D This module activates the (western) \MSWINDOWS\ high \ANSI\ -%D characters, such as ë and á. +%\input regi-win.tex -\startregime [windows] +\enableregime[windows] -\defineactivecharacter À {\`A} -\defineactivecharacter Á {\'A} -\defineactivecharacter  {\^A} -\defineactivecharacter à {\~A} -\defineactivecharacter Ä {\"A} -\defineactivecharacter Å {\AA{}} -\defineactivecharacter Æ {\AE{}} - -\defineactivecharacter à {\`a} -\defineactivecharacter á {\'a} -\defineactivecharacter â {\^a} -\defineactivecharacter ã {\~a} -\defineactivecharacter ä {\"a} -\defineactivecharacter å {\aa{}} -\defineactivecharacter æ {\ae{}} - -\defineactivecharacter Ç {\c C} -\defineactivecharacter ç {\c c} - -\defineactivecharacter È {\`E} -\defineactivecharacter É {\'E} -\defineactivecharacter Ê {\^E} -\defineactivecharacter Ë {\"E} - -\defineactivecharacter è {\`e} -\defineactivecharacter é {\'e} -\defineactivecharacter ê {\^e} -\defineactivecharacter ë {\"e} - -\defineactivecharacter Ì {\`I} -\defineactivecharacter Í {\'I} -\defineactivecharacter Î {\^I} -\defineactivecharacter Ï {\"I} - -\defineactivecharacter ì {\`i} -\defineactivecharacter í {\'i} -\defineactivecharacter î {\^i} -\defineactivecharacter ï {\"i} - -\defineactivecharacter Ñ {\~N} -\defineactivecharacter ñ {\~n} - -\defineactivecharacter Ò {\`O} -\defineactivecharacter Ó {\'O} -\defineactivecharacter Ô {\^O} -\defineactivecharacter Õ {\~O} -\defineactivecharacter Ö {\"O} -\defineactivecharacter Œ {\OE{}} -\defineactivecharacter Ø {\O{}} - -\defineactivecharacter ò {\`o} -\defineactivecharacter ó {\'o} -\defineactivecharacter ô {\^o} -\defineactivecharacter õ {\~o} -\defineactivecharacter ö {\"o} -\defineactivecharacter œ {\oe{}} -\defineactivecharacter ø {\o{}} - -\defineactivecharacter Š {\v{S}} -\defineactivecharacter š {\v{s}} -\defineactivecharacter ß {\sz{}} - -\defineactivecharacter Ù {\`U} -\defineactivecharacter Ú {\'U} -\defineactivecharacter Û {\^U} -\defineactivecharacter Ü {\"U} - -\defineactivecharacter ù {\`u} -\defineactivecharacter ú {\'u} -\defineactivecharacter û {\^u} -\defineactivecharacter ü {\"u} - -\defineactivecharacter Ý {\'Y} -\defineactivecharacter ý {\'y} -\defineactivecharacter ÿ {\"y} - -\defineactivecharacter ¿ {?`} -\defineactivecharacter ¡ {!`} -\defineactivecharacter † {\dag{}} -\defineactivecharacter ‡ {\ddag{}} -\defineactivecharacter ¶ {\P{}} -\defineactivecharacter § {\S{}} -\defineactivecharacter – {--} -\defineactivecharacter — {---} -\defineactivecharacter … {\dots{}} -\defineactivecharacter © {\copyright{}} -\defineactivecharacter £ {\sterling{}} - -\defineactivecharacter „ {\char44\kern-.1em\char44 } -\defineactivecharacter “ {\char96\kern-.1em\char96 } -\defineactivecharacter ” {\char34 } -\defineactivecharacter ‘ {\upperleftsinglesixquote{}} -\defineactivecharacter ’ {\char39 } -\defineactivecharacter › {\rightsubguillemot{}} -\defineactivecharacter ‹ {\leftsubguillemot{}} - -\defineactivecharacter « {\ifvmode\leavevmode\fi\leftguillemot\prewordbreak} -\defineactivecharacter » {\prewordbreak\rightguillemot{}} - -\stopregime - -\enableregime[windows] - -\endinput +\endinput diff --git a/tex/context/base/enco-x5.tex b/tex/context/base/enco-x5.tex index 910c7a35c..32a7399ca 100644 --- a/tex/context/base/enco-x5.tex +++ b/tex/context/base/enco-x5.tex @@ -17,19 +17,23 @@ \startencoding[x5] -\defineaccentcommand ` 0 -\defineaccentcommand ' 1 -\defineaccentcommand ^ 2 -\defineaccentcommand ~ 3 -\defineaccentcommand " 4 -\defineaccentcommand d 5 -\defineaccentcommand r 6 -\defineaccentcommand v 7 -\defineaccentcommand u 8 -\defineaccentcommand = 9 -\defineaccentcommand . 10 +\definecharacter textgrave 0 +\definecharacter textacute 1 +\definecharacter textcircumflex 2 +\definecharacter texttilde 3 +\definecharacter textdiaeresis 4 +\definecharacter texthungarumlaut 5 +\definecharacter textring 6 +\definecharacter textcaron 7 +\definecharacter textbreve 8 +\definecharacter textmacron 9 +\definecharacter textdotaccent 10 +\definecharacter textcedilla 11 +\definecharacter textogonek 12 -\defineaccentcommand h 12 +\definecharacter dotlessi 25 +\definecharacter DJ 30 +\definecharacter dj 31 \defineaccent ` A 128 \defineaccent ' A 129 @@ -164,48 +168,27 @@ \defineaccent h y 27 \defineaccent d y 29 -\definecharacter i 25 -\definecharacter DJ 30 -\definecharacter dj 31 - -\definecommand b {\xfiveencodedb} -\definecommand c {\xfiveencodedc} -\definecommand aa {\xfiveencodeda} -\definecommand AA {\xfiveencodedaa} - \stopencoding -\def\xfiveencodedb#1% - {\o@lign - {\relax - #1% - \crcr - \hidewidth - \sh@ft{29}% - \vbox to.2ex{\hbox{\char9}\vss}% - \hidewidth}} - -\def\xfiveencodedc#1% - {\leavevmode - \setbox\z@\hbox{#1}% - \ifdim\ht\z@ = 1ex - \accent11 #1 - \else - {\ooalign{\hidewidth\char11\hidewidth\crcr\unhbox\z@}}% - \fi} - -\def\xfiveencodedaa% - {\accent23a} - -\def\xfiveencodedAA% - {\leavevmode - \setbox\z@\hbox{h}% - \dimen@\ht\z@ - \advance\dimen@ -1ex - \rlap{\raise.67\dimen@\hbox{\char23}}A} - \endinput +% \startencoding [x5] +% +% \definecharacter aa {\xfiveencodedaa} +% \definecharacter AA {\xfiveencodedAA} +% +% \stopencoding +% +% \def\xfiveencodedaa% +% {\accent23a} +% +% \def\xfiveencodedAA% +% {\leavevmode +% \setbox\z@\hbox{h}% +% \dimen@\ht\z@ +% \advance\dimen@ -1ex +% \rlap{\raise.67\dimen@\hbox{\char23}}A} + % \quotesinglbase 13 % \guilsinglleft 14 % \guilsinglright 15 diff --git a/tex/context/base/font-ans.tex b/tex/context/base/font-ans.tex deleted file mode 100644 index 124cf49e6..000000000 --- a/tex/context/base/font-ans.tex +++ /dev/null @@ -1 +0,0 @@ -\writestatus{ENCODING}{texnansi encoding is preloaded}\wait\endinput diff --git a/tex/context/base/font-ber.tex b/tex/context/base/font-ber.tex index 3ad42a96e..cc429dd00 100644 --- a/tex/context/base/font-ber.tex +++ b/tex/context/base/font-ber.tex @@ -57,5 +57,36 @@ \definefontsynonym [Utopia] [put] \definefontsynonym [ZapfChancery] [pzc] \definefontsynonym [ZapfDingbats] [pzd] - + +\definefontsynonym [LucidaBright] [hlhr8t] [encoding=ec] +\definefontsynonym [LucidaBright-Demi] [hlhb8t] [encoding=ec] +\definefontsynonym [LucidaBright-Italic] [hlhri8t] [encoding=ec] +\definefontsynonym [LucidaBright-Oblique] [hlhro8t] [encoding=ec] +\definefontsynonym [LucidaBright-DemiItalic] [hlhbi8t] [encoding=ec] +\definefontsynonym [LucidaBrightSmallcaps] [hlhrc8t] [encoding=ec] + +\definefontsynonym [LucidaSans] [hlsr8t] [encoding=ec] +\definefontsynonym [LucidaSans-Demi] [hlsb8t] [encoding=ec] +\definefontsynonym [LucidaSans-Italic] [hlsri8t] [encoding=ec] +\definefontsynonym [LucidaSans-DemiItalic] [hlsbi8t] [encoding=ec] +\definefontsynonym [LucidaSans-Typewriter] [hlsrt8t] [encoding=ec] +\definefontsynonym [LucidaSans-TypewriterBold] [hlsbt8t] [encoding=ec] +\definefontsynonym [LucidaSans-TypewriterOblique] [hlsrot8t] [encoding=ec] +\definefontsynonym [LucidaSans-TypewriterBoldOblique] [hlsbot8t] [encoding=ec] + +\definefontsynonym [LucidaHandwriting-Italic] [hlcriw8t] [encoding=ec] +\definefontsynonym [LucidaCalligraphy-Italic] [hlcrie8t] [encoding=ec] + +\definefontsynonym [LucidaNewMath-AltDemiItalic] [hlcdima] +\definefontsynonym [LucidaNewMath-AltItalic] [hlcrima] +\definefontsynonym [LucidaNewMath-Arrows] [hlcra] +\definefontsynonym [LucidaNewMath-Arrows-Demi] [hlcda] +\definefontsynonym [LucidaNewMath-Extension] [hlcrv] +\definefontsynonym [LucidaNewMath-Roman] [hlcrm] +\definefontsynonym [LucidaNewMath-Demibold] [hlcdm] +\definefontsynonym [LucidaNewMath-DemiItalic] [hlcdim] +\definefontsynonym [LucidaNewMath-Italic] [hlcrim] +\definefontsynonym [LucidaNewMath-Symbol] [hlcry] +\definefontsynonym [LucidaNewMath-Symbol-Demi] [hlcdy] + \endinput diff --git a/tex/context/base/font-chi.tex b/tex/context/base/font-chi.tex index b8e332927..676f5a053 100644 --- a/tex/context/base/font-chi.tex +++ b/tex/context/base/font-chi.tex @@ -93,7 +93,9 @@ %D \stoptypen %D %D We insert a bit of stretch and introduce a signal to -%D keep track of previous characters. +%D keep track of previous characters. We use a similar +%D method in the units module, which may be a nice +%D introduction to using signals. %D \macros %D {chineseunicodescale, chineseinterglyphskip, @@ -108,8 +110,8 @@ \def\chineseinterglyphskip{0pt plus .05em minus .01em} \def\chinesesurroundskip {.25em plus .15em minus .05em} -%D We define a few signals. (Another examples of using -%D such signals can be found in the module \type {m-units}.) +%D We define a few signals. As said, another example of +%D using signals can be found in the module \type {m-units}. \newsignal\chineseLsignal % left boundary character \newsignal\chineseRsignal % right boundary character @@ -943,73 +945,73 @@ %D In addition to these fonts, we (pre|)|define some commonly %D used fonts: -\definefontsynonym [SimSongTiRegular] [gbsong] [encoding=gbk] -\definefontsynonym [SimSongTiSlanted] [gbsongsl] [encoding=gbk] -\definefontsynonym [SimSongTiBold] [gbsong] [encoding=gbk] -\definefontsynonym [SimSongTiBoldSlanted] [gbsongsl] [encoding=gbk] - -\definefontsynonym [TraSongTiRegular] [b5song] [encoding=big5] -\definefontsynonym [TraSongTiSlanted] [b5songsl] [encoding=big5] -\definefontsynonym [TraSongTiBold] [b5song] [encoding=big5] -\definefontsynonym [TraSongTiBoldSlanted] [b5songsl] [encoding=big5] - -\definefontsynonym [SimHeiTiRegular] [gbhei] [encoding=gbk] -\definefontsynonym [SimHeiTiSlanted] [gbheisl] [encoding=gbk] -\definefontsynonym [SimHeiTiBold] [gbhei] [encoding=gbk] -\definefontsynonym [SimHeiTiBoldSlanted] [gbheisl] [encoding=gbk] - -\definefontsynonym [TraHeiTiRegular] [b5hei] [encoding=big5] -\definefontsynonym [TraHeiTiSlanted] [b5heisl] [encoding=big5] -\definefontsynonym [TraHeiTiBold] [b5hei] [encoding=big5] -\definefontsynonym [TraHeiTiBoldSlanted] [b5heisl] [encoding=big5] - -\definefontsynonym [SimKaiTiRegular] [gbkai] [encoding=gbk] -\definefontsynonym [SimKaiTiSlanted] [gbkaisl] [encoding=gbk] -\definefontsynonym [SimKaiTiBold] [gbkai] [encoding=gbk] -\definefontsynonym [SimKaiTiBoldSlanted] [gbkaisl] [encoding=gbk] - -\definefontsynonym [TraKaiTiRegular] [b5kai] [encoding=big5] -\definefontsynonym [TraKaiTiSlanted] [b5kaisl] [encoding=big5] -\definefontsynonym [TraKaiTiBold] [b5kai] [encoding=big5] -\definefontsynonym [TraKaiTiBoldSlanted] [b5kaisl] [encoding=big5] - -\definefontsynonym [SimFangSongRegular] [gbfs] [encoding=gbk] -\definefontsynonym [SimFangSongSlanted] [gbfssl] [encoding=gbk] -\definefontsynonym [SimFangSongBold] [gbfs] [encoding=gbk] -\definefontsynonym [SimFangSongBoldSlanted] [gbfssl] [encoding=gbk] - -\definefontsynonym [TraFangSongRegular] [b5fs] [encoding=big5] -\definefontsynonym [TraFangSongSlanted] [b5fssl] [encoding=big5] -\definefontsynonym [TraFangSongBold] [b5fs] [encoding=big5] -\definefontsynonym [TraFangSongBoldSlanted] [b5fssl] [encoding=big5] - -\definefontsynonym [SimLiShuRegular] [gbfs] [encoding=gbk] -\definefontsynonym [SimLiShuSlanted] [gbfssl] [encoding=gbk] -\definefontsynonym [SimLiShuBold] [gbfs] [encoding=gbk] -\definefontsynonym [SimLiShuBoldSlanted] [gbfssl] [encoding=gbk] - -\definefontsynonym [TraLiShuRegular] [b5fs] [encoding=big5] -\definefontsynonym [TraLiShuSlanted] [b5fssl] [encoding=big5] -\definefontsynonym [TraLiShuBold] [b5fs] [encoding=big5] -\definefontsynonym [TraLiShuBoldSlanted] [b5fssl] [encoding=big5] +\definefontsynonym [SimplifiedChineseSongTiRegular] [gbsong] [encoding=gbk] +\definefontsynonym [SimplifiedChineseSongTiSlanted] [gbsongsl] [encoding=gbk] +\definefontsynonym [SimplifiedChineseSongTiBold] [gbsong] [encoding=gbk] +\definefontsynonym [SimplifiedChineseSongTiBoldSlanted][gbsongsl] [encoding=gbk] + +\definefontsynonym [TraditionalChineseSongTiRegular] [b5song] [encoding=big5] +\definefontsynonym [TraditionalChineseSongTiSlanted] [b5songsl] [encoding=big5] +\definefontsynonym [TraditionalChineseSongTiBold] [b5song] [encoding=big5] +\definefontsynonym [TraditionalChineseSongTiBoldSlanted][b5songsl] [encoding=big5] + +\definefontsynonym [SimplifiedChineseHeiTiRegular] [gbhei] [encoding=gbk] +\definefontsynonym [SimplifiedChineseHeiTiSlanted] [gbheisl] [encoding=gbk] +\definefontsynonym [SimplifiedChineseHeiTiBold] [gbhei] [encoding=gbk] +\definefontsynonym [SimplifiedChineseHeiTiBoldSlanted] [gbheisl] [encoding=gbk] + +\definefontsynonym [TraditionalChineseHeiTiRegular] [b5hei] [encoding=big5] +\definefontsynonym [TraditionalChineseHeiTiSlanted] [b5heisl] [encoding=big5] +\definefontsynonym [TraditionalChineseHeiTiBold] [b5hei] [encoding=big5] +\definefontsynonym [TraditionalChineseHeiTiBoldSlanted][b5heisl] [encoding=big5] + +\definefontsynonym [SimplifiedChineseKaiTiRegular] [gbkai] [encoding=gbk] +\definefontsynonym [SimplifiedChineseKaiTiSlanted] [gbkaisl] [encoding=gbk] +\definefontsynonym [SimplifiedChineseKaiTiBold] [gbkai] [encoding=gbk] +\definefontsynonym [SimplifiedChineseKaiTiBoldSlanted] [gbkaisl] [encoding=gbk] + +\definefontsynonym [TraditionalChineseKaiTiRegular] [b5kai] [encoding=big5] +\definefontsynonym [TraditionalChineseKaiTiSlanted] [b5kaisl] [encoding=big5] +\definefontsynonym [TraditionalChineseKaiTiBold] [b5kai] [encoding=big5] +\definefontsynonym [TraditionalChineseKaiTiBoldSlanted][b5kaisl] [encoding=big5] + +\definefontsynonym [SimplifiedChineseFangSongRegular] [gbfs] [encoding=gbk] +\definefontsynonym [SimplifiedChineseFangSongSlanted] [gbfssl] [encoding=gbk] +\definefontsynonym [SimplifiedChineseFangSongBold] [gbfs] [encoding=gbk] +\definefontsynonym [SimplifiedChineseFangSongBoldSlanted][gbfssl] [encoding=gbk] + +\definefontsynonym [TraditionalChineseFangSongRegular] [b5fs] [encoding=big5] +\definefontsynonym [TraditionalChineseFangSongSlanted] [b5fssl] [encoding=big5] +\definefontsynonym [TraditionalChineseFangSongBold] [b5fs] [encoding=big5] +\definefontsynonym [TraditionalChineseFangSongBoldSlanted][b5fssl] [encoding=big5] + +\definefontsynonym [SimplifiedChineseLiShuRegular] [gbli] [encoding=gbk] +\definefontsynonym [SimplifiedChineseLiShuSlanted] [gblisl] [encoding=gbk] +\definefontsynonym [SimplifiedChineseLiShuBold] [gbli] [encoding=gbk] +\definefontsynonym [SimplifiedChineseLiShuBoldSlanted] [gblisl] [encoding=gbk] + +\definefontsynonym [TraditionalChineseLiShuRegular] [b5li] [encoding=big5] +\definefontsynonym [TraditionalChineseLiShuSlanted] [b5lisl] [encoding=big5] +\definefontsynonym [TraditionalChineseLiShuBold] [b5li] [encoding=big5] +\definefontsynonym [TraditionalChineseLiShuBoldSlanted] [b5lisl] [encoding=big5] %D The following definitions provide us the commands to switch %D to these fonts. -\defineunicodefont [SimSongTi] [SimplifiedChinese] [chinese] -\defineunicodefont [TraSongTi] [TraditionalChinese] [chinese] +\defineunicodefont [SimSongTi] [SimplifiedChineseSongTi] [chinese] +\defineunicodefont [TraSongTi] [TraditionalChineseSongTi] [chinese] -\defineunicodefont [SimHeiTi] [SimplifiedChinese] [chinese] -\defineunicodefont [TraHeiTi] [TraditionalChinese] [chinese] +\defineunicodefont [SimHeiTi] [SimplifiedChineseHeiTi] [chinese] +\defineunicodefont [TraHeiTi] [TraditionalChineseHeiTi] [chinese] -\defineunicodefont [SimKaiTi] [SimplifiedChinese] [chinese] -\defineunicodefont [TraKaiTi] [TraditionalChinese] [chinese] +\defineunicodefont [SimKaiTi] [SimplifiedChineseKaiTi] [chinese] +\defineunicodefont [TraKaiTi] [TraditionalChineseKaiTi] [chinese] -\defineunicodefont [SimFangSong] [SimplifiedChinese] [chinese] -\defineunicodefont [TraFangSong] [TraditionalChinese] [chinese] +\defineunicodefont [SimFangSong] [SimplifiedChineseFangSong] [chinese] +\defineunicodefont [TraFangSong] [TraditionalChineseFangSong] [chinese] -\defineunicodefont [SimLiShu] [SimplifiedChinese] [chinese] -\defineunicodefont [TraLiShu] [TraditionalChinese] [chinese] +\defineunicodefont [SimLiShu] [SimplifiedChineseLiShu] [chinese] +\defineunicodefont [TraLiShu] [TraditionalChineseLiShu] [chinese] % \definealternativestyle [ChineseTitleFont] [\bfd\SimKaiTi] [] diff --git a/tex/context/base/font-cmr.tex b/tex/context/base/font-cmr.tex index eccc2c1cb..11e28b258 100644 --- a/tex/context/base/font-cmr.tex +++ b/tex/context/base/font-cmr.tex @@ -594,4 +594,20 @@ mi=cmmi12 sa 1, sy=cmsy10 sa 1] +% hack to prevent mapping of filenames, watch the space! + +\definebodyfont [12pt] [mm] [mr= cmr12] +\definebodyfont [11pt] [mm] [mr= cmr10 at 11pt] +\definebodyfont [10pt] [mm] [mr= cmr10] +\definebodyfont [9pt] [mm] [mr= cmr9] +\definebodyfont [8pt] [mm] [mr= cmr8] +\definebodyfont [7pt] [mm] [mr= cmr7] +\definebodyfont [6pt] [mm] [mr= cmr6] +\definebodyfont [5pt] [mm] [mr= cmr5] +\definebodyfont [4pt] [mm] [mr= cmr5] + +\definebodyfont [14.4pt] [mm] [mr= cmr12 at 14.4pt] +\definebodyfont [17.3pt] [mm] [mr= cmr12 at 17.3pt] +\definebodyfont [20.7pt] [mm] [mr= cmr12 at 20.7pt] + \endinput diff --git a/tex/context/base/font-fil.tex b/tex/context/base/font-fil.tex index 7c0b656e6..84411624d 100644 --- a/tex/context/base/font-fil.tex +++ b/tex/context/base/font-fil.tex @@ -11,54 +11,54 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\definefontsynonym [ComputerModern] [cmr10] -\definefontsynonym [ComputerModern-Bold] [cmbx10] -\definefontsynonym [ComputerModern-Italic] [cmti10] -\definefontsynonym [ComputerModern-Slanted] [cmsl10] -\definefontsynonym [ComputerModern-BoldItalic] [cmbxti10] -\definefontsynonym [ComputerModern-BoldSlanted] [cmbxsl10] -\definefontsynonym [ComputerModern-Caps] [cmr10] +\definefontsynonym [ComputerModern] [cmr10] +\definefontsynonym [ComputerModern-Bold] [cmbx10] +\definefontsynonym [ComputerModern-Italic] [cmti10] +\definefontsynonym [ComputerModern-Slanted] [cmsl10] +\definefontsynonym [ComputerModern-BoldItalic] [cmbxti10] +\definefontsynonym [ComputerModern-BoldSlanted] [cmbxsl10] +\definefontsynonym [ComputerModern-Caps] [cmr10] -\definefontsynonym [ComputerModernSans] [cmss10] -\definefontsynonym [ComputerModernSans-Bold] [cmssbx10] -\definefontsynonym [ComputerModernSans-Italic] [cmssi10] -\definefontsynonym [ComputerModernSans-Slanted] [cmssi10] -\definefontsynonym [ComputerModernSans-BoldItalic] [cmssbx10] -\definefontsynonym [ComputerModernSans-BoldSlanted] [cmssbx10] -\definefontsynonym [ComputerModernSans-Caps] [cmss10] +\definefontsynonym [ComputerModernSans] [cmss10] +\definefontsynonym [ComputerModernSans-Bold] [cmssbx10] +\definefontsynonym [ComputerModernSans-Italic] [cmssi10] +\definefontsynonym [ComputerModernSans-Slanted] [cmssi10] +\definefontsynonym [ComputerModernSans-BoldItalic] [cmssbx10] +\definefontsynonym [ComputerModernSans-BoldSlanted] [cmssbx10] +\definefontsynonym [ComputerModernSans-Caps] [cmss10] -\definefontsynonym [ComputerModernMono] [cmtt10] -\definefontsynonym [ComputerModernMono-Bold] [cmtt10] -\definefontsynonym [ComputerModernMono-Italic] [cmitt10] -\definefontsynonym [ComputerModernMono-Slanted] [cmsltt10] -\definefontsynonym [ComputerModernMono-BoldItalic] [cmtt10] -\definefontsynonym [ComputerModernMono-BoldSlanted] [cmtt10] -\definefontsynonym [ComputerModernMono-Caps] [cmtt10] +\definefontsynonym [ComputerModernMono] [cmtt10] +\definefontsynonym [ComputerModernMono-Bold] [cmtt10] +\definefontsynonym [ComputerModernMono-Italic] [cmitt10] +\definefontsynonym [ComputerModernMono-Slanted] [cmsltt10] +\definefontsynonym [ComputerModernMono-BoldItalic] [cmtt10] +\definefontsynonym [ComputerModernMono-BoldSlanted] [cmtt10] +\definefontsynonym [ComputerModernMono-Caps] [cmtt10] -\definefontsynonym [ComputerModernMath-Roman] [cmr10] -\definefontsynonym [ComputerModernMath-Extension] [cmex10] -\definefontsynonym [ComputerModernMath-Italic] [cmmi10] -\definefontsynonym [ComputerModernMath-Symbol] [cmsy10] +\definefontsynonym [ComputerModernMath-Roman] [cmr10] +\definefontsynonym [ComputerModernMath-Extension] [cmex10] +\definefontsynonym [ComputerModernMath-Italic] [cmmi10] +\definefontsynonym [ComputerModernMath-Symbol] [cmsy10] -\definefontsynonym [Courier] [com] [encoding=texnansi] -\definefontsynonym [Courier-Oblique] [coo] [encoding=texnansi] -\definefontsynonym [Courier-Bold] [cob] [encoding=texnansi] -\definefontsynonym [Courier-BoldOblique] [cobo] [encoding=texnansi] +\definefontsynonym [Courier] [com] [encoding=texnansi] +\definefontsynonym [Courier-Oblique] [coo] [encoding=texnansi] +\definefontsynonym [Courier-Bold] [cob] [encoding=texnansi] +\definefontsynonym [Courier-BoldOblique] [cobo] [encoding=texnansi] -\definefontsynonym [Helvetica] [hv] [encoding=texnansi] -\definefontsynonym [Helvetica-Oblique] [hvo] [encoding=texnansi] -\definefontsynonym [Helvetica-Bold] [hvb] [encoding=texnansi] -\definefontsynonym [Helvetica-BoldOblique] [hvbo] [encoding=texnansi] +\definefontsynonym [Helvetica] [hv] [encoding=texnansi] +\definefontsynonym [Helvetica-Oblique] [hvo] [encoding=texnansi] +\definefontsynonym [Helvetica-Bold] [hvb] [encoding=texnansi] +\definefontsynonym [Helvetica-BoldOblique] [hvbo] [encoding=texnansi] -\definefontsynonym [Times-Roman] [tir] [encoding=texnansi] -\definefontsynonym [Times-Italic] [tii] [encoding=texnansi] -\definefontsynonym [Times-Bold] [tib] [encoding=texnansi] -\definefontsynonym [Times-BoldItalic] [tibi] [encoding=texnansi] +\definefontsynonym [Times-Roman] [tir] [encoding=texnansi] +\definefontsynonym [Times-Italic] [tii] [encoding=texnansi] +\definefontsynonym [Times-Bold] [tib] [encoding=texnansi] +\definefontsynonym [Times-BoldItalic] [tibi] [encoding=texnansi] -\definefontsynonym [Times-MathRoman] [tir] [encoding=texnansi] -\definefontsynonym [Times-MathExtension] [mtex] -\definefontsynonym [Times-MathItalic] [mtmi] -\definefontsynonym [Times-MathSymbol] [mtsy] +\definefontsynonym [Times-MathRoman] [tir] [encoding=texnansi] +\definefontsynonym [Times-MathExtension] [mtex] +\definefontsynonym [Times-MathItalic] [mtmi] +\definefontsynonym [Times-MathSymbol] [mtsy] \definefontsynonym [LucidaBlackletter] [lbl] [encoding=texnansi] \definefontsynonym [LucidaBright] [lbr] [encoding=texnansi] @@ -101,13 +101,21 @@ \definefontsynonym [LucidaNewMath-Italic] [lbmi] [encoding=texnansi] \definefontsynonym [LucidaNewMath-Symbol] [lbms] [encoding=texnansi] \definefontsynonym [LucidaNewMath-Symbol-Demi] [lbmsd] [encoding=texnansi] - -\definefontsynonym [AntykwaTorunska-Bold] [anttb] [encoding=texnansi] -\definefontsynonym [AntykwaTorunska-Regular] [anttr] [encoding=texnansi] -\definefontsynonym [AntykwaTorunska-Italic] [anttri] [encoding=texnansi] -\definefontsynonym [ContextNavigation] [contnav] +\definefontsynonym [Informal-Regular] [ifrm10cm] +\definefontsynonym [Informal-Bold] [ifrb10cm] +\definefontsynonym [Informal-Oblique] [ifro10cm] +\definefontsynonym [Informal-BoldOblique] [ifbo10cm] -\definefontsynonym [RalfSmithFormalScript] [rsfs10] +\definefontsynonym [Informal-MathExtendedSymbols] [ifex10] +\definefontsynonym [Informal-MathItalics] [ifmi10] +\definefontsynonym [Informal-MathSymbols] [ifsy10] + +\definefontsynonym [AntykwaTorunska-Bold] [anttb] [encoding=texnansi] +\definefontsynonym [AntykwaTorunska-Regular] [anttr] [encoding=texnansi] +\definefontsynonym [AntykwaTorunska-Italic] [anttri] [encoding=texnansi] + +\definefontsynonym [ContextNavigation] [contnav] +\definefontsynonym [RalfSmithFormalScript] [rsfs10] \endinput diff --git a/tex/context/base/font-ibm.tex b/tex/context/base/font-ibm.tex deleted file mode 100644 index 90174be2c..000000000 --- a/tex/context/base/font-ibm.tex +++ /dev/null @@ -1,2 +0,0 @@ -\writestatus{ENCODING}{please use \string\useencoding[ibm] instead}\wait -\input enco-ibm.tex \endinput diff --git a/tex/context/base/font-il2.tex b/tex/context/base/font-il2.tex deleted file mode 100644 index 484504e7c..000000000 --- a/tex/context/base/font-il2.tex +++ /dev/null @@ -1 +0,0 @@ -\writestatus{ENCODING}{iso il2 encoding is preloaded}\wait\endinput diff --git a/tex/context/base/font-ini.tex b/tex/context/base/font-ini.tex index e00701367..2347ddcd3 100644 --- a/tex/context/base/font-ini.tex +++ b/tex/context/base/font-ini.tex @@ -25,7 +25,7 @@ 6: -- wordt geladen 7: onbekend formaat -- 8: stijl -- gedefinieerd - 9: mapping -- is geladen +% 9: mapping -- is geladen 10: onbekende font file -- \stopmessages @@ -39,7 +39,7 @@ 6: -- is loaded 7: unknown format -- 8: style -- defined - 9: mapping -- is loaded +% 9: mapping -- is loaded 10: unknown font file -- \stopmessages @@ -53,7 +53,7 @@ 6: -- ist geladen 7: unbekanntes Format -- 8: Stil -- definiert - 9: Map -- ist geladen +% 9: Map -- ist geladen 10: unbekanntes Font -- \stopmessages @@ -67,7 +67,7 @@ 6: -- je nacten 7: neznamy format -- 8: styl -- definovan - 9: mapovani -- je nacteno +% 9: mapovani -- je nacteno 10: neznamy font -- \stopmessages @@ -81,7 +81,7 @@ 6: -- caricato 7: formato sconosciuto -- 8: stile -- definito - 9: mappatura -- caricata +% 9: mappatura -- caricata 10: file di font sconosciuto -- \stopmessages @@ -95,10 +95,24 @@ 6: -- er lest inn 7: ukjent format -- 8: stil -- definert - 9: avbildning -- er lest inn +% 9: avbildning -- er lest inn 10: ukjent fontfil -- \stopmessages +\startmessages romanian library: fonts + title: corp de litere + 1: codificarea -- + 2: varianta -- este incarcata + 3: varianta necunoscuta -- + 4: corpul de litere -- nu este definit + 5: stilul -- nu este definit + 6: -- este incarcat + 7: format necunoscut -- + 8: stilul -- definit +% 9: maparea -- este incarcat + 10: fisier font necunoscut -- +\stopmessages + %D This module is one of the oldest modules of \CONTEXT. The %D macros below evolved out of the \PLAIN\ \TEX\ macros and %D therefore use a similar naming scheme (\type{\rm}, @@ -606,10 +620,6 @@ %D specification of math symbols however we need hexadecimal %D numbers, so we have to convert the \type{\fam}'s value. -\def\hexnumber#1% - {\ifcase#1 0\or 1\or 2\or 3\or 4\or 5\or 6\or 7\or - 8\or 9\or A\or B\or C\or D\or E\or F\else 0\fi} - \edef\hexmrfam {\hexnumber\mrfam} \edef\hexbsfam {\hexnumber\bsfam} \edef\hexmifam {\hexnumber\mifam} \edef\hexbifam {\hexnumber\bifam} \edef\hexsyfam {\hexnumber\syfam} \edef\hexscfam {\hexnumber\scfam} @@ -619,38 +629,6 @@ \edef\hexbffam {\hexnumber\bffam} \edef\hexmcfam {\hexnumber\mcfam} \edef\hexnnfam {\hexnumber\nnfam} \edef\hexmdfam {\hexnumber\mdfam} -%D \macros -%D {lchexnumber,uchexnumber,lchexnumbers} -%D -%D In addition to the uppercase hex conversion, we -%D occasionally need a lowercase one, for instance when we -%D want to compose gbsong fontnames. - -\def\lchexnumber#1% - {\ifcase#1 0\or 1\or 2\or 3\or 4\or 5\or 6\or 7\or - 8\or 9\or a\or b\or c\or d\or e\or f\else 0\fi} - -\let\uchexnumber=\hexnumber - -\def\lchexnumbers#1% - {\ifcase#1 - 00\or 01\or 02\or 03\or 04\or 05\or 06\or 07\or 08\or 09\or 0a\or 0b\or 0c\or 0d\or 0e\or 0f\or - 10\or 11\or 12\or 13\or 14\or 15\or 16\or 17\or 18\or 19\or 1a\or 1b\or 1c\or 1d\or 1e\or 1f\or - 20\or 21\or 22\or 23\or 24\or 25\or 26\or 27\or 28\or 29\or 2a\or 2b\or 2c\or 2d\or 2e\or 2f\or - 30\or 31\or 32\or 33\or 34\or 35\or 36\or 37\or 38\or 39\or 3a\or 3b\or 3c\or 3d\or 3e\or 3f\or - 40\or 41\or 42\or 43\or 44\or 45\or 46\or 47\or 48\or 49\or 4a\or 4b\or 4c\or 4d\or 4e\or 4f\or - 50\or 51\or 52\or 53\or 54\or 55\or 56\or 57\or 58\or 59\or 5a\or 5b\or 5c\or 5d\or 5e\or 5f\or - 60\or 61\or 62\or 63\or 64\or 65\or 66\or 67\or 68\or 69\or 6a\or 6b\or 6c\or 6d\or 6e\or 6f\or - 70\or 71\or 72\or 73\or 74\or 75\or 76\or 77\or 78\or 79\or 7a\or 7b\or 7c\or 7d\or 7e\or 7f\or - 80\or 81\or 82\or 83\or 84\or 85\or 86\or 87\or 88\or 89\or 8a\or 8b\or 8c\or 8d\or 8e\or 8f\or - 90\or 91\or 92\or 93\or 94\or 95\or 96\or 97\or 98\or 99\or 9a\or 9b\or 9c\or 9d\or 9e\or 9f\or - a0\or a1\or a2\or a3\or a4\or a5\or a6\or a7\or a8\or a9\or aa\or ab\or ac\or ad\or ae\or af\or - b0\or b1\or b2\or b3\or b4\or b5\or b6\or b7\or b8\or b9\or ba\or bb\or bc\or bd\or be\or bf\or - c0\or c1\or c2\or c3\or c4\or c5\or c6\or c7\or c8\or c9\or ca\or cb\or cc\or cd\or ce\or cf\or - d0\or d1\or d2\or d3\or d4\or d5\or d6\or d7\or d8\or d9\or da\or db\or dc\or dd\or de\or df\or - e0\or e1\or e2\or e3\or e4\or e5\or e6\or e7\or e8\or e9\or ea\or eb\or ec\or ed\or ee\or ef\or - f0\or f1\or f2\or f3\or f4\or f5\or f6\or f7\or f8\or f9\or fa\or fb\or fc\or fd\or fe\or ff\fi} - %D \macros %D {uchar} %D @@ -670,10 +648,10 @@ \def\@noletter@ {@f@no@} % second alternative typeface %D We also define a list of all text (i.e.\ non math symbol) -%D families. I considered using something like: By assigning -%D \type{\dowithfamily} some suitable meaning one can process -%D such lists quite fast. The current implementation uses the -%D commalist processing macros and is not that slow either. +%D families. By assigning \type{\dowithfamily} some suitable +%D meaning one can process such lists quite fast. The current +%D implementation uses the commalist processing macros and is +%D not that slow either. \def\familylist% {\c!tf,\c!sl,\c!it,\c!bf,\c!bs,\c!bi,\c!sc} @@ -879,7 +857,8 @@ \fi \fi \edef\lastfontname{\fontfile\somefontspec}% not really needed - \expandafter\font\csname#1\endcsname\lastfontname + \expandafter\font\csname#1\endcsname\lastfontname\relax + \the\everyfont % new % the second \font definition prevents fuzzy font refs % \expandafter\font\csname\dummyfontname\endcsname\lastfontname % but somehow they changed tex so that it does not matter any more @@ -889,6 +868,14 @@ \edef\nullfontname {\fontname\nullfont} \edef\dummyfontname {font\strippedcsname\\} +%D \macros +%D {everyfont,everyfontswitch} +%D +%D For special purposes, we provide a hook. + +\newevery \everyfont \relax +\newevery \everyfontswitch \relax + % safer but sometimes introducing newlines in the log % % \batchmode @@ -1033,7 +1020,10 @@ % {\parsefontspec[#2]{\bodyfontsize}{#1}\getvalue{#1}} \def\dododefinefont#1#2% - {\parsefontspec[#2]{\bodyfontsize}{*#1*}\getvalue{*#1*}} + {\parsefontspec[#2]{\bodyfontsize}{*#1*}% + \getvalue{*#1*}% + \setfontcharacteristics % new + \the\everyfontswitch} %D I considered checking for mistakenly use of \PLAIN's %D \type{\magstep}'s but although it would take only a few @@ -1099,7 +1089,8 @@ \else \csname\??ft#1#2\s!hyphenchar\endcsname \fi\relax - \csname#1#2#3\endcsname} + \csname#1#2#3\endcsname + \the\everyfontswitch} \endTEX @@ -1114,7 +1105,8 @@ \else #4% \fi\relax - \csname#1#2#3\endcsname} + \csname#1#2#3\endcsname + \the\everyfontswitch} \endETEX @@ -1226,9 +1218,9 @@ %D A typical use of this command is in commands that switch %D to another font bypassing the font mechanism: %D -%D \starttyping +%D \starttypen %D \font\myfont=\truefontname{MyFont} at \currentfontscale\bodyfontsize -%D \stoptyping +%D \stoptypen %D Now we enter the area of font switching. The switching %D mechanism has to take care of several situations, like: @@ -1347,6 +1339,14 @@ \getparameters[\??ft#1][#2]% \@@endfontdef} +%D The interlinespace is communicated with the following macros: + +\def\bodyfontinterlinespecs% + {\??ft\normalizedbodyfontsize\c!interlinie} + +\def\bodyfontinterlinespace% + {\csname\bodyfontinterlinespecs\endcsname} + %D We default all parameters to the main bodyfont size (begin %D \type{#1}), so the next setup is valid too: %D @@ -1463,45 +1463,95 @@ %D definitions like \type{\tfw} or \type{\bfq} for real large %D alternatives. +% \def\dodododefinebodyfont[#1][#2][#3]% er kan wat naar buiten +% {\doifelse{#1}{\s!default} +% {\setvalue{\s!default#2}##1{\definebodyfont[##1][#2][#3]}} +% {\geteparameters[\??ft#1#2][#3]% We expand them! +% \dodefinebodyfontenvironment[#1][]% Just to be sure. +% \def\doiffamily##1##2##3\\% adapted +% {\doifinstringelse{##1##2}\familylist +% {} +% {\addtocommalist{##1##2}\familylist +% %\settextfonts +% \unexpanded\setvalue{##1##2}% +% {\getvalue{#2}\getvalue{##1##2}}% +% \unexpanded\setvalue{##1##2\c!x}% +% {\getvalue{##1##2}\getvalue{##1##2\c!x}}% +% \unexpanded\setvalue{##1##2\c!xx}% +% {\getvalue{##1##2}\getvalue{##1##2\c!xx}}}% +% \doifsomething{##3} +% {\unexpanded\setvalue{#2##3}% eg: \rma, \ssa +% {\switchtofontstyle{#2}{##3}}% +% \unexpanded\setvalue{##1##2##3}% eg: \tfa, \bfa +% {\switchtofontalternative{##1##2}{##3}}% +% \unexpanded\setvalue{#2##1##2##3}% eg: \rmtfa, \ssbfa +% {\switchtofontstylealternative{#2}{##1##2}{##3}}}}% +% \def\dododododefinebodyfont##1% +% {\doifnot{##1}{\s!hyphenchar} +% {\doifdefined{\??ft#1#2##1} +% {%\letvalue{@#1#2##1@}=\characterencoding +% \setevalue{@#1#2##1@}{\currentencoding}% strips @ +% \doifelse{#2}{\c!tt} +% {\unexpanded\setvalue{#1#2##1}{\doloadttfont{#1}{#2}{##1}}} +% {\unexpanded\setvalue{#1#2##1}{\doloadfont{#1}{#2}{##1}}}% +% \bgroup +% \let\relax=\empty +% %\debuggerinfo +% % {\m!fonts}{\getvalue{\??ft#1#2##1} defined as #1 #2 ##1}% +% \egroup}% +% \doifnot{#2}{\c!mm} % new! +% {\expandafter\doiffamily##1\\}}}% +% \processassignlist[#3]\dododododefinebodyfont}} + +% This saves 5K in the fmt file. + \def\dodododefinebodyfont[#1][#2][#3]% er kan wat naar buiten {\doifelse{#1}{\s!default} {\setvalue{\s!default#2}##1{\definebodyfont[##1][#2][#3]}} {\geteparameters[\??ft#1#2][#3]% We expand them! \dodefinebodyfontenvironment[#1][]% Just to be sure. - \def\doiffamily##1##2##3\\% adapted - {\doifinstringelse{##1##2}\familylist - {} - {\addtocommalist{##1##2}\familylist - %\settextfonts - \unexpanded\setvalue{##1##2}% - {\getvalue{#2}\getvalue{##1##2}}% - \unexpanded\setvalue{##1##2\c!x}% - {\getvalue{##1##2}\getvalue{##1##2\c!x}}% - \unexpanded\setvalue{##1##2\c!xx}% - {\getvalue{##1##2}\getvalue{##1##2\c!xx}}}% - \doifsomething{##3} - {\unexpanded\setvalue{#2##3}% eg: \rma, \ssa - {\switchtofontstyle{#2}{##3}}% - \unexpanded\setvalue{##1##2##3}% eg: \tfa, \bfa - {\switchtofontalternative{##1##2}{##3}}% - \unexpanded\setvalue{#2##1##2##3}% eg: \rmtfa, \ssbfa - {\switchtofontstylealternative{#2}{##1##2}{##3}}}}% - \def\dododododefinebodyfont##1% - {\doifnot{##1}{\s!hyphenchar} - {\doifdefined{\??ft#1#2##1} - {%\letvalue{@#1#2##1@}=\characterencoding - \setevalue{@#1#2##1@}{\currentencoding}% strips @ - \doifelse{#2}{\c!tt} - {\unexpanded\setvalue{#1#2##1}{\doloadttfont{#1}{#2}{##1}}} - {\unexpanded\setvalue{#1#2##1}{\doloadfont{#1}{#2}{##1}}}% - \bgroup - \let\relax=\empty - %\debuggerinfo - % {\m!fonts}{\getvalue{\??ft#1#2##1} defined as #1 #2 ##1}% - \egroup}% - \doifnot{#2}{\c!mm} % new! - {\expandafter\doiffamily##1\\}}}% - \processassignlist[#3]\dododododefinebodyfont}} + \processassignlist[#3]{\dododododefinebodyfont{#1}{#2}}}} + +\def\dododododefinebodyfont#1#2#3% + {\doifnot{#3}{\s!hyphenchar} + {\doifdefined{\??ft#1#2#3} + {\setevalue{@#1#2#3@}{\currentencoding}% strips @ + \doifelse{#2}{\c!tt} + {\unexpanded\setvalue{#1#2#3}{\doloadttfont{#1}{#2}{#3}}} + {\unexpanded\setvalue{#1#2#3}{\doloadfont{#1}{#2}{#3}}}% + \bgroup + \let\relax=\empty + %\debuggerinfo + % {\m!fonts}{\getvalue{\??ft#1#2#3} defined as #1 #2 #3}% + \egroup}% + \doifnot{#2}{\c!mm} % new! + {\expandafter\doiffamily#3\\#2\\}}} + +%D !! This one will change !! + +\def\doiffamily#1#2#3\\#4\\% adapted + {\doifinstringelse{#1#2}\familylist + {} + {\addtocommalist{#1#2}\familylist + % eg \bf + \unexpanded\setvalue{#1#2}% + {\getvalue{#4}\getvalue{#1#2}}% funny strange escape, the #4 + % eg \bfx + \unexpanded\setvalue{#1#2\c!x}% + {\getvalue{#1#2}\getvalue{#1#2\c!x}}% + % eg \bfxx + \unexpanded\setvalue{#1#2\c!xx}% + {\getvalue{#1#2}\getvalue{#1#2\c!xx}}}% + \doifsomething{#3} + {% eg: \rma, \ssa + \unexpanded\setvalue{#4#3}% + {\switchtofontstyle{#4}{#3}}% + % eg: \tfa, \bfa + \unexpanded\setvalue{#1#2#3}% + {\switchtofontalternative{#1#2}{#3}}% + % eg: \rmtfa, \ssbfa + \unexpanded\setvalue{#4#1#2#3}% + {\switchtofontstylealternative{#4}{#1#2}{#3}}}} %D Unknown families are added to the family list! For the %D moment we also set the direct calls here. Some day a better @@ -1692,36 +1742,33 @@ \def\resetfontdefinitionfile[#1]% {\letbeundefined{\c!file\f!fontprefix#1}} +\newif\ifloadfontdefinitionfileonce + \def\doreadfontdefinitionfile#1% {\doifundefined{\c!file\f!fontprefix#1}% - {\setvalue{\c!file\f!fontprefix#1}{}% - \makeshortfilename[\truefilename{\f!fontprefix#1}]% + {\ifloadfontdefinitionfileonce + \letvalue{\c!file\f!fontprefix#1}\empty + \fi \startreadingfile - \readsysfile{\shortfilename} + \readsysfile{\truefilename{\f!fontprefix#1}} {\showmessage{\m!fonts}{2}{#1}} - {\loadfontmappingfile{#1} - {\showmessage{\m!fonts}{9}{#1}} + {\makeshortfilename[\truefilename{\f!fontprefix#1}]% + \readsysfile{\shortfilename} + {\showmessage{\m!fonts}{2}{#1}} {\showmessage{\m!fonts}{3}{#1}}}% \stopreadingfile}} -%D Such files are only loaded once! This permits redundant -%D loading, but at the same time forced grouping when we want -%D continuously mix all kind of font, which of course is a kind -%D of typographically sin. The \type{"} is made inactive if +%D When \type {\loadfontdefinitionfiletrue}, such files are +%D only loaded once! This permits redundant loading, but at +%D the same time forced grouping when we want continuously mix +%D all kind of font, which of course is a kind of +%D typographically sin. The \type{"} is made inactive if %D needed to prevent problems with loading files that use this -%D character in numbers. +%D character in numbers. \def\doswitchpoints[#1]% {\expanded{\dodoswitchpoints{#1}}} -% \def\dodoswitchpoints#1% -% {\doifdefinedelse{\@size@#1} -% {\getvalue{\@size@#1}% -% \localbodyfontsize=#1\relax -% \normalizebodyfontsize\localbodyfontsize\to\normalizedbodyfontsize -% \the\everybodyfont} -% {\showmessage{\m!fonts}{4}{#1}}} - \def\dodoswitchpoints#1% {\doifundefined{\@size@#1} {\defineunknownfont{#1}}% @@ -1735,7 +1782,8 @@ \def\doswitchstyle[#1]% {\doifdefinedelse{\@style@#1} {\getvalue{\@style@#1}% - \edef\fontstyle{#1}} + \edef\fontstyle{#1}% + \the\everybodyfont} % cleaner, in setting size as well as style {\showmessage{\m!fonts}{5}{#1}}} %D \TEX\ loads font metric files like \type{cmr10.tfm} and @@ -2087,8 +2135,7 @@ {\getvalue{#2}\getvalue{\c!tf\c!xx}}% \def\docommando##1% {\setvalue{\@shortstyle@##1}{#2}% - \setvalue{\@style@##1}{\getvalue{#2}}% - }%\unexpanded\setvalue{#2}{\setfontstyle{##1}{#2}}}% + \setvalue{\@style@##1}{\getvalue{#2}}}% \processcommalist[#1]\docommando} \def\definefontstyle% @@ -2262,7 +2309,7 @@ %D When asking for a complete font switch, for instance from 10 %D to 12~points, the next macro does the job. First we -%D normalize the size, nect we define the current range of +%D normalize the size, next we define the current range of %D text, script and scriptscript sizes, then we set the text %D fonts and the math families and finally we activate the %D default typeface and also set the font specific parameters @@ -2278,8 +2325,7 @@ \edef\scriptscriptface{\getvalue{\??ft\normalizedbodyfontsize\s!scriptscript}}% \settextfonts \setmathfamilies - \rmtf - \the\everybodyfont} + \rmtf} % no \everybodyfont needed here, so removed %D \macros %D {setupbodyfont,switchtobodyfont} @@ -2318,7 +2364,7 @@ \globalbodyfontsize=\localbodyfontsize \normalizebodyfontsize\globalbodyfontsize\to\normalizedglobalbodyfontize \let\globalfontstyle=\fontstyle - \the\everybodyfont}} + \the\everybodyfont}} % indeed needed in case \dosetfont is not executed \unexpanded\def\switchtobodyfont[#1]% {\doifsomething{#1} @@ -2326,7 +2372,7 @@ {\doswitchpoints[\getvalue{\??ft\normalizedbodyfontsize\interfaced{#1}}]% \doswitchstyle[\fontstyle]} {\dosetfont[#1]}% - \the\everybodyfont}} + \the\everybodyfont}} % indeed needed in case nothing is executed %D Because the last macro can appear in arguments or be assigned %D to parameters, we protect this one for unwanted expansion. @@ -2362,7 +2408,12 @@ {\expandafter\fam\getvalue{\c!nn\s!fam}}% \getvalue{#1#2}% \ifcase\currentxfontsize\or\tx\or\txx\fi - \doifdefined{\purefontname\font\s!handling} % the file bound one + \setfontcharacteristics} + +%D The font specific features are bound to the filename. + +\def\setfontcharacteristics% + {\doifdefined{\purefontname\font\s!handling} % the file bound one {\enablehandling[\getvalue{\purefontname\font\s!handling}]}% \doifdefined{\purefontname\font\s!encoding} % the file bound one {\enablecoding[\getvalue{\purefontname\font\s!encoding}]}% @@ -2379,23 +2430,36 @@ \def\splitoffpurefontname#1 #2\\{#1} -%D Just an experiment: \type{..\sl..\switchstyleonly\tt..}. +%D \macros +%D {switchstyleonly} +%D +%D For switching a style but keeping the alternative, there +%D is: +%D +%D \starttypen +%D {\bf text \switchstyleonly\ss text} +%D {\bf text \switchstyleonly[ss]text} +%D {\sl text \switchstyleonly[sansserif]text} +%D \stoptypen + +% \def\switchstyleonly#1% original takes \ss and {ss} +% {\let\savedfontalternative=\fontalternative +% \chardef\savedescapechar=\escapechar +% \escapechar=-1 +% \getvalue{\string#1}% +% \escapechar=\savedescapechar +% \getvalue{\savedfontalternative}} + +\definecomplexorsimple\switchstyleonly % final version + +\def\simpleswitchstyleonly#1% + {\complexswitchstyleonly[\strippedcsname#1]} -\def\switchstyleonly#1% +\def\complexswitchstyleonly[#1]% {\let\savedfontalternative=\fontalternative - \chardef\savedescapechar=\escapechar - \escapechar=-1 - \getvalue{\string#1}% - \escapechar=\savedescapechar + \getvalue{\getvalue{\@shortstyle@#1}}% \getvalue{\savedfontalternative}} -% testen -% -%\def\switchstyleonly#1% -% {\let\savedfontalternative=\fontalternative -% \getvalue{\strippedcsname#1}% -% \getvalue{\savedfontalternative}} - %D \macros %D {os} %D @@ -2470,19 +2534,19 @@ {\doswitchpoints[\getvalue{\??ft\normalizedbodyfontsize\interfaced\v!klein}]% \doswitchstyle[\fontstyle]} -\def\setmainbodyfont% - {\doswitchpoints[\normalizedbodyfontsize]% +\def\setbigbodyfont% + {\doswitchpoints[\getvalue{\??ft\normalizedbodyfontsize\interfaced\v!groot}]% \doswitchstyle[\fontstyle]} -\def\setbigbodyfont% - {\doswitchpoints[\getvalue{\??ft\normalizedbodyfontsize\v!groot}]% +\def\setmainbodyfont% + {\doswitchpoints[\normalizedbodyfontsize]% \doswitchstyle[\fontstyle]} %D \macros %D {restoreglobalbodyfont} %D %D Users can set whatever font available while typesetting text. -%D Pagenumnbers, footers, headers etc. however must be typeset +%D Pagenumbers, footers, headers etc. however must be typeset %D in the main bodyfont and style of the document. Returning to %D the global state can be done with the next macro: @@ -2521,8 +2585,7 @@ %D here too we use a direct method. \def\infofont% - {\getvalue{\!!sixpoint\c!tt\c!tf}% - \the\everybodyfont} + {\getvalue{\!!sixpoint\c!tt\c!tf}\the\everybodyfont} %D \macros %D {definealternativestyle} @@ -2733,20 +2796,43 @@ \expandafter\emphasislook \fi} +% \def\emphasislook% +% {\begingroup +% \futurelet\next\emphasistest} +% +% \def\emphasistest% +% {\ifcat\noexpand\next,% +% \setbox\scratchbox=\hbox{\next}% +% \ifdim\ht\scratchbox<.3ex +% \let\doemphasiscorrection\endgroup +% \fi +% \fi +% \doemphasiscorrection} + \def\emphasislook% {\begingroup + \beginrobusttest \futurelet\next\emphasistest} \def\emphasistest% - {\ifcat\noexpand\next,% - \setbox\scratchbox=\hbox{\next}% - \ifdim\ht\scratchbox<.3ex - \let\doemphasiscorrection\endgroup - \fi - \fi - \doemphasiscorrection} + {\normalifcat\noexpand\next,% + \endrobusttest\expandafter\doemphasiscorrection + \normalelse + \endrobusttest\expandafter\dododoemphasiscorrection + \normalfi} \def\doemphasiscorrection% + {\futurelet\next\dodoemphasiscorrection} + +\def\dodoemphasiscorrection% + {\setbox\scratchbox=\hbox{\next}% + \ifdim\ht\scratchbox<.3ex + \expandafter\endgroup + \else + \expandafter\dododoemphasiscorrection + \fi} + +\def\dododoemphasiscorrection% {\scratchskip=\lastskip \ifdim\scratchskip=\!!zeropoint\relax \/\relax @@ -2756,11 +2842,12 @@ \endgroup} %D We end with some examples which show the behavior when -%D some punctuation is MET. We also show how the mechanism +%D some punctuation is met. We also show how the mechanism %D adapts itself to bold, italic and slanted typing. %D %D \startbuffer %D test {test}test \par +%D test {\sl test}test \par %D test {\em test}test \par %D test {\em test}--test \par %D @@ -2783,6 +2870,34 @@ %D \stopopelkaar %D \stopvoorbeeld +%D \macros +%D {emphbf,emphit,emphsl,emphtf} +%D +%D The next emphasis alternatives are for \THANH. They adapt +%D their style as good as possible. + +\def\emphbf% + {\groupedcommand{\bf\def\emphit{\bi}\def\emphsl{\bs}}{}} + +\def\emphit% + {\groupedcommand{\it\def\emphbf{\bi}\def\emphsl{\sl}}{}} + +\def\emphsl% + {\groupedcommand{\sl\def\emphbf{\bs}\def\emphit{\it}}{}} + +\def\emphtf% + {\groupedcommand{\tf\def\emphbf{\bf}\def\emphit{\it}\def\emphsl{\sl}}{}} + +%D \startbuffer +%D TEXT {\emphbf text \emphit text \emphtf text \emphsl text} TEXT +%D TEXT \emphbf{text \emphit{text} \emphtf{text} \emphsl{text}} TEXT +%D \stopbuffer +%D +%D \typebuffer +%D \startregels +%D \haalbuffer +%D \stopregels + %D \macros %D {setfont} %D @@ -3127,7 +3242,7 @@ %D \macros %D {moveaccent} %D -%D Exact positioning of accents cns be realized by saying: +%D Exact positioning of accents can be realized by saying: %D %D \starttypen %D \moveaccent{-.1ex}\"uberhaupt @@ -3173,24 +3288,27 @@ %D \starttypen %D \definefontsynonym [Times-Roman] [tir] %D \stoptypen -%D -%D Then Taco came up with the suggestion to automate this -%D process by loading the fontmap file as distributed with the -%D \DVIPS\ and \PDFTEX\ program. Therefore, we now have: - -\def\loadfontmappingfile#1#2#3% file yes no - {\pushendofline - \chardef\@@savedtabcatcode=\the\catcode`\^^I - \def\dodocommando##1 ##2 ##3 ##4\end% - {\doifnot{##1}{*} - {%\writestatus{\m!systems}{font ##2 mapped into ##1}% - \definefontsynonym[##2][##1]}}% - \def\docommando% - {\expandafter\dodocommando\fileline * * * * \end}% - \doprocessfile\scratchread{#1.map}\docommando - \catcode`\^^I=\@@savedtabcatcode - \popendofline - \iffileprocessed#2\else#3\fi} + +% %D One day Taco came up with the suggestion to automate this +% %D process by loading the fontmap file as distributed with the +% %D \DVIPS\ and \PDFTEX\ program. Therefore, we now have: +% +% \def\loadfontmappingfile#1#2#3% file yes no +% {\pushendofline +% \chardef\@@savedtabcatcode=\the\catcode`\^^I +% \def\dodocommando##1 ##2 ##3 ##4\end% +% {\doifnot{##1}{*} +% {%\writestatus{\m!systems}{font ##2 mapped into ##1}% +% \definefontsynonym[##2][##1]}}% +% \def\docommando% +% {\expandafter\dodocommando\fileline * * * * \end}% +% \doprocessfile\scratchread{#1.map}\docommando +% \catcode`\^^I=\@@savedtabcatcode +% \popendofline +% \iffileprocessed#2\else#3\fi} +% +% %D Since the syntax of the map files changes occationally, +% %D I have decided to remove this feature. %D Now we're up to some definitions. @@ -3403,6 +3521,8 @@ %D bodyfont. Sans serif and teletype are also available and %D can be called for by \type{\ss} and \type{\tt}. +\readfile{font-exp.tex}{}{} % load local experiments + \setupbodyfont [unk, fil, rm] \protect diff --git a/tex/context/base/font-lbr.tex b/tex/context/base/font-lbr.tex index a6d76f3e5..d29ae6260 100644 --- a/tex/context/base/font-lbr.tex +++ b/tex/context/base/font-lbr.tex @@ -54,14 +54,14 @@ \definefontsynonym [OldStyle] [MathItalic] \definebodyfont - [14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt,4pt] + [17.3pt,14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt,4pt] [rm,ss,tt,mm] [default] %D Some nice aditional ones. \definebodyfont - [14.4pt,12pt,11pt,10pt,9pt,8pt] + [17.3pt,14.4pt,12pt,11pt,10pt,9pt,8pt] [hw,cg] [default] diff --git a/tex/context/base/font-uni.tex b/tex/context/base/font-uni.tex index 2c0e2a690..633383544 100644 --- a/tex/context/base/font-uni.tex +++ b/tex/context/base/font-uni.tex @@ -270,15 +270,62 @@ \let\unicodecharcommand\firstofoneargument -\unexpanded\def\unicodeglyph#1#2% watch the double mapping +% \unexpanded\def\unicodeglyph#1#2% watch the double mapping +% {\bgroup +% \bodyfontsize=\unicodescale\bodyfontsize +% \font\unicodefont=\truefontname{\truefontname\unicodestyle\lchexnumbers{#1}} +% at \currentfontscale\bodyfontsize +% \unicodestrut\unicodefont\unicodecharcommand{\char#2\relax}% +% \egroup} + +\unexpanded\def\unicodeglyph#1#2% watch the double mapping {\bgroup + \getvalue{@@\currentucharmapping\strippedcsname\uchar}{#1}{#2}% \bodyfontsize=\unicodescale\bodyfontsize - \font\unicodefont=\truefontname{\truefontname\unicodestyle\lchexnumbers{#1}} + \font\unicodefont=\truefontname{\truefontname\unicodestyle\unicodeone} at \currentfontscale\bodyfontsize - \unicodestrut\unicodefont\unicodecharcommand{\char#2\relax}% + \unicodestrut\unicodefont\unicodecharcommand{\char\unicodetwo\relax}% \egroup} %D \macros +%D {currentucharmapping,defineucharmapping} +%D +%D A (plane,char) pair can be remapped using a uchar mapping +%D function. The default mapping is to convert the plane to a +%D lowercase hexadecimal number, and leave the number +%D untouched. The current remapping is kept in a macro. + +\let\currentucharmapping\s!default + +\def\defineucharmapping#1% + {\setvalue{@@#1\strippedcsname\uchar}} + +\defineucharmapping{\s!default}#1#2% + {\edef\unicodeone{\lchexnumbers{#1}}\edef\unicodetwo{#2}} + +%D An example of a remapping is the following: +%D +%D \starttypen +%D \defineucharmapping{GBK}#1#2% +%D {\unicodeposition=#1 +%D \advance\unicodeposition -129 +%D \multiply\unicodeposition 190 +%D \advance\unicodeposition #2 +%D \advance\unicodeposition-\ifnum#2>127 65\else64\fi +%D \dorepositionunicode} +%D \stoptypen +%D +%D This maps the GBK vector onto a compact GBK one. The +%D auxiliary macro is defined here as a goody. + +\def\dorepositionunicode% + {\DoDiv\unicodeposition by256to\scratchcounter + \advance\scratchcounter 1 + \edef\unicodeone{\ifnum\scratchcounter<10 0\fi\the\scratchcounter}% + \DoMod\unicodeposition by256to\scratchcounter + \edef\unicodetwo{\the\scratchcounter}} + +%D \macros %D {setunicodestrut, setunicodescale, nextglyph, %D handleunicodeglyph, insertunicodeglyph} %D diff --git a/tex/context/base/font-unk.tex b/tex/context/base/font-unk.tex index 3cdb226c4..f230b7a43 100644 --- a/tex/context/base/font-unk.tex +++ b/tex/context/base/font-unk.tex @@ -203,12 +203,12 @@ scd=MonoCaps sa d] \definebodyfont [default] [mm] - [mr=MathRoman sa 1, - ex=MathExtension sa 1, - mi=MathItalic sa 1, - sy=MathSymbol sa 1, - ma=MathAlpha sa 1, - mb=MathBeta sa 1] + [mr=MathRoman mo 1, + ex=MathExtension mo 1, + mi=MathItalic mo 1, + sy=MathSymbol mo 1, + ma=MathAlpha mo 1, + mb=MathBeta mo 1] \definebodyfont [default] [hw] [ tf=Handwriting sa 1, diff --git a/tex/context/base/font-win.tex b/tex/context/base/font-win.tex deleted file mode 100644 index d67542557..000000000 --- a/tex/context/base/font-win.tex +++ /dev/null @@ -1,2 +0,0 @@ -\writestatus{ENCODING}{please use \string\useencoding[win] instead}\wait -\input enco-win.tex \endinput diff --git a/tex/context/base/java-ini.tex b/tex/context/base/java-ini.tex index 301834a01..45ef677a5 100644 --- a/tex/context/base/java-ini.tex +++ b/tex/context/base/java-ini.tex @@ -69,6 +69,12 @@ 2: ukjent 'preamble' -- \stopmessages +\startmessages romanian library: javascript + title: javascript + 1: se incarca scriptul -- + 2: preambul necunoscut -- +\stopmessages + %D \TEX\ is not the right tool to check the \JAVA\ code; the %D most we can do is reporting some passed variables: diff --git a/tex/context/base/lang-ger.tex b/tex/context/base/lang-ger.tex index 006265a55..3b90f5cbe 100644 --- a/tex/context/base/lang-ger.tex +++ b/tex/context/base/lang-ger.tex @@ -156,7 +156,7 @@ %D For compatibility reasons we also define: \installlanguage [du] [\s!de] % old times context -\installlanguage [sp] [\s!es] % old times context +%installlanguage [sp] [\s!es] % old times context /lang-ita \installlanguage [usenglish] [\s!us] \installlanguage [ukenglish] [\s!uk] diff --git a/tex/context/base/lang-ini.tex b/tex/context/base/lang-ini.tex index 6ae98221a..2247a98f5 100644 --- a/tex/context/base/lang-ini.tex +++ b/tex/context/base/lang-ini.tex @@ -106,6 +106,20 @@ 10: orddelingsmønster -- er lest inn \stopmessages +\startmessages romanian library: linguals + title: limbi + 1: sablonul -- pentru -- s-a incarcat (n=--) + 2: nu exista sabloane -- pentru -- (n=--) + 3: despartirea in silabe -- pentru -- s-a incarcat (n=--) + 4: nu exista despartire in silabe -- pentru -- (n=--) + 5: sabloanele pentru -- nu sunt incarcate + 6: limba -- nu este definita + 7: optiunile specifice ale limbii [--] introduc un spatiu -- + 8: optiunile specifice ale limbii [--] adaugate + 9: limba -- este activa + 10: sabloanele -- incarcate +\stopmessages + % dutch : \lccode`\'=`\' % english : \lccode`\'=0 % german : \lccode`\'=`\' @@ -477,32 +491,56 @@ %D The main macro looks quite complicated but actually does %D nothing special. By embedding \type{\do} we can easily %D append to the lists and also execute them at will. Just to -%D be sure, we check on spurious spaces. +%D be sure, we check on spurious spaces. The second dummy +%D argument gobbles spaces. \def\languageencoding% {\ifx\characterencoding\nocharacterencoding \else \characterencoding-% \fi} +% \long\def\dostartlanguagespecifics[#1][#2]#3\stoplanguagespecifics% +% {\egroup +% \long\def\docommando##1% +% {\doifdefinedelse{\??la\languageencoding##1\??la} +% {\long\def\do####1####2####3% +% {\setvalue{\??la\languageencoding####1\??la}{\do{####1}{####2####3}}}% +% \getvalue{\??la\languageencoding##1\??la}{#3}} +% {\setvalue{\??la\languageencoding##1\??la}{\do{##1}{#3}}}% +% \bgroup +% \setbox0=\hbox{\enablelanguagespecifics[##1]}% +% \ifdim\wd0>\!!zeropoint +% \showmessage{\m!linguals}{7}{\currentencoding-##1,\the\wd0\space}\wait +% \else +% \showmessage{\m!linguals}{8}{\currentencoding-##1}% +% \fi +% \egroup +% \doif{##1}{\currentmainlanguage} +% {\enablelanguagespecifics[##1]}}% +% \processcommalist[#1]\docommando} + +% This saves 3K in the fmt file. + \long\def\dostartlanguagespecifics[#1][#2]#3\stoplanguagespecifics% {\egroup - \long\def\docommando##1% - {\doifdefinedelse{\??la\languageencoding##1\??la} - {\long\def\do####1####2####3% - {\setvalue{\??la\languageencoding####1\??la}{\do{####1}{####2####3}}}% - \getvalue{\??la\languageencoding##1\??la}{#3}} - {\setvalue{\??la\languageencoding##1\??la}{\do{##1}{#3}}}% - \bgroup - \setbox0=\hbox{\enablelanguagespecifics[##1]}% - \ifdim\wd0>\!!zeropoint - \showmessage{\m!linguals}{7}{\currentencoding-##1,\the\wd0\space}\wait - \else - \showmessage{\m!linguals}{8}{\currentencoding-##1}% - \fi - \egroup - \doif{##1}{\currentmainlanguage} - {\enablelanguagespecifics[##1]}}% - \processcommalist[#1]\docommando} + \processcommalist[#1]{\dosetlanguagespecifics{#3}}} + +\long\def\dosetlanguagespecifics#1#2% + {\doifdefinedelse{\??la\languageencoding#2\??la} + {\long\def\do##1##2##3% + {\setvalue{\??la\languageencoding##1\??la}{\do{##1}{##2##3}}}% + \getvalue{\??la\languageencoding#2\??la}{#1}} + {\setvalue{\??la\languageencoding#2\??la}{\do{#2}{#1}}}% + \bgroup + \setbox0=\hbox{\enablelanguagespecifics[#2]}% + \ifdim\wd0>\!!zeropoint + \showmessage{\m!linguals}{7}{\currentencoding-#2,\the\wd0\space}\wait + \else + \showmessage{\m!linguals}{8}{\currentencoding-#2}% + \fi + \egroup + \doif{#2}{\currentmainlanguage} + {\enablelanguagespecifics[#2]}} %D Enabling them is rather straightforward. We only have to %D define \type{\do} in such a way that \type{{ }} is removed diff --git a/tex/context/base/lang-ita.tex b/tex/context/base/lang-ita.tex index 3be8fc5c2..0f5d3a1ac 100644 --- a/tex/context/base/lang-ita.tex +++ b/tex/context/base/lang-ita.tex @@ -57,6 +57,8 @@ \c!datum={\v!dag,\ ,\v!maand,\ ,\v!jaar}, \c!status=\v!stop] +\installlanguage [sp] [\s!es] % old times context + \installlanguage [\s!it] [\c!spatiering=\v!opelkaar, @@ -421,6 +423,14 @@ % % \stoplanguagespecifics +%D Rather new \unknown + +\setuplabeltext [\s!it] [\v!pagina=pagina ] +\setuplabeltext [\s!it] [\v!oppagina=a pagina ] +\setuplabeltext [\s!it] [\v!hierboven=come mostrato sopra] +\setuplabeltext [\s!it] [\v!hieronder=come mostrato sotto] +\setuplabeltext [\s!it] [\v!zie=cf. ] + %D \ShowAllLanguageValues [\s!fr] [french] franse slag %D \ShowAllLanguageValues [\s!es] [spanish] spaans benauwd %D \ShowAllLanguageValues [\s!it] [italian] italiaanse ... diff --git a/tex/context/base/lang-lab.tex b/tex/context/base/lang-lab.tex index eb42fee76..00efe5a56 100644 --- a/tex/context/base/lang-lab.tex +++ b/tex/context/base/lang-lab.tex @@ -146,12 +146,25 @@ {\dodogetupsometextprefix{\s!nl}{#2}{#3} {\iftracinglabels{\tttf[#2:~#3/#1]~}\fi}}}}} +\ifx\simplifiedcommands\undefined \newtoks\simplifiedcommands \fi + +\appendtoks + \let \headtext \firstofoneargument + \let \labeltext \firstofoneargument + \let \leftlabeltext \firstofoneargument + \let \rightlabeltext \firstofoneargument + \let \HEADTEXT \firstofoneargument + \let \LABELTEXT \firstofoneargument + \let \LEFTLABELTEXT \firstofoneargument + \let \RIGHTLABELTEXT \firstofoneargument +\to \simplifiedcommands + %D \macros %D {presetheadtext,presetlabeltext} %D %D The next two macros enable us to automatically define %D head and label texts without replacing predefined ones. -%D This are internal macros. +%D These are internal macros. \def\dopresetsometextprefix#1% {\def\dodocommando[##1][##2=##3]% diff --git a/tex/context/base/lang-ura.tex b/tex/context/base/lang-ura.tex index f80bf6189..128fab6d5 100644 --- a/tex/context/base/lang-ura.tex +++ b/tex/context/base/lang-ura.tex @@ -18,9 +18,14 @@ %D on, corrections were made by users. If you have suggestions, %D or feel that your name missing here, don't hesitate to send %D us an email. +%D +%D \starttabulate[|lB|l|] +%D \NC Finnish \NC \NC \NR +%D \NC Hungarian \NC Balazs Nagy \NC \NR +%D \stoptabulate % Cheremiss, Estonian, Finnish, Karelian, Laap, Mordvinian, -% Permian tongues, Hungarianm Ostyak, Vogul, Samoyed +% Permian tongues, Hungarian, Ostyak, Vogul, Samoyed \unprotect @@ -38,7 +43,22 @@ \c!datum={\v!jaar,\ ,\v!maand,\ ,\v!dag}, \c!status=\v!stop] -\installlanguage [finish] [\s!fi] +\installlanguage + [\s!hu] + [\c!spatiering=\v!opelkaar, + \c!leftsentence=---, + \c!rightsentence=---, + \c!leftsubsentence=---, + \c!rightsubsentence=---, + \c!leftquote=\lowerleftsingleninequote, + \c!rightquote=\upperrightsingleninequote, + \c!leftquotation=\lowerleftdoubleninequote, + \c!rightquotation=\upperrightdoubleninequote, + \c!datum={\v!jaar,.,\ ,\v!maand,\ ,\v!dag,.}, + \c!status=\v!stop] + +\installlanguage [finish] [\s!fi] +\installlanguage [hungarian] [\s!hu] \setupheadtext [\s!fi] [\v!inhoud=Sis\"allys] \setupheadtext [\s!fi] [\v!tabellen=Taulukkoj] @@ -50,6 +70,16 @@ \setupheadtext [\s!fi] [\v!logos=Vertauskuva] \setupheadtext [\s!fi] [\v!eenheden=Yksik\"ot] +\setupheadtext [\s!hu] [\v!inhoud=Tartalom] +\setupheadtext [\s!hu] [\v!tabellen=T\'abl\'azatok] +\setupheadtext [\s!hu] [\v!figuren=\'Abr\'ak] +\setupheadtext [\s!hu] [\v!grafieken=Grafik\'ak] +\setupheadtext [\s!hu] [\v!intermezzos=Intermezzok] +\setupheadtext [\s!hu] [\v!index=Index] +\setupheadtext [\s!hu] [\v!afkortingen=R\"ovid\'\it\'esek] +\setupheadtext [\s!hu] [\v!logos=Fejl\'ecek] +\setupheadtext [\s!hu] [\v!eenheden=M\'ert\'ekegys\'egek] + \setuplabeltext [\s!fi] [\v!tabel=Taulukko ] \setuplabeltext [\s!fi] [\v!figuur=Kuva ] \setuplabeltext [\s!fi] [\v!intermezzo=Intermezzo ] @@ -64,6 +94,20 @@ \setuplabeltext [\s!fi] [\v!regel=rivi ] \setuplabeltext [\s!fi] [\v!regels=rivie ] +\setuplabeltext [\s!hu] [\v!tabel={,.~t\'abl\'azat:}] +\setuplabeltext [\s!hu] [\v!figuur={,.~\'abra:}] +\setuplabeltext [\s!hu] [\v!intermezzo={,.~intermezzo:}] +\setuplabeltext [\s!hu] [\v!grafiek={,.~k\'ep:}] +\setuplabeltext [\s!hu] [\v!hoofdstuk={,.~fejezet:}] +\setuplabeltext [\s!hu] [\v!paragraaf={,.}] +\setuplabeltext [\s!hu] [\v!sub\v!paragraaf={,.}] +\setuplabeltext [\s!hu] [\v!sub\v!sub\v!paragraaf={,.}] +\setuplabeltext [\s!hu] [\v!sub\v!sub\v!sub\v!paragraaf={,.}] +\setuplabeltext [\s!hu] [\v!bijlage=] +\setuplabeltext [\s!hu] [\v!deel={,.~r\'esz:}] +\setuplabeltext [\s!hu] [\v!regel={,.~sor:}] +\setuplabeltext [\s!hu] [\v!regels=sorok] + \setuplabeltext [\s!fi] [\v!january=tammikuu] \setuplabeltext [\s!fi] [\v!february=helmikuu] \setuplabeltext [\s!fi] [\v!march=maaliskuu] @@ -77,6 +121,19 @@ \setuplabeltext [\s!fi] [\v!november=marraskuu] \setuplabeltext [\s!fi] [\v!december=joulukuu] +\setuplabeltext [\s!hu] [\v!january=janu\'ar] +\setuplabeltext [\s!hu] [\v!february=febru\'ar] +\setuplabeltext [\s!hu] [\v!march=m\'arcius] +\setuplabeltext [\s!hu] [\v!april=\'aprilis] +\setuplabeltext [\s!hu] [\v!may=m\'ajus] +\setuplabeltext [\s!hu] [\v!june=j\'unius] +\setuplabeltext [\s!hu] [\v!july=j\'ulius] +\setuplabeltext [\s!hu] [\v!august=augusztus] +\setuplabeltext [\s!hu] [\v!september=szeptember] +\setuplabeltext [\s!hu] [\v!october=okt\'ober] +\setuplabeltext [\s!hu] [\v!november=november] +\setuplabeltext [\s!hu] [\v!december=december] + \setuplabeltext [\s!fi] [\v!sunday=sunnuntai] \setuplabeltext [\s!fi] [\v!monday=maanantai] \setuplabeltext [\s!fi] [\v!tuesday=tiistai] @@ -85,7 +142,16 @@ \setuplabeltext [\s!fi] [\v!friday=perjantai] \setuplabeltext [\s!fi] [\v!saturday=lauantai] +\setuplabeltext [\s!hu] [\v!sunday=vas\'arnap] +\setuplabeltext [\s!hu] [\v!monday=h\'etf\H{o}] +\setuplabeltext [\s!hu] [\v!tuesday=kedd] +\setuplabeltext [\s!hu] [\v!wednesday=szerda] +\setuplabeltext [\s!hu] [\v!thursday=cs\"ut\"ort\"ok] +\setuplabeltext [\s!hu] [\v!friday=p\'entek] +\setuplabeltext [\s!hu] [\v!saturday=szombat] + %D \ShowAllLanguageValues [\s!fi] [finnish] finse ... +%D \ShowAllLanguageValues [\s!hu] [hungarian] magyar. \protect diff --git a/tex/context/base/m-mathml.tex b/tex/context/base/m-mathml.tex new file mode 100644 index 000000000..471aa4770 --- /dev/null +++ b/tex/context/base/m-mathml.tex @@ -0,0 +1,28 @@ +%D \module +%D [ file=m-mathml, +%D version=1999.12.20, +%D title=\CONTEXT\ XML Modules, +%D subtitle=Loading \MATHML\ Filters, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE / 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. + +%D We have to make sure that some basic entities are +%D loaded: + +\useXMLfilter[ent] + +%D Then we load the math: + +\useXMLfilter[mml,mmp,mmc] + +%D And finaly we load the whole bunch of entities: + +% \useXMLfilter[mea,meb,mec,meh,men,meo,mer] +% \useXMLfilter[mxa,mxb,mxc,mxh,mxn,mxo,mxr] + +\endinput diff --git a/tex/context/base/m-quest.tex b/tex/context/base/m-quest.tex new file mode 100644 index 000000000..23e9dc279 --- /dev/null +++ b/tex/context/base/m-quest.tex @@ -0,0 +1,241 @@ +%D \module +%D [ file=m-invull, +%D version=1995.01.10, +%D title=\CONTEXT\ Extra Modules, +%D subtitle=Exercise, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +%I Invuloefeningen kunnen worden vormgegeven met het +%I de commando's: +%I +%I \definieerinvulwoord[trefwoord]{woord,woord} +%I \invulwoord[trefwoord] +%I \invulwoord{woord,woord,...} +%I +%I Daarbij kan het een en ander worden ingesteld met +%I +%I \stelinvullenin[status=,nummer=,links=,rechts=,letter=] +%P +%I Er zijn drie manieren om woorden in te vullen. De meest +%I eenvoudige is die waarbij de in te vullen woorden in de +%I tekst staan. +%I +%I bla bla \invulwoord{een,alfa} bla bla bla bla bla bla +%I bla bla bla bla bla bla bla bla \invulwoord{twee,beta}. +%I +%I De gezette tekst hangt af van de instellingen: +%I +%I [status=leeg] ________ +%I [status=vol,nummer=1] 'een' respectievelijk 'twee' +%I [status=vol,nummer=2] 'alfa' respectievelijk 'beta' +%I +%I Het nummer heeft dus betrekking op het volgnummer in de +%I opgegeven reeks. +%P +%I Bij de tweede manier worden eerste de alternatieven +%I gedefinieerd: +%I +%I \definieerinvulwoord{een,alfa} +%I \definieerinvulwoord{twee,beta} +%I +%I die vervolgens worden opgeroepen: +%I +%I bla \invulwoord[+] bla bla bla bla bla bla bla bla bla +%I bla bla bla bla bla bla bla bla bla bla \invulwoord[+]. +%I +%I De mogelijke instellingen komen overeen met die van de +%I eerste manier. +%P +%I De derde manier is een variant op de tweede. Bij grote +%I teksten kan men het overzicht kwijtraken. Het is daarom +%I mogelijk 'logische' namen toe te kennen aan woorden. +%I +%I \definieerinvulwoord[a]{een,alfa} +%I \definieerinvulwoord[b]{twee,beta} +%I +%I die vervolgens worden opgeroepen: +%I +%I bla \invulwoord[a] bla bla bla bla bla bla bla bla bla +%I bla bla bla bla bla bla bla bla bla bla \invulwoord[b]. +%I +%I Dit maakt het bovendien mogelijk woorden meerdere malen +%I (in een willekeurige volgorde op te roepen: +%I +%I bla \invulwoord[a] bla \invulwoord[b] bla bla bla bla +%I bla bla bla bla \invulwoord[b] bla bla \invulwoord[a]. +%P +%I Bij [status=leeg] wordt een streep gezet die in breedte +%I overeenkomt met het woord dat er eigenlijk hoort te +%I staan. De ingevulde tekst komt visueel daardoor overeen +%I met de in te vullen tekst, wat vergelijken vereenvoudigd. +%I +%I Met [status=reset] worden enkele tellers weer op 0 gezet. +%I Dit kan nodig zijn als meerdere invuloefeningen in een +%I tekst worden gezet. +%I +%I Als \versie[voorlopig] is ingesteld, worden bij invullers +%I zonder logische namen tussen haakjes de volgnummers +%I getoond. + +%S \startsetup +%S \command +%S [stelinvullenin] +%S \type +%S [\c!vars!] +%S \variable +%S [\c!letter] +%S [\v!normaal,\v!vet,\v!schuin,\v!vetschuin,\v!type,\v!kap, +%S \v!klein...,\c!command!] +%S [\v!vet] +%S \variable +%S [\c!links] +%S [\c!text!] +%S [] +%S \variable +%S [\c!rechts] +%S [\c!text!] +%S [] +%S \variable +%S [\c!status] +%S [\v!leeg,\v!vol,\v!reset] +%S [\v!vol] +%S \variable +%S [\c!nummer] +%S [\c!number!] +%S [1] +%S \variable +%S [\c!lijn] +%S [\v!aan,\v!uit] +%S [\v!aan] +%S \stopsetup + +%S \startsetup +%S \command +%S [invulwoord] +%S \type +%S [\c!ref!,\c!opt!\c!val!\c!opt!\c!args!] +%S \value +%S [\c!text!] +%S \stopsetup + +%S \startsetup +%S \command +%S [definieerinvulwoord] +%S \type +%S [\c!ref!,\c!opt!\c!val!\c!args!] +%S \value +%S [\c!text!] +%S \stopsetup + +% Mogelijke uitbreidingen +% +% - [breedte=<maat>,passend,ruim] +% - invullijst met nummers +% - weergeven lijst tijdens definitie blokkeren +% - door elkaar definieren + +\unprotect + +\definesystemvariable {iv} + +\definereferenceconstant {fillin} {:iv:} + +\newcount\invulteller \newcount\invulput \newcount\invulget + +\def\stelinvullenin% + {\dosingleargument\dostelinvullenin} + +\def\dostelinvullenin[#1]% + {\getparameters[\??iv][#1]% + \doif{\@@ivstatus}{\v!reset} + {\global\invulput=0 + \global\invulget=0 + \let\@@ivstatus\empty}} + +\def\definieerinvulwoord% + {\dosingleempty\dodefinieerinvulwoord} + +\def\dodefinieerinvulwoord[#1]#2% + {\iffirstargument + \setgvalue{\r!fillin#1}{\simpleinvulwoord{#2}}% + \else + \global\advance\invulput by 1 + \setgvalue{\r!fillin\the\invulput}{\simpleinvulwoord{#2}}% + \fi + \ifvoorlopig \ifnum\invulput>0 + \setbox\scratchbox=\hbox{~\ttx(\the\invulput)}% + \wd\scratchbox=\!!zeropoint + \box\scratchbox \par + \fi \fi} + +\def\dosimpleinvulwoord#1% + {\ifnum\@@ivnummer>0 \advance\invulteller by 1 \fi + \ifnum\invulteller=\@@ivnummer\relax + \bgroup + \doconvertfont + {\@@ivletter} + {\@@ivlinks + \doifelse{\@@ivstatus}{\v!leeg} + {\doifelse{\@@ivlijn}{\v!aan} + {\let\next\leeginvulwoord} + {\let\next\geeninvulwoord}} + {\doifelse{\@@ivlijn}{\v!aan} + {\let\next\underbar} + {\let\next\firstofoneargument}}% + \next{#1}% + \@@ivrechts}% + \egroup + \fi}% + +\def\simpleinvulwoord#1% + {\ifnum\@@ivnummer>0 + \invulteller=0 + \processcommalist[#1]\dosimpleinvulwoord + \else + \dosimpleinvulwoord{#1}% + \fi} + +\def\complexinvulwoord[#1]% + {\bgroup + \doifsomething{#1} + {\global\advance\invulget by 1 + \doconvertfont + {\@@ivletter} + {\@@ivlinks + \getvalue{\r!fillin\the\invulget}% + \@@ivrechts}} + {\doconvertfont + {\@@ivletter} + {\@@ivlinks + \getvalue{\r!fillin#1}% + \@@ivrechts}}% + \egroup} + +\definecomplexorsimple\invulwoord + +\def\leeginvulwoord#1% + {{\let\redounderbar\dodounderbar + \def\dodounderbar##1{\redounderbar{\hphantom{##1}}}% + \underbar{#1}}} + +\def\geeninvulwoord#1% + {{\def\dodounderbar##1{\hphantom{##1}}% + \underbar{#1}}} + +% when nummer > 0, then commalist processing; beware of $(1,2)$, use { } there + +\stelinvullenin + [\c!nummer=0, + \c!letter=\v!vet, + \c!lijn=\v!aan, + \c!links=, + \c!rechts=, + \c!status=] + +\protect \endinput diff --git a/tex/context/base/m-units.tex b/tex/context/base/m-units.tex index fd82b1499..658f417d1 100644 --- a/tex/context/base/m-units.tex +++ b/tex/context/base/m-units.tex @@ -54,6 +54,11 @@ 1: bruk \string\Degrees\space\string\Celsius\space istedenfor \string\Celsius ! \stopmessages +\startmessages romanian library: units + title: unitati + 1: folositi \string\Degrees\space\string\Celsius\space in locul \string\Celsius ! +\stopmessages + \unprotect %D This runtime loadable module implements a way of defining diff --git a/tex/context/base/main-001.tex b/tex/context/base/main-001.tex index 5a1e0758d..dea630ac7 100644 --- a/tex/context/base/main-001.tex +++ b/tex/context/base/main-001.tex @@ -1,4 +1,4 @@ -%D \module +%D \module %D [ file=main-001, %D version=1997.03.31, %D title=\CONTEXT\ Core Macros, @@ -233,6 +233,37 @@ 27: Versjon \stopmessages +\startmessages romanian library: systems + title: sistem + 1: se incarca utilitarul-fisierul este amanat (typemode) + 2: -- s-a incarcat + 3: incercati LaTeX + 4: comanda -- este deja definita + 5: macro-urile din modulul -- s-au incarcat + 6: nu s-au gasit macro-uri in modulul -- + 7: macro-urile din modulul -- s-au incarcat deja + 8: o noua versiune de fisier utilitar, este necesara o noua trecere + 9: -- nu este gasit/procesat + 10: nu folositi em in -- + 11: se creeaza un utilitar simplu + 12: fisierul utilitar nu este sortat, folositi texutil + 13: marcajul -- definit -- + 14: s-a fortat trecere pa pagina noua in lista la -- + 15: buffer salvat -- + 16: buffer-ul -- s-a cules + 17: se culege buffer-ul verbatim -- + 18: sinonimul -- -- nu exista + 19: intelesul (sinonimele) pentru -- incarcat + 20: intelesul (ordinea) pentru -- incarcat + 21: nici o data utilitara nu este incarcata + 22: folositi un fisier utilitar valid + 23: -- aranjat la -- + 24: Blocuri + 25: Referinte + 26: Registri + 27: Versiune +\stopmessages + \startmessages dutch library: floatblocks title: plaatsblokken 1: -- hernummerd / -- => -- @@ -329,6 +360,22 @@ 12: udefinert \stopmessages +\startmessages romanian library: floatblocks + title: Blocuri + 1: -- renumerotat / -- => -- + 2: -- salvat + 3: -- mutat + 4: -- plasat + 5: ordinea adaptata + 6: nr. cadrelor de sus limitat la -- + 7: nr. blocurilor de jos limitat la -- + 8: mai putin de -- linii + 9: ordinea deranjata + 10: -- limitat + 11: nu este dat nici un bloc + 12: nedefinit +\stopmessages + \startmessages dutch library: layouts title: layout 1: teksthoogte aangepast met -- op pagina -- @@ -412,6 +459,20 @@ 10: -- og -- er ikke 1.0 til sammen 11: mellomrom -- ikke tillatt i gridmodus \stopmessages + +\startmessages romanian library: layouts + title: aranjamente + 1: textheight adaptat cu -- la pagina -- + 2: textul amanat de -- ori a fost plasat + 3: textul amanat de -- ori + 4: blocuri marginale active + 5: blocuri marginale inactive + 6: setul -- de subpagini procesat (dimensiunea --) + 7: se calculeaza spatiul pentru logo + 8: se calculeaza fundalurile + 10: -- si -- nu se adauga pana la 1.0 + 11: spatierea -- nu este permisa in gridmode +\stopmessages % \CONTEXTtrue % Now we know that we can use ConTeXt commands. @@ -549,12 +610,12 @@ \fi} \def\indentation% - {\ifvmode - \ifdim\parindent=\!!zeropoint - \else - \hskip\parindent - \fi - \fi} + {\ifvmode \ifdim\parindent=\!!zeropoint \else + % was : \hskip\parindent + % can be: \indent + % but we test: + \noindent\hskip\parindent + \fi \fi} % vergeten @@ -583,7 +644,7 @@ \def\forgetall% {\the\everyforgetall} -\appendtoks \let\par=\endgraf \to \everyforgetall % i.v.m. getpar etc +\appendtoks \let\par\endgraf \to \everyforgetall % i.v.m. getpar etc \appendtoks \notragged \to \everyforgetall \appendtoks \forgetparskip \to \everyforgetall \appendtoks \forgetparindent \to \everyforgetall @@ -1034,44 +1095,6 @@ \leavevmode \fi\fi} -% We passen ook de \displayskip's wat aan (nog eens uitzoeken): - -\def\displayskipsize#1#2% - {\ifdim\tussenwit>\!!zeropoint - #1\tussenwit\!!plus#2\tussenwit\!!minus#2\tussenwit\relax - \else - #1\lineheight\!!plus#2\lineheight\!!minus#2\lineheight\relax - \fi} - -\def\displayskipfactor {1.0} -\def\displayshortskipfactor {0.8} - -\def\displayskipgluefactor {0.3} -\def\displayshortskipgluefactor {0.2} - -\def\abovedisplayskipsize% doet niets ? - {\displayskipsize\displayskipfactor\displayskipgluefactor} - -\def\belowdisplayskipsize% doet niets ? - {\displayskipsize\displayskipfactor\displayskipgluefactor} - -\def\abovedisplayshortskipsize% - {\displayskipsize\displayshortskipfactor\displayshortskipgluefactor} - -\def\belowdisplayshortskipsize% - {\displayskipsize\displayshortskipfactor\displayshortskipgluefactor} - -\def\setdisplayskip#1#2#3% - {#1=#2\relax - \advance#1 by -\parskip - \advance#1 by -#3\relax} - -\def\setdisplayskips% - {\setdisplayskip\abovedisplayskip\abovedisplayskipsize\baselineskip - \setdisplayskip\belowdisplayskip\belowdisplayskipsize\!!zeropoint - \setdisplayskip\abovedisplayshortskip\abovedisplayshortskipsize\baselineskip - \setdisplayskip\belowdisplayshortskip\belowdisplayshortskipsize\!!zeropoint} - % We stellen enkele penalties anders in dan Plain TEX: \def\defaultwidowpenalty{2000} % was: 1000 @@ -1266,11 +1289,6 @@ \dimen0=-\vsize \advance\dimen0 by \teksthoogte \global\advance\vsize by \dimen0 -%\ifgridsnapping % evt altijd, nog testen -% \getnoflines\vsize -% \vsize=\noflines\openlineheight % local is better and ok -% \advance\vsize by .5\openlineheight % collect enough data -%\fi \ifdim\pagegoal<\maxdimen \advance\dimen0 by \pagegoal \global\pagegoal=\dimen0 @@ -1302,12 +1320,44 @@ % NB \userpageno vervangen door \realpageno +% \def\doifonevenpaginaelse#1#2% +% {\ifodd\realpageno#1\else#2\fi} +% +% \def\doifbothsidesoverruled#1\orsideone#2\orsidetwo#3\od% +% {\ifdubbelzijdig +% \ifodd\realpageno#2\relax\else#3\relax\fi +% \else +% #1\relax +% \fi} +% +% \def\doifbothsides#1\orsideone#2\orsidetwo#3\od% +% {\ifdubbelzijdig +% \ifenkelzijdig +% #1\relax +% \else +% \ifodd\realpageno#2\relax\else#3\relax\fi +% \fi +% \else +% #1\relax +% \fi} + +%D When we start at an even page, we need to swap the layout +%D differently. We cannot adapt the real page number, since +%D it is used in cross referencing. The next switch is set +%D when we start at an even page. + +\newif\ifshiftedrealpageno + \def\doifonevenpaginaelse#1#2% - {\ifodd\realpageno#1\else#2\fi} + {\ifshiftedrealpageno + \ifodd\realpageno#2\else#1\fi + \else + \ifodd\realpageno#1\else#2\fi + \fi} \def\doifbothsidesoverruled#1\orsideone#2\orsidetwo#3\od% {\ifdubbelzijdig - \ifodd\realpageno#2\relax\else#3\relax\fi + \doifonevenpaginaelse{#2}{#3}\relax \else #1\relax \fi} @@ -1317,7 +1367,7 @@ \ifenkelzijdig #1\relax \else - \ifodd\realpageno#2\relax\else#3\relax\fi + \doifonevenpaginaelse{#2}{#3}\relax \fi \else #1\relax @@ -1503,7 +1553,7 @@ \scratchdimen=\rugwit \advance\scratchdimen by -\linkerrandbreedte \advance\scratchdimen by -\linkerrandafstand - \advance\scratchdimen by -\paginascheiding +% \advance\scratchdimen by -\paginascheiding \advance\scratchdimen by -\linkermargebreedte \advance\scratchdimen by -\linkermargeafstand \ifdim\scratchdimen<\!!zeropoint @@ -1511,7 +1561,7 @@ \fi \global\advance\zetbreedte by -\rechtermargeafstand \global\advance\zetbreedte by -\rechtermargebreedte - \global\advance\zetbreedte by -\paginascheiding +% \global\advance\zetbreedte by -\paginascheiding \global\advance\zetbreedte by -\rechterrandafstand \global\advance\zetbreedte by -\rechterrandbreedte \global\advance\zetbreedte by -\scratchdimen} @@ -1689,15 +1739,18 @@ \newbox\preparedmarginbox \def\reshapemargin% - {\beginofshapebox - \unvbox\preparedmarginbox - \endofshapebox - \reshapebox - {\box\shapebox}% - \setbox\preparedmarginbox=\vbox to \teksthoogte - {\@@mbboven - \flushshapebox - \@@mbonder}} + {\ifdim\ht\preparedmarginbox>\!!zeropoint + \beginofshapebox + \unvbox\preparedmarginbox + \endofshapebox + \reshapebox + {\box\shapebox}% + \setbox\preparedmarginbox=\vbox to \teksthoogte + {\@@mbboven + \flushshapebox + \@@mbonder}% + \fi} + \def\plaatsrechtermargeblok% {\hskip\rechtermargebreedte} @@ -1787,9 +1840,12 @@ \appendtoks\the\everytopofpage\to\everystarttext \appendtoks\global\everytopofpage{}\to\everystoptext -\def\douitstellen% +\def\douitstellen% PAS OP 2X MAIN-001 {\the\everytopofpage \ifinuitstellen\else\ifcase\nofpostponedblocks\else % The \nof-test is +\bgroup +\black % else problems inside split verbatim +\restoreglobalbodyfont % else problems inside split verbatim \global\pagetotal\!!zeropoint % recently added \global\inuitstellentrue % definitely needed \dorecurse{\nofpostponedblocks} % else we can loose @@ -1797,6 +1853,7 @@ \doflushfloats % new but potential dangerous % and that is something \doglobal\newcounter\nofpostponedblocks % we don't want, do we? \global\inuitstellenfalse % Anyhow, 'uitstellen' +\egroup \fi\fi} % is still suboptimal. \setvalue{\e!start\e!uitstellen}% @@ -1924,20 +1981,20 @@ \bgroup \ifnum\realpageno=\firstsubpage\relax \global\let\prevsubpage=\firstsubpage -\setglobalsystemreference\rt!page{\v!sub\v!achteruit}\lastsubpage + \setglobalsystemreference\rt!page{\v!sub\v!achteruit}\lastsubpage \else \xdef\prevsubpage{\realfolio}% \doglobal\decrement\prevsubpage -\setglobalsystemreference\rt!page{\v!sub\v!achteruit}\prevsubpage + \setglobalsystemreference\rt!page{\v!sub\v!achteruit}\prevsubpage \fi \setglobalsystemreference\rt!page{\v!vorigesubpagina}\prevsubpage \ifnum\realpageno=\lastsubpage\relax \global\let\nextsubpage=\lastsubpage -\setglobalsystemreference\rt!page{\v!sub\v!vooruit}\firstsubpage + \setglobalsystemreference\rt!page{\v!sub\v!vooruit}\firstsubpage \else \xdef\nextsubpage{\realfolio}% \doglobal\increment\nextsubpage -\setglobalsystemreference\rt!page{\v!sub\v!vooruit}\nextsubpage + \setglobalsystemreference\rt!page{\v!sub\v!vooruit}\nextsubpage \fi \setglobalsystemreference\rt!page{\v!volgendesubpagina}\nextsubpage \egroup @@ -2143,7 +2200,7 @@ \def\goleftonpage% {\hskip-\linkermargeafstand \hskip-\linkermargebreedte - \hskip-\paginascheiding + %\hskip-\paginascheiding \hskip-\linkerrandafstand \hskip-\linkerrandbreedte} @@ -2353,10 +2410,17 @@ \boxmaxdepth\maxdepth % \noindent % the contents can be < \hsize \dopagecontents#1#2}% - \hss}% new + \hss}% new +\ifsomebackgroundfound\v!tekst % sneller + \setbox0=\hbox\localframed + [\??ma\v!tekst] + [\c!strut=\v!nee,\c!offset=\v!overlay, + \c!breedte=\zetbreedte,\c!hoogte=\teksthoogte] + {\dp0=\!!zeropoint\box0}% +\fi \ht0=\teksthoogte \wd0=\zetbreedte -\dp0=\!!zeropoint % new, maybe a reason for small shifts + \dp0=\!!zeropoint % new, maybe a reason for small shifts \ifshowgrid \setgridbox2\zetbreedte\teksthoogte \hbox{\color[red]{\box2}\hskip-\zetbreedte\box0}% @@ -2379,7 +2443,7 @@ \goleftonpage \plaatslinkerrandblok \hskip\linkerrandafstand - \showpageseparation + %\showpageseparation \plaatslinkermargeblok \hskip\linkermargeafstand \egroup @@ -2388,7 +2452,7 @@ \hskip\rechtermargeafstand \plaatstestinfo \plaatsrechtermargeblok - \showpageseparation + %\showpageseparation \hskip\rechterrandafstand \plaatsrechterrandblok \egroup}% @@ -2532,6 +2596,7 @@ {\vbox {\beginrestorecatcodes \forgetall % igv problemen, check: \boxmaxdepth\maxdimen +\ifnewbackground\enablemode[\systemmodeprefix\v!achtergrond]\fi \boxmaxdepth\maxdimen % new \mindermeldingen \setbox0=\vbox @@ -2828,13 +2893,13 @@ \fi \def\dodocommando##1##2##3##4##5##6% {\hskip\linkerrandafstand - \hskip\pageseparation + %\hskip\pageseparation \hbox to \linkermargebreedte{\docommando{##2}\hss}% \hskip\linkermargeafstand \hbox to \zetbreedte{\docommando{##3}\hss\docommando{##4}}% \hskip\rechtermargeafstand \hbox to \rechtermargebreedte{\hss\docommando{##5}}% - \hskip\pageseparation + %\hskip\pageseparation \hskip\rechterrandafstand \hbox to \rechterrandbreedte{\hss\docommando{##6}}}% \normalbaselines @@ -2987,9 +3052,51 @@ \newif\ifwitruimteflexibel \witruimteflexibeltrue -\def\dodostelwitruimtein[#1]% - {%\witruimteflexibeltrue - \processallactionsinset +%\def\dodostelwitruimtein[#1]% +% {%\witruimteflexibeltrue +% \processallactionsinset +% [#1] +% [\v!herstel=>, +% \v!vast=>\witruimteflexibelfalse, +% \v!flexibel=>\witruimteflexibeltrue, +% \v!regel=>\tussenwit=\baselineskip, +% \v!halveregel=>\tussenwit=.5\baselineskip, +% \s!default=>\doifnot{\currentwitruimte}{\v!geen} +% {\stelwitruimteopnieuwin}, +% \s!unknown=>\@EA\assigndimension\@EA{\commalistelement} % \@EA is nodig +% {\tussenwit} +% {\blankokleinmaat}{\blankomiddelmaat}{\blankogrootmaat}]% % te vangen +% \edef\currentwitruimte% +% {\ifdim\tussenwit=\!!zeropoint +% \v!geen +% \else +% \ifgridsnapping\the\baselineskip\else\the\tussenwit\fi +% \fi}% +% \ifgridsnapping +% \witruimteflexibelfalse +% \tussenwit=1\tussenwit +% \ifdim\tussenwit>\!!zeropoint +% \tussenwit=\baselineskip +% \fi +% \else +% \ifwitruimteflexibel \else \tussenwit=1\tussenwit \fi +% \fi +% \parskip=\tussenwit} +% +%\def\dostelwitruimtein[#1]% +% {\expanded{\dodostelwitruimtein[#1]}} +% +%\def\stelwitruimtein% +% {\dosingleempty\dostelwitruimtein} + +\definecomplexorsimple\stelwitruimtein + +\def\complexstelwitruimtein[#1]% + {\expanded{\dostelwitruimtein[#1]}% + \dodostelwitruimtein} + +\def\dostelwitruimtein[#1]% + {\processallactionsinset [#1] [\v!herstel=>, \v!vast=>\witruimteflexibelfalse, @@ -3000,8 +3107,10 @@ {\stelwitruimteopnieuwin}, \s!unknown=>\@EA\assigndimension\@EA{\commalistelement} % \@EA is nodig {\tussenwit} - {\blankokleinmaat}{\blankomiddelmaat}{\blankogrootmaat}]% % te vangen - \edef\currentwitruimte% + {\blankokleinmaat}{\blankomiddelmaat}{\blankogrootmaat}]} % te vangen + +\def\dodostelwitruimtein% + {\edef\currentwitruimte% {\ifdim\tussenwit=\!!zeropoint \v!geen \else @@ -3018,11 +3127,10 @@ \fi \parskip=\tussenwit} -\def\dostelwitruimtein[#1]% - {\expanded{\dodostelwitruimtein[#1]}} - -\def\stelwitruimtein% - {\dosingleempty\dostelwitruimtein} +\def\simplestelwitruimtein% == snelle \stelwitruimtein[\s!default] + {\doifnot{\currentwitruimte}{\v!geen} + {\stelwitruimteopnieuwin}% + \dodostelwitruimtein} \def\geenwitruimte% {\ifdim\parskip>\!!zeropoint\relax @@ -3189,11 +3297,14 @@ \newif\iflocalinterlinespace -\def\bodyfontinterlinespecs% - {\??ft\normalizedbodyfontsize\c!interlinie} +% font-ini -\def\bodyfontinterlinespace% - {\csname\bodyfontinterlinespecs\endcsname} +\ifx\bodyfontinterlinespecs\undefined + + \let\bodyfontinterlinespecs\empty + \let\bodyfontinterlinespace\empty + +\fi \def\presetnormallineheight% {\edef\normallineheight{\@@itregel}% @@ -3359,11 +3470,11 @@ \ifblankobuiten \else \par - \ifvmode - \ifblankoforceer\ifdim\prevdepth>\!!zeropoint\else + \ifvmode %in pos fonts gaat dit mis + \ifblankoforceer%\ifdim\prevdepth>\!!zeropoint\else % -1000pt signals top of page or column (\ejectcolumn) \vbox{\strut}\kern-\lineheight - \fi\fi + \fi%\fi \ifblankoblokkeer \global\doeblankofalse \edef\oldprevdepth{\the\prevdepth}% @@ -3488,7 +3599,7 @@ %D For a long time we had: %D -%D \startypen +%D \starttypen %D \def\simpledoblanko% %D {\doifelse{\currentwitruimte}{\v!geen} %D {\blanko[\currentblanko]} @@ -3576,7 +3687,19 @@ \let\deblanko=\v!groot]% \stelwitruimtein} -\definecomplexorsimpleempty\stelblankoin +% \definecomplexorsimpleempty\stelblankoin +% +% speed gain: 60 sec -> 30 sec + +\definecomplexorsimple\stelblankoin + +\def\simplestelblankoin% == snelle \stelblankoin[\s!default] + {\ifgridsnapping + \blankoflexibelfalse + \fi + \dostelblankoin{\deblankoskip}% + \let\deblanko\v!groot + \stelwitruimtein} \def\dodefinieerblanko[#1][#2]% {\def\docommando##1{\setvalue{\??bo##1}{#2}}% @@ -3616,22 +3739,37 @@ {\doifoutervmode {\ifindentfirstparagraph\else\noindentation\fi}} -\def\dostelinspringenin[#1]% +%\def\dostelinspringenin[#1]% +% {\processallactionsinset +% [#1] +% [ \v!eerste=>\indentfirstparagraphtrue, +% \v!volgende=>\indentfirstparagraphfalse, +% \s!default=>\dodostelinspringenin, +% \s!unknown=>\edef\currentvoorwit{\commalistelement}% +% \dodostelinspringenin]} +% +%\def\dodostelinspringenin% +% {\assigndimension{\currentvoorwit}{\voorwit}{1em}{1.5em}{2em}% +% \parindent=\voorwit\relax} +% +%\def\stelinspringenin% +% {\dosingleempty\dostelinspringenin} + +\definecomplexorsimple\stelinspringenin + +\def\complexstelinspringenin[#1]% {\processallactionsinset [#1] [ \v!eerste=>\indentfirstparagraphtrue, \v!volgende=>\indentfirstparagraphfalse, - \s!default=>\dodostelinspringenin, + \s!default=>\simplestelinspringenin, \s!unknown=>\edef\currentvoorwit{\commalistelement}% - \dodostelinspringenin]} + \simplestelinspringenin]} -\def\dodostelinspringenin% +\def\simplestelinspringenin% {\assigndimension{\currentvoorwit}{\voorwit}{1em}{1.5em}{2em}% \parindent=\voorwit\relax} -\def\stelinspringenin% - {\dosingleempty\dostelinspringenin} - \def\doinspringen[#1]% {\processallactionsinset [#1] @@ -3952,7 +4090,7 @@ \def\dostartsimplecolumns[#1]% {\bgroup - \getparameters[\??kl][\c!breedte=\hsize,\c!afstand=1em,\c!n=2,#1]% + \getparameters[\??kl][\c!breedte=\hsize,\c!afstand=1.5\korpsgrootte,\c!n=2,#1]% \setrigidcolumnhsize\@@klbreedte\@@klafstand\@@kln \setbox\scratchbox=\vbox\bgroup \forgetall} % \blanko[\v!blokkeer] @@ -3984,19 +4122,71 @@ \v!tekst, \v!rechtermarge,\v!rechterrand] \fi\fi - \let\pageseparation=\!!zeropoint} + \stelachtergrondenin + [\c!status=\v!herhaal]} \def\toonkader{\dodoubleempty\dotoonkader} \def\tooninstellingA#1#2% {#1&\PtToCm{\the#2}&\the#2&\tttf\string#2\cr} -\def\tooninstellingC#1#2% - {#1&\dimen0=#2\PtToCm{\the\dimen0}&\dimen0=#2\the\dimen0&\tttf\string#2\cr} - \def\tooninstellingB#1#2#3% {#1&#3&\tttf\string#3\cr} +\def\tooninstellingC#1#2% \relax is really needed here ! + {#1&\dimen0=#2\PtToCm{\the\dimen0}&\dimen0=#2\relax\the\dimen0&\tttf\string#2\cr} + +%\startinterface english + +\def\tooninstellingen% fallback + {\noindent + \vbox + {\forgetall + \mindermeldingen + \switchtobodyfont[\v!klein] + \tabskip\!!zeropoint + \halign + {\strut##\quad\hss&##\quad\hss&##\quad\hss&##\hss\cr + \tooninstellingA{paperheight} \paperheight + \tooninstellingA{paperwidth} \paperwidth + \tooninstellingA{printpaperheight} \printpaperheight + \tooninstellingA{printpaperwidth} \printpaperwidth + \noalign{\blanko} + \tooninstellingA{topspace} \topspace + \tooninstellingA{backspace} \backspace + \tooninstellingA{height} \makeupheight + \tooninstellingA{width} \makeupwidth + \noalign{\blanko} + \tooninstellingA{top} \topheight + \tooninstellingC{topdistance} \topdistance + \tooninstellingA{header} \headerheight + \tooninstellingC{headerdistance} \headerdistance + \tooninstellingA{textheight} \textheight + \tooninstellingC{footerdistance} \footerdistance + \tooninstellingA{footer} \footerheight + \tooninstellingC{bottomdistance} \bottomdistance + \tooninstellingA{bottom} \bottomheight + \noalign{\blanko} + \tooninstellingA{leftedge} \leftedgewidth + \tooninstellingC{leftedgedistance} \leftedgedistance + \tooninstellingA{leftmargin} \leftmarginwidth + \tooninstellingC{leftmargindistance} \leftmargindistance + \tooninstellingA{textwidth} \textwidth + \tooninstellingC{rightmargindistance}\rightmargindistance + \tooninstellingA{rightmargin} \rightmarginwidth + \tooninstellingC{rightedgedistance} \rightedgedistance + \tooninstellingA{rightedge} \rightedgewidth + \noalign{\blanko} + \tooninstellingB{bodyfontsize} \the \globalbodyfontsize + \noalign{\blanko} + \tooninstellingB{line} \relax \normallineheight + \tooninstellingB{height} \relax \strutheightfactor + \tooninstellingB{depth} \relax \strutdepthfactor + \tooninstellingB{topskip} \relax \topskipfactor + \tooninstellingB{maxdepth} \relax \maxdepthfactor}}} + +%\stopinterface + \startinterface dutch \def\tooninstellingen% @@ -4048,57 +4238,6 @@ \stopinterface -\startinterface english - -\def\tooninstellingen% - {\noindent - \vbox - {\forgetall - \mindermeldingen - \switchtobodyfont[\v!klein] - \tabskip\!!zeropoint - \halign - {\strut##\quad\hss&##\quad\hss&##\quad\hss&##\hss\cr - \tooninstellingA{paperheight} \paperheight - \tooninstellingA{paperwidth} \paperwidth - \tooninstellingA{printpaperheight} \printpaperheight - \tooninstellingA{printpaperwidth} \printpaperwidth - \noalign{\blanko} - \tooninstellingA{topspace} \topspace - \tooninstellingA{backspace} \backspace - \tooninstellingA{height} \makeupheight - \tooninstellingA{width} \makeupwidth - \noalign{\blanko} - \tooninstellingA{top} \topheight - \tooninstellingC{topdistance} \topdistance - \tooninstellingA{header} \headerheight - \tooninstellingC{headerdistance} \headerdistance - \tooninstellingA{textheight} \textheight - \tooninstellingC{footerdistance} \footerdistance - \tooninstellingA{footer} \footerheight - \tooninstellingC{bottomdistance} \bottomdistance - \tooninstellingA{bottom} \bottomheight - \noalign{\blanko} - \tooninstellingA{leftedge} \leftedgewidth - \tooninstellingC{leftedgedistance} \leftedgedistance - \tooninstellingA{leftmargin} \leftmarginwidth - \tooninstellingC{leftmargindistance} \leftmargindistance - \tooninstellingA{textwidth} \textwidth - \tooninstellingC{rightmargindistance}\rightmargindistance - \tooninstellingA{rightmargin} \rightmarginwidth - \tooninstellingC{rightedgedistance} \rightedgedistance - \tooninstellingA{rightedge} \rightedgewidth - \noalign{\blanko} - \tooninstellingB{bodyfontsize} \the \globalbodyfontsize - \noalign{\blanko} - \tooninstellingB{line} \relax \normallineheight - \tooninstellingB{height} \relax \strutheightfactor - \tooninstellingB{depth} \relax \strutdepthfactor - \tooninstellingB{topskip} \relax \topskipfactor - \tooninstellingB{maxdepth} \relax \maxdepthfactor}}} - -\stopinterface - \startinterface german \def\tooninstellingen% @@ -4198,12 +4337,63 @@ \stopinterface +\startinterface romanian + +\def\tooninstellingen% + {\noindent + \vbox + {\forgetall + \mindermeldingen + \switchtobodyfont[\v!klein] + \tabskip\!!zeropoint + \halign + {\strut##\quad\hss&##\quad\hss&##\quad\hss&##\hss\cr + \tooninstellingA{paperheight} \paperheight + \tooninstellingA{paperwidth} \paperwidth + \tooninstellingA{printpaperheight} \printpaperheight + \tooninstellingA{printpaperwidth} \printpaperwidth + \noalign{\blanko} + \tooninstellingA{topspace} \topspace + \tooninstellingA{backspace} \backspace + \tooninstellingA{height} \makeupheight + \tooninstellingA{width} \makeupwidth + \noalign{\blanko} + \tooninstellingA{top} \topheight + \tooninstellingC{topdistance} \topdistance + \tooninstellingA{header} \headerheight + \tooninstellingC{headerdistance} \headerdistance + \tooninstellingA{textheight} \textheight + \tooninstellingC{footerdistance} \footerdistance + \tooninstellingA{footer} \footerheight + \tooninstellingC{bottomdistance} \bottomdistance + \tooninstellingA{bottom} \bottomheight + \noalign{\blanko} + \tooninstellingA{leftedge} \leftedgewidth + \tooninstellingC{leftedgedistance} \leftedgedistance + \tooninstellingA{leftmargin} \leftmarginwidth + \tooninstellingC{leftmargindistance} \leftmargindistance + \tooninstellingA{textwidth} \textwidth + \tooninstellingC{rightmargindistance}\rightmargindistance + \tooninstellingA{rightmargin} \rightmarginwidth + \tooninstellingC{rightedgedistance} \rightedgedistance + \tooninstellingA{rightedge} \rightedgewidth + \noalign{\blanko} + \tooninstellingB{bodyfontsize} \the \globalbodyfontsize + \noalign{\blanko} + \tooninstellingB{line} \relax \normallineheight + \tooninstellingB{height} \relax \strutheightfactor + \tooninstellingB{depth} \relax \strutdepthfactor + \tooninstellingB{topskip} \relax \topskipfactor + \tooninstellingB{maxdepth} \relax \maxdepthfactor}}} + +\stopinterface + \def\toonlayout% interfereert lelijk met een \typefile er na {\bgroup \pagina \toonkader \stellayoutin[\c!markering=\v!aan] - \herhaal[4*\tooninstellingen\pagina] + \dorecurse{4}{\tooninstellingen\pagina} \egroup} \definetwopasslist{\s!paragraph} @@ -4410,6 +4600,8 @@ {\setraggedness\middleraggedness \setraggedskips{2}{.5fil}{.5fil}{.3333em}{.5em}{0em}{0em}} +\newif\if@@asragged \@@asraggedtrue % old method + \def\dodosteluitlijnenin[#1]% {\doifinsetelse{\v!ruim} {#1}{\!!doneatrue}{\!!doneafalse}% \doifinsetelse{\v!breed}{#1}{\!!donebtrue}{\!!donebfalse}% @@ -4422,16 +4614,21 @@ \v!normaal=>\notragged, \v!ja=>\notragged, \v!nee=>\raggedright, - \v!binnen=>\setraggedparagraphmode\raggedleft\raggedright, - \v!buiten=>\setraggedparagraphmode\raggedright\raggedleft, - \v!links=>\if!!donea\veryraggedleft \else\raggedleft \fi, - \v!rechts=>\if!!donea\veryraggedright \else\raggedright \fi, +\if@@asragged\v!binnen\else\v!buiten\fi + =>\setraggedparagraphmode\raggedleft\raggedright, +\if@@asragged\v!buiten\else\v!binnen\fi + =>\setraggedparagraphmode\raggedright\raggedleft, +\if@@asragged\v!links\else\v!rechts\fi + =>\if!!donea\veryraggedleft \else\raggedleft \fi, +\if@@asragged\v!rechts\else\v!links\fi + =>\if!!donea\veryraggedright \else\raggedright \fi, \v!midden=>\if!!doneb\raggedwidecenter\else \if!!donea\veryraggedcenter\else\raggedcenter\fi\fi, \v!hangend=>\enableprotruding, \v!niethangend=>\disableprotruding, \v!afgebroken=>\dohyphens, \v!nietafgebroken=>\nohyphens, + \v!nieuw=>\@@asraggedfalse, % so new will give you consistency \v!reset=>\notragged\normalbottom]} \def\dosteluitlijnenin[#1]% @@ -4910,14 +5107,14 @@ {\inleftmargin {#1\relax \hskip\linkermargebreedte - \hskip\pageseparation + %\hskip\pageseparation \hskip\linkerrandafstand}} \def\inrightside#1% {\inrightmargin {\hskip\rechtermargebreedte \hskip\rechterrandafstand - \hskip\pageseparation + %\hskip\pageseparation #1}} %D We want to keep things efficient and therefore only handle @@ -5029,16 +5226,27 @@ \global\let\@@pnstatus\@@pnstatus +%\def\dostelpaginanummerin[#1]% +% {\getparameters +% [\??pn] +% [%\c!status=\v!start, +% \c!nummer=, +% #1]% +% \global\let\@@pnstatus\@@pnstatus +% \doifsomething{\@@pnnummer} +% {\setnummer[\s!page]{\@@pnnummer}% +% \setuserpageno{\ruwenummer[\s!page]}}} + \def\dostelpaginanummerin[#1]% - {\getparameters - [\??pn] - [%\c!status=\v!start, - \c!nummer=, - #1]% + {\getparameters[\??pn][\c!nummer=,#1]% \global\let\@@pnstatus\@@pnstatus \doifsomething{\@@pnnummer} {\setnummer[\s!page]{\@@pnnummer}% - \setuserpageno{\ruwenummer[\s!page]}}} + \setuserpageno{\ruwenummer[\s!page]}}% + % this makes starting at an even page possible + \ifnum\realpageno=1 \ifodd\pageno \else + \global\shiftedrealpagenotrue + \fi \fi} \def\stelpaginanummerin% {\dosingleargument\dostelpaginanummerin} @@ -5362,7 +5570,7 @@ {\hsize\linkerrandbreedte \hss\getvalue{\??tk#1\v!rand#2}}% \hskip\linkerrandafstand - \hskip\pageseparation + %\hskip\pageseparation \hbox to \linkermargebreedte {\hsize\linkermargebreedte \hsmash{\hbox to \linkermargebreedte @@ -5390,7 +5598,7 @@ \hsmash{\hbox to \rechtermargebreedte {#6{\??tk#1\v!marge\c!margetekst}\hss}}% \hss}% let op: \smashed - \hskip\pageseparation + %\hskip\pageseparation \hskip\rechterrandafstand \hbox to \rechterrandbreedte {\hsize\rechterrandbreedte @@ -5448,6 +5656,8 @@ % \hoofdstuk{eerste} \dorecurse{20}{\input tufte \relax} % \hoofdstuk{tweede} \dorecurse{20}{\input tufte \relax} +% todo: commalist aflopen {empty,next} {first,empty} + \def\plaatslayoutregel#1#2% % handelt o.b.v. tekst {\ExpandFirstAfter\processaction [\getvalue{\??tk#1\v!tekst\c!status}] @@ -5639,7 +5849,7 @@ \unexpanded\def\@@plaatspaginanummer% called in empty tests %{\doif{\@@pnstatus}{\v!start} {\doif{\@@nmstatus\@@pnstatus}{\v!start\v!start} - {{\@@nmcommando{\doattributes\??nm\c!letter\c!kleur{\volledigepaginanummer}}}}} + {{\@@nmcommando{\doattributes\??nm\c!letter\c!kleur{\completepagenumber}}}}} \def\@@plaatspaginascheider% still used ? %{\doif{\@@pnstatus}{\v!start}% @@ -5663,10 +5873,12 @@ \donexttracklevel{##1}}% \donexttrackcommando{\firstsection}} -\unexpanded\def\volledigepaginanummer% +\unexpanded\def\completepagenumber% {\doif{\@@nmstatus\@@pnstatus}{\v!start\v!start} {\@@nmlinks\labeltexts{\v!paginanummer}{\pageprefixes\pagenumber}\@@nmrechts}} +\let\volledigepaginanummer\completepagenumber + \unexpanded\def\plaatspaginanummer% {\doif{\@@nmstatus\@@pnstatus}{\v!start\v!start} {\labeltexts{\v!paginanummer}{\pagenumber}}} @@ -6636,6 +6848,10 @@ \global\sidefloatvsize=\nofloatvsize \global\floatflagfalse} +\def\forgetsidefloats% + {\global\sidefloatvsize=\nofloatvsize + \global\floatflagfalse} + \def\flushsidefloatsafterpar% {\xdef\oldpagetotal{\the\pagetotal}% \gdef\checksidefloat% @@ -6736,8 +6952,10 @@ \witruimte \previoussidefloat \stallsidefloat - \setbox\floatbox=\hbox{\vbox % pretty ugly, will be rewritten - {\vskip\ifmarginfloat-\sidefloattopskip\else\sidefloattopoffset\fi#1}} +% \setbox\floatbox=\hbox{\vbox % pretty ugly, will be rewritten +% {\vskip\ifmarginfloat-\sidefloattopskip\else\sidefloattopoffset\fi#1}} + \setbox\floatbox=\hbox + {\vbox{\vskip\ifmarginfloat-\fi\sidefloattopoffset#1}}% \measuresidefloat \ifroomforfloat \setsidefloat @@ -6810,14 +7028,14 @@ \ifrightfloat \hfill \ifmarginfloat - \rlap{\hskip\rechtermargeafstand\unhbox\floatbox}% + \rlap{\hskip\rechtermargeafstand\hskip\rightskip\unhbox\floatbox}% \else \unhbox\floatbox \fi \else \noindent \ifmarginfloat - \llap{\unhbox\floatbox\hskip\linkermargeafstand}% + \llap{\unhbox\floatbox\hskip\leftskip\hskip\linkermargeafstand}% \else \unhbox\floatbox \fi @@ -7261,7 +7479,7 @@ % testfloatbox gaat mis, niet in midden, dus elders \def\flushfloatbox% nog verder doorvoeren en meer info in marge - {\snaptogrid\hbox{\iftestfloatbox\ruledhbox\fi{\box\floatbox}}} + {\snaptogrid\hbox{\iftestfloatbox\ruledhbox\fi{\copy\floatbox}}} % beter de laatste skip buiten de \insert uitvoeren, % bovendien bij volle flush onder baseline. @@ -7555,150 +7773,330 @@ \fi}}% \begstrut#3\endstrut\endgraf}} +% \def\dosetpagfloat#1#2#3#4% \copy wegwerken +% {\bgroup +% \forgetall +% \postponefootnotes +% \mindermeldingen +% %\showcomposition +% \putborderedfloat#4\in4\\% +% \def\locatefloat% +% {\doregelplaats\@@flflplaats}% +% \ConvertToConstant\doifelse{#3}{\v!geen} +% {\global\setbox\floatbox=\vbox % pas op als wd groter dan hsize +% {\ifbinnenkolommen\ifdim\wd4>\hsize +% \let\locatefloat\relax +% \fi\fi +% \locatefloat{\copy4}}} % we need \wd4 later +% {\setbox2=\hbox +% {\footnotesenabledfalse\putcompletecaption{#4}{#2}{#3}{0}}% +% \doifinsetelse{\@@kjkjplaats}{\v!hoog,\v!midden,\v!laag} +% {\dimen0=\hsize +% \advance\dimen0 by -\wd4\relax +% \advance\dimen0 by -\@@bkmarge\relax % \was tfskipsize\relax +% \ifdim\wd2>\dimen0\relax +% \dimen2=1.3\dimen0\relax +% \ifdim\wd2<\dimen2\relax +% \dimen0=0.8\dimen0\relax +% \fi +% \fi +% \setbox2=\vbox +% {\forgetall +% \hsize=\dimen0\relax +% \raggedright +% \putcompletecaption{#4}{#2}{#3}{1}}} +% {\doifelse{\@@kjkjbreedte}{\v!max} +% {\dosetraggedvbox{\@@kjkjuitlijnen}% +% \setbox2=\raggedbox +% {\hsize\wd4\relax +% \putcompletecaption{#4}{#2}{#3}{0}}} +% {\ifdim\wd2>\wd4\relax +% \doifelse{\@@kjkjbreedte}{\v!passend} +% {\ifdim\wd4<15\korpsgrootte\relax +% \dimen0=15\korpsgrootte\relax +% \else +% \dimen0=\wd4\relax +% \fi +% \ifdim\wd4>\hsize +% \setbox0=\vbox +% {\forgetall +% \hsize=1.0\wd4 +% \footnotesenabledfalse +% \putcompletecaption{#4}{#2}{#3}{0}}% +% \ifdim\ht0>\lineheight\relax +% \setbox2=\vbox +% {\forgetall +% \hsize=0.9\wd4 +% \putcompletecaption{#4}{#2}{#3}{0}}% +% \else +% %\setbox2=\vbox % was 0, bug +% % {\forgetall +% % \hsize=1.0\wd4 +% % \putcompletecaption{#4}{#2}{#3}{0}}% +% \setbox2=\hbox{\putcompletecaption{#4}{#2}{#3}{0}}% +% \fi +% \else +% \setbox0=\vbox +% {\forgetall +% \dimen2=1.5\dimen0\relax +% \ifdim\dimen2<\hsize +% \hsize=\dimen2\relax +% \fi +% \footnotesenabledfalse +% \putcompletecaption{#4}{#2}{#3}{0}}% +% \ifdim\ht0>\lineheight\relax +% \setbox2=\vbox +% {\forgetall +% \dimen2=1.2\dimen0\relax +% \ifdim\dimen2<\hsize +% \hsize=\dimen2\relax +% \fi +% \putcompletecaption{#4}{#2}{#3}{0}}% +% \else +% %\setbox2=\vbox % was 0, bug +% % {\forgetall +% % \dimen2=1.5\dimen0\relax +% % \ifdim\dimen2<\hsize +% % \hsize=\dimen2\relax +% % \fi +% % \putcompletecaption{#4}{#2}{#3}{0}}% +% \setbox2=\hbox{\putcompletecaption{#4}{#2}{#3}{0}}% +% \fi +% \fi} +% {\dosetraggedvbox{\@@kjkjuitlijnen}% +% \setbox2=\raggedbox +% {\hsize\@@kjkjbreedte +% \putcompletecaption{#4}{#2}{#3}{0}}}% +% \else +% % \setbox2=\hbox % we want footnotes ! +% % {\putcompletecaption{#4}{#2}{#3}{0}}% +% \raggedcenter % default +% \dosetraggedvbox{\@@kjkjuitlijnen}% +% \setbox2=\raggedbox +% {\hsize\wd4 +% \putcompletecaption{#4}{#2}{#3}{0}}% +% \fi}}% +% \global\setbox\floatbox=\vbox +% {\forgetall +% \processaction +% [\@@kjkjplaats] +% [ \v!boven=>\locatefloat{\copy2}% +% \endgraf\@@kjkjtussen +% \locatefloat{\copy4}, +% \v!onder=>\locatefloat{\copy4}% +% \endgraf\@@kjkjtussen +% \locatefloat{\copy2}, +% \v!hoog=>\locatefloat +% {\doifelse{\@@flflplaats}{\v!links} +% {\copy4 +% \tfskip +% \vbox to\ht4{\@@kjkjtussen\copy2\vfill}} +% {\vbox to\ht4{\@@kjkjtussen\copy2\vfill}% +% \tfskip +% \copy4}}, +% \v!laag=>\locatefloat +% {\doifelse{\@@flflplaats}{\v!links} +% {\copy4 +% \tfskip +% \vbox to\ht4 +% {\vfill\copy2\@@kjkjtussen}} +% {\vbox to\ht4 +% {\vfill\copy2\@@kjkjtussen}% +% \tfskip +% \copy4}}, +% \v!midden=>\locatefloat +% {\doifelse{\@@flflplaats}{\v!links} +% {\copy4 +% \tfskip +% \vbox to\ht4{\vfill\copy2\vfill}} +% {\vbox to\ht4{\vfill\copy2\vfill}% +% \tfskip +% \copy4}}, +% \v!geen=>\locatefloat{\copy4}]}}% +% % extended: +% \postcenterfloatbox{\wd4}% +% %\ifdim\wd4>\hsize +% % \global\setbox\floatbox= +% % \hbox to \ifbinnenkolommen\wd4\else\hsize\fi +% % {\hss\box\floatbox\hss}% +% %\fi +% \egroup} + +% new + +\newbox\tempfloatbox +\newbox\tempcaptionbox + +%\stelblokkopjesin[\c!breedte=5cm] +%\stelblokkopjesin[\c!uitlijnen=\v!links] +%\stelblokkopjesin[\c!uitlijnen=\v!rechts] + \def\dosetpagfloat#1#2#3#4% \copy wegwerken {\bgroup \forgetall \postponefootnotes \mindermeldingen - %\showcomposition - \putborderedfloat#4\in4\\% + \putborderedfloat#4\in\tempfloatbox\\% \def\locatefloat% {\doregelplaats\@@flflplaats}% \ConvertToConstant\doifelse{#3}{\v!geen} - {\global\setbox\floatbox=\vbox % pas op als wd groter dan hsize - {\ifbinnenkolommen\ifdim\wd4>\hsize - \let\locatefloat\relax - \fi\fi - \locatefloat{\copy4}}} % we need \wd4 later - {\setbox2=\hbox + {\dopreparenocaption{#1}{#2}{#3}{#4} + \edef\width{\the\wd\floatbox}} + {\setbox\tempcaptionbox=\hbox {\footnotesenabledfalse\putcompletecaption{#4}{#2}{#3}{0}}% \doifinsetelse{\@@kjkjplaats}{\v!hoog,\v!midden,\v!laag} - {\dimen0=\hsize - \advance\dimen0 by -\wd4\relax - \advance\dimen0 by -\@@bkmarge\relax % \was tfskipsize\relax - \ifdim\wd2>\dimen0\relax - \dimen2=1.3\dimen0\relax - \ifdim\wd2<\dimen2\relax - \dimen0=0.8\dimen0\relax - \fi - \fi - \setbox2=\vbox - {\forgetall - \hsize=\dimen0\relax - \raggedright - \putcompletecaption{#4}{#2}{#3}{1}}} + {\dopreparesidecaption{#1}{#2}{#3}{#4}} {\doifelse{\@@kjkjbreedte}{\v!max} - {\dosetraggedvbox{\@@kjkjuitlijnen}% - \setbox2=\raggedbox - {\hsize\wd4\relax - \putcompletecaption{#4}{#2}{#3}{0}}} - {\ifdim\wd2>\wd4\relax + {\dopreparestackcaptionmax{#1}{#2}{#3}{#4}} + {\ifdim\wd\tempcaptionbox>\wd\tempfloatbox % wider caption \doifelse{\@@kjkjbreedte}{\v!passend} - {\ifdim\wd4<15\korpsgrootte\relax - \dimen0=15\korpsgrootte\relax - \else - \dimen0=\wd4\relax - \fi - \ifdim\wd4>\hsize - \setbox0=\vbox - {\forgetall - \hsize=1.0\wd4 - \footnotesenabledfalse - \putcompletecaption{#4}{#2}{#3}{0}}% - \ifdim\ht0>\lineheight\relax - \setbox2=\vbox - {\forgetall - \hsize=0.9\wd4 - \putcompletecaption{#4}{#2}{#3}{0}}% - \else - %\setbox2=\vbox % was 0, bug - % {\forgetall - % \hsize=1.0\wd4 - % \putcompletecaption{#4}{#2}{#3}{0}}% - \setbox2=\hbox{\putcompletecaption{#4}{#2}{#3}{0}}% - \fi - \else - \setbox0=\vbox - {\forgetall - \dimen2=1.5\dimen0\relax - \ifdim\dimen2<\hsize - \hsize=\dimen2\relax - \fi - \footnotesenabledfalse - \putcompletecaption{#4}{#2}{#3}{0}}% - \ifdim\ht0>\lineheight\relax - \setbox2=\vbox - {\forgetall - \dimen2=1.2\dimen0\relax - \ifdim\dimen2<\hsize - \hsize=\dimen2\relax - \fi - \putcompletecaption{#4}{#2}{#3}{0}}% - \else - %\setbox2=\vbox % was 0, bug - % {\forgetall - % \dimen2=1.5\dimen0\relax - % \ifdim\dimen2<\hsize - % \hsize=\dimen2\relax - % \fi - % \putcompletecaption{#4}{#2}{#3}{0}}% - \setbox2=\hbox{\putcompletecaption{#4}{#2}{#3}{0}}% - \fi - \fi} - {\dosetraggedvbox{\@@kjkjuitlijnen}% - \setbox2=\raggedbox - {\hsize\@@kjkjbreedte - \putcompletecaption{#4}{#2}{#3}{0}}}% + {\dopreparestackcaptionaut{#1}{#2}{#3}{#4}} + {\dopreparestackcaptionwid{#1}{#2}{#3}{#4}}% \else - \setbox2=\hbox % we want footnotes ! - {\putcompletecaption{#4}{#2}{#3}{0}}% - \fi}}% - \global\setbox\floatbox=\vbox - {\forgetall - \processaction - [\@@kjkjplaats] - [ \v!boven=>\locatefloat{\copy2}% - \endgraf\@@kjkjtussen - \locatefloat{\copy4}, - \v!onder=>\locatefloat{\copy4}% - \endgraf\@@kjkjtussen - \locatefloat{\copy2}, - \v!hoog=>\locatefloat - {\doifelse{\@@flflplaats}{\v!links} - {\copy4 - \tfskip - \vbox to\ht4{\@@kjkjtussen\copy2\vfill}} - {\vbox to\ht4{\@@kjkjtussen\copy2\vfill}% - \tfskip - \copy4}}, - \v!laag=>\locatefloat - {\doifelse{\@@flflplaats}{\v!links} - {\copy4 - \tfskip - \vbox to\ht4 - {\vfill\copy2\@@kjkjtussen}} - {\vbox to\ht4 - {\vfill\copy2\@@kjkjtussen}% - \tfskip - \copy4}}, - \v!midden=>\locatefloat - {\doifelse{\@@flflplaats}{\v!links} - {\copy4 - \tfskip - \vbox to\ht4{\vfill\copy2\vfill}} - {\vbox to\ht4{\vfill\copy2\vfill}% - \tfskip - \copy4}}, - \v!geen=>\locatefloat{\copy4}]}}% - % extended: - \postcenterfloatbox{\wd4}% - %\ifdim\wd4>\hsize - % \global\setbox\floatbox= - % \hbox to \ifbinnenkolommen\wd4\else\hsize\fi - % {\hss\box\floatbox\hss}% - %\fi + \dopreparestackcaptionmin{#1}{#2}{#3}{#4}% + \fi}} + \edef\width{\the\wd\tempfloatbox}% + \buildfloatbox}% + \postcenterfloatbox\width \egroup} +\def\dopreparenocaption#1#2#3#4% + {\global\setbox\floatbox=\vbox % pas op als wd groter dan hsize + {\ifbinnenkolommen\ifdim\wd\tempfloatbox>\hsize + \let\locatefloat\relax + \fi\fi + \locatefloat{\copy\tempfloatbox}}} + +\def\dopreparestackcaptionmax#1#2#3#4% + {\dosetraggedvbox{\@@kjkjuitlijnen}% + \setbox\tempcaptionbox=\raggedbox + {\hsize\wd\tempfloatbox + \putcompletecaption{#4}{#2}{#3}{0}}} + +\def\captionminwidth {15\korpsgrootte} +\def\captionovershoot {2em} + +\def\dopreparestackcaptionaut#1#2#3#4% + {\doifsomething{\@@kjkjuitlijnen} + {\ExpandBothAfter\doifnotinset{\v!midden}{\@@kjkjuitlijnen} + {\let\captionovershoot\!!zeropoint}}% + \ifdim\wd\tempfloatbox>\hsize + % float is wider than \hsize + \dosetraggedvbox\@@kjkjuitlijnen + \setbox\scratchbox=\raggedbox % trial run + {\hsize=\wd\tempfloatbox + \footnotesenabledfalse + \putcompletecaption{#4}{#2}{#3}{0}}% + \ifdim\ht\scratchbox>\lineheight % more lines + \dosetraggedvbox\@@kjkjuitlijnen + \setbox\tempcaptionbox=\raggedbox + {\hsize=\wd\tempfloatbox + \advance\hsize -\captionovershoot\relax + \ifdim\hsize<\captionminwidth\relax + \hsize=\wd\tempfloatbox + \fi + \putcompletecaption{#4}{#2}{#3}{0}}% + \else + \setbox\tempcaptionbox=\raggedbox + {\hsize=\wd\tempfloatbox + \putcompletecaption{#4}{#2}{#3}{0}}% + \fi + \else + % float is smaller of equal to \hsize + \scratchdimen=\ifdim\wd\tempfloatbox<\captionminwidth\relax + \captionminwidth % float smaller than min width + \else + \wd\tempfloatbox % float width + \fi + \setbox\scratchbox=\vbox % test with overshoot + {\advance\scratchdimen \captionovershoot + \advance\scratchdimen 3em % an average word length + \ifdim\scratchdimen<\hsize \hsize=\scratchdimen \fi + \footnotesenabledfalse + \putcompletecaption{#4}{#2}{#3}{0}}% + \ifdim\ht\scratchbox>\lineheight + % at least an average word longer than a line + \dosetraggedvbox\@@kjkjuitlijnen + \setbox\tempcaptionbox\raggedbox + {\advance\scratchdimen \captionovershoot + \ifdim\scratchdimen<\hsize \hsize=\scratchdimen \fi + \putcompletecaption{#4}{#2}{#3}{0}}% + \else + % just over a line, don't use an overshoot + \dosetraggedvbox\@@kjkjuitlijnen + \setbox\tempcaptionbox=\raggedbox + {\hsize\scratchdimen + \putcompletecaption{#4}{#2}{#3}{0}}% + \fi + \fi} + +\def\dopreparestackcaptionwid#1#2#3#4% + {\dosetraggedvbox\@@kjkjuitlijnen + \setbox\tempcaptionbox=\raggedbox + {\hsize\@@kjkjbreedte + \putcompletecaption{#4}{#2}{#3}{0}}} + +\def\dopreparestackcaptionmin#1#2#3#4% + {\raggedcenter % the default + \dosetraggedvbox\@@kjkjuitlijnen % when given + \setbox\tempcaptionbox=\raggedbox % vbox, keeps footnotes + {\hsize\wd\tempfloatbox + \putcompletecaption{#4}{#2}{#3}{0}}} + +\def\dopreparesidecaption#1#2#3#4% + {\dimen0=\hsize + \advance\dimen0 by -\wd\tempfloatbox + \advance\dimen0 by -\@@bkmarge\relax % was \tfskipsize\relax + \ifdim\wd\tempcaptionbox>\dimen0 + \dimen2=1.3\dimen0 + \ifdim\wd\tempcaptionbox<\dimen2 + \dimen0=0.8\dimen0 + \fi + \fi + \setbox\tempcaptionbox=\vbox + {\hsize=\dimen0 + \raggedright + \putcompletecaption{#4}{#2}{#3}{1}}} + +\def\buildfloatbox% + {\global\setbox\floatbox=\vbox + {\forgetall + \processaction + [\@@kjkjplaats] + [ \v!boven=>\locatefloat{\box\tempcaptionbox}% + \endgraf\@@kjkjtussen + \locatefloat{\box\tempfloatbox}, + \v!onder=>\locatefloat{\box\tempfloatbox}% + \endgraf\@@kjkjtussen + \locatefloat{\box\tempcaptionbox}, + \v!hoog=>\locatefloat + {\doifelse{\@@flflplaats}{\v!links} + {\box\tempfloatbox + \tfskip + \vbox to\ht\tempfloatbox{\@@kjkjtussen\box\tempcaptionbox\vfill}} + {\vbox to\ht\tempfloatbox{\@@kjkjtussen\box\tempcaptionbox\vfill}% + \tfskip + \box\tempfloatbox}}, + \v!laag=>\locatefloat + {\doifelse{\@@flflplaats}{\v!links} + {\box\tempfloatbox + \tfskip + \vbox to\ht\tempfloatbox + {\vfill\box\tempcaptionbox\@@kjkjtussen}} + {\vbox to\ht\tempfloatbox + {\vfill\box\tempcaptionbox\@@kjkjtussen}% + \tfskip + \box\tempfloatbox}}, + \v!midden=>\locatefloat + {\doifelse{\@@flflplaats}{\v!links} + {\box\tempfloatbox + \tfskip + \vbox to\ht\tempfloatbox{\vfill\box\tempcaptionbox\vfill}} + {\vbox to\ht\tempfloatbox{\vfill\box\tempcaptionbox\vfill}% + \tfskip + \box\tempfloatbox}}, + \v!geen=>\locatefloat{\box\tempfloatbox}]}} + \newif\ifpostponecolumnfloats \postponecolumnfloatsfalse % don't change \def\postcenterfloatbox#1% @@ -7914,156 +8312,6 @@ \def\splitsplaatsblok% {\dosingleempty\dosplitsplaatsblok} -\abovedisplayskip = \!!zeropoint\relax -\abovedisplayshortskip = \!!zeropoint\relax % evt. 0pt minus 3pt -\belowdisplayskip = \!!zeropoint\relax -\belowdisplayshortskip = \!!zeropoint\relax % evt. 0pt minus 3pt - -\predisplaypenalty = 0 -\postdisplaypenalty = 0 % -5000 gaat mis, zie penalty bij \paragraaf - -\doorlabelen - [\v!formule] - [\c!tekst=\v!formule, - \c!wijze=\@@fmwijze, - \c!blokwijze=\@@fmblokwijze, - \c!plaats=\v!intekst] - -\def\stelformulesin% - {\dodoubleargument\getparameters[\??fm]} - -%% - -\newconditional\handleformulanumber -\newconditional\incrementformulanumber - -\def\dododoformulenummer#1#2#3#4% (#1,#2)=outer(ref,sub) (#3,#4)=inner(ref,sub) - {\hbox\bgroup - \ifconditional\handleformulanumber - \ifconditional\incrementformulanumber - \verhoognummer[\v!formule]% - \fi - \maakhetnummer[\v!formule]% - \setbox0=\hbox{\ignorespaces#2\unskip}% - \ifdim\wd0>\!!zeropoint - \edef\hetsubnummer{#2}% - \else - \let\hetsubnummer\empty - \fi - \doifsomething{#1}{\rawreference{\s!for}{#1}{\hetnummer\hetsubnummer}}% - \setbox0=\hbox{\ignorespaces#4\unskip}% - \ifdim\wd0>\!!zeropoint - \edef\hetsubnummer{#4}% - \fi - \doifsomething{#3}{\rawreference{\s!for}{#3}{\hetnummer\hetsubnummer}}% - \rm\strut\@@fmlinks - \ignorespaces\hetnummer\ignorespaces\hetsubnummer\unskip - \@@fmrechts - \fi - \egroup} - -\def\dodoformulenummer[#1][#2][#3]% - {\doquadruplegroupempty\dododoformulenummer{#1}{#2}{#3}} - -\def\doformulenummer% - {\dotripleempty\dodoformulenummer} - -% - -\letvalue{\e!start\e!formule}=\undefined -\letvalue{\e!stop \e!formule}=\undefined - -%\def\dodoplaatsstartformule#1[#2]#3\startformule#4\stopformule% -% {\dodoplaatsformule#1[#2]#3$$#4$$} - -\expanded - {\def\noexpand\dodoplaatsstartformule##1[##2]##3\csname\e!start\e!formule\endcsname##4\csname\e!stop\e!formule\endcsname% - {\noexpand\dodoplaatsformule##1[##2]##3$$##4$$}} - -\setvalue{\e!start\e!formule}{\dostartformula} -\setvalue{\e!stop \e!formule}{\dostopformula} - -\def\dostartformula% - {\dowithnextbox - {\scratchskip=\ifdim\tussenwit>\!!zeropoint\tussenwit\else\blankoskip\fi - \startregelcorrectie[\the\scratchskip] - \box\nextbox - \stopregelcorrectie} - \vbox\bgroup - \forgetall - \abovedisplayskip\!!zeropoint - \belowdisplayskip\!!zeropoint - \abovedisplayshortskip\!!zeropoint - \belowdisplayshortskip\!!zeropoint -\vbox{\strut}\vskip-2\openlineheight % Why 2 and not 1? ; 'open' is new - $$\def\dostopformula{$$\egroup}} - -\def\plaatsformule% - {\settrue\incrementformulanumber - \dodoubleempty\doplaatsformule} - -\def\plaatssubformule% - {\setfalse\incrementformulanumber - \dodoubleempty\doplaatsformule} - -\def\doplaatsformule[#1][#2]% #2 = dummy, gobbles spaces - {\def\redoplaatsformule% - {\ifx\next\bgroup - \expandafter\xdoplaatsformule - \else - \expandafter\ydoplaatsformule - \fi[#1]}% - \futurelet\next\redoplaatsformule} - -\long\def\xdoplaatsformule[#1]#2#3% #3 gobbles spaces - {\def\redoplaatsformule% - {\expandafter\ifx\csname\e!start\e!formule\endcsname\next - \expandafter\dodoplaatsstartformule - \else - \expandafter\dodoplaatsformule - \fi[#1]{#2}}% - \futurelet\next\redoplaatsformule#3} - -\long\def\ydoplaatsformule[#1]#2% #3 gobbles spaces - {\def\redoplaatsformule% - {\expandafter\ifx\csname\e!start\e!formule\endcsname\next - \expandafter\dodoplaatsstartformule - \else - \expandafter\dodoplaatsformule - \fi[#1]}% - \futurelet\next\redoplaatsformule#2} - -\def\dodoplaatsformule[#1]#2$$#3$$% - {\begingroup - \setdisplayskips - \doifelse{#1}{-} - {\setfalse\handleformulanumber} - {\doifelse{#2}{-} - {\setfalse\handleformulanumber} - {\settrue\handleformulanumber}}% - \ifconditional\handleformulanumber - \def\formulenummer% - {\global\let\doeqno\empty - \global\let\doleqno\empty - %\global\let\formulenummer\doformulenummer ??? - \doformulenummer[#1][#2]}% - \def\subformulenummer% - {\setfalse\incrementformulanumber - \formulenummer}% - \gdef\doleqno{\leqno{\doformulenummer[#1][#2][]{}}}% - \gdef\doeqno {\eqno {\doformulenummer[#1][#2][]{}}}% - \doifelse{\@@fmplaats}{\v!links} - {\dostartformula#3\doleqno\dostopformula} - {\dostartformula#3\doeqno \dostopformula}% - \else - \def\formulenummer{\doformulenummer[#1][#2]}% - \let\subformulenummer\doformulenummer - \dostartformula#3\dostopformula - \fi - \par - \ignorespaces - \endgroup} - \newbox\facingbox \newbox\facingpage @@ -8129,23 +8377,20 @@ \def\ifsomebackgroundfound#1% {\edef\!!stringe{\??ma#1}% - \doifelsevaluenothing{\!!stringe\c!achtergrond } + \doifelsevaluenothing{\!!stringe\c!achtergrond } + {\doifelsevaluenothing{\!!stringe\c!voorgrondkleur} {\doifelsevalue{\!!stringe\c!kader }\v!aan\!!doneatrue {\doifelsevalue{\!!stringe\c!linkerkader }\v!aan\!!doneatrue {\doifelsevalue{\!!stringe\c!rechterkader}\v!aan\!!doneatrue {\doifelsevalue{\!!stringe\c!bovenkader }\v!aan\!!doneatrue {\doifelsevalue{\!!stringe\c!onderkader }\v!aan\!!doneatrue \!!doneafalse}}}}} + \!!doneatrue} \!!doneatrue \if!!donea} \def\doaddpagebackground#1#2% - {\doifelsevaluenothing{\??ma#1\c!achtergrond} - {\doifelsevaluenothing{\??ma#1\c!kader} - {\donefalse} - {\donetrue}} - {\donetrue}% - \ifdone + {\ifsomebackgroundfound{#1}% \edef\setpagebackgrounddepth% {\dp#2=\the\dp#2}% \setbox#2=\vbox\localframed @@ -8175,12 +8420,18 @@ % #3 = pos % #4 = pos +%D Better (no zero dimension mp figs) and faster: + \def\dododopagebodybackground#1#2#3#4% {\ifsomebackgroundfound{#3#4}% - \localframed - [\??ma#3#4] - [\c!breedte=#1,\c!hoogte=#2,\c!offset=\v!overlay] - {\getvalue{\??ma#3#4\c!commando}}% {\hsize=#1\vsize=#2....} + \ifdim#1>\!!zeropoint\relax + \ifdim#2>\!!zeropoint\relax + \localframed + [\??ma#3#4] + [\c!breedte=#1,\c!hoogte=#2,\c!offset=\v!overlay] + {\getvalue{\??ma#3#4\c!commando}}% {\hsize=#1\vsize=#2....} + \fi + \fi \else \hskip#1% \fi} @@ -8192,13 +8443,13 @@ \goleftonpage \dododopagebodybackground\linkerrandbreedte#2#1\v!linkerrand \hskip\linkerrandafstand - \hskip\pageseparation + %\hskip\pageseparation \dododopagebodybackground\linkermargebreedte#2#1\v!linkermarge \hskip\linkermargeafstand \dododopagebodybackground\zetbreedte#2#1\v!tekst \hskip\rechtermargeafstand \dododopagebodybackground\rechtermargebreedte#2#1\v!rechtermarge - \hskip\pageseparation + %\hskip\pageseparation \hskip\rechterrandafstand \dododopagebodybackground\rechterrandbreedte#2#1\v!rechterrand \egroup\egroup @@ -8228,7 +8479,6 @@ \def\setbackgroundboxes% {\ifsomebackground\ifnewbackground \showmessage{\m!layouts}{8}{}% - \docheckbackgrounddefinitions \setbackgroundbox\leftbackground\relax \ifdubbelzijdig \setbackgroundbox\rightbackground\doswapmargins @@ -8266,50 +8516,50 @@ % saves us hundreds of unused hash entries if not needed -\def\docheckbackgrounddefinitions% allocates about 1000 hash-entries - {\doifdefined{\??ma\v!pagina\c!achtergrond}% skip first pass - {\def\dodocommando##1##2% - {\copylocalframed[\??ma##1##2][\??ma\v!pagina]% - \getparameters[\??ma##1##2] - [\c!achtergrond=,\c!kader=,\c!kleur=,\c!raster=, - \c!onderkader=,\c!bovenkader=,\c!linkerkader=,\c!rechterkader=]% - \copyparameters - [\??ma##1##2\c!kader][\??ma##1##2] - [\c!kleur,\c!raster]% - \copyparameters - [\??ma##1##2\c!achtergrond][\??ma##1##2] - [\c!kleur,\c!raster]}% - \def\docommando##1% - {\dodocommando##1\v!linkerrand \dodocommando##1\v!linkermarge - \dodocommando##1\v!tekst - \dodocommando##1\v!rechtermarge \dodocommando##1\v!rechterrand}% - \docommando\v!boven \docommando\v!hoofd - \docommando\v!tekst - \docommando\v!voet \docommando\v!onder - \def\docheckbackgrounddefinitions% - {\global\somebackgroundtrue}}} +%\def\docheckbackgrounddefinitions% allocates about 1000 hash-entries +% {\doifdefined{\??ma\v!pagina\c!achtergrond}% skip first pass +% {\def\dodocommando##1##2% +% {\copylocalframed[\??ma##1##2][\??ma\v!pagina]% +% \getparameters[\??ma##1##2] +% [\c!achtergrond=,\c!kader=,\c!kleur=,\c!raster=, +% \c!onderkader=,\c!bovenkader=,\c!linkerkader=,\c!rechterkader=]% +% \copyparameters +% [\??ma##1##2\c!kader][\??ma##1##2] +% [\c!kleur,\c!raster]% +% \copyparameters +% [\??ma##1##2\c!achtergrond][\??ma##1##2] +% [\c!kleur,\c!raster]}% +% \def\docommando##1% +% {\dodocommando##1\v!linkerrand \dodocommando##1\v!linkermarge +% \dodocommando##1\v!tekst +% \dodocommando##1\v!rechtermarge \dodocommando##1\v!rechterrand}% +% \docommando\v!boven \docommando\v!hoofd +% \docommando\v!tekst +% \docommando\v!voet \docommando\v!onder +% \def\docheckbackgrounddefinitions% +% {\global\somebackgroundtrue}}} \def\dostelachtergrondenin[#1][#2][#3]% {\ifthirdargument - \docheckbackgrounddefinitions + \global\somebackgroundtrue \def\docommando##1% {\doifinsetelse{##1}{\v!papier,\v!pagina,\v!linkerpagina,\v!rechterpagina} {\getparameters[\??ma##1][#3]% - \dosetpageseparation} + }%\dosetpageseparation} {\def\dodocommando####1% {\getparameters[\??ma##1####1][#3]}% \processcommalist[#2]\dodocommando}}% \processcommalist[#1]\docommando \else\ifsecondargument - \docheckbackgrounddefinitions - \doifcommonelse{#1}{\v!papier,\v!pagina,\v!linkerpagina,\v!rechterpagina} + \global\somebackgroundtrue + \doifcommonelse{#1}{\v!tekst,\v!papier,\v!pagina,\v!linkerpagina,\v!rechterpagina} {\def\docommando##1% {\getparameters[\??ma##1][#2]}% \processcommalist[#1]\docommando - \dosetpageseparation} - {\dostelachtergrondenin - [#1] - [\v!linkerrand,\v!linkermarge,\v!tekst,\v!rechtermarge,\v!rechterrand] + }%\dosetpageseparation} + {\stelachtergrondenin + [#1]% + [\v!linkerrand,\v!linkermarge,\v!tekst,\v!rechtermarge,\v!rechterrand]% [#2]}% \else\iffirstargument \getparameters[\??ma][#1]% @@ -8360,58 +8610,35 @@ [\??ma\v!rechterpagina\c!achtergrond][\??ma\v!rechterpagina] [\c!offset,\c!diepte,\c!straal,\c!hoek,\c!kleur,\c!raster] -\def\@@pageseparation {6pt} -\def\pageseparation {0pt} - -\def\paginascheiding {\pageseparation} - -\def\dosetpageseparation% - {\let\pageseparation=\!!zeropoint - \let\showpageseparation=\relax - \processaction - [\getvalue{\??ma\v!pagina\c!scheider}] - [ \v!ruim=>\let\pageseparation=\@@pageseparation - \let\showpageseparation=\showloosepageseparation, - \v!passend=>\let\pageseparation=\@@pageseparation - \let\showpageseparation=\showtightpageseparation]} - -\def\showloosepageseparation% - {\ifdim\pageseparation>\!!zeropoint\relax - \bgroup - \setbox0=\hbox - {\vrule - \!!width\pageseparation - \!!depth\papierhoogte - \!!height\papierhoogte}% - \ht0=\!!zeropoint - \dp0=\!!zeropoint - \box0 - \egroup - \fi} - -\def\showtightpageseparation% - {\ifdim\pageseparation>\!!zeropoint\relax - \bgroup - \dimen0=\teksthoogte - \advance\dimen0 by \kopwit - \doifsometextlineelse{\v!hoofd} - {\advance\dimen0 by \hoofdhoogte - \advance\dimen0 by \hoofdafstand} - {}% - \dimen2=\papierhoogte - \advance\dimen2 by -\dimen0 -%\advance\dimen0 by -1cm % nog eens optie -%\advance\dimen2 by -1cm % nog eens optie - \setbox0=\hbox - {\vrule - \!!width\pageseparation - \!!depth\dimen2 - \!!height\dimen0}% - \ht0=\!!zeropoint - \dp0=\!!zeropoint - \box0 - \egroup - \fi} +\def\dodocommando#1#2% + {\copylocalframed + [\??ma#1#2][\??ma\v!pagina]% + \getparameters + [\??ma#1#2] + [\c!achtergrond=,\c!kader=,\c!kleur=,\c!raster=\@@rsraster, + \c!onderkader=,\c!bovenkader=,\c!linkerkader=,\c!rechterkader=]% + \setvalue{\??ma#1#2\c!kleur}{\getvalue{\??ma\v!pagina\c!kleur }}% + \setvalue{\??ma#1#2\c!raster}{\getvalue{\??ma\v!pagina\c!raster}}% + \setvalue{\??ma#1#2\c!kaderkleur}{\getvalue{\??ma#1#2\c!kleur}}% + \setvalue{\??ma#1#2\c!achtergrondkleur}{\getvalue{\??ma#1#2\c!kleur}}% + \setvalue{\??ma#1#2\c!achtergrondraster}{\getvalue{\??ma#1#2\c!raster}}} + +\dodocommando\v!tekst\empty + +\def\docommando#1% + {\dodocommando#1\v!linkerrand + \dodocommando#1\v!linkermarge + \dodocommando#1\v!tekst + \dodocommando#1\v!rechtermarge + \dodocommando#1\v!rechterrand} + +\docommando\v!boven +\docommando\v!hoofd +\docommando\v!tekst +\docommando\v!voet +\docommando\v!onder + +\let\dodocommando\relax \let\docommando\relax \def\currentproject {} \def\currentproduct {} @@ -8446,8 +8673,9 @@ \doglobal\decrement\fileprocesslevel} \def\processfile#1% - {\ifx\allinputpaths\empty - \processlocalfile{\readlocfile}{#1}{}% + {\relax + \ifx\allinputpaths\empty + \def\next{\processlocalfile\readlocfile}% \else \let\filepath\empty \def\docommando##1% @@ -8455,13 +8683,16 @@ {\donetrue\def\filepath{##1}} {\donefalse}% \ifdone\expandafter\quitcommalist\fi}% - \processcommacommand[.,\allinputpaths]\docommando + \doifparentfileelse{#1} % new + {\processcommacommand [\allinputpaths]\docommando} + {\processcommacommand[.,\allinputpaths]\docommando}% \ifx\filepath\empty - \processlocalfile{\readlocfile }{#1}% fall back ../../.. + \def\next{\processlocalfile\readlocfile}% fall back ../../.. \else - \processlocalfile{\readsetfile\filepath}{#1}% file found + \def\next{\processlocalfile{\readsetfile\filepath}}% file found \fi - \fi} + \fi + \next{#1}} \let\allinputpaths\empty @@ -8540,7 +8771,7 @@ \appendtoks \preloadlanguages \to \everyjob \appendtoks \preloadspecials \to \everyjob \appendtoks \openspecialfile \to \everyjob -\appendtoks \checkutilityfile \to \everyjob +%appendtoks \checkutilityfile \to \everyjob % obsolete \appendtoks \openutilities \to \everyjob \appendtoks \loadoptionfile \to \everyjob \appendtoks \loadtwopassdata \to \everyjob @@ -9083,6 +9314,7 @@ \definieerpapierformaat [CD] [\c!breedte=120mm, \c!hoogte=120mm] \definieerpapierformaat [letter] [\c!breedte=8.5in, \c!hoogte=11in] +\definieerpapierformaat [2*letter] [\c!breedte=11in, \c!hoogte=17in] \definieerpapierformaat [legal] [\c!breedte=8.5in, \c!hoogte=14in] \definieerpapierformaat [folio] [\c!breedte=8.5in, \c!hoogte=13in] \definieerpapierformaat [executive] [\c!breedte=7.25in, \c!hoogte=10.5in] @@ -9494,14 +9726,6 @@ \stelinspringenin [\v!geen] -\stelformulesin - [\c!wijze=\@@nrwijze, - \c!blokwijze=, - \c!sectienummer=\@@nrsectienummer, - \c!plaats=\v!rechts, - \c!links=(, - \c!rechts=)] - \stelreferentielijstin [\c!letter=\v!normaal] @@ -9649,11 +9873,15 @@ \c!kaderoffset=\getvalue{\??ma\v!pagina\c!offset}, \c!achtergrondoffset=\getvalue{\??ma\v!pagina\c!offset}, \c!offset=\!!zeropoint, % later set to \v!overlay, watch out ! - \c!diepte=\!!zeropoint, - \c!scheider=\v!nee] + %\c!scheider=\v!nee, + \c!diepte=\!!zeropoint] + +\global\somebackgroundfalse \def\documentstyle% {\showmessage{\m!systems}{3}{} \stoptekst} +\let\documentclass\documentstyle + \protect \endinput diff --git a/tex/context/base/main-002.tex b/tex/context/base/main-002.tex index 6abe6cb1b..6784b2a2a 100644 --- a/tex/context/base/main-002.tex +++ b/tex/context/base/main-002.tex @@ -77,7 +77,8 @@ \setbox2=\hbox {\doitems {\@@isbulletbreedte} - {\herhaal[\nofitems*\docommando{\strut\doitembullet{\herhaler}}]}}} + {\dorecurse{\nofitems} + {\docommando{\strut\doitembullet{\herhaler}}}}}} \def\dostartitems#1#2#3% {\let\doitems=#2 @@ -442,20 +443,22 @@ \def\bedrag#1% {\strut\hbox\bgroup \let\normalfixedspace~% - \def~{\futurelet\next\dofixedspace}% - \def\dofixedspace% - {\hskip.5em\relax - \ifx\next,% - \hphantom,\let\next\gobbleoneargument - \else\ifx\next.% - \hphantom.\let\next\gobbleoneargument - \else - \let\next\relax - \fi\fi - \next}% - \bedragprefix#1\bedragsuffix + % \def~{\futurelet\next\dofixedspace}% + % \def\dofixedspace% + % {\hskip.5em\relax + % \ifx\next,% + % \hphantom{,}\let\next\gobbleoneargument + % \else\ifx\next.% + % \hphantom{.}\let\next\gobbleoneargument + % \else + % \let\next\relax + % \fi\fi + % \next}% + % \bedragprefix#1\bedragsuffix + \bedragprefix\digits{#1}\bedragsuffix \egroup} + % \definieeralineas[test][n=3] % % \stelalineasin[test][3][breedte=4cm,uitlijnen=links] @@ -592,7 +595,9 @@ {\ifdim\lastskip=\quotationsignal \unskip\hskip\quotationskip \fi +\ifhmode % else funny pagebeaks \penalty\!!tenthousand\hskip\!!zeropoint % == \prewordbreak +\fi \strut % new, needed below \getvalue{\??la\currentlanguage#1}% \penalty\!!tenthousand\hskip\quotationsignal} % +- \prewordbreak @@ -653,7 +658,7 @@ \def\dotoevoegen#1% {\def\next{#1}% - \herhaal[#1*{\inlinker{\next~+}\def\next{}\crlf}]} + \dorecurse{#1}{\inlinker{\next~+}\def\next{}\crlf}} \def\complextoevoegen[#1]% {\blanko @@ -871,7 +876,7 @@ \startdummy \NC\@@@kmbet\EQ\@@kmbet\NC\NR \NC\@@@kmdat\EQ\@@kmdat\NC\NR - \NC\@@@kmken\EQ\kap{\@@kmken}\NC\NR + \NC\@@@kmken\EQ\expanded{\kap{\@@kmken}}\NC\NR \doifsomething{\@@kmvan\@@kmaan}{\NC\NC\NC\NR}% \doifsomething{\@@kmvan}{\NC\@@@kmvan\EQ\@@kmvan\NC\NR}% \doifsomething{\@@kmaan}{\NC\@@@kmaan\EQ\@@kmaan\NC\NR}% diff --git a/tex/context/base/main-003.tex b/tex/context/base/main-003.tex index 3f401c0e0..5a5a06792 100644 --- a/tex/context/base/main-003.tex +++ b/tex/context/base/main-003.tex @@ -40,6 +40,10 @@ \startmessages norwegian library: systems 41: ekstern fil -- i gruppe -- eksisterer ikke \stopmessages + +\startmessages romanian library: systems + 41: fisierul extern -- din grupul -- nu exista +\stopmessages \definetabulate [\e!legenda] diff --git a/tex/context/base/meta-fig.tex b/tex/context/base/meta-fig.tex index c282f36c7..8cb9c6365 100644 --- a/tex/context/base/meta-fig.tex +++ b/tex/context/base/meta-fig.tex @@ -1,85 +1,181 @@ %D \module %D [ file=meta-fig, %D version=2000.09.07, -%D title=\METAPOST\ Graphics, -%D subtitle=Stand Alone Graphics, +%D title=\METAPOST\ Graphics, +%D subtitle=Stand Alone Graphics, %D author=Hans Hagen, %D date=\currentdate, %D copyright={PRAGMA / Hans Hagen \& Ton Otten}] %C %C This module is part of the \CONTEXT\ macro||package and is -%C therefore copyrighted by \PRAGMA. See mreadme.pdf for -%C details. +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. \writestatus{loading}{MetaPost Graphics / Stand Alone Graphics} -\unprotect +\unprotect %D This module implements a method for defining %D stand||alone||graphics, that is, each graphic gets is own %D page. Because graphics are wrapped in a \type {\framed}, %D you can add overlays to the graphic directly, and since the %D whole \CONTEXT\ machinery is available, you can also add -%D page backgrounds. -%D +%D page backgrounds. +%D %D \starttypen %D \setupMPpage %D [offset=1pt, %D background=color, %D backgroundcolor=green] -%D +%D %D \startMPpage -%D fill fullcircle scaled 10cm withcolor red ; +%D fill fullcircle scaled 10cm withcolor red ; %D \stopMPpage -%D +%D %D \startMPpage -%D fill fullsquare rotated 45 scaled 8cm withcolor blue ; +%D fill fullsquare rotated 45 scaled 8cm withcolor blue ; %D \stopMPpage %D \stoptypen -%D -%D Although this is hardly of any use, you can mix these +%D +%D Although this is hardly of any use, you can mix these %D definitions with the text flow, since all settings are -%D kept local. The page is clipped to the image size. +%D kept local. The page is clipped to the image size. -\presetlocalframed[\??mp] +% \presetlocalframed[\??mp] +% +% \def\setupMPpage% +% {\dodoubleargument\getparameters[\??mp]} +% +% \def\startMPpage% +% {\dosingleempty\dostartMPpage} +% +% \long\def\dostartMPpage[#1]#2\stopMPpage +% {\pagina +% \bgroup +% \setbox\scratchbox=\hbox +% {\localframed[\??mp][#1]{\startMPcode#2\stopMPcode}} +% \edef\MPwd{\the\wd\scratchbox} +% \edef\MPht{\the\ht\scratchbox} +% \definieerpapierformaat +% [\s!dummy] +% [\c!breedte=\MPwd, +% \c!hoogte=\MPht] +% \startlocal % keep settings as local as can be +% \stelpapierformaatin +% [\s!dummy][\s!dummy] +% \stellayoutin +% [\c!breedte=\MPwd,\c!hoogte=\MPht, +% \c!kopwit=\!!zeropoint,\c!rugwit=\!!zeropoint, +% \c!snijwit=\!!zeropoint,\c!bodemwit=\!!zeropoint, +% \c!hoofd=\!!zeropoint,\c!voet=\!!zeropoint] +% \stoplocal % which saves us the trouble of push/pop +% \getvalue{\e!start\v!standaard\e!opmaak}% +% \centerbox{\box\scratchbox}% +% \getvalue{\e!stop\v!standaard\e!opmaak}% +% \egroup} +% +% \setupMPpage +% [\c!strut=\v!nee, +% \c!uitlijnen=, +% \c!offset=\v!overlay, +% \c!breedte=\v!passend, +% \c!hoogte=\v!passend, +% \c!kader=\v!uit] -\def\setupMPpage% - {\dodoubleargument\getparameters[\??mp]} - -\def\startMPpage% - {\dosingleempty\dostartMPpage} +% generalized, so this belongs in another module -\long\def\dostartMPpage[#1]#2\stopMPpage - {\page +\def\dostartfittingpage[#1][#2]% + {\pagina \bgroup \setbox\scratchbox=\hbox - {\localframed[\??mp][#1]{\startMPcode#2\stopMPcode}} - \edef\MPwd{\the\wd\scratchbox} - \edef\MPht{\the\ht\scratchbox} - \definepapersize + \bgroup + \getparameters[#1][#2]% + \schaal[\c!schaal=\getvalue{#1\c!schaal}]\bgroup\localframed[#1]\bgroup} + +\def\dostopfittingpage% + {\egroup\egroup\egroup + \edef\fittingwd{\the\wd\scratchbox} + \edef\fittinght{\the\ht\scratchbox} + \definieerpapierformaat [\s!dummy] - [\c!breedte=\MPwd, - \c!hoogte=\MPht] - \startlocal % keep settings as local as can be - \setuppapersize + [\c!breedte=\fittingwd, + \c!hoogte=\fittinght] + \startlocal % keep settings as local as can be + \stelpapierformaatin [\s!dummy][\s!dummy] - \setuplayout - [\c!breedte=\MPwd,\c!hoogte=\MPht, + \stellayoutin + [\c!breedte=\fittingwd,\c!hoogte=\fittinght,\c!plaats=\v!midden, \c!kopwit=\!!zeropoint,\c!rugwit=\!!zeropoint, \c!snijwit=\!!zeropoint,\c!bodemwit=\!!zeropoint, \c!hoofd=\!!zeropoint,\c!voet=\!!zeropoint] \stoplocal % which saves us the trouble of push/pop - \startstandardmakeup - \centerbox{\box\scratchbox} - \stopstandardmakeup - \egroup} + \getvalue{\e!start\v!standaard\e!opmaak}% + \centerbox{\box\scratchbox}% + \getvalue{\e!stop\v!standaard\e!opmaak}% + \egroup} + +% MP pages + +\presetlocalframed[\??mg] + +\def\setupMPpage% + {\dodoubleargument\getparameters[\??mg]} + +\def\startMPpage% + {\dosingleempty\dostartMPpage} + +\long\def\dostartMPpage[#1]#2\stopMPpage + {\dostartfittingpage[\??mg][#1]% + \startMPcode#2\stopMPcode% + \dostopfittingpage} \setupMPpage - [\c!strut=\v!nee, + [\c!schaal=1000, + \c!strut=\v!nee, \c!uitlijnen=, \c!offset=\v!overlay, \c!breedte=\v!passend, \c!hoogte=\v!passend, \c!kader=\v!uit] -\protect \endinput +% tex pages + +\presetlocalframed[\??tg] + +\def\setupTEXpage% + {\dodoubleargument\getparameters[\??tg]} + +\def\startTEXpage% + {\dodoubleempty\dostartfittingpage[\??tg]} + +\def\stopTEXpage% + {\dostopfittingpage} + +\setupTEXpage + [\c!schaal=1000, + \c!strut=\v!nee, + \c!uitlijnen=\v!normaal, % needed, else problems ! + \c!offset=\v!overlay, + \c!breedte=\v!passend, + \c!hoogte=\v!passend, + \c!kader=\v!uit] + +%D \macros +%D {MPfigure} +%D +%D A bit out of place, here but nevertheless: + +\def\MPfigure#1#2% test for dup figure + {\bgroup + \getfiguredimensions[#1][\c!object=\v!nee]% + \freezedimenmacro\naturalfigurewidth + \freezedimenmacro\naturalfigureheight + \startMPcode + externalfigure "#1" + xscaled \naturalfigurewidth\space + yscaled \naturalfigureheight\space + #2 ; + \stopMPcode + \egroup} + +\protect \endinput diff --git a/tex/context/base/meta-ini.tex b/tex/context/base/meta-ini.tex index 1554c175d..86c6f1364 100644 --- a/tex/context/base/meta-ini.tex +++ b/tex/context/base/meta-ini.tex @@ -45,6 +45,11 @@ 1: metapost bibliotek -- blir lest inn \stopmessages +\startmessages romanian library: metapost + title: metapost + 1: se incarca biblioteca metapost -- +\stopmessages + %D This module extends the functionality of the support module %D \type {supp-mps}, the module that is responsible for %D \METAPOST\ inclusion in \CONTEXT. Some basic macros will be @@ -55,6 +60,7 @@ \appendtoks if unknown context_tool : input mp-tool ; fi ; if unknown context_spec : input mp-spec ; fi ; + if unknown context_grph : input mp-grph ; fi ; \to \MPinitializations %D Since we want lables to follow the document settings, we @@ -65,6 +71,14 @@ defaultscale := \the\bodyfontsize/10pt ; % not good yet \to \MPinitializations +%D In order to support fancy text features (like outline +%D fonts), we set: + +\appendtoks + graphictextformat := "context" ; + graphictextdirective "\the\everyMPTEXgraphic" ; +\to \MPinitializations + %D We save the number of graphics for the sake of \TEXEXEC. \newcounter\totalnumberofMPgraphics @@ -205,6 +219,12 @@ \long\def\dostartuseMPgraphic#1#2#3\stopuseMPgraphic% {\long\setgvalue{MP:#1}{\handleuseMPgraphic{#1}{#2}{#3}}} +\long\def\startusableMPgraphic% % redundant but handy + {\dodoublegroupempty\dostartusableMPgraphic} + +\long\def\dostartusableMPgraphic#1#2#3\stopusableMPgraphic% + {\long\setgvalue{MP:#1}{\handleuseMPgraphic{#1}{#2}{#3}}} + \long\def\handlereusableMPgraphic#1#2#3% {\bgroup \def\@@meta{#1:}% @@ -229,7 +249,7 @@ \fi} \unexpanded\def\useMPgraphic% - {\dodoublegroupempty\douseMPgraphic} + {\dodoublegroupempty\douseMPgraphic} \def\douseMPgraphic#1#2% {{\setupMPvariables[#1][#2]\getvalue{MP:#1}{}}} @@ -366,10 +386,18 @@ \long\def\dostartMPenvironment[#1][#2]#3\stopMPenvironment% {\doif{#1}{\s!reset}{\resetMPenvironment}% - \appendtoks#3\to\everyMPTEXgraphic} + \convertargument#3\to\ascii + \expandafter\appendtoks\ascii\to\everyMPTEXgraphic} \def\resetMPenvironment% - {\everyMPTEXgraphic=\emptytoks} % = is really needed ! + {\everyMPTEXgraphic=\emptytoks % = is really needed ! + \startMPenvironment + \global\loadfontdefinitionfileoncetrue + \stopMPenvironment} + +\startMPenvironment + \global\loadfontdefinitionfileoncetrue +\stopMPenvironment %D This command takes \type {[reset]} as optional %D argument. @@ -501,6 +529,64 @@ % % extra_begin_fig .... +%D Alas, the prologue settings differ per driver. + +\ifx\undefined\MPprologues \def\MPprologues{0} \fi + +\appendtoks + prologues := \MPprologues ; +\to \MPinitializations + +\appendtoks + \def\MPprologues{0}% + \def\MPOSTdriver{dvips}% +\to \everyresetspecials + +%D \macros +%D {PDFMPformoffset} +%D +%D In \PDF, forms are clipped and therefore we have to take +%D precautions to get this right. Since this is related to +%D objects, we use the same offset as used there. + +\def\PDFMPformoffset{\objectoffset} + +%D \macros +%D {insertMPfile} +%D +%D Bypassing the special driver and figure mechanism is not +%D that nice but saves upto 5\% time in embedding \METAPOST\ +%D graphics by using the low level \PDF\ converter directly, +%D given of course that we use \PDFTEX. As a result we need to +%D fool around with the object trigger. + +\def\insertMPfile#1#2% + {\ifx\pdfoutput\undefined + \doinsertMPfile{#1}% + \else\ifcase\pdfoutput + \doinsertMPfile{#1}% + \else + \doiffileelse{#1} + {{\chardef\makeMPintoPDFobject=2 % in order to handle specials + \convertMPtoPDF{#1}{1}{1}}} + {\doinsertMPfile{#1}}% + \fi\fi} + +%D We also take care of disabling fancy figure features, that +%D can terribly interfere when dealing with symbols, +%D background graphics and running (postponed) graphics. +%D You won't believe me if I tell you what funny side effects +%D can occur. One took me over a day to uncover when +%D processing the screen version of the \METAFUN\ manual. + +\def\doinsertMPfile#1% + {\externalfigure + [#1] + [\c!type=\c!mps,\c!object=\v!nee, + \c!reset=\v!ja,\c!symbool=\v!ja, + \c!maxbreedte=,\c!maxhoogte=, + \c!kader=\v!uit,\c!achtergrond=]} + \protect \endinput % also: diff --git a/tex/context/base/meta-pag.tex b/tex/context/base/meta-pag.tex index 7252cf868..c51ff0e0b 100644 --- a/tex/context/base/meta-pag.tex +++ b/tex/context/base/meta-pag.tex @@ -105,7 +105,8 @@ %D has. \prependtoks - \freezeMPlayout % to be used grouped !!! + \calculatereducedvsizes % this is really needed + \freezeMPlayout % to be used grouped \to \everyMPgraphic \appendtoks diff --git a/tex/context/base/meta-pre.tex b/tex/context/base/meta-pre.tex new file mode 100644 index 000000000..6194cba21 --- /dev/null +++ b/tex/context/base/meta-pre.tex @@ -0,0 +1,67 @@ +%D \module +%D [ file=meta-pre, +%D version=2001.03.21, +%D title=\METAPOST\ Graphics, +%D subtitle=Predefined Goodies, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +%D In this library, we define a couple of handy graphics. + +% todo: use the predefine grid macros + +\startuseMPgraphic{pagegrid} + StartPage ; + drawoptions(withcolor .8white) ; + fill Field[Text][Text] ; + drawoptions(withcolor .65white) ; + fill Field[Footer][Text] ; + fill Field[Header][Text] ; + fill Field[LeftMargin][Text] ; + fill Field[RightMargin][Text] ; + drawoptions(withcolor .65yellow) ; + fill Field[LeftEdge][Text] ; + fill Field[RightEdge][Text] ; + fill Field[Bottom][Text] ; + fill Field[Top][Text] ; + drawoptions(withpen pencircle scaled .3pt withcolor .65white) ; + for i=-3cm step 1cm until PaperWidth+3cm : + draw (i,-3cm)--(i,PaperHeight+3cm) ; + endfor ; + for i=PaperHeight+3cm step -1cm until -3cm : + draw (-3cm,i)--(PaperWidth+3cm,i) ; + endfor ; + drawoptions(withpen pencircle scaled .15pt) ; + for i=.5cm-3cm step 1cm until PaperWidth+3cm : + draw (i,-3cm)--(i,PaperHeight+3cm) ; + endfor ; + for i=PaperHeight-.5cm+3cm step -1cm until -3cm : + draw (-3cm,i)--(PaperWidth+3cm,i) ; + endfor ; + drawoptions(withpen pencircle scaled .3pt withcolor .65red) ; + for i=0 step 1cm until PaperWidth : + draw (i,0)--(i,PaperHeight) ; + endfor ; + for i=PaperHeight step -1cm until 0 : + draw (0,i)--(PaperWidth,i) ; + endfor ; + drawoptions(withpen pencircle scaled .15pt withcolor .65red) ; + for i=.5cm step 1cm until PaperWidth : + draw (i,0)--(i,PaperHeight) ; + endfor ; + for i=PaperHeight-.5cm step -1cm until 0 : + draw (0,i)--(PaperWidth,i) ; + endfor ; + drawoptions(withpen pencircle scaled 5pt withcolor .65red) ; + draw ulcorner Page ; + StopPage ; +\stopuseMPgraphic + +\defineoverlay[pagegrid][\useMPgraphic{pagegrid}] + +\endinput diff --git a/tex/context/base/meta-txt.tex b/tex/context/base/meta-txt.tex index d39b20ef5..ea9493a1f 100644 --- a/tex/context/base/meta-txt.tex +++ b/tex/context/base/meta-txt.tex @@ -128,7 +128,7 @@ \setupshapetexts% [\c!korps=] -%%%%%%% +%%%%%%% rotfont nog definieren \doifundefined{RotFont}{\definefont[RotFont][RegularBold]} @@ -150,6 +150,9 @@ {\vbox\bgroup \forgetall \dontcomplain + \startMPenvironment + \doifundefined{RotFont}{\definefont[RotFont][RegularBold]} + \stopMPenvironment \MPtoks\emptytoks \resetMPdrawing \startMPdrawing @@ -242,7 +245,7 @@ width=\the\localhsize, % without \the, problems in non e-tex color=darkgray] -\defineblank +\definieerblanko [EnglishRule] [medium] diff --git a/tex/context/base/mult-com.tex b/tex/context/base/mult-com.tex index 748cab454..35a5547bf 100644 --- a/tex/context/base/mult-com.tex +++ b/tex/context/base/mult-com.tex @@ -21,8 +21,8 @@ %D future english will be the core language.} %D %D The German translations were provided by Tobias Burnus, -%D the Czech ones by Tom Hudec, and the italian interface was -%D provided by Guiseppe Bilottta. +%D the Czech ones by Tom Hudec, and the Italian ones +%D by Giuseppe Bilottta. \writestatus{loading}{Context Multilingual Macros / Commands} @@ -41,1664 +41,1670 @@ \startcommands dutch english german czech - italian + italian romanian language: taal language sprache jazyk - lingua + lingua limba mainlanguage: hoofdtaal mainlanguage hauptsprache hlavnijazyk - linguaprincipale + linguaprincipale limbaprincipala translate: vertaal translate uebersetzten prelozit - traduci + traduci traduce installlanguage: installeertaal installlanguage installieresprache instalacejazyka - linguainstallazione + linguainstallazione instalarelimba setuplanguage: steltaalin setuplanguage stellespracheein nastavjazyk - impostalingua % GB + impostalingua setarelimba showmakeup: toonopmaak showmakeup zeigeumbruch ukazupravu - mostramakeup % GB + mostramakeup afiseazamakeup useencoding: usecodering useencoding benutzekodierung uzijkodovani - usacodifica + usacodifica folosestecodificarea usespecials: gebruikspecials usespecials benutzespezielles uzijspeciality - usaspecialita % GB + usaspecialita folosestespeciale defineoutput: definieeruitvoer defineoutput defineoutput definujvystup - definiscioutput % GB + definiscioutput definesteoutput setupoutput: steluitvoerin setupoutput stelleausgabeein nastavvystup - impostaoutput % GB + impostaoutput setareoutput defineaccent: definieeraccent defineaccent definiereakzent definujakcent - definisciaccento + definisciaccento definesteaccent definecharacter: definieerkarakter definecharacter definierezeichen definujznak - definiscicarattere + definiscicarattere definestecaracter definecommand: definieercommando definecommand definierebefehl definujprikaz - definiscicomando + definiscicomando definestecomanda startcoding: startcodering startcoding startkodierung startkodovani - iniziacodifica + iniziacodifica startcodificare stopcoding: stopcodering stopcoding stopkodierung stopkodovani - terminacodifica + terminacodifica stopcodificare definebodyfontenvironment: definieerkorpsomgeving definebodyfontenvironment definierefliesstextumgebung definujprostredizakladnihofontu - definisciambientefontdelcorpo + definisciambientefontdeltesto definestemediulfonttext setupbodyfontenvironment: stelkorpsomgevingin setupbodyfontenvironment stellefliesstextumgebungein nastavprostredizakladnihofontu - impostaambientefontdelcorpo + impostaambientefontdeltesto seteazamediulfonttext definebodyfont: definieerkorps definebodyfont definierefliesstext definujzakladnifont - definiscifontdelcorpo + definiscifontdeltesto definestefonttext definefont: definieerfont definefont definiereschrift definujfont - definiscifont + definiscifont definestefont definefontsynonym: definieerfontsynoniem definefontsynonym defineschriftsynonym definujsynonumumfontu - definiscisinonimofont + definiscisinonimofont definestesinonimfont definestyle: definieerletter definestyle definierestil definujstyl - definiscistile + definiscistile definestestil definefontstyle: definieerfontstijl definefontstyle definiereschriftstil definujstylfontu - definiscistilefont + definiscistilefont definestestilfont setupstrut: stelstrutin setupstrut setupstrut setupstrut - impostastrut + impostastrut seteazastrut setuptype: steltypein setuptype stelletipein nastavtype - impostatype + impostatype seteazatype type: type type tippen opis - type + type type typ: typ typ tip pis - typ + typ typ arg: arg arg arg arg - arg + arg arg tex: tex tex tex tex - tex + tex tex definetyping: definieertypen definetyping definieretippen definujopis - definiscityping %GB + definiscityping definestetyping + definetype: definieertype definetype + definetype definetype + definiscitype definetype setuptyping: steltypenin setuptyping stelletippenein nastavopis - impostatyping %GB + impostatyping seteazatyping typefile: typefile typefile tippedatei opissoubor - typefile %GB + typefile typefile setupfootnotes: stelvoetnotenin setupfootnotes stellefussnotenein nastavpoznamkypodcarou - impostanotepdp + impostanotepdp seteazanotasubsol setupfootnotedefinition: stelvoetnootdefinitiein setupfootnotedefinition stellefussnotendefinitionein nastavdefinicipoznamekpodcarou - impostadefinizionenotepdp + impostadefinizionenotepdp seteazadefinireanotasubsol note: noot note notiz poznamka - nota + nota nota footnote: voetnoot footnote fussnote poznamkapodcarou - notapdp + notapdp notasubsol + footnotetext: voetnoottekst footnotetext + footnotetext footnotetext + testonotapdp footnotetext startlocalfootnotes: startlokalevoetnoten startlocalfootnotes startlokalefussnoten startlokalnipoznamkypodcarou - inizianotepdplocali + inizianotepdplocali startnotesubsollocale stoplocalfootnotes: stoplokalevoetnoten stoplocalfootnotes stoplokalefussnoten stoplokalnipoznamkypodcarou - terminanotepdplocali + terminanotepdplocali stopnotesubsollocale placelocalfootnotes: plaatslokalevoetnoten placelocalfootnotes platzierelokalefussnoten umistilokalnipoznamkypodcarou - mettinotepdplocali + mettinotepdplocali punenotesubsollocale placefootnotes: plaatsvoetnoten placefootnotes platzierefussnoten umistipoznamkypodcarou - mettinotepdp + mettinotepdp punenotesubsol currentdate: huidigedatum currentdate heutigesdatum aktualnidatum - datadioggi + datadioggi datacurenta date: datum date datum datum - data + data data weekday: weekdag weekday wochentag vsedniden - giornosettimana + giornosettimana zidinsaptamana WEEKDAY: WEEKDAG WEEKDAY WOCHENTAG VSEDNIDEN - GIORNOSETTIMANA + GIORNOSETTIMANA ZIDINSAPTAMANA month: maand month monat mesic - mese + mese luna MONTH: MAAND MONTH MONAT MESIC - MESE + MESE LUNA Numbers: Cijfers Numbers Ziffern Cisla - Numeri + Numeri Numere numbers: cijfers numbers ziffern cisla - numeri + numeri numere romannumerals: romeins romannumerals roemischezahlen rimskecislice - numeriromani + numeriromani numereromane Romannumerals: Romeins Romannumerals Roemischezahlen Rimskecislice - Numeriromani + Numeriromani Numereromane character: letter character buchstabe znak - carattere + lettera litera Character: Letter Character Buchstabe Znak - Carattere + Lettera Litera characters: letters characters buchstaben znaky - caratteri + lettere litere Characters: Letters Characters Buchstaben Znaky - Caratteri + Lettera Litere unknown: onbekend unknown unbekant neznamo - ignoto + ignoto necunoscut definesymbol: definieersymbool definesymbol definieresymbol definujsymbol - definiscisimbolo + definiscisimbolo definestesimbol definefiguresymbol: definieerfiguursymbool definefiguresymbol definiereabbsymbol definujobrazeksymbol - definiscifigurasimbolo + definiscifigurasimbolo definestesimbolfigura symbol: symbool symbol symbol symbol - simbolo + simbolo simbol setupsymbolset: stelsymboolsetin setupsymbolset stellesymbolsetein nastavsadusymbolu - impostasetsimboli + impostasetsimboli seteazasimbol showsymbolset: toonsymboolset showsymbolset showsymbolset ukazsadusymbolu - mostrasetsimboli % TB + mostrasetsimboli afiseazasetsimboluri startsymbolset: startsymboolset startsymbolset startsymbolset startsadasymbolu - iniziasetsimboli % TB + iniziasetsimboli startsetsimboluri usesymbols: gebruiksymbolen usesymbols verwendesymbole uzijsymbol - usasimboli + usasimboli folosestesimboluri defineconversion: definieerconversie defineconversion definierekonversion definujkonverzi - definisciconversione + definisciconversione definesteconversie convertnumber: converteernummer convertnumber konvertierezahl konvertujcislo - convertinumero + convertinumero convertestenumar setupcapitals: stelkapitalenin setupcapitals stelleversalienein nastavkapitalky - impostamaiuscole + impostamaiuscole seteazamajuscule kap: kap kap kap kap - kap + kap kap KAP: KAP CAP KAP KAP - CAP + CAP KAP nokap: nokap nocap nokap nokap - nocap + nocap nokap Kap: Kap Cap Kap Kap - Cap + Cap Kap Kaps: Kaps Caps Kaps Kaps - Caps + Caps Kaps WORD: WOORD WORD WORT SLOVO - PAROLA + PAROLA CUVANT WORDS: WOORDEN WORDS WOERTER SLOVA - PAROLE + PAROLE CUVINTE Word: Woord Word Wort Slovo - Parola + Parola Cuvant Words: Woorden Words Woerter Slova - Parole + Parole Cuvinte stretched: uitgerekt stretched gestreckt roztazene - stirato + stirato intins overstrike: doorstreep overstrike durchgestrichen preskrtnuto - sbarrato + sbarrato liniepeste overstrikes: doorstrepen overstrikes durchstreichen preskrtnuti - sbarrati + sbarrati liniipeste overbar: overstreep overbar ueberstrichen nadtrzeno - sopralinea + sopralinea barasus overbars: overstrepen overbars ueberstreichen nadtrzeni - sopralinee + sopralineas supralinie underbar: onderstreep underbar unterstrichen podtrzeno - sottolinea + sottolinea sublinie underbars: onderstrepen underbars unterstreichen podtrzeni - sottolinee + sottolineas sublinii setupunderbar: stelonderstrepenin setupunderbar stelleunterstreichenein nastavpodtrzeni - impostasottolinea + impostasottolinea seteazasublinie setupbodyfont: stelkorpsin setupbodyfont stellefliesstextein nastavzakladnifont - impostafontdelcorpo + impostafontdeltesto seteazafonttext switchtobodyfont: switchnaarkorps switchtobodyfont wechselezumfliesstext prepninazakladnifont - cambiaafontdelcorpo + cambiaafontdeltesto trecilafonttext showbodyfont: toonkorps showbodyfont zeigefliesstext ukazzakladnifont - mostrafontdelcorpo + mostrafontdeltesto afiseazafonttext showbodyfontenvironment: toonkorpsomgeving showbodyfontenvironment zeigefliesstextumgebung ukazpostredizakladnihofontu - mostraambientefontdelcorpo + mostraambientefontdeltesto afiseazamediufonttext headtext: koptekst headtext ueberschrifttext texthlavicky - testoinstestazioni + testoinstestazioni texttitlu labeltext: labeltekst labeltext labeltext textpopisku - testoetichette + testoetichetta texteticheta LABELTEXT: LABELTEKST LABELTEXT LABELTEXT TEXTPOPISKU - TESTOETICHETTA + TESTOETICHETTA TEXTETICHETA setupheadtext: stelkoptekstin setupheadtext stelleueberschrifttextein nastavtexthlavicky - impostatestointestazioni + impostatestointestazioni seteazatexttitlu setuplabeltext: stellabeltekstin setuplabeltext stellelabeltextein nastavtextpopisku - impostatestoetichette + impostatestoetichette seteazatexteticheta marginrule: kantlijn marginrule marginallinie marginalnilinka - lineamargine + lineamargine liniemargine startmarginrule: startkantlijn startmarginrule startmarginallinie startmarginalnilinka - inizialineamargine + inizialineamargine startliniemargine stopmarginrule: stopkantlijn stopmarginrule stopmarginallinie stopmarginalnilinka - terminalineamargine + terminalineamargine stopliniemargine setupmarginrules: stelkantlijnin setupmarginrules stellemarginallinieein nastavmarginalnilinky - impostalineamargine + impostalineemargine seteazaliniimargine blackrule: blokje blackrule rechteck cernalinka - lineanera + lineanera linieneagra blackrules: blokjes blackrules rechtecke cernelinky - lineenere + lineenere liniinegre setupblackrules: stelblokjesin setupblackrules stellerechteckein nastavcernelinky - impostalineenere + impostalineenere seteazaliniinegre setupscreens: stelrastersin setupscreens stellerasterein nastavrastr - impostaschermi + impostaschermi seteazaecrane framed: omlijnd framed umrahmt oramovani - incorniciato + incorniciato framed inframed: inlijnd inframed imumriss zaramovani - inframed % GB + circondato inframed mframed: wilijnd maframed maumrise maoramovani - maframed + maframed maframed inmframed: inwilijnd inmaframed immaumrise mazaramovani - inmaframed + inmaframed inmaframed setupframed: stelomlijndin setupframed stelleumrahmtein nastavoramovani - impostaincorniciato + impostaincorniciato seteazainconjurat setuplinewidth: stellijndiktein setuplinewidth stellelinienbreiteein nastavsirkucary - impostaampiezzariga + impostaampiezzariga seteazagrosimelinie setupthinrules: steldunnelijnenin setupthinrules stelleduennerumrissein nastavtenkelinky - impostalineesottili + impostalineesottili seteazaliniesubtire thinrule: dunnelijn thinrule duennelinie tenkalinka - lineasottile + lineasottile liniesubtire thinrules: dunnelijnen thinrules duennerumriss tenkelinky - lineesottili + lineesottili liniisubtiri hairline: haarlijn hairline haarlinie vlasovalinka - filodicapello + capello firdepar vl: vl vl vl vl - vl + vl vl hl: hl hl hl hl - hl + hl hl defineframed: definieeromlijnd defineframed definiereumrahmt definujoramovani - definisciincorniciato + definisciincorniciato definesteinconjurare defineframedtext: definieerkadertekst defineframedtext definiereumrahmtertext definujoramovanytext - definiscitestoincorniciato + definiscitestoincorniciato definestetextinconjurat setupframedtexts: stelkadertekstenin setupframedtexts stelleumrahmtetexteein nastavoramovanetexty - impostatestoincorniciato + impostatestiincorniciati definestetexteinconjurate defineoverlay: definieeroverlay defineoverlay definiereoverlay definujprekryv - definiscisovrapposizione + definiscisovrapposizione definesteoverlay background: achtergrond background hintergrund pozadi - sfondo + sfondo fundal startbackground: startachtergrond startbackground starthintergrund startpozadi - iniziasfondo + iniziasfondo startfundal stopbackground: stopachtergrond stopbackground stophintergrund stoppozadi - terminasfondo + terminasfondo stopfundal setupbackground: stelachtergrondin setupbackground stellehintergrundein nastavpozadi - impostasfondo + impostasfondo seteazafundal fillinrules: invullijnen fillinrules gefuelltesrechteck vyplnovelinky % ve formulari - lineeriempimento + lineeriempimento rigleumplere setupfillinrules: stelinvullijnenin setupfillinrules stellegefuelltesrechteckein nastavvyplnovelinky - impostalineeriempimento + impostalineeriempimento seteazarigleumplere fillintext: invultekst fillintext ausfuelltext vyplnenytext - testoriempimento + testoriempimento textumplere setupfillinlines: stelinvulregelsin setupfillinlines stellegefuelltezeileein nastavvyplnoveradky - impostarigheriempimento + impostarigheriempimento seteazaliniiumplere fillinline: invulregel fillinline gefuelltezeile vyplnovyradek - lineariempimento + rigariempimento linieumplere setuptextrules: steltekstlijnenin setuptextrules stelletextumrissein nastavtextovelinky - impostalineetesto + impostalineetesto seteazarigletext textrule: tekstlijn textrule textlinie textovalinka - lineatesto + lineatesto riglatext starttextrule: starttekstlijn starttextrule starttextlinie starttextovalinka - inizialineatesto + inizialineatesto startriglatext stoptextrule: stoptekstlijn stoptextrule stoptextlinie stoptextovalinka - terminalineatesto + terminalineatesto stopriglatext usemodule: gebruikmodule usemodule verwendemodul uzijmodul - usamodulo + usamodulo folosestemodul usemodules: gebruikmodules usemodules verwendemodule uzijmoduly - usamoduli + usamoduli folosestemodule starttekst: starttekst starttext starttext starttext - iniziatesto + iniziatesto starttext stoptekst: stoptekst stoptext stoptext stoptext - terminatesto + terminatesto stoptext margetitel: margetitel margintitle marginaltitel marginalninadpis - titoloinmargine + titoloinmargine titlumarginal margewoord: margewoord marginword marginalwort marginalnislovo - parolainmargine + parolainmargine cuvantmarginal margetekst: margetekst margintext marginaltext marginalnitext - testoinmargine + testoinmargine textmarginal inlinker: inlinker inleft imlinken vlevo - insinistra + insinistra instanga inmarge: inmarge inmargin inmarginalie naokraj - inmargine + inmargine marginal inanderemarge: inanderemarge inothermargin inanderermarginale nadruhyokraj - inaltromargine + inaltromargine inaltamargine inrechter: inrechter inright imrechten vpravo - indestra + indestra indreapta startmargeblok: startmargeblok startmarginblock startmarginalblock startmarginalniblok - iniziabloccomargine + iniziabloccomargine startblocmarginal stopmargeblok: stopmargeblok stopmarginblock stopmarginalblock stopmarginalniblok - terminabloccomargine + terminabloccomargine stopblocmarginal stelinmargein: stelinmargein setupinmargin stelleinmarginalieein nastavmarginalie - impostainmargine + impostainmargine seteazamarginal stelmargeblokkenin: stelmargeblokkenin setupmarginblocks stellemarginalblockein nastavmarginalniblok - impostablocchimargine + impostablocchimargine seteazablocurimarginale inleftside: inlinkerrand inleftside imlinkenrand nalevo - inlatosinistro + inlatosinistro inparteastanga inleftmargin: inlinkermarge inleftmargin inlinkermarginale nalevyokraj - inmarginesinistro + inmarginesinistro inmargineastanga inrightmargin: inrechtermarge inrightmargin inrechtermarginale napravyokraj - inmarginedestro + inmarginedestro inmargineadreapta inrightside: inrechterrand inrightside imrechtenrand napravo - inlatodestro + inlatodestro inparteadreapta woordrechts: woordrechts wordright wortrechts slovovpravo - paroladestra + paroladestra cuvantdreapta definieerblanko: definieerblanko defineblank definiereblanko definujpreskok - definisciblank % GB + definiscirigovuoto definesteblanc blanko: blanko blank blanko preskoc - blank + rigovuoto blanc stelblankoin: stelblankoin setupblank stelleblankoein nastavpreskok - impostablank + impostarigovuoto seteazablanc corrigeerwitruimte: corrigeerwitruimte correctwhitespace korrigierezwischenraum korekcebilehomista - correggiwhitespace + correggiwhitespace corecteazaspatiualb fixedspaces: vastespaties fixedspaces festesspatium tvrdemezery - spazifissi + spazifissi spatiifixate fixedspace: vastespatie fixedspace festesspatium tvrdamezera - spaziofisso + spaziofisso spatiufixat nospace: geenspatie nospace keinspatium zadnamezera - nientespazio + nientespazio faraspatiu space: spatie space spatium mezera - spazio + spazio spatiu geenwitruimte: geenwitruimte nowhitespace keinzwischenraum zadnebilemisto - nientewhitespace + nientewhitespace faraspatiualb opelkaar: opelkaar packed kleinerdurchschuss zhustene - impaccato + impaccato impachetat startopelkaar: startopelkaar startpacked startkleinerdurchschuss startzhustene - iniziaimpaccato + iniziaimpaccato startimpachetat stopopelkaar: stopopelkaar stoppacked stopkleinerdurchschuss stopzhustene - terminaimpaccato + terminaimpaccato stopimpachetat startvanelkaar: startvanelkaar startunpacked startgrosserdurchschuss startnezhustene - iniziaunpacked % GB + iniziaunpacked startneimpachetat stopvanelkaar: stopvanelkaar stopunpacked stopgrosserdurchschuss stopnezhustene - terminaunpacked + terminaunpacked stopneimpachetat startregelcorrectie: startregelcorrectie startlinecorrection startzeilenkorrektur startkorekceradku - iniziacorrezioneriga + iniziacorrezioneriga startcorectielinie stopregelcorrectie: stopregelcorrectie stoplinecorrection stopzeilenkorrektur stopkorekceradku - terminacorrezioneriga + terminacorrezioneriga stopcorectielinie omlaag: omlaag godown nachunten jdidolu - vaigiu % GB + vaigiu injos witruimte: witruimte whitespace zwischenraum bilemisto - whitespace % GB + whitespace spatiualb nietinspringen: nietinspringen noindenting nichteinziehen zadneodsazovani - nienterientro + nienterientro faraaliniat inspringen: inspringen indenting einziehen odsazovani - rientro + rientro aliniat stelinspringenin: stelinspringenin setupindenting stelleeinziehenein nastavodsazovani - impostarientro + impostarientro seteazaaliniat startuitlijnen: startuitlijnen startalignment startausrichtung startzarovnavani - iniziaallineamento + iniziaallineamento startaliniere stopuitlijnen: stopuitlijnen stopalignment stopausrichtung stopzarovnavani - terminaallineamento + terminaallineamento stopaliniere startregels: startregels startlines startzeilen startradky - iniziarighe + iniziarighe startlinii stopregels: stopregels stoplines stopzeilen stopradky - terminarighe + terminarighe stoplinii stelparagraafnummerenin: stelparagraafnummerenin setupparagraphnumbering stelleabsatznummerierungein nastavcislovaniodstavcu - impostanumerazionecapoversi + impostanumerazionecapoversi seteazanumerotareparagrafe stelregelnummerenin: stelregelnummerenin setuplinenumbering stellezeilennumerierungein nastavcislovaniradku - impostanumerazionerighe + impostanumerazionerighe seteazanumerotarelinii startregelnummeren: startregelnummeren startlinenumbering startzeilennumerierung startcislovaniradku - inizianumerazionerighe + inizianumerazionerighe startnumerotarelinii stopregelnummeren: stopregelnummeren stoplinenumbering stopzeilennumerierung stopcislovaniradku - terminanumerazionerighe + terminanumerazionerighe stopnumerotarelinii startregel: startregel startline startzeile startradek - iniziariga + iniziariga startlinie stopregel: stopregel stopline stopzeile stopradek - terminariga + terminariga stoplinie eenregel: eenregel someline einezeile nejakyradek - qualcheriga + qualcheriga olinie inregel: inregel inline inzeile vradku - inriga + inriga inlinie crlf: crlf crlf crlf crlf - crlf + crlf crlf stelregelsin: stelregelsin setuplines stellezeilenein nastavradky - impostarighe + impostarighe seteazalinii startsmaller: startsmaller startnarrower startenger startzuzeni - iniziapiustretto + iniziapiustretto startingust stopsmaller: stopsmaller stopnarrower stopenger stopzuzeni - terminapiustretto + terminapiustretto stopingust stelsmallerin: stelsmallerin setupnarrower stelleengerein nastavzuzeni - impostapiustretto + impostapiustretto seteazaingust definetabulate: definieertabulatie definetabulate definieretabulator definujtabelaci - definiscitabulate % GB + definiscitabulate definestetabulatori setuptabulate: steltabulatiein setuptabulate stelletabulatorein nastavtabelaci - impostatabulate + impostatabulate seteazatabulatori starttabel: starttabel starttable starttabelle starttabulka - iniziatabella + iniziatabella starttabel stoptabel: stoptabel stoptable stoptabelle stoptabulka - terminatabella + terminatabella stoptabel starttabellen: starttabellen starttables starttabellen starttabulky - iniziatabelle + iniziatabelle starttabele stoptabellen: stoptabellen stoptables stoptabellen stoptabulky - terminatabelle + terminatabelle stoptabele steltabellenin: steltabellenin setuptables stelletabellenein nastavtabulky - impostatabelle + impostatabelle seteazatabele definetabletemplate: definieertabelvorm definetabletemplate definieretabellenvorlage definujsablonutabulky - definiscimodellotabella + definiscimodellotabella definestesablontabel pagina: pagina page seite strana - pagina + pagina pagina koppelpagina: koppelpagina couplepage doppelseite parovastrana - accoppiapagina % GB + accoppiapagina paginadubla soortpagina: soortpagina pagetype seitentyp typstrany - tipopagina + tipopagina tippagina verwerkpagina: verwerkpagina processpage bearbeiteseite zpracujstranu - elaborapagina + elaborapagina proceseazapagina koppelpapier: koppelpapier couplepaper doppelseitigespapier dvoustrannypapir - accoppiacarta % GB + accoppiacarta hartiedubla selecteerpapier: selecteerpapier selectpaper waehlepapieraus vyberpapir - selezionacarta + selezionacarta selecteazahartie scherm: scherm screen bildschirm obrazovka - schermo + schermo ecran definieersectie: definieersectie definesection definiereabschnitt definujsekci - definiscisezione + definiscisezione definestesectiune definieersectieblok: definieersectieblok definesectionblock definiereabschnittsblock definujbloksekce - definiscibloccosezione + definiscibloccosezione definesteblocsectiune stelsectieblokin: stelsectieblokin setupsectionblock stelleabschnittsblockein nastavbloksekce - impostabloccosezione + impostabloccosezione seteazablocsectiune stelsectiein: stelsectiein setupsection stelleabschnittein nastavsekci - impostasezione + impostasezione seteazasectiune geenbovenenonderregels: geenbovenenonderregels notopandbottomlines keinzeilenobenundunten zadnehorniadolniradky - nientelineecimafondo + nientelineecimafondo faraliniisussijos geenhoofdenvoetregels: geenhoofdenvoetregels noheaderandfooterlines keinekopfundfusszeilen zadnezahlaviaupati - nientelineintestazionepdp + nientelineintestazionepdp faraliniiantetsisubsol stelbovenin: stelbovenin setuptop stellenobenein nastavhorejsek - impostacima + impostacima seteazasus stelboventekstenin: stelboventekstenin setuptoptexts stelletextobenein nastavhornitexty - impostatesticima + impostatesticima seteazatextesus stelhoofdin: stelhoofdin setupheader stellekopfzeileein nastavzahlavi - impostainstestazione + impostainstestazione seteazaantet stelhoofdtekstenin: stelhoofdtekstenin setupheadertexts stellekopfzeilentextein nastavtextyzahlavi - impostatestiintestazioni + impostatestiintestazioni seteazatexteantet stelnummeringin: stelnummeringin setuppagenumbering stelleseitennummeriernungein nastavcislovanistran - impostanumerazionepagina + impostanumerazionepagina seteazanumerotarepagina stelonderin: stelonderin setupbottom stelleuntenein nastavspodek - impostafondo + impostafondo seteazajos stelondertekstenin: stelondertekstenin setupbottomtexts stelletextuntenein nastavdolnitexty - impostatestifondo + impostatestifondo seteazatextejos stelvoetin: stelvoetin setupfooter stellefusszeileein nastavupati - impostapdp + impostapdp seteazasubsol stelvoettekstenin: stelvoettekstenin setupfootertexts stellefusszeilentextein nastavtextyupati - impostatestipdp + impostatestipdp seteazatextesubsol stelpaginanummerin: stelpaginanummerin setuppagenumber stelleseitennummerein nastavcislostrany - impostanumeropagina + impostanumeropagina seteazanumarpagina stelsubpaginanummerin: stelsubpaginanummerin setupsubpagenumber stelleunterseitennummerein nastavpodcislostrany - impostanumerosottopagina + impostanumerosottopagina seteazanumarsubpagina steltekstin: steltekstin setuptext stelletextein nastavtext - impostatesto + impostatesto seteazatext stelteksttekstenin: stelteksttekstenin setuptexttexts stelletexttexteein nastavtexttexty - impostatestotesti + impostatestotesti seteazatextetext definieertekst: definieertekst definetext definieretext definujtext - definiscitesto + definiscitesto definestetext pagenumber: paginanummer pagenumber seitenummer cislostrany - numeropagina + numeropagina numarpagina completepagenumber: volledigepaginanummer completepagenumber completepagenumber completepagenumber % TOBIAS % TO - numeropaginacompleto % TB TH + numeropaginacompleto completeazanumarpagina % TB TH placepagenumber: plaatspaginanummer placepagenumber placepagenumber placepagenumber % TOBIAS % TOM - mettinumeropagina % TB TH + mettinumeropagina punenumarpagina % TB TH items: items items posten polozky - elementi + elementi element stelitemsin: stelitemsin setupitems stellepostenein nastavpolozky - impostaelementi + impostaelementi seteazaelemente regellinks: regellinks leftaligned linksbuendig zarovnanovlevo - asinistra % GB + asinistra aliniatstanga % GB regelmidden: regelmidden midaligned zentriert zarovnanonastred - alcentro + alcentro aliniatcentru regelrechts: regelrechts rightaligned rechtsbuendig zarovnanovpravo - adestra + adestra aliniatdreapta startkolommen: startkolommen startcolumns startspalten startsloupce - iniziacolonne + iniziacolonne startcoloane stopkolommen: stopkolommen stopcolumns stopspalten stopsloupce - terminacolonne + terminacolonne stopcoloane stelkolommenin: stelkolommenin setupcolumns stellespaltenein nastavsloupce - impostacolonne + impostacolonne seteazacoloane kolom: kolom column spalte sloupec - colonna + colonna coloana kop: kop head kopf nadpis - testa % GB + testa titlu % GB but: but but but spodek - fondo + fondo but som: som item pos polozka - elemento + elemento element nop: nop nop nop nop - nop + nop nop mar: mar mar mar okr - mar + mar mar sym: sym sym sym sym - sim + sim sim its: its its its pol % abbr. of polozka (it em) - el %abbr. of elemento + el el % abbr. of elemento (it) element (ro) ran: ran ran ran ran - ran + ran ran startopsomming: startopsomming startitemize startaufzaehlung startvycet - iniziaitemize % GB + iniziaelenco startenumerare stelopsommingenin: stelopsommingenin setupitemizations stelleaufzaehlungenein nastavvycty - impostaitemization + impostaelencazioni setareitemization stelopsommingin: stelopsommingin setupitemize stelleaufzaehlungein nastavvycet - impostaitemize + impostaelenco setareenumerare stopopsomming: stopopsomming stopitemize stopaufzaehlung stopvycet - terminaitemize + terminaelenco stopenumerare definieerkop: definieerkop definehead definiereueberschrift definujnadpis - definiscitesta % GB + definiscitesta definesteantet stelkopin: stelkopin setuphead stelleueberschriftein nastavnadpis - impostatesta + impostatesta seteazatitlu stelkoppenin: stelkoppenin setupheads stelleueberschriftenein nastavnadpisy - impostateste + impostateste seteazatitluri stelkopnummerin: stelkopnummerin setupheadnumber stellekopfzahlein nastavcislonadpisu - impostanumerotesta + impostanumerotesta seteazanumartitlu kopnummer: kopnummer headnumber kopfnummer cislonadpisu - numerotesta + numerotesta numartitlu huidigekopnummer: huidigekopnummer currentheadnumber heutigeskopfnummer aktualnicislonadpisu - numerotestacorrente + numerotestacorrente numartitlucurent bepaalkopnummer: bepaalkopnummer determineheadnumber bestimmekopfnummer stanovcislonadpisu - determinanumerotesta + determinanumerotesta determinanumartitlu resetmarkering: resetmarkering resetmarking ruecksetztenbeschriftung resetznaceni - reimpostamarcatura + reimpostamarcatura reseteazamarcaje stelmarkeringin: stelmarkeringin setupmarking stellebeschriftungein nastavznaceni - impostamarcatura + impostamarcatura seteazamarcaje definieermarkering: definieermarkering definemarking definierebeschriftung definujznaceni - definiscimarcatura + definiscimarcatura definestemarcaje geenmarkering: geenmarkering nomarking keinebeschriftung zadneznaceni - nientemarcatura + nientemarcatura faramarcaje marking: markeer marking beschriftung znaceni - marcatura + marcatura marcaje ontkoppelmarkering: ontkoppelmarkering decouplemarking entknuepfebeschriftung rozpojeneznaceni - decouplemarcatura % GB + decouplemarcatura decupleazamarcaje % GB koppelmarkering: koppelmarkering couplemarking verknuepfebeschriftung propojeneznaceni - accoppiamarcatura % GB + accoppiamarcatura cupleazamarcaje % GB haalmarkering: haalmarkering getmarking holebeschriftung ziskejznaceni - prendimarcatura % GB + prendimarcatura adumarcaje % GB stellayoutin: stellayoutin setuplayout stellelayoutein nastavvzhled - impostalayout + impostalayout seteazaaspect paslayoutaan: paslayoutaan adaptlayout passelayoutan prizpusobvzhled - adattalayout + adattalayout adapteazaaspect steloffsetin: steloffsetin setupoffset stelleoffsetein nastavoffset - impostaoffest + impostaoffest seteazaoffset plaatsopgrid: plaatsopgrid placeongrid amgitterausrichten umistinamrizku - mettiingriglia + mettiingriglia plaseazapegrid verplaatsopgrid: verplaatsopgrid moveongrid amgitterneuausrichten premistinamrizku - spostaagriglia + spostaagriglia mutapegrid tooninstellingen: tooninstellingen showsetups zeigeeinstellungen ukaznastaveni - mostraimpostazioni + mostraimpostazioni afiseazasetari toonkader: toonkader showframe zeigerahmen ukazramecek - mostracornice + mostracornice afiseazarama toongrid: toongrid showgrid zeigegitter ukazmrizku - mostragriglia + mostragriglia afiseazagrid toonopbouw: toonopbouw showbuildup zeigeaufbau ukazstrukturu - mostrabuildup % GB + mostrabuildup afiseazabuildup toonlayout: toonlayout showlayout zeigelayout ukazvzhled - mostralyout + mostralyout afiseazaaspect toonprint: toonprint showprint zeigedruck ukazvytisk - mostrastampa + mostrastampa afiseazatiparire toonstruts: toonstruts showstruts zeigestruts ukazpodpery - mostrastruts + mostrastruts afiseazastruts definieerpapierformaat: definieerpapierformaat definepapersize definierepapierformat definujvelikostpapiru - definiscidimensionicarta + definiscidimensionicarta definestedimensiunehartie stelpapierformaatin: stelpapierformaatin setuppapersize stellepapierformatein nastavvelikostpapiru - impostadimensionicarta + impostadimensionicarta seteazadimensiunihartie stelarrangerenin: stelarrangerenin setuparranging stelleanordnenein nastavusporadani - impostaparranging % GB + impostaparranging seteazaaranjareapag versie: versie version version verze - versione + versione versiune stelachtergrondenin: stelachtergrondenin setupbackgrounds stellehintergruendeein nastavpozadi - impostasfondi + impostasfondi seteazafundaluri steluitlijnenin: steluitlijnenin setupalign stelleausrichtungein nastavzarovnani - impostaallineamento + impostaallineamento seteazaalinierea stelwitruimtein: stelwitruimtein setupwhitespace stellezwischenraumein nastavbilamista - impostawhitespace % GB + impostawhitespace seteazaspatiualb setupinteraction: stelinteractiein setupinteraction stelleinteraktionein nastavinterakci - impostainterazione + impostainterazione seteazainteractiunea stelinteractiemenuin: stelinteractiemenuin setupinteractionmenu stelleinteraktionsmenueein nastavinterakcnimenu - impostamenuinterazione + impostamenuinterazione seteazameniuinteractiune definieerinteractiemenu: definieerinteractiemenu defineinteractionmenu definiereinteraktionsmenue definujinterakcnimenu - definiscimenuinterazione + definiscimenuinterazione definestemeniuinteractiune blokkeerinteractiemenu: blokkeerinteractiemenu disableinteractionmenu inaktiviereinteraktionsmenue zablokujinterakcnimenu - disabilitamenuinterazione + disabilitamenuinterazione dezactiveazameniuinteractiune interactiebuttons: interactiebuttons interactionbuttons interaktionsknopfe interakcnitlacitka - pulsantinterazione + pulsantinterazione butoaneinteractiune interactiebalk: interactiebalk interactionbar interaktionsbalken interakcnilista - barrainterazione + barrainterazione barainteractiune stelinteractiebalkin: stelinteractiebalkin setupinteractionbar stelleinteraktionsbalkenein nastavinterakcnilistu - impostabarrainterazione + impostabarrainterazione seteazabarainteractiune stelinteractieschermin: stelinteractieschermin setupinteractionscreen stelleinteraktionsbildschirmein nastavinterakcniobrazovku - impostaschermointerazione + impostaschermointerazione seteazaecraninteractiune placebookmarks: plaatsbookmarks placebookmarks platzierebookmarks umistizalozky - mettisegnalibro + mettisegnalibro plaseazasemnecarte bookmark: bookmark bookmark bookmark zalozka - segnalibro + segnalibro semncarte definieerbeeldmerk: definieerbeeldmerk definelogo definierelogo definujlogo - definiscilogo + definiscilogo definestelogo plaatsbeeldmerken: plaatsbeeldmerken placelogos platzierelogo umistiloga - mettiloghi + mettiloghi punelogouri definecolor: definieerkleur definecolor definierefarbe definujbarvu - definiscicolore + definiscicolore definesteculoare definecolorgroup: definieerkleurgroep definecolorgroup definierefarbengruppe definujskupinubarev - definiscigruppocolori + definiscigruppocolori definestegrupculori definepalet: definieerpalet definepalet definierepalette definujpaletu - definiscitavolozza + definiscitavolozza definestepaleta graycolor: grijskleur graycolor graufarbe sedabarva - coloregrigio + coloregrigio culoaregri color: kleur color farbe barva - colore + colore culoare startcolor: startkleur startcolor startfarbe startbarva - iniziacolore + iniziacolore startculoare stopcolor: stopkleur stopcolor stopfarbe stopbarva - terminacolore + terminacolore stopculoare setupcolors: stelkleurenin setupcolors stellefarbenein nastavbarvy - impostacolori + impostacolori seteazaculori setupcolor: stelkleurin setupcolor stellefarbeein nastavbarvu - impostacolore + impostacolore seteazaculoare setuppalet: stelpaletin setuppalet stellepaletteein nastavpaletu - impostatavolozza + impostatavolozza seteazapaleta showcolor: toonkleur showcolor zeigefarbe ukazbarvu - mostracolore + mostracolore afiseazaculoare showcolorgroup: toonkleurgroep showcolorgroup zeigefarbengruppe ukazskupinubarev - mostragruppocolori + mostragruppocolori afiseazagrupculoare showpalet: toonpalet showpalet zeigepalette ukazpaletu - mostratavolozza + mostratavolozza afiseazapaleta comparecolorgroup: vergelijkkleurgroep comparecolorgroup vergleichefarbengruppe porovnejskupinubarev - confrontagruppocolori + confrontagruppocolori comparagrupculoare comparepalet: vergelijkpalet comparepalet vergleichepalette porovnejpaletu - confrontatavolozza + confrontatavolozza comparapaleta colorvalue: kleurwaarde colorvalue farbewert hodnotabarvy - valorecolore + valorecolore valoareculoare greyvalue: grijswaarde greyvalue grauwert hodnotasedi - valoregrigio + valoregrigio valoaregri startraster: startraster startraster startraster startrastr - iniziaraster % GB + iniziaraster startraster % GB stopraster: stopraster stopraster stopraster stoprastr - terminaraster + terminaraster stopraster definieerblok: definieerblok defineblock definiereblock definujblok - definisciblocco + definisciblocco definestebloc stelblokin: stelblokin setupblock stelleblockein nastavblok - impostablocco + impostablocco seteazabloc gebruikblokken: gebruikblokken useblocks verwendebloecke uzijbloky - usablocco + usablocco folosestebloc verwerkblokken: verwerkblokken processblocks bearbeitebloecke zpracujbloky - elaborablocchi + elaborablocchi proceseazabloc handhaafblokken: handhaafblokken keepblocks behaltebloecke zachovejbloky - tieniblocchi + tieniblocchi pastreazablocuri selecteerblokken: selecteerblokken selectblocks waehlebloeckeaus vyberbloky - selezionablocchi + selezionablocchi selecteazablocuri verbergblokken: verbergblokken hideblocks verbergebloecke schovejbloky - nascondiblocchi + nascondiblocchi ascundeblocuri passeerblokken: passeerblokken bypassblocks bypassblocks bypassblocks - saltablocchi + saltablocchi saripesteblocuri forceerblokken: forceerblokken forceblocks forceblocks forceblocks - forzablocchi + forzablocchi forteazablocuri geenblokkenmeer: geenblokkenmeer nomoreblocks keinebloeckemehr zadnedalsibloky - bastablocchi + bastablocchi gatablocuri definieerlijst: definieerlijst definelist definiereliste definujseznam - definiscielenco + definiscilista definestelista definieersamengesteldelijst: definieersamengesteldelijst definecombinedlist definierezusammengestellteliste definujkombinovanyseznam - definiscielencocombinato + definiscilistacombinata definestelistacombinata plaatslijst: plaatslijst placelist platziereliste umistiseznam - mettielenco + mettilista punelista plaatssamengesteldelijst: plaatssamengesteldelijst placecombinedlist platzierezusammengestellteliste umistikombinovanyseznam - mettilistacombinata + mettilistacombinata punelistacombinata schrijfnaarlijst: schrijfnaarlijst writetolist schreibezurliste zapisdoseznamu - scriviinelenco + scriviinlista scrieinlista schrijftussenlijst: schrijftussenlijst writebetweenlist schreibezwischenliste zapismeziseznam - scrivitraelenchi + scrividentrolista scrieintreliste stellijstin: stellijstin setuplist stellelisteein nastavseznam - impostaelenco + impostalista seteazalista stelsamengesteldelijstin: stelsamengesteldelijstin setupcombinedlist stellezusammengestelltelisteein nastavkombinovanyseznam - impostaelencocombinato + impostalistacombinata seteazalistacombinata bepaallijstkenmerken: bepaallijstkenmerken determinelistcharacteristics bestimmelistencharakeristika stanovcharakteristickuseznamu - determinacarattersticheelenco + determinacaratterstichelista determinacaracteristicilelistei lijstlengte: lijstlengte listlength listenlaenge delkaseznamu - lunghezzaelenco + lunghezzalista lungimelista lijstbreedte: lijstbreedte listwidth listenbreite sirkaseznamu - ampiezzaelenco + ampiezzalista latimelista lijsthoogte: lijsthoogte listheight listenhoehe vyskaseznamu - altezzaelenco + altezzalista inaltimelista geenlijst: geenlijst nolist keineliste zadnyseznam - nienteelenco + nientelista faralista definieerreferentielijst: definieerreferentielijst definereferencelist definierereferenzliste definujseznamodkazu - definiscielencoriferimenti + definiscilistariferimenti definestelistareferinte plaatsreferentielijst: plaatsreferentielijst placereferencelist platzierereferenzliste umistiseznamodkazu - mettielencoriferimenti + mettilistariferimenti punelistareferinte schrijfnaarreferentielijst: schrijfnaarreferentielijst writetoreferencelist schreibezurreferenzliste zapisdoseznamuodkazu - scriviinelencoriferimenti + scriviinlistariferimenti scrieinlistareferinte stelreferentielijstin: stelreferentielijstin setupreferencelist stellereferenzlisteein nastavseznamodkazu - impostaelencoriferimenti + impostalistariferimenti seteazalistareferinte definieerplaatsblok: definieerplaatsblok definefloat definieregleitobjekt definujplvouciobjekt - definiscioggettomobile + definiscioggettomobile definestefloat stelplaatsblokin: stelplaatsblokin setupfloat stellegleitobjektein nastavplvouciobjekt - impostaoggettomobile + impostaoggettomobile seteazafloat stelplaatsblokkenin: stelplaatsblokkenin setupfloats stellegleitobjekteein nastavplvouciobjekty - impostaoggettimobili + impostaoggettimobili seteazafloats splitsplaatsblok: splitsplaatsblok splitfloat teilegleitobjekt rozdelplvouciobjekt - spezzaoggettomobile + spezzaoggettomobile impartefloat stelplaatsblokkensplitsenin: stelplaatsblokkensplitsenin setupfloatsplitting stelleplatziegeteiltegleitobjekt nastavdeleniplvoucichobjektu - impostaspezzamentooggettomobile + impostaspezzamentooggettomobile seteazaimpartireafloat startcombinatie: startcombinatie startcombination startkombination startspojeni - iniziacombinazione + iniziacombinazione startcombinare stopcombinatie: stopcombinatie stopcombination stopkombination stopspojeni - terminacombinazione + terminacombinazione stopcombinare plaatsnaastelkaar: plaatsnaastelkaar placesidebyside platzierenebeneinander umistivedlesebe - mettifiancoafianco + mettifiancoafianco punefatainfata plaatsonderelkaar: plaatsonderelkaar placeontopofeachother platziereuntereinander umistinadsebe - mettiunosullaltro + mettiunosullaltro punedeasuprafiecareia stelblokkopjein: stelblokkopjein setupcaption stellebildunterschriftein nastavpopisek - impostacaption % GB + impostacaption seteazalegenda % GB stelblokkopjesin: stelblokkopjesin setupcaptions stellebilderunterschriftein nastavpopisky - impostacaptions % GB + impostacaptions seteazalegendele % GB stelcombinatiesin: stelcombinatiesin setupcombinations stellekombinationein nastavspojeni - impostacombinazioni + impostacombinazioni seteazacombinari startoverlay: startoverlay startoverlay startoverlay startprekryv - iniziasovrapposizione + iniziasovrapposizione startoverlay stopoverlay: stopoverlay stopoverlay stopoverlay stopprekryv - terminasovrapposizione + terminasovrapposizione stopoverlay definieerregister: definieerregister defineregister definiereregister definujrejstrik - definisciregistro + definisciregistro definesteregistru koppelregister: koppelregister coupleregister verknuepfregister propojenyrejstrik - accoppiaregistro + accoppiaregistro cupleazaregistru stelregisterin: stelregisterin setupregister stelleregisterein nastavrejstrik - impostaregistro + impostaregistro seteazaregistru schrijfnaarregister: schrijfnaarregister writetoregister schreibezumregister zapisdorejstriku - scriviinregistro + scriviinregistro scrieinregistru plaatsregister: plaatsregister placeregister platziereregister umistirejstrik - mettiregistro + mettiregistro puneregistru bepaalregisterkenmerken: bepaalregisterkenmerken determineregistercharacteristics bestimmeregistercharakteristika urcicharakteristikurejstriku - determinacaratteristicheregistro + determinacaratteristicheregistro determinacaracteristiciregistru definieersorteren: definieersorteren definesorting definieresortieren definujtrideni - definisciordinamento + definisciordinamento definestesortare definieersynoniemen: definieersynoniemen definesynonyms definieresynonyme definujsynonyma - definiscisinonimi + definiscisinonimi definestesinonim stelsorterenin: stelsorterenin setupsorting stellesortierenein nastavtrideni - impostaordinamento + impostaordinamento seteazasortare stelsynoniemenin: stelsynoniemenin setupsynonyms stellesynonymein nastavsynonyma - impostasinonimi + impostasinonimi seteazasinonime startsynchronisatie: startsynchronisatie startsynchronization startsynchronisation startsynchronizace - iniziasincronizzazione + iniziasincronizzazione startsincronizare stopsynchronisatie: stopsynchronisatie stopsynchronization stopsynchronisation stopsynchronizace - terminasincronizzazione + terminasincronizzazione stopsincronizare stelsynchronisatiebalkin: stelsynchronisatiebalkin setupsynchronizationbar stellesynchronisationsbalkenein nastavsynchronizacnilistu - impostabarrasincronizzazione + impostabarrasincronizzazione setarebarasincronizare stelsynchronisatiein: stelsynchronisatiein setupsynchronization stellesynchronisationein nastavsynchronizaci - impostasincronizzazione + impostasincronizzazione setaresincronizare synchronisatiebalk: synchronisatiebalk synchronizationbar synchronisationsbalken synchronizacnilista - barrasincronizzazione + barrasincronizzazione barasincronizare synchroniseer: synchroniseer synchronize synchronisieren synchronizovat - sincronizza + sincronizza sincronizeaza gebruikexterndocument: gebruikexterndocument useexternaldocument verwendeexteresdokument uzijexternidokument - usadocumentoesterno + usadocumentoesterno folosestedocumentextern gebruikURL: gebruikURL useURL verwendeURL uzijURL - usaURL + usaURL folosesteURL gebruikurl: gebruikurl useurl verwendeurl uzijurl - usaurl + usaurl folosesteurl setupurl: stelurlin setupurl stelleurlein nastavurl - impostaurl + impostaurl seteazaurl coupledocument: koppeldocument coupledocument verknuepfedokument propojenydokument - accoppiadocumento + accoppiadocumento cupleazadocument stelprogrammasin: stelprogrammasin setupprograms stelleprogrammein nastavprogramy - impostaprogrammi + impostaprogrammi seteazaprograme definieerprogramma: definieerprogramma defineprogram definiereprogramme definujprogram - definisciprogramma + definisciprogramma definesteprogram programma: programma program programm program - programma + programma program stelpaginaovergangenin: stelpaginaovergangenin setuppagetransitions stelleseitenuebergangein nastavprechodstrany - impostatransizionepagina + impostatransizionepagina seteazatranzitiepagina definieerprofiel: definieerprofiel defineprofile definiereprofil definujprofil - definisciprofilo + definisciprofilo definesteprofil definieerversie: definieerversie defineversion definiereversion definujverzi - definisciversion + definisciversion definesteversiune markeerversie: markeerversie markversion beschrifteversion oznacverzi - marcaversione % GB + marcaversione marcheazaversiune % GB selecteerversie: selecteerversie selectversion waehleversionaus vyberverzi - selezionaversione % GB + selezionaversione selecteazaversiune % GB startprofiel: startprofiel startprofile startprofil startprofil - iniziaprofilo + iniziaprofilo startprofil startversie: startversie startversion startversion startverze - iniziaversione + iniziaversione startversiune stelprofielenin: stelprofielenin setupprofiles stelleprofilein nastavprofily - impostaprofili + impostaprofili seteazaprofile stelversiesin: stelversiesin setupversions stelleversionein nastavverze - impostaversioni + impostaversioni seteazaversiuni stopprofiel: stopprofiel stopprofile stopprofil stopprofil - terminaprofili + terminaprofili stopprofil stopversie: stopversie stopversion stopversion stopverze - terminaversioni + terminaversioni stopversiune volgprofiel: volgprofiel followprofile folgeprofil dodrzujprofil - seguiprofilo + seguiprofilo urmeazaprofil volgprofielversie: volgprofielversie followprofileversion folgeprofilversion dodrzujverziprofilu - seguiversioneprofilo + seguiversioneprofilo urmeazaversiuneprofil volgversie: volgversie followversion folgeversion dodrzujverzi - seguiversione + seguiversione urmeazaversiune doordefinieren: doordefinieren definedescription definierebeschreibung definujpopis - definiscidescrizione + definiscidescrizione definestedescriere doorlabelen: doorlabelen definelabel definierelabel definujpopisek - definiscietichetta + definiscietichetta definesteeticheta doornummeren: doornummeren defineenumeration definierenummerierung definujvycet - definiscienumerazione + definiscienumerazione definesteenumerare doorspringen: doorspringen defineindenting definiereeinzug definujodsazovani - definiscirientro + definiscirientro definestealiat steldoordefinierenin: steldoordefinierenin setupdescriptions definierebeschreibungen nastavpopisy - impostadescrizioni + impostadescrizioni seteazadescriere steldoornummerenin: steldoornummerenin setupenumerations stellebeschreibungein nastavvycty - impostaenumerazioni + impostaenumerazioni seteazaenumerare steldoorspringenin: steldoorspringenin setupindentations stelleeinzuegein nastavodsazovani - impostarientri + impostarientri seteazaaliniate steltabin: steltabin setuptab stelletabein nastavtab - impostatab + impostatab seteazatab tab: tab tab tab tab - tab + tab tab setupexternalfigures: stelexternefigurenin setupexternalfigures stelleexterneabbildungenein nastavexterniobrazy - impostafigureesterne + impostafigureesterne seteazafiguriexterne showexternalfigures: toonexternefiguren showexternalfigures zeigeexterneabbildungen ukazexterniobrazy - mostrafiguresterne + mostrafiguresterne afiseazafiguriexterne externalfigure: externfiguur externalfigure externeabbildung externiobraz - figuraesterna + figuraesterna figuraexterna useexternalfigure: gebruikexternfiguur useexternalfigure verwendeexterneabbildung uzijexterniobraz - usafiguraesterna + usafiguraesterna folosestefiguraexterna startfigure: startfiguur startfigure startabbildung startobraz - iniziafigura + iniziafigura startfigura referring: refereer referring referieren odkazujici - referring % GB + referring referring % GB remark: toelichting remark bemerkung oznaceni - commento + commento remarca colorbar: kleurenbalk colorbar farbbalken barevnalista - barracolori + barracolori baraculoare rooster: rooster grid gitter mrizka - griglia + griglia grid button: button button knopf tlacitko - pulsante + pulsante buton menubutton: menubutton menubutton menueknopf tlacitkomenu - pulsantemenu + pulsantemenu butonmeniu stelbuttonsin: stelbuttonsin setupbuttons stelleknopfein nastavtlacitka - impostapulsanti + impostapulsanti seteazabutoane usereferences: gebruikreferenties usereferences verwendereferenzen uzijodkazy - usariferimenti + usariferimenti folosestereferinte reflijst: reflijst reflist refliste seznamodkazu - listarif + listarif listaref stelreferentielijstin: stelreferentielijstin setupreferencelist stellereferenzlisteein nastavseznamodkazu - impostalistariferimenti + impostalistariferimenti seteazalistareferinte setupreferencing: stelrefererenin setupreferencing stellereferenzierenein nastavodkazovani - impostariferimento + impostariferimento seteazareferinte textreference: tekstreferentie textreference textreferenz odkaznatext - riferimentotesto + riferimentotesto referintatext pagereference: paginareferentie pagereference seitenreferenz odkaznastranu - riferimentopagina + riferimentopagina referintapagina reference: referentie reference referenz odkaz - riferimento + riferimento referinta definereference: definieerreferentie definereference definierereferenz definujodkaz - definisciriferimento + definisciriferimento definestereferinte definereferenceformat: definieerreferentieformaat definereferenceformat definierereferenzformat definujformatodkazu - definisciformatoriferimento + definisciformatoriferimento definesteformatreferinte useJSscripts: gebruikJSscripts useJSscripts verwendeJSscript uzijJSscripts - usaJSscripts + usaJSscripts folosestescriptJS uit: uit from von zref - da + da din in: in in in tref - in + in in op: op at bei pref - al % GB + al la % GB over: over about ueber oref - intorno + intorno despre naar: naar goto zu jdina - vaia + vaia dute atpage: oppagina atpage aufseite nastrane - apagina + apagina lapagina somewhere: ergens somewhere irgendwo nekde - daqualcheparte + daqualcheparte undeva ref: ref ref ref ref - rif + rif ref naarbox: naarbox gotobox zurbox jdinabox - vaiabox % GB + vaiabox dutebox % GB naarpagina: naarpagina gotopage zurseite jdinastranu - vaiapagina + vaiapagina dutepagina plaatsformule: plaatsformule placeformula platziereformel umistirovnici - mettiformula + mettiformula puneformula plaatssubformule: plaatssubformule placesubformula platziereunterformel umistipodrovnici - mettisottoformula + mettisottoformula punesubformula stelformulesin: stelformulesin setupformulae stelleformelnein nastavrovnice - impostaformule + impostaformule seteazaformule formulenummer: formulenummer formulanumber formelnummer cislorovnice - numeroformula + numeroformula numarformula subformulenummer: subformulenummer subformulanumber unterformelnummer cislopodrovnice - numerosottoformula + numerosottoformula numarsubformula leg: leg leg leg leg - leg + leg leg geg: geg fact geg fakt - fatto + fatto fact mathematics: wiskunde mathematics mathematik matematika - matematica + matematica matematica dimension: dimensie dimension dimension rozmer - dimensione + dimensione dimensiune nodimension: geendimensie nodimension keindimension zadnyrozmer - nientedimensioni + nientedimensioni faradimensiune startomgeving: startomgeving startenvironment startumgebung startprostredi - iniziaambiente + iniziaambiente startmediu stopomgeving: stopomgeving stopenvironment stopumgebung stopprostredi - terminaambiente + terminaambiente stopmediu startdeelomgeving: startdeelomgeving startlocalenvironment startlokaleumgebung startlokalnihoprostredi - iniziaambientelocale + iniziaambientelocale startmediulocal startonderdeel: startonderdeel startcomponent startkomponente startkomponenta - iniziacomponente + iniziacomponente startcomponenta stoponderdeel: stoponderdeel stopcomponent stopkomponente stopkomponenta - terminacomponente + terminacomponente stopcomponenta startprodukt: startprodukt startproduct startprodukt startprodukt - iniziaprodotto + iniziaprodotto startprodus stopprodukt: stopprodukt stopproduct stopprodukt stopprodukt - terminaprodotto + terminaprodotto stopprodus startproject: startproject startproject startprojekt startprojekt - iniziaprogetto + iniziaprogetto startproiect stopproject: stopproject stopproject stopprojekt stopprojekt - terminaprogetto + terminaprogetto stopproiect setups: instellingen setups einstellungen nastaveni - impostazioni + impostazioni setari project: project project projekt projekt - progetto + progetto proiect onderdeel: onderdeel component komponente komponenta - componenet + componenet componenta produkt: produkt product produkt produkt - prodotto + prodotto produs omgeving: omgeving environment umgebung prostredi - amiente + ambiente mediu geenfilesmeer: geenfilesmeer nomorefiles keinedateienmehr zadnedalsisoubory - bastafile + bastafile farafisiere haalbuffer: haalbuffer getbuffer holepuffer ziskejbuffer - prendibuffer + prendibuffer adubuffer stelbufferin: stelbufferin setupbuffer stellepufferein nastavbuffer - impostabuffer + impostabuffer seteazabuffer typebuffer: typebuffer typebuffer tippepuffer typebuffer - typebuffer % GB + typebuffer scriebuffer % GB definieerbuffer: definieerbuffer definebuffer definierepuffer definujbuffer - definiscibuffer + definiscibuffer definestebuffer betekenis: betekenis unitmeaning bedeutung vyznam - nomeunita % GB + nomeunita numeunitate % GB voluit: voluit infull volleswort plnezneni - perlungo + perlungo pelung citaat: citaat quotation zitat citace - quotation % GB + citazione citat citeer: citeer quote zitieren citovat - quote + menzione minicitat startcitaat: startcitaat startquotation startzitat startcitace - iniziaquotation + iniziacitazione startcitat stopcitaat: stopcitaat stopquotation stopzitat stopcitace - terminaquotation + terminacitazione stopcitat stelciterenin: stelciterenin setupquote stellezitierenein nastavcitaci - impostaquote + impostamenzione seteazaminicitat definieer: definieer define definieren definuj - definisci + definisci defineste herhaal: herhaal redo wiederholen opakovat - rifai + rifai refa gebruikcommandos: gebruikcommandos usecommands verwendebefehl uzijprikazy - usacomandi + usacomandi folosestecomenzi definieerstartstop: definieerstartstop definestartstop definierestartstop definujstartstop - definisciiniziatermina + definisciiniziatermina definestestartstop startlocal: startlokaal startlocal startlokal startlokalni - inizialocale + inizialocale startlocal stoplocal: stoplokaal stoplocal stoplokal stoplokalni - terminalocale + terminalocale stoplocal startglobal: startglobaal startglobal startglobal startglobalni - iniziaglobale + iniziaglobale startglobal stopglobal: stopglobaal stopglobal stopglobal stopglobalni - terminaglobale + terminaglobale stopblobal naam: naam name name jmeno - nome + nome nume definieeropmaak: definieeropmaak definemakeup definiereumbruch definujupravu - definiscimakeup % GB + definiscimakeup definestemakeup % GB stelopmaakin: stelopmaakin setupmakeup stelleumbruchein nastavupravu - impostamakeup + impostamakeup seteazamakeup startopmaak: startopmaak startmakeup startumbruch startuprava - iniziamakeup + iniziamakeup startmakeup stopopmaak: stopopmaak stopmakeup stopumbruch stopuprava - terminamakeup + terminamakeup stopmakeup useexternalsoundtrack: gebruikexterngeluidsfragment useexternalsoundtrack verwendeexternestonstueck uzijexternizvuk - usacolonnasonoraesterna + usacolonnasonoraesterna folosestemuzicaexterna gebruikexternefile: gebruikexternefile useexternalfile verwendeexternedatei uzijexternisoubor - usafileesterno + usafileesterno folosestefisierextern gebruikexternefiles: gebruikexternefiles useexternalfiles verwendeexternedateien uzijexternisoubory - usafileesterni + usafileesterni folosestefisiereexterne kenmerk: kenmerk referral verweis odkaz - referral % GB + referral referit % GB kenmerkdatum: kenmerkdatum referraldate verweisdatum odkaznadatum - datareferral + datareferral datareferit high: hoog high hoch vysoky - ap + ap inalt lohi: laho lohi tiho nivy - pedap + pedap jossus low: laag low tief nizky - ped + ped jos breuk: breuk fraction bruch zlomek - frazione + frazione fractie chem: chem chem chem chem - chim + chim chem startnaast: startnaast startopposite startgegenueber startprotejsek - iniziaopposto + iniziaopposto startopozit stopnaast: stopnaast stopopposite stopgegenueber stopprotejsek - terminaopposto + terminaopposto stopopozit stelnaastplaatsenin: stelnaastplaatsenin setupoppositeplacing stellegegenueberplatzierenein nastavumisteniprotejsku - impostaposizionamentoopposti + impostaposizionamentoopposti seteazaplasareaopozita startpositioneren: startpositioneren startpositioning startpositionieren startumistovani - iniziaposizionamento + iniziaposizionamento startpozitionare stoppositioneren: stoppositioneren stoppositioning stoppositionieren stopumistovani - terminaposizionamento + terminaposizionamento stoppozitionare positioneer: positioneer position position pozice - posizione + posizione pozitie stelpositionerenin: stelpositionerenin setuppositioning stellepositionierenein nastavumistovani - impostaposizionamento + impostaposizionamento setarepozitie roteer: roteer rotate drehen otocit - rotazione % GB + rotazione roteste % GB stelroterenin: stelroterenin setuprotate stelledrehenein nastavotoceni - impostarotazione + impostarotazione seteazarotare spiegel: spiegel mirror spiegeln zrcadlit - riflessione + riflessione reflexie schaal: schaal scale format meritko - scale % GB + scale scala % GB stelnummerenin: stelnummerenin setupnumbering stellenummerierungein nastavcislovani - impostanumerazione + impostanumerazione seteazanumerotare reset: reset reset ruecksetzten reset - reimposta + reimposta reset stelpublicatiesin: stelpublicatiesin setuppublications stellepublikationein nastavpublikace - impostapubblicazioni + impostapubblicazioni seteazapublicatii publicatie: publicatie publication publikation publikace - pubblicazione + pubblicazione publicatie definieerhbox: definieerhbox definehbox definierehbox definujhbox - definiscihbox + definiscihbox definestehbox toevoegen: toevoegen adding zusatz scitani - adding % GB + adding adauga % GB punten: punten periods punkt tecky - punti + punti puncte stelkoppeltekenin: stelkoppeltekenin setuphyphenmark stellebindestrichein nastavdelitko - impostasegnosillabazione % GB + impostasegnosillabazione seteazaliniesilabe % GB stelinterliniein: stelinterliniein setupinterlinespace stellezeilenabstandein nastavmeziradkovoumezeru - impostainterlinea + impostainterlinea seteazaspatiuinterliniar stelspatieringin: stelspatieringin setupspacing stellespatiumein nastavradkovani - impostaspaziatura + impostaspaziatura seteazaspatiu steltolerantiein: steltolerantiein setuptolerance stelletoleranzein nastavtoleranci - impostatolleranza + impostatolleranza seteazatoleranta setupsystem: stelsysteemin setupsystem stellesystemein nastavsystem - impostasistema + impostasistema seteazasistem usepath: gebruikgebied usedirectory benutzeverzeichnis uzijadresar % TOBIAS - usacartella % GB + usacartella folosestedirector % GB definieeralineas: definieeralineas defineparagraphs definiereabsaetze definujodstavce - definiscicapoversi + definiscicapoversi definesteparagraf stelalineasin: stelalineasin setupparagraphs stelleabsaetzeein nastavodstavce - impostacapoversi + impostacapoversi seteazaparagrafe geentest: geentest donttest keintest zadnytest - notest + notest nutesta stelcommentaarin: stelcommentaarin setupcomment stellekommentarein nastavkomentar - impostacommento + impostacommento seteazacomentariu commentaar: commentaar comment kommentar komentar - commento + commento comentariu definefield: definieerveld definefield definierefeld definujpole - definiscicampo + definiscicampo definestecamp definemainfield: definieerhoofdveld definemainfield definierehauptfeld definujhlavnipole - definiscicampoprincipale + definiscicampoprincipale definestecampprincipal definesubfield: definieersubveld definesubfield definieresubfeld definujpodpole - definiscisottocampo + definiscisottocampo definestesubcamp clonefield: kloonveld clonefield klonierefeld klonujpole - clonacampo + clonacampo cloneazacamp copyfield: copieerveld copyfield kopierefeld kopirujpole - copiacampo + copiacampo copiazacamp setupfield: stelveldin setupfield stellefeldein nastavpole - impostacampo + impostacampo seteazacamp setupfields: stelveldenin setupfields stellefelderin nastavvsechnapole - impostacampi + impostacampi seteazacampuri field: veld field feld pole - campi + campi camp fitfield: passendveld fitfield passendfeld prizpusobivepole % or vhodnepole - adattacampo + adattacampo potrivestecamp logfields: registreervelden logfields registrierefelder zaznamovepole - logcampi % GB + logcampi logcampuri % GB showfields: toonvelden showfields zeigefelder ukazpole - mostracampi + mostracampi afiseazacampuri tooltip: suggestie tooltip tooltip bublinkovanapoveda - tooltip % GB + tooltip tooltip % GB fillinfield: invulveld fillinfield ausfuellfeld vyplnovepole - camporiempimento + camporiempimento campumplere definefieldstack: definieerveldstapel definefieldstack definierefeldstapel definujzasobnikpoli - definiscistackcampi % GB + definiscistackcampi definestestivacampuri % GB fieldstack: veldstapel fieldstack feldstapel zasobnikpoli - stackcampi + stackcampi stivacampuri setupforms: stelformulierenin setupforms setupforms setupforms - impostaforms % GB + impostaforms seteazaformulare % GB setupclipping: stelclipin setupclipping stelleausschnittein nastavorez - impostaclippling % GB + impostaclippling seteazaclipping % GB clip: clip clip ausschnitt orez - clip + clip clip placelegend: plaatslegenda placelegend platzierelegende umistilegendu - mettilegenda + mettilegenda punelegenda setuplegend: stellegendain setuplegend stellelegendeein nastavlegendu - impostalegenda + impostalegenda seteazalegenda setuppagecomment: stelpaginacommentaarin setuppagecomment stelleseitenkommentarein nastavkomentarstrany - impostacommentopagina + impostacommentopagina seteazacomentariupagina setupstrut: stelstrutin setupstrut setupstrut setupstrut - impostastrut + impostastrut seteazastrut definerule: definieerlijn definerule definerule definerule - definiscilinea + definiscilinea definesterigla placerule: plaatslijn placerule placerule placerule - mettilinea + mettilinea punerigla setuprule: stellijnin setuprule setuprule setuprule - impostalinea + impostalinea seteazarigla definetextvariable: definieertekstvariabele definetextvariable definetextvariable definetextvariable - definiscivariabiletesto + definiscivariabiletesto definestevariabilatext setuptextvariable: steltekstvariabelein setuptextvariable setuptextvariable setuptextvariable - impostavariabiletesto + impostavariabiletesto seteazavariabilatext settextvariable: kentekstvariabeletoe settextvariable settextvariable settextvariable - setvariabiletesto % GB + setvariabiletesto setvariabilatext % GB placetextvariable: plaatstekstvariabele placetextvariable placetextvariable placetextvariable - mettivariabiletesto + mettivariabiletesto punevariabilatext textvariable: tekstvariabele textvariable textvariable textvariable - variabiletesto + variabiletesto variabilatext definetextposition: definieertekstpositie definetextposition definetextposition definetextposition - definisciposizionetesto + definisciposizionetesto definestepozitietext setuptextposition: steltekstpositiein setuptextposition setuptextposition setuptextposition - impostaposizionetesto + impostaposizionetesto seteazapozitietext positiontext: positioneertekst positiontext positiontext positiontext - posizionetesto % GB + posizionetesto pozitietext % GB definerawfont: definerawfont definerawfont definerawfont definerawfont - definiscifontgrezzo + definiscifontgrezzo definestefontraw switchtorawfont: switchtorawfont switchtorawfont switchtorawfont switchtorawfont - passaafontgrezzo + passaafontgrezzo trecilafontraw \stopcommands % ^ ^ ^ nadenken over \settextvariable vs \setuptextvariable in nl @@ -1713,107 +1719,111 @@ \startcommands dutch english german czech - italian + italian romanian bovenhoogte: bovenhoogte topheight hoeheoben vyskahorejsku - altezzacima + altezzacima inaltimesus bovenafstand: bovenafstand topdistance abstandoben vzdalenosthorejsku - distanzacima + distanzacima distantasus hoofdhoogte: hoofdhoogte headerheight kopfzeilenhoehe vyskazahlavi - altezzaintestazione + altezzaintestazione inaltimeantet hoofdafstand: hoofdafstand headerdistance kopfzeilenabstand vzdalenostzahlavi - distanzaintestazione + distanzaintestazione distantaantet teksthoogte: teksthoogte textheight texthoehe vyskatextu - altezzatesto + altezzatesto inaltimetext voetafstand: voetafstand footerdistance fusszeileabstand vzdalenostupati - distanzapdp + distanzapdp distantasubsol voethoogte: voethoogte footerheight fusszeilenhoehe vyskaupati - altezzapdp + altezzapdp inaltimesubsol onderafstand: onderafstand bottomdistance abstandunten vzdalenostspodku - distanzafondo + distanzafondo distantajos onderhoogte: onderhoogte bottomheight hoeheunten vyskaspodku - altezzafondo + altezzafondo inaltimejos margebreedte: margebreedte marginwidth marginalbreite sirkamarginalie - ampiezzamargine % GB + ampiezzamargine latimemargine % GB linkermargebreedte: linkermargebreedte leftmarginwidth linkemarginalbreite sirkalevemarginalie - ampiezzamarginesinistro + ampiezzamarginesinistro latimemarginestanga rechtermargebreedte: rechtermargebreedte rightmarginwidth rechtemarginalbreite sirkapravemarginalie - ampiezzamarginedestro + ampiezzamarginedestro latimemarginedreapta margeafstand: margeafstand margindistance marginalafstand vzdalenostmarginalie - distanzamargine + distanzamargine distantamargine linkermargeafstand: linkermargeafstand leftmargindistance linkemarginalafstand vzdalenostlevemarginalie - distanzamarginesinistro + distanzamarginesinistro distantamarginestanga rechtermargeafstand: rechtermargeafstand rightmargindistance rechtemarginalafstand vzdalenostpravemarginalie - distanzamarginedestro + distanzamarginedestro distantamarginedreapta randbreedte: randbreedte edgewidth randbreite sirkaokraje - ampiezzabordo + ampiezzabordo latimecolturi linkerrandbreedte: linkerrandbreedte leftedgewidth breitelinkerrand sirkalevehookraje - ampiezzabordosinistro + ampiezzabordosinistro latimecoltstanga rechterrandbreedte: rechterrandbreedte rightedgewidth breiterechterrand sirkapravehookraje - ampiezzabordodestro + ampiezzabordodestro latimecoltdreapta randafstand: randafstand edgedistance randabstand vzdalenostokraje - distanzabordo + distanzabordo distantacolt linkerrandafstand: linkerrandafstand leftedgedistance abstandlinkerrand vzdalenostlevehookraje - distanzabordosinistro + distanzabordosinistro distantacoltstanga rechterrandafstand: rechterrandafstand rightedgedistance abstandrechterrand vzdalenostpravehookraje - distanzabordodestro + distanzabordodestro distantacoltdreapta tekstbreedte: tekstbreedte textwidth textbreite sirkatextu - ampiezzatesto + ampiezzatesto latimetext zetbreedte: zetbreedte makeupwidth satzbreite sirkasazby - ampiezzamakeup % GB + ampiezzamakeup latimemakeup % GB zethoogte: zethoogte makeupheight satzhoehe vyskasazby - altezzamakeup + altezzamakeup inaltimemakeup kopwit: kopwit topspace kopfweite odsazenishora - spaziocima + spaziocima spatiusus rugwit: rugwit backspace rumpfweite odsazenizleva - spaziodietro % GB + spaziodietro spatiuspate % GB papierbreedte: papierbreedte paperwidth papierbreite sirkapapiru - ampiezzacarta + ampiezzacarta latimehartie papierhoogte: papierhoogte paperheight papierhoehe vyskapapiru - altezzacarta + altezzacarta inaltimehartie printpapierbreedte: printpapierbreedte printpaperwidth printpapierbreite sirkatiskpapiru - ampiezzacartastampa % GB + ampiezzacartastampa latimehartieimprimanta % GB printpapierhoogte: printpapierhoogte printpaperheight printpapierhoehe vyskatiskpapiru - altezzacartastampa % GB + altezzacartastampa inaltimehartieimprimanta % GB kopniveau: kopniveau headlevel kopfniveau hlavniuroven - livellotesta % GB + livellotesta niveltitlu % GB linewidth: lijndikte linethickness liniendicke tloustkacary - spessoreriga + spessoreriga grosimelinie totaalaantalpaginas: totaalaantalpaginas totalnumberofpages gesamtseitenanzahl celkovypocetstran - numerototaledipagine + numerototaledipagine numartotalpagini + + useXMLfilter: gebruikXMLfilter useXMLfilter + useXMLfilter useXMLfilter + useXMLfilter useXMLfilter \stopcommands @@ -1827,47 +1837,47 @@ \startcommands dutch english german czech - italian + italian romanian startdocument: startdocument startdocument startdokument startdokument - iniziadocumento + iniziadocumento startdocument stopdocument: stopdocument stopdocument stopdokument stopdokument - terminadocumento + terminadocumento stopdocument startoverzicht: startoverzicht startoverview startueberblick startprehled - iniziaoverview % GB + iniziaoverview startoverview % GB stopoverzicht: stopoverzicht stopoverview stopueberblick stopprehled - terminaoverview + terminaoverview stopoverview stelbrievenin: stelbrievenin setupcorrespondence stellekorrespondenzein nastavkorespondenci - impostacorrispondenza + impostacorrispondenza seteazacorespondenta brieven: brieven letters briefe dopisy - lettere + lettere litere brief: brief letter brief dopis - lettera + lettera litera label: label label label poppisek - etichetta + etichetta eticheta sheet: sheet sheet blatt list - foglio + foglio sheet stelstickersin: stelstickersin setupstickers stellestickerein nastavetikety - impostafrancobolli % GB + impostafrancobolli seteazastickers % GB stelsheetsin: stelsheetsin setupsheets stelleblattein nastavlisty - impostafogli + impostafogli seteazasheets labels: labels labels labels popisky - etichette + etichette etichete woonplaats: woonplaats domicile wohnort bydliste - domicilio + domicilio domiciliu \stopcommands diff --git a/tex/context/base/mult-con.tex b/tex/context/base/mult-con.tex index 8e94e01e1..490e65a95 100644 --- a/tex/context/base/mult-con.tex +++ b/tex/context/base/mult-con.tex @@ -11,11 +11,14 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. +% additions are marked as % new + %D In this rather large definition file we are going to tell %D \CONTEXT\ which constants, variables and elements we use. %D %D The German translations were provided by Tobias Burnus, -%D and the Czech ones by Tom Hudec. +%D the Czech ones by Tom Hudec, the Italian ones by Giuseppe +%D Bilotta. \writestatus{loading}{Context Multilingual Macros / Constants} @@ -28,23 +31,23 @@ \startvariables dutch english german czech - italian + italian romanian een: een one eins jedna - uno + uno unu twee: twee two zwei dve - due + due doi drie: drie three drei tri - tre + tre trei vier: vier four vier ctyri - quattro + quattro patru vijf: vijf five fuenf pet - cinque + cinque cinci \stopvariables %D \stopcompressdefinitions @@ -55,88 +58,88 @@ \startvariables dutch english german czech - italian + italian romanian sunday: zondag sunday sonntag nedele - domenica + domenica duminica monday: maandag monday montag pondeli - lunedi + lunedi luni tuesday: dinsdag tuesday dienstag utery - martedi + martedi marti wednesday: woensdag wednesday mittwoch streda - mercoledi + mercoledi miercuri thursday: donderdag thursday donnerstag ctvrtek - giovedi + giovedi joi friday: vrijdag friday freitag patek - venerdi + venerdi vineri saturday: zaterdag saturday samstag sobota - sabato + sabato sambata \stopvariables \startvariables dutch english german czech - italian + italian romanian january: januari January Januar leden - gennaio + gennaio ianuarie february: februari February Februar unor - febbraio + febbraio februarie march: maart March Maerz brezen - marzo + marzo martie april: april April April duben - aprile + aprile aprilie may: mei May Mai kveten - maggio + maggio mai june: juni June Juni cerven - giugno + giugno iunie july: juli July Juli cervenec - luglio + luglio iulie august: augustus August August srpen - agosto + agosto august september: september September September zari - settembre + settembre septembrie october: oktober October Oktober rijen - ottobre + ottobre octombrie november: november November November listopad - novembre + novembre noiembrie december: december December Dezember prosinec - dicembre + dicembre decembrie \stopvariables %D Next we introduce some general label bound variables: \startvariables dutch english german czech - italian + italian romanian oppagina: oppagina atpage aufseite nastrance - apagina + apagina lapagina hierboven: hierboven hencefore vorher vyse - precedente + precedente precedent hieronder: hieronder hereafter nachher nize - seguente + seguente urmator \stopvariables @@ -150,78 +153,78 @@ \startvariables dutch english german czech - italian + italian romanian sectionlevel: sectie section abschnitt oddil - sezione + paragrafo sectiune deel: deel part teil cast - parte + parte parte hoofdstuk: hoofdstuk chapter kapitel kapitola - capitolo + capitolo capitol onderwerp: onderwerp subject thema tema - argomento + argomento subiect paragraaf: paragraaf section absatz sekce - capoverso %paragrafo + capoverso sectiune titel: titel title titel titul - titolo + titolo titlu margetitel: margetitel margintitle marginaltitel titulmarginalie - titoloinmargine + titoloinmargine titlumarginal inhoud: inhoud content inhalt obsah - indice % GB + indice cuprins inhouden: inhouden contents inhalte obsah - indici % GB + indici cuprinsuri bijlage: bijlage appendix anhang dodatek - appendice + appendice apendix bijlagen: bijlagen appendices anhaenge dodatky - appendici + appendici apendixuri hoofdtekst: hoofdtekst bodypart haupttext hlavnicast - bodypart % GB + testoprincipale principal % GB hoofdteksten: hoofdteksten bodymatter haupttexte hlavnicasti - bodymatter % GB + testiprincipali principalul % GB inleiding: inleiding frontpart einleitung prednicast - frontpart % GB + prefazione prolog inleidingen: inleidingen frontmatter einleitungen prednicasti - frontmatter % GB + preambolo prologul uitleiding: uitleiding backpart epilog epilog - backpart % GB + postfazione epilog % GB uitleidingen: uitleidingen backmatter epiloge epilogy - backmatter % GB + postambolo epilogul % GB voetnoot: voetnoot footnote fussnote poznamkapodcarou - notapdp + notapdp notasubsol systeem: systeem system systeme system - sistema + sistema sistem \stopvariables \startvariables dutch english german czech - italian + italian romanian typen: typen typing tippen typing - typing % GB + typing typing % GB file: file file datei soubor - file % GB + file fisier % GB \stopvariables @@ -235,73 +238,71 @@ \startvariables dutch english german czech - italian + italian romanian formule: formule formula formel rovnice - formula + formula formula formules: formules formulae formeln rovnice - formule + formule formule figuur: figuur figure abbildung obrazek - figura + figura figura figuren: figuren figures abbildungen obrazky - figure + figure figure tabel: tabel table tabelle tabulka - tabella + tabella tabelul tabellen: tabellen tables tabellen tabulky - tabelle + tabelle tabelele grafiek: grafiek graphic grafik graf - grafico + grafico graficul grafieken: grafieken graphics grafiken grafy - grafici + grafici graficele intermezzo: intermezzo intermezzo intermezzo intermezzo - intermezzo + intermezzo intermezzo intermezzos: intermezzos intermezzi intermezzi intermezzi - intermezzi + intermezzi intermezzi index: index index index rejstrik - indiceanalitico + indiceanalitico index indices: indices indices indizies rejstriky - indicianalitici + indicianalitici indexuri afkorting: afkorting abbreviation abkuerzung zkratka - abbreviazione + abbreviazione abreviere afkortingen: afkortingen abbreviations abkuerzungen zkratky - abbreviazioni + abbreviazioni abrevieri logo: logo logo logo logo - logo + logo logo logos: logos logos logos loga - loghi + loghi logos eenheid: eenheid unit einheit jednotka - unita -% GB: unita in italian means "joined", the previous should be "unit\`a"; -% moreover, the plural (following) is the same as the singular. What should I do? + unita unitate eenheden: eenheden units einheiten jednotky - unita + unita unitati regel: regel line zeile radek - riga + riga linia regels: regels lines zeilen radky - righe + righe linii framedtext: kadertekst framedtext umrahmtertext oramovanytext - testoincorniciato + testoincorniciato textinconjurat \stopvariables @@ -316,935 +317,944 @@ \startconstants dutch english german czech - italian + italian romanian leftquotation: linkercitaat leftquotation linkerzitat citacevlevo - leftquotation % GB + citazionesinistra citatstanga rightquotation: rechtercitaat rightquotation rechterzitat citacevpravo - rightquotation % GB + citazionedestra citatdreapta leftquote: linkerciteer leftquote linkerzitieren citovatvlevo - leftquote % GB + menzionesinistra minicitatstanga rightquote: rechterciteer rightquote rechterzitieren citovatvpravo - rightquote % GB + menzionedestra minicitatdreapta leftsentence: linkerzin leftsentence linkersatz vetavlevo - leftsentence % GB + frasesinistra propozitiestanga rightsentence: rechterzin rightsentence rechtersatz vetavpravo - rightsentence % GB + frasedestra propozitiedreapta leftsubsentence: linkersubzin leftsubsentence linkersubsatz podvetavlevo - leftsubsentence % GB + sottofrasesinistra subpropozitiestanga rightsubsentence: rechtersubzin rightsubsentence rechtersubsatz podvetavpravo - rightsubsentence % GB + sottofrasedestra subpropozitiedreapta datum: datum date datum datum - data + data data voorwit: voorwit spacebefore vorspatium mezerapred - spazioprima + spazioprima spatiuinainte nawit: nawit spaceafter nachspatium mezeraza - spaziodopo + spaziodopo spatiudupa zijvoorwit: zijvoorwit sidespacebefore nebenvorspatium bocnimezerapred - sidespacebefore % GB + spaziolateraleprima spatiulateralinainte zijnawit: zijnawit sidespaceafter nebennachspatium bocnimezeraza - sidespaceafter % GB + spaziolateraledopo spatiulateraldupa aan: aan to zu na - a + verso catre aanduiding: aanduiding indicator indikator indikator - indicator % GB + indicatore indicator achtergrond: achtergrond background hintergrund pozadi - sfondo + sfondo fundal achtergronddiepte: achtergronddiepte backgrounddepth hintergrundtiefe hloubkapozadi - profonditasfondo + profonditasfondo adancimefundal achtergrondhoek: achtergrondhoek backgroundcorner hintergrundwinkel rohpozadi - angolosfondo + angolosfondo coltfundal achtergrondkleur: achtergrondkleur backgroundcolor hintergrundfarbe barvapozadi - coloresfondo - achtergrondoffset: achtergrondoffset backgroundoffset + coloresfondo culoarefundal + voorgrondkleur: voorgrondkleur foregroundcolor + foregroundcolor foregroundcolor + coloreprimopiano foregroundcolor + achtergrondoffset: achtergrondoffset backgroundoffset hintergrundoffset offsetpozadi - offsetsfondo + offsetsfondo offsetfundal achtergrondraster: achtergrondraster backgroundscreen hintergrundraster rastrpozadi - schermosfondo + schermosfondo ecranfundal achtergrondstraal: achtergrondstraal backgroundradius hintergrundradius polomerpozadi - raggiosfondo + raggiosfondo razafundal adres: adres address adresse adresa - indirizzo + indirizzo adresa afsluiter: afsluiter stopper abschnitttrenner predel - stopper + stopper stopper afstand: afstand distance abstand vzdalenost - distanza + distanza distanta alinea: alinea paragraph absatz odstavec - capoverso %paragrafo + capoverso paragraf assenstelsel: assenstelsel axis achsen osa - asse + asse axa auteur: auteur author autor autor - autore + autore autor autofile: autofile autofile autofile autofile - autofile % TB TH GB + autofile autofile % TB TH balanceren: balanceren balance ausgleichen rovnovaha - bilanciamento + bilanciamento balanta bfactor: bfactor wfactor bfaktor sfaktor - wfactor % GB + wfactor factorw % GB binnen: binnen inner innen vnitrni - interno + interno intern blanko: blanko blank blanko prazdny - blank % GB + rigovuoto blanc blokkade: blokkade obstruction gesperrt prekazka - ostruzione + ostruzione obstructie blokwijze: blokwijze blockway blockauf dobloku - blockway % GB + blockway blockway % GB bodemwit: bodemwit bottomspace bottomspace bottomspace - spaziofondo + spaziofondo spatiujos boven: boven top oben vrsek - cima + cima sus bovenafstand: bovenafstand topdistance obenabstand vzdalenostvrsku - distanzacima + distanzacima distantasus bovenkader: bovenkader topframe obenrahmen rameceknahore - cornicecima + cornicecima framesus bovenoffset: bovenoffset topoffset obenoffset offsetvrsku - offsetcima + offsetcima offsetsus bovenstatus: bovenstatus topstate statusoben statusvrsku - statocima + statocima staresus breedte: breedte width breite sirka - ampiezza + ampiezza latime maxbreedte: maxbreedte maxwidth maxbreite maxsirka - ampiezzamax + ampiezzamax latimemaxima minbreedte: minbreedte minwidth minbreite minsirka - ampiezzamin % TB TH + ampiezzamin latimeminima % TB TH bron: bron source quelle zdroj - origine + origine sursa commando: commando command befehl prikaz - comando + comando comanda commandos: commandos commands befehle prikazy - comandi + comandi comenzi contrastkleur: contrastkleur contrastcolor kontrastfarbe kontrastnibarva - colorecontrasto + colorecontrasto culoarecontrast conversie: conversie conversion konversion konverze - conversione + conversione conversie kopconversie: kopconversie headconversion headconversion konverzehlavicky - headconversion % TB GB + conversionetesta conversietitlu % TB koplabel: koplabel headlabel headlabel popisekhlavicky - headlabel % TB GB + etichettatesta etichetatitlu % TB criterium: criterium criterium kriterium kriterium - criterio + criterio criteriu datum: datum date datum datum - data + data data default: default default default implicitni - implicito + implicito implicit diepte: diepte depth tiefe hloubka - profondita + profondita inaltime dieptecorrectie: dieptecorrectie depthcorrection tiefekorrektur korekcehloubky - correzioneprofondita + correzioneprofondita corectieadancime dikte: dikte thickness dicke tloustka - spessore + spessore grosime doorgaan: doorgaan continue fortsetzen pokracovat - continua + continua continua dubbelzijdig: dubbelzijdig doublesided doppelseitig oboustranne - doppiafaccia + doppiafaccia douafete dummy: dummy dummy dummy dummy - dummy + dummy dummy eenheid: eenheid unit einheit jednotka - unita + unita unitate eigennummer: eigennummer ownnumber eigenenummer vlastnicislo - proprionumero % GB + numeroproprio numarpropriu evenmarge: evenmarge evenmargin geraderand sudamarginalie - marginepari + marginepari marginepara expansie: expansie expansion expansion expanzen - espansione + espansione expansiune factor: factor factor faktor faktor - fattore + fattore factor converteerfile: converteerfile convertfile konvertieredatei konverzesouboru - convertfile % GB + convertifile convertestefisier file: file file datei soubor - file + file fisier formaat: formaat size groesse velikost - dimensione + dimensione dimensiune autofocus: autofocus autofocus autofocus autoostreni - autofocus + autofocus autofocus focus: focus focus focus zaostreni - focus % GB + focus focus % GB gebied: gebied directory verzeichnis adresar - directory %cartella + directory director grid: grid grid gritter mrizka - griglia + griglia grid groot: groot big gross velky - grande + grande mare haal: haal get hole ziskat - prendi + prendi adu hang: hang hang haengend zaveseni - sospendi % GB + sospendi suspenda herhaal: herhaal repeat wiederholen opakovat - ripeti % GB + ripeti repeta hfactor: hfactor hfactor hfaktor vfaktor - hfactor % GB + hfactor hfactor % GB hoek: hoek corner winkel roh - angolo + angolo colt hoffset: hoffset hoffset hoffset hoffset - hoffset % GB + hoffset hoffset % GB hokjes: hokjes frames umrahmen ramecky - frames % GB + cornici frames hoofd: hoofd header kopfzeile zahlavi - intestazione %testatina + intestazione antet hoofdafstand: hoofdafstand headerdistance kopfzeilenabstand vzdalenostzahlavi - distanzaintestazione + distanzaintestazione distantaantet hoofdstatus: hoofdstatus headerstate kopfzeilenstatus statuszahlavi - statointestazione + statointestazione stareantet hoogte: hoogte height hoehe vyska - altezza + altezza inaltime maxhoogte: maxhoogte maxheight maxhoehe maxvyska - altezzamax + altezzamax inaltimemaxima huidige: huidige current aktuell aktualni - corrente + corrente curent in: in in in v - in + in in inspringen: inspringen indenting einziehen odsazovani - rientro + rientro aliniat interactie: interactie interaction interaktion interakce - interazione + interazione interactiune interlinie: interlinie interlinespace zeilenabstande meziradkovamezera - interlinea + interlinea spatiereinterliniara items: items items posten polozky - elemnti + elementi elemente kader: kader frame rahmen ramecek - cornice + cornice frame kaderdiepte: kaderdiepte framedepth rahmentiefe hloubkaramecku - profonditacornice + profonditacornice adancimeframe kaderhoek: kaderhoek framecorner rahmenwinkel rohramecku - angolocornice + angolocornice coltframe kaderkleur: kaderkleur framecolor rahmenfarbe barvaramecku - colorecornice + colorecornice culoareframe kaderoffset: kaderoffset frameoffset rahmenoffset offsetramecku - offsetcornice + offsetcornice offsetframe kaderstraal: kaderstraal frameradius rahmenradius polomerramecku - raggiocornice + raggiocornice razaframe kantlijn: kantlijn marginedge marginalkante textovahrana - bordomargine + bordomargine coltbordura kantlijntekst: kantlijntekst marginedgetext marginalkantetext textmarginalnihookraje - testobordomargine + testobordomargine textcoltbordura karakteruitlijnen: karakteruitlijnen aligncharacter aligncharacter aligncharacter - aligncharacter % TB TH GB + allineacarattere aliniazacaracter % TB TH uitlijnkarakter: uitlijnkarakter alignmentcharacter alignmentcharacter alignmentcharacter - carattereallineamento % TB TH + carattereallineamento alierecaracter % TB TH klein: klein small klein male - piccolo + piccolo mic kleur: kleur color farbe barva - colore + colore culoare kolom: kolom column spalte sloupec - colonna + colonna coloana kolomafstand: kolomafstand columndistance spaltenabstand vzdalenostsloupcu - distanzacolonne + distanzacolonne distantacoloane kopkleur: kopkleur headcolor kopffarbe barvahlavicky - coloreintestazione + coloretesta culoaretitlu kopletter: kopletter headstyle kopfstil stylhlavicky - stileintestazione + stiletesta stiltitlu kopna: kopna afterhead nachkopf pohlavicce - dopointestazione + dopotesta dupatitlu kopoffset: kopoffset veroffset kopfoffset offsethlavicky - veroffset % GB + veroffset veroffset % GB koppeling: koppeling coupling verknuepfung propojeni - accoppiamento + accoppiamento cuplare koppelwijze: koppelwijze couplingway verkopplungsart zpusobpropojeni - modoaccoppiamento + modoaccoppiamento modcuplare kopvoor: kopvoor beforehead vorkopf predhlavickou - primadiintestazione + primaditesta inaintetitlu kopwit: kopwit topspace kopfspatium svrchnimezera - spaziocima + spaziocima spatiusus korps: korps bodyfont fliesstext zakladnifont - fontcorpo + fonttesto fonttext label: label label label popisek - etichetta + etichetta eticheta leeg: leeg empty leer prazdne - vuoto + vuoto gol letter: letter style stil pismeno - stile + stile stil lijn: lijn rule linie linka - linea + linea rigla lijndikte: lijndikte rulethickness liniendicke tloustkalinky - spessorelinea + spessorelinea grosimerigla lijnkleur: lijnkleur rulecolor linienfarbe barvalinky - colorelinea + colorelinea culoarerigla lijst: lijst list liste seznam - elenco + lista lista linkerbreedte: linkerbreedte leftwidth linkerbreite sirkavlevo - ampiezzasinistra + ampiezzasinistra latimestanga linkerkader: linkerkader leftframe linkerrahmen ramecekvlevo - cornicesinistra + cornicesinistra framestanga linkerkleur: linkerkleur leftcolor linkerfarbe barvavlevo - coloresinistra + coloresinistra culoarestanga linkerletter: linkerletter leftstyle linkerstil stylvlevo - stilesinistra + stilesinistra stilstanga linkermarge: linkermarge leftmargin linkerrand levyokraj - marginesinistro + marginesinistro marginestanga linkermargeafstand: linkermargeafstand leftmargindistance linkerrandabstand vzdalenostlevehookraje - distanzamarginesinistro + distanzamarginesinistro distantamarginestanga linkeroffset: linkeroffset leftoffset linkeroffset levyoffset - offsetsinistro % GB + offsetsinistro offsetstanga linkerrand: linkerrand leftedge linkekante levahrana - bordosinistro + bordosinistro bordurastanga linkerrandafstand: linkerrandafstand leftedgedistance linkerkantenabstand vzdalenostlevehrany - distanzabordosinistro + distanzabordosinistro distantabordurastanga linkertekst: linkertekst lefttext linkertext textvlevo - testosinistro % GB + testosinistro textstanga % GB links: links left links vlevo - sinistra + sinistra stanga + nlinks: nlinks nleft + nlinks nvlevo + nsinistra nstanga logo: logo logo logo logo - logo + logo logo logos: logos logos logos loga - loghi + loghi logos lokaal: lokaal local lokal lokalne - locale + locale local marge: marge margin marginalie marginalie - margine + margine margine margeafstand: margeafstand margindistance marginalabstand vzdalenostokraje - distanzamargine + distanzamargine distantamargine margetekst: margetekst margintext marginaltext textmarginalie - testomargine + testomargine textmargine markering: markering marking beschriftung znaceni - marcatura + marcatura marcaje markleur: markleur marcolor beschrfarbe barvaznacky - coloremarcatura + coloremarcatura culoaremarcaj marletter: marletter marstyle beschrstil stylsnacky - stilemarcatura + stilemarcatura stilmarcaj menu: menu menu menue menu - menu + menu meniu methode: methode method methode metoda - metodo + metodo metoda midden: midden middle mittig stredni - mezzo % GB + centro mijloc % GB middentekst: middentekst middletext mittigertext strednitext - testocentro % GB + testocentro textmijloc % GB min: min min min min - min + min min monster: monster sample muster vzor - campione + campione exemplu na: na after nach po - dopo + dopo dupa naam: naam name name jmeno - nome + nome nume nacommando: nacommando commandafter zumbefehl prikazpo - comdandodopo + comdandodopo comandadupa nboven: nboven ntop noben nvrsek - ncima + ncima nsus niveau: niveau level niveau uroven - livello + livello nivel niveaus: niveaus levels niveaus urovne - livelli + livelli nivele nonder: nonder nbottom nunten nspodek - nfondo + nfondo njos norm: norm norm norm norm - norma + norma norm nregels: nregels nlines zzeile nradky - nrighe + nrighe nlinii nummer: nummer number nummer cislo - numero + numero numar nummercommando: nummercommando numbercommand nummerbefehl ciselnyprikaz - comandonumero + comandonumero comandanumar nummeren: nummeren numbering nummerierung cislovani - numerazione + numerazione numerotare nummerkleur: nummerkleur numbercolor nummernfarbe barvacisla - colorenumero + colorenumero culoarenumar nummerletter: nummerletter numberstyle nummernstil stylcisla - stilenumero + stilenumero stilnumar nummerscheider: nummerscheider numberseparator nummernseperator oddelovaccisla - separatorenumero + separatorenumero separatornumar object: object object objekt objekt - oggetto + oggetto obiect offset: offset offset offset offset - offset + offset offset onder: onder bottom unten spodek - fondo + fondo jos onderafstand: onderafstand bottomdistance abstandunten vzdalenostspodku - distanzafondo + distanzafondo distantajos onderkader: onderkader bottomframe untenrahmen ramecekdole - cornicefondo + cornicefondo framejos onderoffset: onderoffset bottomoffset untenoffset offsetspodku - offsetfondo + offsetfondo offsetjos onderstatus: onderstatus bottomstate untenstatus statusspodku - statofondo + statofondo starejos onevenmarge: onevenmarge oddmargin ungeraderand lichyokraj - marginedispari + marginedispari margineimpara op: op at bei u - ad + ad la optie: optie option option volba - opzione + opzione optiune pagina: pagina page seite stranka - pagina + pagina pagina paginacommando: paginacommando pagecommand seitenbefehl strankovyprikaz - comandopagina + comandopagina comandapagina paginakleur: paginakleur pagecolor seitenfarbe barvastranky - colorepagina + colorepagina culoarepagina paginaletter: paginaletter pagestyle seitenstil stylstranky - stilepagina + stilepagina stilpagina paginanummer: paginanummer pagenumber seitennummer cislostranky - numeropagina + numeropagina numarpagina paginaovergangen: paginaovergangen pageboundaries seitenbegrenzung hranicestranky - limitipagina + limitipagina marginipagina palet: palet palet palette paleta - tavolozza + tavolozza paleta papier: papier paper papier papir - carta + carta hartie plaats: plaats location platz misto - location + luogo locatie plaatsafsluiter: plaatsafsluiter placestopper setzetrenner predelmista - mettistopper % GB + mettistopper punestopper % GB plaatsen: plaatsen place platziere umistit - metti % GB + metti pune % GB plaatskop: plaatskop placehead setzekopf umistihlavicku - mettitesta % GB + mettitesta punetitlu % GB positie: positie position position position - position % TB TH GB + posizione pozitie % TB TH prefix: prefix prefix prefix prefix - prefisso + prefisso prefix preset: preset preset voreinstellung prednastaveni - preimpostato % GB + preimpostato preset % GB preview: preview preview vorschau nahled - anteprima + anteprima previzualizare punt: punt dot punkt tecka - punto + punto punct pijl: pijl arrow pfeil sipka - freccia + freccia sageata rand: rand edge kante hrana - bordo + bordo bordura randafstand: randafstand edgedistance kantenabstand vzdalenosthrany - distanzabordo + distanzabordo distantabordura raster: raster screen raster rastr - schermo + schermo ecran rechterbreedte: rechterbreedte rightwidth rechterbreite sirkavpravo - ampiezzadestra + ampiezzadestra marginedreapta rechterkader: rechterkader rightframe rechterrahmen ramecekvpravo - cornicedestra + cornicedestra framedreapta rechterkleur: rechterkleur rightcolor rechterfarbe barvavpravo - coloredestra + coloredestra culoaredreapta rechterletter: rechterletter rightstyle rechterstil stylvpravo - stiledestra + stiledestra stildreapta rechtermarge: rechtermarge rightmargin rechterrand pravyokraj - marginedestro + marginedestro marginedreapta rechtermargeafstand: rechtermargeafstand rightmargindistance rechterrandabstand vzdalenostpravehookraje - distanzamarginedestro + distanzamarginedestro distantamarginedreapta rechteroffset: rechteroffset rightoffset rechterabstand pravyoffset - offsetdestro + offsetdestro offsetdreapta rechterrand: rechterrand rightedge rechtekante pravahrana - bordodestro + bordodestro borduradreapta rechterrandafstand: rechterrandafstand rightedgedistance rechterkantenabstand vzdalenostpravehrany - distanzabordodestro + distanzabordodestro distantacoltdreapta rechtertekst: rechtertekst righttext rechtertext textvpravo - testodestro % GB + testodestro textdreapta % GB rechts: rechts right rechts vpravo - destra + destra dreapta + nrechts: nrechts nright + nrechts nvpravo + ndestra ndreapta reductie: reductie reduction reduktion redukce - riduzione + riduzione reducere refereren: refereren referencing referieren odkazujici - referencing % GB + referencing referinta % GB regel: regel line zeile radek - riga + riga linie regelcorrectie: regelcorrectie linecorrection zeilekorrektur korekceradku - correzioneriga + correzioneriga corectielinie regels: regels lines zeilen radky - righe + righe linii resolutie: resolutie resolution aufloesung rozliseni - risoluzione + risoluzione rezolutie rotatie: rotatie rotation rotation rotace - rotazione + rotazione rotatie rugoffset: rugoffset horoffset rumpfabstand horoffset - horoffset % GB + horoffset offsetoriz % GB rugwit: rugwit backspace rumpfspatium zpetnamezera - backspace % GB + backspace spatiuspate % GB richting: richting direction richtung smer - direzione + direzione directie schaal: schaal scale format meritko - scale % GB + scala scala scheider: scheider separator seperator oddelovac - separatore + separatore separator scherm: scherm display bildschirm obrazovka - display % GB + display display % GB scope: scope scope bereich rozsah - scope % GB + scope scop % GB sectie: sectie section abschnitt oddil - sezione + sezione sectiune sectienummer: sectienummer sectionnumber abschnittsnummer cislooddilu - numerosezione + numerosezione numarsectiune snijwit: snijwit cutspace cutspace cutspace - cutspace % GB + cutspace cutspace % GB soort: soort family familie rodina - famiglia + famiglia familie spatie: spatie space spatium mezera - spazio + spazio spatiu spatiering: spatiering spacing spatiumausgleich mezerovani - spaziatura + spaziatura spatiere splitsen: splitsen split split split - split % TB TH GB + separa split % TB TH springvolgendein: springvolgendein indentnext ziehefolgendeein odsadpristi - rientrosuccessivo + rientrasuccessivo aliniaturmator stap: stap step schritt krok - passo + passo pas start: start start start start - inizia + inizia start status: status state status status - stato + stato stare stop: stop stop stop stop - termina + termina stop straal: straal radius radius polomer - raggio + raggio raza streep: streep dash strich pomlcka - dash % GB + dash dash % GB sub: sub sub unter pod - sotto + sotto sub subtitel: subtitel subtitle untertitel podtitulek - sottotitolo + sottotitolo subtitlu symbool: symbool symbol symbol symbol - simbolo + simbolo simbol symboolset: symboolset symbolset symbolset sadasymbolu - setsimboli + setsimboli setsimbol symkleur: symkleur symcolor symfarbe barvasymbolu - coloresimbolo + coloresimbolo culoaresimbol symletter: symletter symstyle symstil stylsymboly - stilesimbolo + stilesimbolo stilsimbol synoniem: synoniem synonym synonym synonymum - sinonimo + sinonimo sinonim synoniemkleur: synoniemkleur synonymcolor synonymfarbe barvasynonyma - coloresinonimi + coloresinonimi culoaresinonim synoniemletter: synoniemletter synonymstyle synonymstil stylsynonyma - stilesinonimi + stilesinonimi stilsinonim tab: tab tab tab tab - tab + tab tab teken: teken sign zeichen znak - segno + segno semn tekst: tekst text text text - testo + testo text tekstbreedte: tekstbreedte textwidth textbreite sirkatextu - ampiezzatesto + ampiezzatesto latimetext tekstcommando: tekstcommando textcommand textbefehl textovyprikaz - comandotesto + comandotesto comandatext tekstformaat: tekstformaat textsize textgroesse velikosttextu - dimensionetesto + dimensionetesto dimensiunetext tekstkleur: tekstkleur textcolor textfarbe barvatextu - coloretesto + coloretesto culoaretext tekstletter: tekstletter textstyle textstil styltextu - stiletesto + stiletesto stiltext tekstscheider: tekstscheider textseparator textseparator oddelovactextu - separatoretesto + separatoretesto separatortext tekststatus: tekststatus textstate textstatus statustextu - statotesto + statotesto staretext titel: titel title titel titul - titolo + titolo titlu titeluitlijnen: titeluitlijnen aligntitle titelausrichten zarovnejtitul - allineatitolo + allineatitolo alinieretitlu tolerantie: tolerantie tolerance toleranz tolerance - tolleranza + tolleranza toleranta tussen: tussen inbetween zwischen mezi - tra + tra intre type: type type typ typ - type % GB + type type % GB uitlijnen: uitlijnen align ausrichtung zarovnani - allinea + allinea aliniere urlspatie: urlspatie urlspace urlspatium prostorurl - spaziourl + spaziourl spatiuurl urlvariant: urlvariant urlalternative urlalternative urlalternativa - alternativaurl + alternativaurl urlalternativ van: van from von z - da + da dela variant: variant alternative alternative alternativa - alternativa + alternativa alternativ verhoog: verhoog increment erhoehen zvysit - incremento % GB + incremento increment % GB verhoognummer: verhoognummer incrementnumber nummererhoehen zvysujicicislo - incrementanumero + incrementanumero numarincrement verwijzing: verwijzing reference referenz odkaz - riferimento + riferimento referinta onbekendeverwijzing: onbekendeverwijzing unknownreference unbekantereferenz neznamyodkaz - riferimentoingoto + riferimentoingoto referintanecunoscuta voet: voet footer fusszeile upati - piedipagina + piedipagina subsol voetafstand: voetafstand footerdistance fusszeilenabstand vzdalenostupati - distanzapdp + distanzapdp distantasubsol voetstatus: voetstatus footerstate fusszeilenstatus statusupati - statopdp + statopdp staresubsol voffset: voffset voffset voffset voffset - voffset + voffset voffset volgende: volgende next folgende dalsi - successivo + successivo urmatorul voor: voor before vor pred - prima + prima inainte voorcommando: voorcommando commandbefore vorbefehl predchoziprikaz - comandoprima + comandoprima comandainainte vorige: vorige previous vorige predchozi - precedente + precedente precendent vorigenummer: vorigenummer previousnumber vorigenummer predchozicislo - numeroprecedente + numeroprecedente numarprecedent wachttijd: wachttijd delay wartezeit prodleva - attesa + attesa intarziere wijze: wijze way art zpusob - modo + modo mod willekeur: willekeur random zufaellig nahodne - casuale + casuale aleator wit: wit white weiss bily - bianco + bianco alb xfactor: xfactor xfactor xfaktor xfaktor - xfactor % GB + xfactor xfactor %GB xmax: xmax xmax xmax xmax - xmax % GB + xmax xmax % GB xoffset: xoffset xoffset xoffset xoffset - xoffset % GB + xoffset xoffset % GB xschaal: xschaal xscale xformat xmeritko - xscale % GB + xscale xscala % GB xstap: xstap xstep xschritt xkrok - xstep % GB + xstep xstep % GB yfactor: yfactor yfactor yfaktor yfaktor - yfactor % GB + yfactor yfactor % GB ymax: ymax ymax ymax ymax - ymax % GB + ymax ymax % GB yoffset: yoffset yoffset yoffset yoffset - yoffset % GB + yoffset yoffset % GB yschaal: yschaal yscale yformat ymeritko - yscale % GB + yscale yscala % GB ystap: ystap ystep yschritt ykrok - ystep % GB + ystep ystep % GB zelfdepagina: zelfdepagina samepage selbeseite stejnastranka - stessapagina + stessapagina aceeasipagina zij: zij side objektabstand pocitat - lato + lato parte veldachtergrondkleur: veldachtergrondkleur fieldbackgroundcolor feldhintergrundfarbe barvapozadipole - coloresfondocampo + coloresfondocampo culoarefundalcamp veldkaderkleur: veldkaderkleur fieldframecolor feldrahmenfarbe barvarameckupole - colorecornicecampo + colorecornicecampo culoareframecamp veldoffset: veldoffset fieldoffset feldoffset offsetpole - offsetcampo + offsetcampo offsetcamp openactie: openactie openaction oeffenaktion otevriakci - azioneapri + azioneapri actiunedeschidere sluitactie: sluitactie closeaction schliessenaktion zavriakci - azionechiudi + azionechiudi actiuneinchidere openpaginaactie: openpaginaactie openpageaction openpageaction akceotevrenistranky - azioneapripagina % TB + azioneapripagina actiunedeschiderepagina % TB sluitpaginaactie: sluitpaginaactie closepageaction closepageaction akcezavrenistranky - azionechiudipagina % TB + azionechiudipagina actiuneinchiderepagina % TB klikin: klikin clickin klickin klikuvnitr - clickdentro + clickdentro clickintru klikuit: klikuit clickout klickaus klikvne - clickfuori + clickfuori clickies gebiedin: gebiedin regionin regionin oblastuvnitr - entraregione + entraregione regiuneintrare gebieduit: gebieduit regionout regionaus oblastvne - esciregione + esciregione regiuneiesire natoets: natoets afterkey nachtaste klavesapo - dopotasto + dopotasto dupatasta formatteer: formatteer format formatieren formatovat - format % GB + format format % GB valideer: valideer validate validieren validovat - verifica + verifica verifica bereken: bereken calculate berechnen pocitat - calcola + calcola calculeaza klik: klik click klick klik - click + click click vcommando: vcommando vcommand vbefehl vprikaz - vcomando + vcomando comandav icommando: icommando icommand ibefehl iprikaz - icomando + icomando comandai ccommando: ccommando ccommand cbefehl cprikaz - ccomando + ccomando comandac \stopconstants @@ -1258,749 +1268,758 @@ \startvariables dutch english german czech - italian + italian romanian aan: aan on an zap - attivo + attivo on aanelkaar: aanelkaar serried kleinerabstand semknuto - serried % GB + vicino serried aansluitend: aansluitend joinedup keinabstand spojeno - uniti + unito unit absoluut: absoluut absolute absolut absolutni - assoluto + assoluto absolut achtergrond: achtergrond background hintergrund pozadi - sfondo + sfondo fundal achteruit: achteruit backward rueckwaerts zpet - indietro + indietro inapoi actie: actie action aktion akce - azione + azione actiune afsluiter: afsluiter stopper trenner predel - stopper + stopper stopper alinea: alinea paragraph absatz odstavec - capoverso %paragrafo + capoverso paragraf alles: alles all alles vse - tutti + tutti tot altijd: altijd always immer vzdy - sempre + sempre totdeauna autointro: autointro autointro autointro autouvod - autointro + autointro autointro beide: beide both beide obe - entrambi + entrambi ambele binnen: binnen inner innen uvnitr - interno + interno intern blanko: blanko blank blanko prazdny - blank % GB + rigovuoto blank blokkeer: blokkeer disable sperren zablokovat - disattiva + disattiva dezactivat boven: boven top oben vrsek - cima + cima sus breed: breed wide breit siroce - ampio + ampio larg breedte: breedte width breite sirka - ampiezza + ampiezza latime buffer: buffer buffer puffer buffer - buffer + buffer buffer buiten: buiten outer aussen vnejsi - esterno + esterno extern cijfers: cijfers numbers ziffern cisla - numeri + numeri numere Cijfers: Cijfers Numbers Ziffern Cisla - Numeri + Numeri Numere commando: commando command befehl prikaz - comando + comando comanda commandos: commandos commands befehle prikazy - comandi + comandi comenzi concept: concept concept konzept koncept - concetto + concetto concept dag: dag day tag den - giorno + giorno zi datum: datum date datum datum - data + data data default: default default default implicitni - implicito + implicito implicit definitief: definitief final endfassung finalni - finale + finale final diepte: diepte depth tiefe podlehloubky - profondita % GB + profondita adancime dubbelzijdig: dubbelzijdig doublesided doppelseitig dvoustranny - doppiafaccia + doppiafaccia douafete eerste: eerste first erste prvni - primo + primo primul elk: elk each jede kazdy - ogni + ogni fiecare enkelzijdig: enkelzijdig singlesided einzelseitig jednostranne - facciasingola + facciasingola ofata ergens: ergens somewhere irgendwo nekde - daqualcheparte + daqualcheparte undeva nergens: nergens nowhere nirgens nikde - danessunaparte + danessunaparte niciunde even: even even gerade sude - pari + pari par extern: extern external extern externi - esterno + esterno extern file: file file datei soubor - file + file fisier flexibel: flexibel flexible flexibel prizpusobive - flessibile + flessibile flexibil forceer: forceer force zwinge sila - forza + forza fortat gebruikt: gebruikt used verwende uzito - usato + usato folosit geen: geen none kein zadny - nessuno + nessuno niciunul geenmarkering: geenmarkering nomarking keinebeschriftung zadneznaceni - nomarcature + nomarcature faramarcare geenwit: geenwit nowhite keinweiss zadnabila - nobianco + nobianco faraalb geroteerd: geroteerd rotated gedreht otoceno - ruotato + ruotato rotat gespiegeld: gespiegeld mirrored gespiegelt zrcadleno - riflesso + riflesso oglindit globaal: globaal global global globalne - globale + globale global grid: grid grid gritter mrizka - griglia + griglia grila groot: groot big gross velke - grande + grande mare grotevoorkeur: grotevoorkeur bigpreference grosszuegig vysokapriorita - grandepreferenza + grandepreferenza preferintamare grijs: grijs gray grau seda - grigio + grigio gri halveregel: halveregel halfline halbezeile pulradku - mezzariga + mezzariga jumatatelinie handhaaf: handhaaf keep behalte drzet - mantieni + mantieni mentine hangend: hangend hanging haengend visici - sospeso + sospeso suspendat herhaal: herhaal repeat wiederholen opakovat - ripeti + ripeti repetat herstel: herstel fix stellewiederher fixuj - fisso + fisso fix hier: hier here hier zde - qui + qui aici hoofd: hoofd header kopfzeile zahlavi - intestazione %testatina + intestazione antet hoog: hoog high hoch vysoko - alto + alto inalt hoogte: hoogte height hoehe vyska - altezza + altezza inaltime horizontaal: horizontaal horizontal horizontal horizontalne - orizzontale + orizzontale orizontal huidige: huidige current aktuell aktualni - corrente + corrente curent italic: italic italic italic kurziva - corsivo + corsivo italic inlinker: inlinker inleft imlinken vlevo - insinistra + insinistra instanga inmarge: inmarge inmargin imrand naokraji - inmargine + inmargine inmargine inrechter: inrechter inright imrechten vpravo - indestra + indestra indreapta interactie: interactie interaction interaktion interakce - interazione + interazione interactiune intekst: intekst intext imtext dotextu - intesto + intesto intext intro: intro intro intro uvod - intro + intro intro its: its its its pol - suo + its propriu % GB ja: ja yes ja ano - si + si da jaar: jaar year jahr rok - anno + anno an kader: kader frame rahmen ramecek - cornice + cornice incadrat kantlijn: kantlijn marginedge marginalkante textovahrana - bordomargine + bordomargine marginebordura kap: kap cap kap kap - cap % GB + cap cap kapitaal: kapitaal capital versalien kapitalky - maiuscolo + maiuscolo majuscula kenmerk: kenmerk referral merkmal znacka - referral % GB + referral referinta klein: klein small klein male - piccolo + piccolo mic kleinnormaal: kleinnormaal smallnormal kleinnormal malenormalni - piccolonormale + piccolonormale micnormal kleinschuin: kleinschuin smallslanted kleingeneigt malesklonene - piccoloinclinato + piccoloinclinato micinclinat kleinschuinvet: kleinschuinvet smallslantedbold kleingeneigtfett malesklonenetucne - piccoloinclinatograssetto + piccoloinclinatograssetto micinclinataldin kleinitalic: kleinitalic smallitalic kleinitalic malekurzivni - piccolocorsivo + piccolocorsivo micitalic kleinitalicvet: kleinitalicvet smallitalicbold kleinitalicfett malekurzivnitucne - piccolocorsivograssetto + piccolocorsivograssetto micitalicaldin kleintype: kleintype smalltype kleintippen maletype - piccolotype % GB + piccolotype mictype kleinvet: kleinvet smallbold kleinfett maletucne - piccolograssetto + piccolograssetto micaldin kleinvetschuin: kleinvetschuin smallboldslanted kleinfettgeneigt maletucnesklonene - piccolograssettoinclinato + piccolograssettoinclinato micaldininclinat kleinvetitalic: kleinvetitalic smallbolditalic kleinfettitalic maletucnekurzivni - piccolograssettocorsivo + piccolograssettocorsivo micaldininclinat kleur: kleur color farbe barevne - colore + colore culoare kolom: kolom column column column - colonna % TB TH + colonna coloana % TB TH kolommen: kolommen columns spalten sloupce - colonne + colonne coloane kop: kop head kopf hlavicka - testa % GB + testa antet % GB laag: laag low tief nizko - basso + basso jos laatste: laatste last letzte posledni - ultimo + ultimo ultim label: label label label popisek - etichetta + etichetta eticheta laho: laho lohi hoti nivy - pedap % TB TH + pedap lohi % TB TH lang: lang tall lang vysoko - alto % GB + alto inalt % GB leeg: leeg empty leer prazdne - vuoto + vuoto gol Letter: Letter Character Buchstabe Pismeno - Carattere + Lettera Caracter letter: letter character buchstabe pismeno - carattere + lettera caracter Letters: Letters Characters Buchstaben Pismena - Caratteri + Lettere Caractere letters: letters characters buchstaben pismena - caratteri + lettere caractere liggend: liggend landscape querformat nasirku - orizzontale + orizzontale vedere lijn: lijn rule linie linka - linea + linea rigla lijst: lijst list liste seznam - elenco + lista lista linkermarge: linkermarge leftmargin linkerrand levyokraj - marginesinistro + marginesinistro marginestanga linkerpagina: linkerpagina leftpage linkerseite levastranka - paginasinistra + paginasinistra paginastanga linkerrand: linkerrand leftedge linkekante levahrana - bordosinistro + bordosinistro bordurastanga links: links left links vlevo - sinistra + sinistra stanga lokaal: lokaal local lokal lokalne - locale + locale local nieuw: nieuw new neu novy - nuovo + nuovo nou MAAND: MAAND MONTH MONAT MESIC - MESE + MESE LUNA maand: maand month monat mesic - mese + mese luna mar: mar mar mar mar - mar % GB + mar mar marge: marge margin marginalie marginalie - margine + margine margine max: max max max max - max + max max mediaeval: mediaeval mediaeval mittelalterlich stredoveky - medievale + medievale medieval middel: middel medium mittel stredni - medio + medio mediu midden: midden middle mittig nastred - centro + centro centru na: na after nach po - dopo + dopo dupa naam: naam name name jmeno - nome + nome nume naast: naast opposite gegenueber naproti - opposto + opposto opus nee: nee no nein ne - no + no nu negatief: negatief negative negativ negativ - negativo + negativo negativ niet: niet not nicht ne - non + non nu nooit: nooit never nie nikdy - mai + mai niciodata normaal: normaal normal normal normalni - normale + normale normal nummer: nummer number nummer cislo - numero + numero numar offset: offset offset offset offset - offset + offset offset onbekend: onbekend unknown unbekannt neznamy - ignoto + ignoto necunoscut onder: onder bottom unten spodek - fondo + fondo subsol oneven: oneven odd ungerade liche - dispari + dispari impar opelkaar: opelkaar packed gepackt zhustene - raggruppati + impaccato impachetat vanelkaar: vanelkaar unpacked ungepackt rozbalene - unpacked % GB + unpacked despachetat opmaak: opmaak markup umbruch zlom - markup % GB + markup marcaj opmarge: opmarge atmargin amrand naokraji - almargine + almargine lamargine overlay: overlay overlay overlay prekryv - sovrapponi + sovrapponi overlay pagina: pagina page seite stranka - pagina + pagina pagina paginanummer: paginanummer pagenumber seitennummer cislostranky - numeropagina + numeropagina numarpagina papier: papier paper papier papir - carta + carta foaie scherm: scherm display bildschirm obrazovka - display % GB + display display % new + omgekeerd: omgekeerd reverse + reverse reverse + reverse reverse % new passend: passend fit passend prizpusobive - adatta + adatta ajustat postscript: postscript postscript postscript postscript - postscript + postscript postscript preview: preview preview vorschau nahled - anteprima + anteprima previzualizare programma: programma program programm program - programma + programma program punt: punt dot punkt tecka - punto + punto punct ran: ran ran ran rozsah - corse + corse rulat rand: rand edge kante hrana - bordo + bordo bordura raster: raster screen raster rastr - schermo + schermo ecran recht: recht rectangular rechteckig pravouhly - rettangolare + rettangolare rectangular rechtermarge: rechtermarge rightmargin rechterrand pravyokraj - marginedestro + marginedestro marginedreapta rechterpagina: rechterpagina rightpage rechterseite pravastranka - paginadestra + paginadestra paginadreapta rechterrand: rechterrand rightedge rechterkante pravahrana - bordodestro + bordodestro borduradreapta rechts: rechts right rechts vpravo - destra + destra dreapta regel: regel line zeile radek - riga + riga linie register: register register register rejstrik - registro + registro registru relatief: relatief relative relativ relativni - relativo + relativo relativ reset: reset reset zuruecksetzten reset - reimposta + reimposta reset Romeins: Romeins Romannumerals Roemischezahlen Rimskecislice - Numeriromani + Numeriromani Numereromane romeins: romeins romannumerals roemischezahlen rimskecislice - numeriromani + numeriromani numereromane grieks: grieks greek griechisch recky - greco + greco grec Grieks: Grieks Greek Griechisch Recky - Greco + Greco Grec rond: rond round rund zaobleny - rotondo + rotondo rotund roteer: roteer rotate drehe otoc - ruota + ruota rotit rek: rek stretch strecken natahnout - dilata + dilata dilatat ruim: ruim broad breit siroky - ampio + ampio broad rij: rij row row row - row % TB TH GB + row rand schuin: schuin slanted geneigt sklonene - inclinato + inclinato inclinat schuinvet: schuinvet slantedbold geneigtfett sklonenetucne - inclinatograssetto + inclinatograssetto inclinataldin italicvet: italicvet italicbold italicfett kurzivnitucne - corsivograssetto + corsivograssetto italicaldin sectienummer: sectienummer sectionnumber abschnittsnummer cislooddilu - numerosezione + numerosezione numarsetiune smal: smal narrow schmall uzky - stretto + stretto ingust soepel: soepel tolerant tolerant tolerantni - tollerante + tollerante tolerant standaard: standaard standard standard standardni - standard + standard standard start: start start start start - inizia + inizia start stop: stop stop stop stop - termina + termina stop streng: streng strict streng striktni - strict % GB + strict strict strut: strut strut strut strut - strut + strut strut sub: sub sub unter pod - sotto + sotto sub sym: sym sym sym sym - sim + sim sym symbool: symbool symbol symbol symbol - simbolo + simbolo simbol tekst: tekst text text text - testo + testo text back: terug back zurueck zpet - dietro % GB + dietro inapot test: test test test test - test + test text tussen: tussen inbetween zwischen mezi - tra + tra intre type: type type tippen type - type % GB + type type % GB uit: uit off aus vyp - disattivo + disattivo dezactivat url: url url url url - url + url url URL: URL URL URL URL - URL + URL URL vast: vast fixed fest fixne - fisso + fisso fixat los: los loose lose uvolnene - lento + lento larg verder: verder continue fortsetzten pokracovat - continua + continua continuu vertikaal: vertikaal vertical vertikal vertikalne - verticale + verticale vertical vet: vet bold fett tucne - grassetto + grassetto aldin vetschuin: vetschuin boldslanted fettgeneigt tucnesklonene - grassettoinclinato + grassettoinclinato aldininclinat vetitalic: vetitalic bolditalic fettitalic tucnekurzivni - grassettocorsivo + grassettocorsivo aldinitalic viertal: viertal quadruple viertel ctyrnasobny - quadruplo + quadruplo cvadrupul voet: voet footer fusszeile upati - piedipagina + piedipagina subsol volgende: volgende next folgende dalsi - successivo + successivo urmatorul voor: voor before vor pred - prima + prima inainte voorgrond: voorgrond foreground vordergrund popredi - foreground % GB + foreground primplan voorkeur: voorkeur preference einstellung nastaveni - preferenza + preferenza preferinta voorlopig: voorlopig temporary temporaer docasne - temporaneo + temporaneo temporar vooruit: vooruit forward vorwaerts vpred - avanti + avanti avans vorige: vorige previous vorig predchozi - precedente + precedente precedent waarde: waarde value wert hodnota - valore + valore valoare week: week week woche tyden - settimana + settimana saptamana weekdag: weekdag weekday wochentag vsedniden - giornosettimana + giornosettimana zisaptamana WEEKDAG: WEEKDAG WEEKDAY WOCHENTAG VSEDNIDEN - GIORNOSETTIMANA + GIORNOSETTIMANA ZISAPTAMANA willekeurig: willekeurig random zufaellig nahodny - casuale + casuale aleator wit: wit white weiss bily - bianco + bianco alb zeer: zeer very sehr velmi - molto + molto foarte zeersoepel: zeersoepel verytolerant sehrtolerant velmitolerantni - moltotollerante + moltotollerante foartetolerant zeerstreng: zeerstreng verystrict sehrstreng velmistriktni - moltostrict % GB + moltostrict foartestrict % GB zie: zie see sieh viz - vedi + vedi vezi smallcaps: smallcaps smallcaps smallcaps kapitalky - maiuscoletto + maiuscoletto majusculemici WOORD: WOORD WORD WORT SLOVO - PAROLA + PAROLA CUVANT eerstepagina: eerstepagina firstpage ersteseite prvnistranka - primapagina + primapagina primapagina vorigepagina: vorigepagina previouspage vorigeseite predchozistranka - paginaprecedente + paginaprecedente paginaanterioara volgendepagina: volgendepagina nextpage folgendeseite dalsistranka - paginasuccessiva + paginasuccessiva paginaurmatoare laatstepagina: laatstepagina lastpage letzteseite poslednistrana - ultimapagina + ultimapagina ultimapagina eerstesubpagina: eerstesubpagina firstsubpage ersteunterseite prvnipodstranka - primasottopagina + primasottopagina primasubpagina vorigesubpagina: vorigesubpagina previoussubpage vorigeunterseite predchozipodstranka - sottopaginaprecedente + sottopaginaprecedente subpaginaanterioara volgendesubpagina: volgendesubpagina nextsubpage folgendeunterseite dalsipodstranka - sottopaginasuccessiva + sottopaginasuccessiva urmatoareasubpagina laatstesubpagina: laatstesubpagina lastsubpage letzteunterseite poslaednipodstranka - ultimasottopagina + ultimasottopagina ultimasubpagina volgendeevenpagina: volgendeevenpagina nextevenpage naechstegeradeseite dalsisudastranka - paginaparisuccessiva + paginaparisuccessiva paginaparaurmatoarea volgendeonevenpagina: volgendeonevenpagina nextoddpage naechsteungeradeseite dalsilichastranka - paginadisparisuccessiva + paginadisparisuccessiva paginaimparaurmatoarea vorigeevenpagina: vorigeevenpagina previousevenpage vorigegeradeseite predchozisudastranka - paginapariprecedente + paginapariprecedente paginaparaprecedenta vorigeonevenpagina: vorigeonevenpagina previousoddpage vorigeungeradeseite predchozilichastranka - paginadispariprecedente + paginadispariprecedente paginaimparaprecedenta alleenleesbaar: alleenleesbaar readonly nurlesbar pouzeprocteni - solalettura + solalettura readonly verplicht: verplicht required obligatorisch pozadovane - richiestp + richiestp obligatoriu beschermd: beschermd protected geschuetzt chranene - protetto + protetto protejat gesorteerd: gesorteerd sorted sortiert tridene - ordinato + ordinato sortat nietbeschikbaar: nietbeschikbaar unavailable nichtverfuegbar nedostupne - non disponibile + nondisponibile nedisponibil verborgen: verborgen hidden versteckt skryte - nascosto + nascosto ascuns printbaar: printbaar printable druckbar tisknutelne - stampabile + stampabile tiparibil bookmark: bookmark bookmark bookmark zalozka - segnalibro + segnalibro semncarte \stopvariables % nieuw, to be translated \startvariables dutch english german czech - italian + italian romanian + sturing: sturing controls + controls controls + controls controale niethangend: niethangend nothanging nothanging nothanging - nothanging + nothanging nothanging afgebroken: afgebroken hyphenated hyphenate hyphenated - hyphenate + sillabato despsilabe nietafgebroken: afgebroken nothyphenated nothyphenated nothyphenated - nothyphenated + nonsillabato nedespsilabe \stopvariables \startconstants dutch english german czech - italian + italian romanian + sturing: sturing controls + controls controls + controlli controale globaal: globaal global global globalne - globale + globale global \stopconstants @@ -2015,14 +2034,14 @@ \startvariables dutch english german czech - italian + italian romanian conversie: conversie conversion konversion konverze - coversione + coversione conversie per: per by pro skrz - da + da de \stopvariables @@ -2063,41 +2082,41 @@ \startvariables dutch english german czech - italian + italian romanian calligraphic: calligrafie calligraphic kalligraphie kaligraficke - calligrafico + calligrafico caligrafic handwritten: handschrift handwritten handschrift rukopisne - grafiamanuale + grafiamanuale scrismanual sansserif: schreefloos sansserif grotesk bezserifu - sansserif % GB + sansserif sansserif % GB roman: romaan roman antiqua antikva - roman % GB + roman roman % GB teletype: teletype teletype fernschreiber strojopis - teletype % GB + teletype teletype % GB type: type type tippen opis - type % GB + type type % GB serif: serif serif serif serif - serif % GB + serif serif % GB regular: regular regular regular pravidelne - regolare + regolare regular support: support support support podpora - supporto + supporto suport sans: sans sans sans sans - sans + sans sans mono: mono mono mono mono - mono + mono mono \stopvariables @@ -2113,59 +2132,59 @@ \startsetupvariables dutch english german czech - italian + italian romanian doornummering: doornummering enumeration nummerierung vycet - enumerazione + enumerazione enumerare doordefinitie: doordefinitie description beschreibung popis - descrizione + descrizione descriere doorsprong: doorsprong indentation einzug odsazovani - rientro + rientro indentare doorlabel: doorlabel labeling beschriften oznacovani - etichettatura + etichettatura etichetare samengesteldelijst: samengesteldelijst combinedlist kombiniereliste kombinovanyseznam - elencocombinato + listacombinata listacombinata sectie: sectie section abschnitt oddil - sezione + sezione sectiune register: register register register rejstrik - registro + registro registru interactie: interactie interaction interaktion interakce - interazione + interazione interactiune synoniem: synoniem synonym synonym synonymum - sinonimo + sinonimo sinonim synoniemen: synoniemen synonyms synonyme synonyma - sinonimi + sinonimi sinonime sorteer: sorteer sort sortiere trid - sort % GB + sort sortare % GB sorteren: sorteren sorts sortieren tridit - sorts % GB + sorts sortari % GB naam: naam name name jmeno - nome + nome nume blok: blok float gleitobjekt plvouciobjekt - oggettomobile + oggettomobile obiectmobil blokken: blokken floats gleitobjekte plvouciobjekty - oggettimobili + oggettimobili obiectemobile alinea: alinea paragraph absatz odstavec - capoverso + capoverso paragraf framedtext: kadertekst framedtext umrahmtertext oramovanytext - testoincorniciato + testoincorniciato textinconjurat \stopsetupvariables @@ -2179,134 +2198,134 @@ \startelements dutch english german czech - italian + italian romanian beginvan: beginvan begin anfang zacatek - inizio + inizio inceput buffer: buffer buffer puffer buffer - buffer + buffer buffer commentaar: commentaar comment kommentar komentar - commento + commento comentariu eindvan: eindvan end ende konec - fine + fine sfarsit formule: formule formula formel rovnice - formula + formula formula gekoppelde: gekoppelde coupled verknuepft propojene - accoppiato + accoppiato cuplat haal: haal get get ziskat - prendi + prendi get huidigelokale: huidigelokale currentlocal aktuelllokal aktualnelokalni - correntelocale + correntelocale localcurent in: in - ein - - in + in in instellingen: instellingen setups impostazioni einstellungen - nastaveni + nastaveni setari interactiemenu: interactiemenu interactionmenu interaktionsmenue interaktivnimenu - menuinterattivo + menuinterattivo meniuinteractiune laad: laad load laden nacist - carica + carica incarca leeg: leeg empty vuoto leer - prazdne + prazdne gol lege: lege empty leer prazdne - vuoti + vuoti gol lijst: lijst list auflisten seznam - elenco + lista lista lijstmet: lijstmet listof auflistenvon seznam - elencodi + listadi listade lokale: lokale local lokal lokalne - locale + locale local opmaak: opmaak makeup umbruch zlom - makeup % GB + makeup makeup % GB plaats: plaats place platziere umisti - metti + metti pune reserveer: reserveer reserve reservieren rezervovat - riserva + riserva rezervat start: start start start start - inizia + inizia start stel: stel setup stelle nastaveni - imposta + imposta setare stop: stop stop stop stop - termina + termina stop tabelkop: tabelkop tablehead tabellenueberschrift zahlavitabulky - testatabella % GB + testatabella antettabel % GB tabelstaart: tabelstaart tabletail tabellenende konectabulky - codatabella % GB + codatabella subsoltabel % GB tabulate: tabulatie tabulate tabulator tabelator - tabulate % GB + tabulate tabulate % GB tekst: tekst text text text - testo + testo text type: type type type opis - type % GB + type type % GB uitstellen: uitstellen postponing verschieben odlozit - posporre % GB + posporre postponing % GB verbergen: verbergen hiding verbergen skryt - nascondere + nascondere ascundere verhoog: verhoog increment erhoehen zvysit - incrementa + incrementa increment volgende: volgende next folgende dalsi - successivo + successivo urmatorul volledige: volledige complete vollende uplny - completo + completo complet vorige: vorige previous vorige predchozi - precedente + precedente precedent vorigelokale: vorigelokale previouslocal voriglokal predchozilokalni - precedentelocale + precedentelocale precedentlocal zie: zie see sieh viz - vedi + vedi vezi register: register register register rejstrik - registro + registro registru gegeven: gegeven fact gegeben fakt - fatto + fatto fapt legenda: legenda legend legende legenda - legenda + legenda legenda helptext: helptekst helptext hilfetext textnapovedy - testoaiuto + testoaiuto textajutator pagecomment: paginacommentaar pagecomment pagecomment komentarstranky - commentopagina % TB + commentopagina comentariupagina % TB sectieblokomgeving: sectieblokomgeving sectionblockenvironment sectionblockenvironment sectionblockenvironment - ambientebloccosezione % TB TH + ambientebloccosezione blocsectiuneambient % TB TH \stopelements @@ -2320,101 +2339,108 @@ \startvariables dutch english german czech - italian + italian romanian FirstPage: EerstePagina FirstPage ErsteSeite PrvniStrana - PrimaPagina + PrimaPagina PrimaPagina PreviousPage: VorigePagina PreviousPage VorigeSeite PredchoziStrana - PaginaPrecedente + PaginaPrecedente PaginaPrecedenta NextPage: VolgendePagina NextPage FolgendeSeite DalsiStrana - PaginaSuccessiva + PaginaSuccessiva PaginaUrmatoare LastPage: LaatstePagina LastPage LetzteSeite PosledniStrana - UltimaPagina + UltimaPagina UltimaPagina PreviousJump: VorigeSprong PreviousJump VorigerSprung PredchoziSkok - SaltoPrecedente + SaltoPrecedente SaltPrecedent NextJump: VolgendeSprong NextJump NaechsterSprung NasledujiciSkok - SaltoSuccessivo + SaltoSuccessivo SaltUrmator SwapViewer: WisselViewer SwapViewer WechseleViewer ZmenitProhlizec - ScambiaVisualizzatore + ScambiaVisualizzatore SchimbaVizualizator ExitViewer: VerlaatViewer ExitViewer BeendeViewer UkoncitProhlizec - EsciVisualizzatore + EsciVisualizzatore IesireVizualizator CloseDocument: SluitDocument CloseDocument SchliesseDokument ZavritDokument - ChiudiDocumento + ChiudiDocumento InchideDocument SaveDocument: BewaarDocument SaveDocument SpeichereDokument UlozitDokument - SalvaDocumento + SalvaDocumento SalvareDocument ViewerHelp: ViewerHelp ViewerHelp ViewerHilfe NapovedaProhlizece - AiutoVisualizzatore + AiutoVisualizzatore AjutorVizualizator PrintDocument: PrintDocument PrintDocument DruckeDokument VytisknoutDokument - StampaDocumento + StampaDocumento TiparesteDocument SearchDocument: DoorzoekDocument SearchDocument DokumentDurchsuchen ProhledatDokument - CercaDocumento + CercaDocumento CautaDocument SearchAgain: HerhaalZoeken SearchAgain WeiterSuchen HledatZnovu - CercaAncora + CercaAncora CautaDinNou Query: RaadpleegDocument Query Query Query - Query % TB TH GB + Query Query % TB TH GB QueryAgain: HerhaalRaadplegen QueryAgain QueryAgain QueryAgain - QueryAgain % TB TH GB + QueryAgain QueryAgain % TB TH GB GotoPage: GaNaarPagina GotoPage GotoPage JdiNaStranku - VaiAPagina % TB + VaiAPagina LaPagina % TB StartMovie: StartFilm StartMovie StartFilm SpustitFilm - IniziaFilm + IniziaFilm StartFilm StopMovie: StopFilm StopMovie StopFilm ZastavitFilm - FermaFilm + FermaFilm StopFilm PauseMovie: PauzeerFilm PauseMovie PauseFilm PozastavitFilm - PausaFilm + PausaFilm PauzaFilm ResumeMovie: HervatFilm ResumeMovie FortsetzenFilm PokracovatFilm - RiprendiFilm + RiprendiFilm RepornesteFilm StartSound: StartGeluid StartSound StartSound StartZvuk - IniziaSuono % TB + IniziaSuono StartSunet % TB StopSound: StopFilm StopSound StopSound StopZvuk - FermaSuono % TB + FermaSuono StopSunet % TB PauseSound: PauzeerFilm PauseSound PauseSound PozastavitZvuk - PausaSuono % TB + PausaSuono PauzaSunet % TB ResumeSound: HervatSound ResumeSound ResumeSound PokracovatZvuk - RiprendiSuono % TB + RiprendiSuono RepornesteSunet % TB SaveForm: BewaarFormulier SaveForm SpeicheFormular UlozitFormular - SalvaForm + SalvaForm SalveazaFormular LoadForm: LaadFormulier LoadForm LadeFormular NacistFormular - CaricaForm + CaricaForm IncarcaFormular ResetForm: ResetFormulier ResetForm ZuruecksetzenFormular ResetFormulare - ReimpostaForm + ReimpostaForm ResetareFormular SubmitForm: VerzendFormulier SubmitForm VersendeFormular PoslatFormular - MandaForm + MandaForm TrimiteFormular HideField: VerbergVeld HideField VerbergeFeld SkryjPole - NascondiCampo + NascondiCampo AscundeCamp ShowField: ToonVeld ShowField ZeigeFeld UkazPole - MostraCampo + MostraCampo AfiseazaCamp + + FitWidth: FitWidth FitWidth + BreitePassend FitWidth + FitWidth AjustatLatime + FitHeight: FitHeight FitHeight + HoehePassend FitHeight + FitHeight AjustatInaltime \stopvariables @@ -2423,26 +2449,26 @@ \startvariables dutch english german czech - italian + italian romanian New: Nieuw New Neu Novy - Nuovo + Nuovo Nou Balloon: Ballon Balloon Ballon Bublinka - Pallone + Pallone Balon Addition: Toevoeging Addition Zusatz Pridavek - Aggiunta + Aggiunta Adaugare Help: Help Help Hilfe Napoveda - Aiuto + Aiuto Ajutor Paragraph: Paragraaf Paragraph Absatz Odstavec - Capoverso + Capoverso Paragraf Key: Sleutel Key Schluessel Klavesa - Tasto + Tasto Cheie \stopvariables %D \stopcompressdefinitions diff --git a/tex/context/base/mult-ini.tex b/tex/context/base/mult-ini.tex index ca650b1dd..f76e7943f 100644 --- a/tex/context/base/mult-ini.tex +++ b/tex/context/base/mult-ini.tex @@ -558,6 +558,9 @@ \def\doresetvalue#1#2% {\dosetvalue{#1}{#2}{}} +\def\doignorevalue#1#2#3% + {\dosetvalue{#1}{#2}{}} + %\def\dogetvalue#1#2% % {\csname#1\csname\k!prefix!#2\endcsname\endcsname} @@ -583,36 +586,70 @@ \beginTEX -\def\dosetvalue#1#2#3% +% \def\dosetvalue#1#2#3% +% {\let\c!internal!\c!internal!n +% \@EA\ifx\csname\k!prefix!#2\endcsname\relax +% \let\c!internal!\c!internal!y +% \@EA\def\csname#1#2\endcsname{#3}% +% \else +% \let\c!internal!\c!internal!y +% \@EA\def\csname#1\csname\k!prefix!#2\endcsname\endcsname{#3}% +% \fi} +% +% \def\dosetevalue#1#2#3% +% {\let\c!internal!\c!internal!n +% \@EA\ifx\csname\k!prefix!#2\endcsname\relax +% \let\c!internal!\c!internal!y +% \@EA\edef\csname#1#2\endcsname{#3}% +% \else +% \let\c!internal!\c!internal!y +% \@EA\edef\csname#1\csname\k!prefix!#2\endcsname\endcsname{#3}% +% \fi} +% +% \def\dosetgvalue#1#2#3% +% {\let\c!internal!\c!internal!n +% \@EA\ifx\csname\k!prefix!#2\endcsname\relax +% \let\c!internal!\c!internal!y +% \@EA\gdef\csname#1#2\endcsname{#3}% +% \else +% \let\c!internal!\c!internal!y +% \@EA\gdef\csname#1\csname\k!prefix!#2\endcsname\endcsname{#3}% +% \fi} +% +% cleaner (not that much faster) don't pass #3 yet: + +\def\dosetvalue#1#2% {\let\c!internal!\c!internal!n \@EA\ifx\csname\k!prefix!#2\endcsname\relax \let\c!internal!\c!internal!y - \@EA\def\csname#1#2\endcsname{#3}% + \@EA\@EA\@EA\def\@EA\@EA\csname#1#2\endcsname \else \let\c!internal!\c!internal!y - \@EA\def\csname#1\csname\k!prefix!#2\endcsname\endcsname{#3}% + \@EA\@EA\@EA\def\@EA\@EA\csname#1\csname\k!prefix!#2\endcsname\endcsname \fi} -\def\dosetevalue#1#2#3% +\def\dosetevalue#1#2% {\let\c!internal!\c!internal!n \@EA\ifx\csname\k!prefix!#2\endcsname\relax \let\c!internal!\c!internal!y - \@EA\edef\csname#1#2\endcsname{#3}% + \@EA\@EA\@EA\edef\@EA\@EA\csname#1#2\endcsname \else \let\c!internal!\c!internal!y - \@EA\edef\csname#1\csname\k!prefix!#2\endcsname\endcsname{#3}% + \@EA\@EA\@EA\edef\@EA\@EA\csname#1\csname\k!prefix!#2\endcsname\endcsname \fi} -\def\dosetgvalue#1#2#3% +\def\dosetgvalue#1#2% {\let\c!internal!\c!internal!n \@EA\ifx\csname\k!prefix!#2\endcsname\relax \let\c!internal!\c!internal!y - \@EA\gdef\csname#1#2\endcsname{#3}% + \@EA\@EA\@EA\gdef\@EA\@EA\csname#1#2\endcsname \else \let\c!internal!\c!internal!y - \@EA\gdef\csname#1\csname\k!prefix!#2\endcsname\endcsname{#3}% + \@EA\@EA\@EA\gdef\@EA\@EA\csname#1\csname\k!prefix!#2\endcsname\endcsname \fi} +% so far + \def\docopyvalue#1#2#3% {\let\c!internal!\c!internal!n \@EA\ifx\csname\k!prefix!#3\endcsname\relax @@ -631,36 +668,70 @@ \beginETEX \protected -\def\dosetvalue#1#2#3% +% \def\dosetvalue#1#2#3% +% {\let\c!internal!\c!internal!n +% \ifcsname\k!prefix!#2\endcsname +% \let\c!internal!\c!internal!y +% \@EA\def\csname#1\csname\k!prefix!#2\endcsname\endcsname{#3}% +% \else +% \let\c!internal!\c!internal!y +% \@EA\def\csname#1#2\endcsname{#3}% +% \fi} +% +% \def\dosetevalue#1#2#3% +% {\let\c!internal!\c!internal!n +% \ifcsname\k!prefix!#2\endcsname +% \let\c!internal!\c!internal!y +% \@EA\edef\csname#1\csname\k!prefix!#2\endcsname\endcsname{#3}% +% \else +% \let\c!internal!\c!internal!y +% \@EA\edef\csname#1#2\endcsname{#3}% +% \fi} +% +% \def\dosetgvalue#1#2#3% +% {\let\c!internal!\c!internal!n +% \ifcsname\k!prefix!#2\endcsname +% \let\c!internal!\c!internal!y +% \@EA\gdef\csname#1\csname\k!prefix!#2\endcsname\endcsname{#3}% +% \else +% \let\c!internal!\c!internal!y +% \@EA\gdef\csname#1#2\endcsname{#3}% +% \fi} +% +% cleaner (not that much faster) don't pass #3 yet: + +\def\dosetvalue#1#2% {\let\c!internal!\c!internal!n \ifcsname\k!prefix!#2\endcsname \let\c!internal!\c!internal!y - \@EA\def\csname#1\csname\k!prefix!#2\endcsname\endcsname{#3}% + \@EA\@EA\@EA\def\@EA\@EA\csname#1\csname\k!prefix!#2\endcsname\endcsname \else \let\c!internal!\c!internal!y - \@EA\def\csname#1#2\endcsname{#3}% + \@EA\@EA\@EA\def\@EA\@EA\csname#1#2\endcsname \fi} -\def\dosetevalue#1#2#3% +\def\dosetevalue#1#2% {\let\c!internal!\c!internal!n \ifcsname\k!prefix!#2\endcsname \let\c!internal!\c!internal!y - \@EA\edef\csname#1\csname\k!prefix!#2\endcsname\endcsname{#3}% + \@EA\@EA\@EA\edef\@EA\@EA\csname#1\csname\k!prefix!#2\endcsname\endcsname \else \let\c!internal!\c!internal!y - \@EA\edef\csname#1#2\endcsname{#3}% + \@EA\@EA\@EA\edef\@EA\@EA\csname#1#2\endcsname \fi} -\def\dosetgvalue#1#2#3% +\def\dosetgvalue#1#2% {\let\c!internal!\c!internal!n \ifcsname\k!prefix!#2\endcsname \let\c!internal!\c!internal!y - \@EA\gdef\csname#1\csname\k!prefix!#2\endcsname\endcsname{#3}% + \@EA\@EA\@EA\gdef\@EA\@EA\csname#1\csname\k!prefix!#2\endcsname\endcsname \else \let\c!internal!\c!internal!y - \@EA\gdef\csname#1#2\endcsname{#3}% + \@EA\@EA\@EA\gdef\@EA\@EA\csname#1#2\endcsname \fi} +% so far + \def\docopyvalue#1#2#3% {\let\c!internal!\c!internal!n \ifcsname\k!prefix!#3\endcsname @@ -677,86 +748,12 @@ \endETEX -%D We take this opportunity of redefining to adapt an -%D assignment macro. The change has to do with the fact that the -%D generated error message must be multi||lingual. We can not -%D define the message yet, because we still have to select the -%D interface language. - -%\def\p!doassign#1[#2][#3=#4=#5]% -% {\let\donottest=\dontprocesstest -% \edef\!!stringa{#5}% -% \edef\!!stringb{\relax}% -% \let\donottest=\doprocesstest -% \ifx\!!stringa\!!stringb -% \showmessage{check}{1}{#3,\the\inputlineno}% -% \else -% #1{#2}{#3}{#4}% -% \fi} - -\def\p!doassign#1[#2][#3=#4=#5]% - {\ifx\empty#3\else % and definitely not \ifx#3\empty - \ifx\relax#5% - \showmessage{check}{1}{#3,\the\inputlineno}% - \else - #1{#2}{#3}{#4}% - \fi - \fi} +%D We can now redefine some messages that will be +%D introduced in the multi||lingual system module. -\long\def\dogetargument#1#2#3#4% - {\doifnextcharelse{#1} - {\let\expectedarguments\noexpectedarguments - #3\dodogetargument} - {\ifnum\expectedarguments>\noexpectedarguments - \showmessage{check}{2}{\the\expectedarguments,\the\inputlineno}% - \fi - \let\expectedarguments\noexpectedarguments - #4\dodogetargument#1#2}} - -\def\dogetgroupargument#1#2% - {\def\nextnextargument% - {\ifx\nextargument\bgroup - \let\expectedarguments\noexpectedarguments - \def\nextargument{#1\dodogetargument}% - %\else\ifx\nextargument\lineending % this can be an option - % \def\nextargument{\bgroup\def\\ {\egroup\dogetgroupargument#1#2}\\}% - %\else\ifx\nextargument\blankspace % but may never be default - % \def\nextargument{\bgroup\def\\ {\egroup\dogetgroupargument#1#2}\\}% - \else - \ifnum\expectedarguments>\noexpectedarguments - \showmessage{check}{2}{\the\expectedarguments,\the\inputlineno}% - \fi - \let\expectedarguments\noexpectedarguments - \def\nextargument{#2\dodogetargument{}}% - \fi%\fi\fi % so let's get rid of it - \nextargument}% - \futurelet\nextargument\nextnextargument} - -\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{\bgroup\def\\ {\egroup\dogetgroupargument#1#2}\\}% - %\normalelse\normalifx\nextargument\blankspace % but may never be default - % \def\nextargument{\bgroup\def\\ {\egroup\dogetgroupargument#1#2}\\}% - \normalelse - \endrobusttest - \ifnum\expectedarguments>\noexpectedarguments - \showmessage{check}{2}{\the\expectedarguments,\the\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\checkdefined#1#2#3% - {\doifdefined{#3} - {\showmessage{check}{3}{#2,#3}}} +\def\showassignerror #1#2{\showmessage{\m!check}{1}{#1,#2}} +\def\showargumenterror#1#2{\showmessage{\m!check}{2}{#1,#2}} +\def\showdefinederror #1#2{\showmessage{\m!check}{3}{#1,#2}} %D \CONTEXT\ is a parameter driven package. This means that %D users instruct the system by means of variables, values and diff --git a/tex/context/base/mult-sys.tex b/tex/context/base/mult-sys.tex index ba597846e..323a7b1e3 100644 --- a/tex/context/base/mult-sys.tex +++ b/tex/context/base/mult-sys.tex @@ -54,6 +54,7 @@ \definesystemconstant {ukenglish} \definesystemconstant {uk} \definesystemconstant {usenglish} \definesystemconstant {us} \definesystemconstant {croation} \definesystemconstant {hr} +\definesystemconstant {hungarian} \definesystemconstant {hu} %D For proper \UNICODE\ support we need a few font related %D constants. @@ -283,6 +284,7 @@ \definereferenceconstant {object} {:o:} % object reference \definereferenceconstant {driver} {:d:} % driver object reference +\definereferenceconstant {widget} {:w:} % field chain reference \definereferenceconstant {java} {:j:} % java scripts @@ -391,17 +393,19 @@ \definesystemvariable {ld} % LegenDa \definesystemvariable {lg} % taal (LanGuage) \definesystemvariable {li} % LIjst +\definesystemvariable {ll} % Layers \definesystemvariable {ln} % LijNen \definesystemvariable {lo} % LOgos \definesystemvariable {lt} % LiTeratuur \definesystemvariable {ly} % LaYout \definesystemvariable {ma} % MargeAchtergrond \definesystemvariable {mb} % MargeBlokken -\definesystemvariable {mp} % MetaPost +\definesystemvariable {mg} % Metapost paGe \definesystemvariable {mk} % MarKering \definesystemvariable {nm} % Nummering \definesystemvariable {np} % NaastPlaatsen \definesystemvariable {nr} % Nummeren +\definesystemvariable {of} % OFfset \definesystemvariable {oi} % OmlijndInstellingen \definesystemvariable {ol} % OmLijnd \definesystemvariable {on} % ONderstreep @@ -449,6 +453,7 @@ \definesystemvariable {ta} % TAb \definesystemvariable {tb} % TekstBlokken \definesystemvariable {te} % TEmplate +\definesystemvariable {tg} % Tex paGe \definesystemvariable {ti} % TabelInstellingen \definesystemvariable {tk} % Teksten \definesystemvariable {tl} % TekstLijnen @@ -547,14 +552,18 @@ \definefileconstant {colorprefix} {colo-} \definefileconstant {encodingprefix} {enco-} +\definefileconstant {regimeprefix} {regi-} \definefileconstant {fontprefix} {font-} -\definefileconstant {symbolprefix} {symb-} \definefileconstant {javascriptprefix} {java-} \definefileconstant {languageprefix} {lang-} -\definefileconstant {specialprefix} {spec-} \definefileconstant {metapostprefix} {meta-} +\definefileconstant {specialprefix} {spec-} +\definefileconstant {symbolprefix} {symb-} +\definefileconstant {xtagprefix} {xtag-} + \definefileconstant {moduleprefix} {m-} \definefileconstant {styleprefix} {s-} +\definefileconstant {xstyleprefix} {x-} \definefileconstant {privateprefix} {p-} %D \CONTEXT\ follows different strategies for finding files. @@ -668,6 +677,13 @@ 3: -- -- overskygger en makro, bruk STORE BOKSTAVER! \stopmessages +\startmessages romanian library: check + title: verificari + 1: lipseste '=' dupa '--' in linia -- + 2: argumentul(ele) -- sunt asteptate in linia -- + 3: -- -- inlocuieste un macro, folositi MAJUSCULE! +\stopmessages + \fi %D Ok, here are some more, because we've got ouselves some diff --git a/tex/context/base/page-lyr.tex b/tex/context/base/page-lyr.tex new file mode 100644 index 000000000..397b78205 --- /dev/null +++ b/tex/context/base/page-lyr.tex @@ -0,0 +1,243 @@ +%D \module +%D [ file=page-lyr, +%D version=2000.10.20, +%D title=\CONTEXT\ OTR Macros, +%D subtitle=Layers, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +% logo space wil be reimplemented as layers + +\writestatus{loading}{Context OTR Macros / Layers} + +\unprotect + +%D The layering mechanism implemented here is independent of +%D the output routine, but future extensions may depend on a +%D more close cooperation. + +%D First we overload a macro from \type {core-rul}. From now on +%D we accept a third (optional) argument: the specific layer it +%D will go in. This means that we can move an overlay from one +%D background to the other using the dimensions of the parent. + +\ifx\undefined\defineoverlay \message{loaded to early} \wait \fi + +\def\defineoverlay% + {\dotripleempty\dodefineoverlay} + +\def\dodefineoverlay[#1][#2][#3]% + {\ifthirdargument + \def\docommando##1% + {\setvalue{\??ov##1}####1####2####3####4####5####6####7% + {\setlayer[#3]{\executedefinedoverlay + ##1\\#2\\{####1}{####2}{####3}{####4}{####5}{####6}{####7}}}}% + \else + \def\docommando##1% + {\setvalue{\??ov##1}{\executedefinedoverlay + ##1\\#2\\}}% + \fi + \processcommalist[#1]\docommando} + +%D When tracing is turned on, a couple of boxes will +%D show up as well as the reference point. + +\newif\iftracelayers % \tracelayerstrue + +%D This handy constant saved some string memory. + +\def\@@layerbox{@@layerbox} + +%D \macros +%D {definelayer} +%D +%D Each layer gets its own (global) box. This also means that +%D the data that goes into a layer, is typeset immediately. +%D Each layer automatically gets an associated overlay, +%D which can be used in any background assignment. + +\def\definelayer% + {\dodoubleargument\dodefinelayer} + +\def\dodefinelayer[#1][#2]% + {\ifundefined{\@@layerbox#1}% + \expandafter\newbox\csname\@@layerbox#1\endcsname + \else + \setbox\csname\@@layerbox#1\endcsname=\voidb@x + \fi + \defineoverlay + [#1][\composedlayer{#1}]% + \setuplayer + [#1] + [\c!status=\v!start,\c!richting=\v!normaal,\c!optie=, + \c!x=\!!zeropoint,\c!y=\!!zeropoint,\c!positie=\v!nee, + \c!breedte=\wd\nextbox,\c!hoogte=\ht\nextbox, + \c!hoffset=\!!zeropoint,\c!voffset=\!!zeropoint, + \c!plaats=rb,\c!positie=\v!nee,\c!pagina=,#2]} + +%D \macros +%D {setuplayer} +%D +%D After a layer is defined, you can change its +%D characteristics. + +\def\setuplayer% + {\dodoubleargument\dosetuplayer} + +\def\dosetuplayer[#1]% + {\getparameters[\??ll#1]} + +%D \macros +%D {setlayer} +%D +%D Data is moved intoa layer with the following macro. When +%D \type {position} is set, relative positioning is used, with +%D the current point as reference point. Otherwise the topleft +%D corner is used as reference point. +%D +%D \starttypen +%D \setlayer [identifier] [optional parameters] {data} +%D \stoptypen + +\def\setlayer% + {\dodoubleargument\dosetlayer} + +\def\dosetlayer[#1][#2]% + {\doifnotvalue{\??ll#1\c!status}{\v!stop}{\dodosetlayer[#1][#2]}} + +\def\dodosetlayer[#1][#2]% + {\bgroup + \global\newbackgroundtrue + \doglobal\increment\currentlayerdata + \forgetall + \dontcomplain + \doifvalue{\??ll#1\c!optie}{\v!test}{\tracelayerstrue}% + \dowithnextbox % sneller als aparte macro + {\ifundefined{\@@layerbox#1}% + \writestatus{layer}{unknown layer #1}% + \else + \dododosetlayer[#1][#2]% + \fi + \egroup} + \hbox} + +\newbox\layerbox + +\def\dododosetlayer[#1][#2]% + {\getparameters[\??ll#1][#2]% + \doifvalue{\??ll#1\c!positie}{\v!overlay} + {\getparameters[\??ll#1] + [\c!positie=\v!ja, + \c!breedte=\!!zeropoint, + \c!hoogte=\!!zeropoint]}% + \doifelsevalue{\??ll#1\c!positie}{\v!ja} + {\edef\layerpage{\MPp{lyr:\currentlayerdata}}% + \scratchdimen\MPx{lyr:#1:\layerpage}\scratchdimen-\scratchdimen + \advance\scratchdimen\MPx{lyr:\currentlayerdata}% + \setevalue{\??ll#1\c!x}{\the\scratchdimen}% + \scratchdimen\MPy{lyr:#1:\layerpage}% + \advance\scratchdimen-\MPy{lyr:\currentlayerdata}% + \setevalue{\??ll#1\c!y}{\the\scratchdimen}% + \setxvalue{\??ll#1\layerpage\c!positie}{\v!ja}% + \setxvalue{\??ll#1\c!status}{\v!start}% needed ? + \setbox\layerbox\vbox to \getvalue{\??ll#1\c!hoogte} % \ht\nextbox + {\hbox to \getvalue{\??ll#1\c!breedte} % \wd\nextbox + {\xypos{lyr:\currentlayerdata}\hss}% + \vss}} + {\setbox\layerbox=\box\voidb@x + \edef\layerpage{\getvalue{\??ll#1\c!pagina}}}% + \doifsomething{\layerpage} + {\edef\layerpage{:\layerpage}% + \doifundefined{\@@layerbox#1\layerpage} + {\global\expandafter\newbox\csname\@@layerbox#1\layerpage\endcsname}}% + \global\setbox\csname\@@layerbox#1\layerpage\endcsname=\vbox + {\offinterlineskip + \ifvoid\csname\@@layerbox#1\layerpage\endcsname\else + \ht \csname\@@layerbox#1\layerpage\endcsname\!!zeropoint + \dp \csname\@@layerbox#1\layerpage\endcsname\!!zeropoint + \wd \csname\@@layerbox#1\layerpage\endcsname\!!zeropoint + \doifnotvalue{\??ll#1\c!richting}{\v!omgekeerd} + {\box\csname\@@layerbox#1\layerpage\endcsname}% + \fi + \setbox\nextbox=\hbox + {\alignedbox[\getvalue{\??ll#1\c!plaats}]\vbox{\box\nextbox}}% + \smashbox\nextbox + \scratchdimen=\getvalue{\??ll#1\c!y}% + \advance\scratchdimen\getvalue{\??ll#1\c!voffset}% + \vskip\scratchdimen + \hskip\getvalue{\??ll#1\c!x}% + \hskip\getvalue{\??ll#1\c!hoffset}% + \box\nextbox % \hfill + \ifvoid\csname\@@layerbox#1\layerpage\endcsname + % already flushed + \else + % the reverse case + \vskip-\scratchdimen + \box\csname\@@layerbox#1\layerpage\endcsname + \fi}% + \ifvoid\layerbox\else\box\layerbox\fi} + +%D Given the task to be accomplished, the previous macro is +%D not even that complicated. It mainly comes down to skipping +%D to the right place and placing a box on top of or below the +%D existing content. In the case of position tracking, another +%D reference point is chosen. + +%D \macros +%D {flushlayer} +%D +%D When we flush a layer, we flush both the main one and the +%D page dependent one (when defined). This feature is more +%D efficient in \ETEX\ since there testing for an undefined +%D macro does not takes hash space. + +\def\flushlayer[#1]% + {\doifvalue{\??ll#1\c!status}{\v!start} + {\startoverlay + {\doflushlayer1{#1}} + {\doflushlayer0{#1:\realfolio}} + \stopoverlay}} + +\def\doflushlayer#1#2% + {\ifundefined{\@@layerbox#2}% + \ifcase#1\else\writestatus{layer}{unknown layer #2}\fi + \else + \doifvalue{\??ll#1\c!optie}{\v!test}\tracelayerstrue + \iftracelayers \ruledvbox \else \vbox \fi to \overlayheight + {\forgetall + \hbox to \overlaywidth + {\doifvalue{\??ll#2\realfolio\c!positie}{\v!ja} + {\xypos{lyr:#2:\realfolio}}% + \box\csname\@@layerbox#2\endcsname\hss}% + \vss}% + \fi} + +%D \macros +%D {composedlayer} +%D +%D This is a handy shortcut, which saves a couple of braces +%D when we use it as parametsr. This name also suits better +%D to other layering commands. + +\def\composedlayer#1{\flushlayer[#1]} + +%D \macros +%D {resetlayer} +%D +%D This macro hardly needs an explanation (and is seldom +%D needed as well). + +\def\doresetlayer#1% + {\ifundefined{\@@layerbox#1}\else + \global\setbox\csname\@@layerbox#1\endcsname\voidb@x + \fi} + +\def\resetlayer[#1]% + {\doresetlayer{#1}\doresetlayer{#1:\realfolio}} + +\protect \endinput diff --git a/tex/context/base/pdfr-il2.tex b/tex/context/base/pdfr-il2.tex new file mode 100644 index 000000000..615fcd7af --- /dev/null +++ b/tex/context/base/pdfr-il2.tex @@ -0,0 +1,233 @@ +%D \module +%D [ file=pdfr-il2, +%D version=2000.12.10, +%D title=\CONTEXT\ PDF Font Resources, +%D subtitle=ISO Latin 2, +%D author={Ondrej Koala Vacha, Hans Hagen} +%D date=\currentdate, +%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +%D This vector is derived (but reformatted a bit) from a +%D sample send to me by Petr Ferdus. There was some Czech +%D comment in which I could recognize the name of Ondrej +%D Koala Vacha. More information on setting up such a vector +%D can be found in the \PDF\ reference manual. + +\startpdffontresource[il2] +/CIDInit /ProcSet findresource begin +12 dict begin + begincmap + /CIDSystemInfo + << /Registry (Adobe) + /Ordering (T1UV) + /Supplement 0 + >> def + /CMapName /Adobe-Identity-UCS def + /CMapType 1 def + 1 begincodespacerange + <00> <FF> + endcodespacerange + %%FontSpecificEncoding + 191 beginbfrange + <20> <20> <0020> % space dec: 32 oct:040 hex:20 + <21> <21> <0021> % exclam dec: 33 oct:041 hex:21 + <22> <22> <0022> % quotedbl dec: 34 oct:042 hex:22 + <23> <23> <0023> % numbersign dec: 35 oct:043 hex:23 + <24> <24> <0024> % dollar dec: 36 oct:044 hex:24 + <25> <25> <0025> % percent dec: 37 oct:045 hex:25 + <26> <26> <0026> % ampersand dec: 38 oct:046 hex:26 + <27> <27> <0027> % quotesingle dec: 39 oct:047 hex:27 + <28> <28> <0028> % parenleft dec: 40 oct:050 hex:28 + <29> <29> <0029> % parenright dec: 41 oct:051 hex:29 + <2a> <2a> <002a> % asterisk dec: 42 oct:052 hex:2a + <2b> <2b> <002b> % plus dec: 43 oct:053 hex:2b + <2c> <2c> <002c> % comma dec: 44 oct:054 hex:2c + <2d> <2d> <002d> % hyphen dec: 45 oct:055 hex:2d + <2e> <2e> <002e> % period dec: 46 oct:056 hex:2e + <2f> <2f> <002f> % slash dec: 47 oct:057 hex:2f + <30> <30> <0030> % zero dec: 48 oct:060 hex:30 + <31> <31> <0031> % one dec: 49 oct:061 hex:31 + <32> <32> <0032> % two dec: 50 oct:062 hex:32 + <33> <33> <0033> % three dec: 51 oct:063 hex:33 + <34> <34> <0034> % four dec: 52 oct:064 hex:34 + <35> <35> <0035> % five dec: 53 oct:065 hex:35 + <36> <36> <0036> % six dec: 54 oct:066 hex:36 + <37> <37> <0037> % seven dec: 55 oct:067 hex:37 + <38> <38> <0038> % eight dec: 56 oct:070 hex:38 + <39> <39> <0039> % nine dec: 57 oct:071 hex:39 + <3a> <3a> <003a> % colon dec: 58 oct:072 hex:3a + <3b> <3b> <003b> % semicolon dec: 59 oct:073 hex:3b + <3c> <3c> <003c> % less dec: 60 oct:074 hex:3c + <3d> <3d> <003d> % equal dec: 61 oct:075 hex:3d + <3e> <3e> <003e> % greater dec: 62 oct:076 hex:3e + <3f> <3f> <003f> % question dec: 63 oct:077 hex:3f + <40> <40> <0040> % at dec: 64 oct:100 hex:40 + <41> <41> <0041> % A dec: 65 oct:101 hex:41 + <42> <42> <0042> % B dec: 66 oct:102 hex:42 + <43> <43> <0043> % C dec: 67 oct:103 hex:43 + <44> <44> <0044> % D dec: 68 oct:104 hex:44 + <45> <45> <0045> % E dec: 69 oct:105 hex:45 + <46> <46> <0046> % F dec: 70 oct:106 hex:46 + <47> <47> <0047> % G dec: 71 oct:107 hex:47 + <48> <48> <0048> % H dec: 72 oct:110 hex:48 + <49> <49> <0049> % I dec: 73 oct:111 hex:49 + <4a> <4a> <004a> % J dec: 74 oct:112 hex:4a + <4b> <4b> <004b> % K dec: 75 oct:113 hex:4b + <4c> <4c> <004c> % L dec: 76 oct:114 hex:4c + <4d> <4d> <004d> % M dec: 77 oct:115 hex:4d + <4e> <4e> <004e> % N dec: 78 oct:116 hex:4e + <4f> <4f> <004f> % O dec: 79 oct:117 hex:4f + <50> <50> <0050> % P dec: 80 oct:120 hex:50 + <51> <51> <0051> % Q dec: 81 oct:121 hex:51 + <52> <52> <0052> % R dec: 82 oct:122 hex:52 + <53> <53> <0053> % S dec: 83 oct:123 hex:53 + <54> <54> <0054> % T dec: 84 oct:124 hex:54 + <55> <55> <0055> % U dec: 85 oct:125 hex:55 + <56> <56> <0056> % V dec: 86 oct:126 hex:56 + <57> <57> <0057> % W dec: 87 oct:127 hex:57 + <58> <58> <0058> % X dec: 88 oct:130 hex:58 + <59> <59> <0059> % Y dec: 89 oct:131 hex:59 + <5a> <5a> <005a> % Z dec: 90 oct:132 hex:5a + <5b> <5b> <005b> % bracketleft dec: 91 oct:133 hex:5b + <5c> <5c> <005c> % backslash dec: 92 oct:134 hex:5c + <5d> <5d> <005d> % bracketright dec: 93 oct:135 hex:5d + <5e> <5e> <005e> % asciicircum dec: 94 oct:136 hex:5e + <5f> <5f> <005f> % underscore dec: 95 oct:137 hex:5f + <60> <60> <0060> % grave dec: 96 oct:140 hex:60 + <61> <61> <0061> % a dec: 97 oct:141 hex:61 + <62> <62> <0062> % b dec: 98 oct:142 hex:62 + <63> <63> <0063> % c dec: 99 oct:143 hex:63 + <64> <64> <0064> % d dec:100 oct:144 hex:64 + <65> <65> <0065> % e dec:101 oct:145 hex:65 + <66> <66> <0066> % f dec:102 oct:146 hex:66 + <67> <67> <0067> % g dec:103 oct:147 hex:67 + <68> <68> <0068> % h dec:104 oct:150 hex:68 + <69> <69> <0069> % i dec:105 oct:151 hex:69 + <6a> <6a> <006a> % j dec:106 oct:152 hex:6a + <6b> <6b> <006b> % k dec:107 oct:153 hex:6b + <6c> <6c> <006c> % l dec:108 oct:154 hex:6c + <6d> <6d> <006d> % m dec:109 oct:155 hex:6d + <6e> <6e> <006e> % n dec:110 oct:156 hex:6e + <6f> <6f> <006f> % o dec:111 oct:157 hex:6f + <70> <70> <0070> % p dec:112 oct:160 hex:70 + <71> <71> <0071> % q dec:113 oct:161 hex:71 + <72> <72> <0072> % r dec:114 oct:162 hex:72 + <73> <73> <0073> % s dec:115 oct:163 hex:73 + <74> <74> <0074> % t dec:116 oct:164 hex:74 + <75> <75> <0075> % u dec:117 oct:165 hex:75 + <76> <76> <0076> % v dec:118 oct:166 hex:76 + <77> <77> <0077> % w dec:119 oct:167 hex:77 + <78> <78> <0078> % x dec:120 oct:170 hex:78 + <79> <79> <0079> % y dec:121 oct:171 hex:79 + <7a> <7a> <007a> % z dec:122 oct:172 hex:7a + <7b> <7b> <007b> % braceleft dec:123 oct:173 hex:7b + <7c> <7c> <007c> % bar dec:124 oct:174 hex:7c + <7d> <7d> <007d> % braceright dec:125 oct:175 hex:7d + <7e> <7e> <007e> % asciitilde dec:126 oct:176 hex:7e + <a0> <a0> <00a0> % nbspace dec:160 oct:240 hex:a0 + <a1> <a1> <0104> % Aogonek dec:161 oct:241 hex:a1 + <a2> <a2> <00a2> % breve dec:162 oct:242 hex:a2 + <a3> <a3> <00a3> % Lslash dec:163 oct:243 hex:a3 + <a4> <a4> <00a4> % currency dec:164 oct:244 hex:a4 + <a5> <a5> <013d> % Lcaron dec:165 oct:245 hex:a5 + <a6> <a6> <015a> % Sacute dec:166 oct:246 hex:a6 + <a7> <a7> <00a7> % section dec:167 oct:247 hex:a7 + <a8> <a8> <00a8> % dieresis dec:168 oct:250 hex:a8 + <a9> <a9> <0160> % Scaron dec:169 oct:251 hex:a9 + <aa> <aa> <015e> % Scedilla dec:170 oct:252 hex:aa + <ab> <ab> <0164> % Tcaron dec:171 oct:253 hex:ab + <ac> <ac> <0179> % Zacute dec:172 oct:254 hex:ac + <ad> <ad> <00ad> % sfthyphen dec:173 oct:255 hex:ad + <ae> <ae> <017d> % Zcaron dec:174 oct:256 hex:ae + <af> <af> <00af> % Zdotaccent dec:175 oct:257 hex:af + <b0> <b0> <00b0> % ring dec:176 oct:260 hex:b0 + <b1> <b1> <0105> % aogonek dec:177 oct:261 hex:b1 + <b2> <b2> <00b2> % ogonek dec:178 oct:262 hex:b2 + <b3> <b3> <00b3> % lslash dec:179 oct:263 hex:b3 + <b4> <b4> <00b4> % acute dec:180 oct:264 hex:b4 + <b5> <b5> <013e> % lcaron dec:181 oct:265 hex:b5 + <b6> <b6> <015b> % sacute dec:182 oct:266 hex:b6 + <b7> <b7> <00b7> % caron dec:183 oct:267 hex:b7 + <b8> <b8> <00b8> % cedilla dec:184 oct:270 hex:b8 + <b9> <b9> <0161> % scaron dec:185 oct:271 hex:b9 + <ba> <ba> <015f> % scedilla dec:186 oct:272 hex:ba + <bb> <bb> <0165> % tcaron dec:187 oct:273 hex:bb + <bc> <bc> <017a> % zacute dec:188 oct:274 hex:bc + <bd> <bd> <00bd> % hungarumlaut dec:189 oct:275 hex:bd + <be> <be> <017e> % zcaron dec:190 oct:276 hex:be + <bf> <bf> <00bf> % zdotaccent dec:191 oct:277 hex:bf + <c0> <c0> <0154> % Racute dec:192 oct:300 hex:c0 + <c1> <c1> <00c1> % Aacute dec:193 oct:301 hex:c1 + <c2> <c2> <00c2> % Acircumflex dec:194 oct:302 hex:c2 + <c3> <c3> <0102> % Abreve dec:195 oct:303 hex:c3 + <c4> <c4> <00c4> % Adieresis dec:196 oct:304 hex:c4 + <c5> <c5> <0139> % Lacute dec:197 oct:305 hex:c5 + <c6> <c6> <0106> % Cacute dec:198 oct:306 hex:c6 + <c7> <c7> <00c7> % Ccedilla dec:199 oct:307 hex:c7 + <c8> <c8> <010c> % Ccaron dec:200 oct:310 hex:c8 + <c9> <c9> <00c9> % Eacute dec:201 oct:311 hex:c9 + <ca> <ca> <0118> % Eogonek dec:202 oct:312 hex:ca + <cb> <cb> <00cb> % Edieresis dec:203 oct:313 hex:cb + <cc> <cc> <011a> % Ecaron dec:204 oct:314 hex:cc + <cd> <cd> <00cd> % Iacute dec:205 oct:315 hex:cd + <ce> <ce> <00ce> % Icircumflex dec:206 oct:316 hex:ce + <cf> <cf> <010e> % Dcaron dec:207 oct:317 hex:cf + <d0> <d0> <00d0> % Dslash dec:208 oct:320 hex:d0 + <d1> <d1> <0143> % Nacute dec:209 oct:321 hex:d1 + <d2> <d2> <0147> % Ncaron dec:210 oct:322 hex:d2 + <d3> <d3> <00d3> % Oacute dec:211 oct:323 hex:d3 + <d4> <d4> <00d4> % Ocircumflex dec:212 oct:324 hex:d4 + <d5> <d5> <00d5> % Ohungarumlaut dec:213 oct:325 hex:d5 + <d6> <d6> <00d6> % Odieresis dec:214 oct:326 hex:d6 + <d7> <d7> <00d7> % multiply dec:215 oct:327 hex:d7 + <d8> <d8> <0158> % Rcaron dec:216 oct:330 hex:d8 + <d9> <d9> <016e> % Uring dec:217 oct:331 hex:d9 + <da> <da> <00da> % Uacute dec:218 oct:332 hex:da + <db> <db> <00db> % Uhungarumlaut dec:219 oct:333 hex:db + <dc> <dc> <00dc> % Udieresis dec:220 oct:334 hex:dc + <dd> <dd> <00dd> % Yacute dec:221 oct:335 hex:dd + <de> <de> <00de> % Tcommaaccent dec:222 oct:336 hex:de + <df> <df> <00df> % germandbls dec:223 oct:337 hex:df + <e0> <e0> <0155> % racute dec:224 oct:340 hex:e0 + <e1> <e1> <00e1> % aacute dec:225 oct:341 hex:e1 + <e2> <e2> <00e2> % acircumflex dec:226 oct:342 hex:e2 + <e3> <e3> <0103> % abreve dec:227 oct:343 hex:e3 + <e4> <e4> <00e4> % adieresis dec:228 oct:344 hex:e4 + <e5> <e5> <013a> % lacute dec:229 oct:345 hex:e5 + <e6> <e6> <0107> % cacute dec:230 oct:346 hex:e6 + <e7> <e7> <00e7> % ccedilla dec:231 oct:347 hex:e7 + <e8> <e8> <010d> % ccaron dec:232 oct:350 hex:e8 + <e9> <e9> <00e9> % eacute dec:233 oct:351 hex:e9 + <ea> <ea> <0119> % eogonek dec:234 oct:352 hex:ea + <eb> <eb> <00eb> % edieresis dec:235 oct:353 hex:eb + <ec> <ec> <011b> % ecaron dec:236 oct:354 hex:ec + <ed> <ed> <00ed> % iacute dec:237 oct:355 hex:ed + <ee> <ee> <00ee> % icircumflex dec:238 oct:356 hex:ee + <ef> <ef> <010f> % dcaron dec:239 oct:357 hex:ef + <f0> <f0> <00f0> % dmacron dec:240 oct:360 hex:f0 + <f1> <f1> <0144> % nacute dec:241 oct:361 hex:f1 + <f2> <f2> <0148> % ncaron dec:242 oct:362 hex:f2 + <f3> <f3> <00f3> % oacute dec:243 oct:363 hex:f3 + <f4> <f4> <00f4> % ocircumflex dec:244 oct:364 hex:f4 + <f5> <f5> <00f5> % ohungarumlaut dec:245 oct:365 hex:f5 + <f6> <f6> <00f6> % odieresis dec:246 oct:366 hex:f6 + <f7> <f7> <00f7> % divide dec:247 oct:367 hex:f7 + <f8> <f8> <0159> % rcaron dec:248 oct:370 hex:f8 + <f9> <f9> <016f> % uring dec:249 oct:371 hex:f9 + <fa> <fa> <00fa> % uacute dec:250 oct:372 hex:fa + <fb> <fb> <00fb> % uhungarumlaut dec:251 oct:373 hex:fb + <fc> <fc> <00fc> % udieresis dec:252 oct:374 hex:fc + <fd> <fd> <00fd> % yacute dec:253 oct:375 hex:fd + <fe> <fe> <00fe> % tcommaaccent dec:254 oct:376 hex:fe + <ff> <ff> <00ff> % dotaccent dec:255 oct:377 hex:ff + endbfrange + endcmap +CMapName currentdict /CMap defineresource pop end +end +\stoppdffontresource + +\endinput diff --git a/tex/context/base/ppchtex.tex b/tex/context/base/ppchtex.tex index 8e3bb50e9..d3da5174e 100644 --- a/tex/context/base/ppchtex.tex +++ b/tex/context/base/ppchtex.tex @@ -2766,7 +2766,61 @@ RT##3##4##5=>\processchemicaltextelement{RN}{##3##4##5}{#1}{0}{}, Z##2##3##4##5=>\processchemicaltextelement{Z}{##2##3##4##5}{#1}{0}{}, \s!unknown=>\unknownchemical{##1##2##3##4##5}]}} -\def\executechemicalEIGHT[#1]% +\def\executechemicalSEVEN[#1]% incomplete ! + {\setchemicalname SEVEN + % + \setchemicalmaximum 7 + \setchemicalsubstitute - + \setchemicaldistance 1038 + % + \setchemicalrotation 1 .623 .782 - - - - - - + \setchemicalrotation 2 -.223 .975 - - - - - - + \setchemicalrotation 3 -.901 .434 - - - - - - + \setchemicalrotation 4 -.901 -.434 - - - - - - + \setchemicalrotation 5 -.223 -.975 - - - - - - + \setchemicalrotation 6 .623 -.782 - - - - - - + \setchemicalrotation 7 1 0 - - - - - - + % + \setchemicalangle 1 0 - - - + \setchemicalangle 2 51.429 - - - + \setchemicalangle 3 102.857 - - - + \setchemicalangle 4 154.286 - - - + \setchemicalangle 5 205.714 - - - + \setchemicalangle 6 257.143 - - - + \setchemicalangle 7 308.571 - - - + % + \setchemicaltranslate 1 - - + \setchemicaltranslate 2 - - + \setchemicaltranslate 3 - - + \setchemicaltranslate 4 - - + \setchemicaltranslate 5 - - + \setchemicaltranslate 6 - - + \setchemicaltranslate 7 - - + % + \setchemicallinesegment B 1038 500 1038 -500 + \setchemicallinesegment SB 1038 240 1038 -240 + \setchemicallinesegment -SB 1038 240 1038 -500 + \setchemicallinesegment +SB 1038 500 1038 -240 + % + \setchemicaltextelement Z 1038 500 + % + \def\processchemical[##1##2##3##4##5]% + {\processaction + [##1##2##3##4##5] + [ PB:##4##5=>\beginchemicalpicture{##4##5}, + PE????=>\endchemicalpicture, + %ROT##4##5=>\processchemicalrotation{##4}, + %SUB##4##5=>\processchemicalsubstitute{##4##5}, + %ADJ##4##5=>\processchemicaldistance{##4##5}, + %MOV##4##5=>\processchemicaltranslate{##4##5}, + -SB##4##5=>\processchemicallinesegment{-SB}{##4##5}, + +SB##4##5=>\processchemicallinesegment{+SB}{##4##5}, + SB##3##4##5=>\processchemicallinesegment{SB}{##3##4##5}, + B##2##3##4##5=>\processchemicallinesegment{B}{##2##3##4##5}, + Z##2##3##4##5=>\processchemicaltextelement{Z}{##2##3##4##5}{#1}{0}{}, + \s!unknown=>\unknownchemical{##1##2##3##4##5}]}} + +\def\executechemicalEIGHT[#1]% incomplete ! {\setchemicalname EIGHT % \setchemicalmaximum 8 diff --git a/tex/context/base/regi-def.tex b/tex/context/base/regi-def.tex new file mode 100644 index 000000000..e26709c77 --- /dev/null +++ b/tex/context/base/regi-def.tex @@ -0,0 +1,21 @@ +%D \module +%D [ file=regi-def, +%D version=2000.20.12, % split from less verbose base file +%D title=\CONTEXT\ Regime Macros, +%D subtitle=Default Character Definitions, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright=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. + +\startregime[default] + +\dostepwiserecurse{128}{255}{1} + {\expanded{\defineactivetoken\recurselevel\space{\rawcharacter\recurselevel}}}% + +\stopregime + +\endinput diff --git a/tex/context/base/regi-ibm.tex b/tex/context/base/regi-ibm.tex new file mode 100644 index 000000000..eb52933fe --- /dev/null +++ b/tex/context/base/regi-ibm.tex @@ -0,0 +1,65 @@ +%D \module +%D [ file=regi-ibm, +%D version=1995.1.1, +%D title=\CONTEXT\ Encoding Macros, +%D subtitle=The Good Old MSDOS IBM codepage, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +%D This module activates the \kap{IBM PC} high \ASCII\ +%D characters, such as ‰ and á. + +\startregime [ibm] + +\defineactivetoken 128 {\Ccedilla} % € +\defineactivetoken 129 {\udiaeresis} % +\defineactivetoken 130 {\eacute} % ‚ +\defineactivetoken 131 {\acircumflex} % ƒ +\defineactivetoken 132 {\adiaeresis} % „ +\defineactivetoken 133 {\agrave} % … +\defineactivetoken 134 {\aring} % † +\defineactivetoken 135 {\ccedilla} % ‡ +\defineactivetoken 136 {\ecircumflex} % ˆ +\defineactivetoken 137 {\ediaeresis} % ‰ +\defineactivetoken 138 {\egrave} % Š +\defineactivetoken 139 {\idiaeresis} % ‹ +\defineactivetoken 140 {\icircumflex} % Œ +\defineactivetoken 141 {\igrave} % +\defineactivetoken 142 {\Adiaeresis} % Ž +\defineactivetoken 143 {\Aring} % +\defineactivetoken 144 {\Eacute} % +\defineactivetoken 145 {\aeligature} % ‘ +\defineactivetoken 146 {\AEligature} % ’ +\defineactivetoken 147 {\ocircumflex} % “ +\defineactivetoken 148 {\odiaeresis} % ” +\defineactivetoken 149 {\ograve} % • +\defineactivetoken 150 {\ucircumflex} % – +\defineactivetoken 151 {\ugrave} % — +\defineactivetoken 152 {\ijligature} % ˜ +\defineactivetoken 153 {\Odiaeresis} % ™ +\defineactivetoken 154 {\Udiaeresis} % š +\defineactivetoken 160 {\aacute} % +\defineactivetoken 161 {\iacute} % ¡ +\defineactivetoken 162 {\oacute} % ¢ +\defineactivetoken 163 {\uacute} % £ +\defineactivetoken 164 {\ntilde} % ¤ +\defineactivetoken 165 {\Ntilde} % ¥ +\defineactivetoken 225 {\ssharp} % á + +\stopregime + +% todo + +\startregime [ibm] + +\defineactivetoken ® {\ifvmode\leavevmode\fi\leftguillemot\prewordbreak} +\defineactivetoken ¯ {\prewordbreak\rightguillemot} + +\stopregime + +\endinput diff --git a/tex/context/base/regi-ini.tex b/tex/context/base/regi-ini.tex new file mode 100644 index 000000000..6a9540b79 --- /dev/null +++ b/tex/context/base/regi-ini.tex @@ -0,0 +1,25 @@ +% For the moment regimes are implemented in the enco-ini.tex +% module, but some day we will move the code here. + +% also needed: message + +\unprotect + +\def\douseregime#1% nearly identical to encoding + {\doifundefined{\c!file\f!regimeprefix#1}% + {\setvalue{\c!file\f!regimeprefix#1}{}% + \makeshortfilename[\f!regimeprefix#1]% + \startreadingfile + \readsysfile{\shortfilename} + {\showmessage{\m!encodings}{2}{#1}} + {\showmessage{\m!encodings}{3}{#1}}% + \stopreadingfile}} + +\def\useregime[#1]% + {\processcommalist[#1]\douseregime} + +\protect + +\useregime[def,uni,ibm,win] + +\endinput diff --git a/tex/context/base/regi-uni.tex b/tex/context/base/regi-uni.tex new file mode 100644 index 000000000..2b749967f --- /dev/null +++ b/tex/context/base/regi-uni.tex @@ -0,0 +1,23 @@ +%D \module +%D [ file=enco-uni, +%D version=1998.10.18, +%D title=\CONTEXT\ Encoding Macros, +%D subtitle=Unicode, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +%D This module activates all characters in the upper range +%D and sets them to the basic unicodehandler. + +\startregime[unicode] + +\defineactivedecimals 128 to 255 as {\handleunicodeflowglyph} + +\stopregime + +\endinput diff --git a/tex/context/base/regi-vis.tex b/tex/context/base/regi-vis.tex new file mode 100644 index 000000000..ceac691c4 --- /dev/null +++ b/tex/context/base/regi-vis.tex @@ -0,0 +1,152 @@ +% temporary module + +\startregime[viscii] + +\defineactivetoken 2 {\h{uA}} +\defineactivetoken 5 {\~{uA}} +\defineactivetoken 6 {\~{^A}} +\defineactivetoken 20 {\h{Y}} +\defineactivetoken 23 {\h{Y}} +\defineactivetoken 24 {\d{Y}} +\defineactivetoken 25 {\~{Y}} +\defineactivetoken 30 {\d{Y}} + +\defineactivetoken 128 {\d{A}} +\defineactivetoken 129 {\'{uA}} +\defineactivetoken 130 {\`{uA}} +\defineactivetoken 131 {\d{uA}} +\defineactivetoken 132 {\'{^A}} +\defineactivetoken 133 {\`{^A}} +\defineactivetoken 134 {\h{^A}} +\defineactivetoken 135 {\d{^A}} +\defineactivetoken 136 {\~{E}} +\defineactivetoken 137 {\d{E}} +\defineactivetoken 138 {\'{^E}} +\defineactivetoken 139 {\`{^E}} +\defineactivetoken 140 {\h{^E}} +\defineactivetoken 141 {\~{^E}} +\defineactivetoken 142 {\d{^E}} +\defineactivetoken 143 {\'{^O}} + +\defineactivetoken 144 {\`{^O}} +\defineactivetoken 145 {\h{^O}} +\defineactivetoken 146 {\~{^O}} +\defineactivetoken 147 {\d{^O}} +\defineactivetoken 148 {\d{hO}} +\defineactivetoken 149 {\'{hO}} +\defineactivetoken 150 {\`{hO}} +\defineactivetoken 151 {\h{hO}} +\defineactivetoken 152 {\d{I}} +\defineactivetoken 153 {\h{O}} +\defineactivetoken 154 {\d{O}} +\defineactivetoken 155 {\h{I}} +\defineactivetoken 156 {\h{U}} +\defineactivetoken 157 {\~{U}} +\defineactivetoken 158 {\d{U}} +\defineactivetoken 159 {\`{Y}} + +\defineactivetoken 160 {\~{O}} +\defineactivetoken 161 {\'{ua}} +\defineactivetoken 162 {\`{ua}} +\defineactivetoken 163 {\d{ua}} +\defineactivetoken 164 {\'{^a}} +\defineactivetoken 165 {\`{^a}} +\defineactivetoken 166 {\h{^a}} +\defineactivetoken 167 {\d{^a}} +\defineactivetoken 168 {\~{e}} +\defineactivetoken 169 {\d{ e}} +\defineactivetoken 170 {\'{^e}} +\defineactivetoken 171 {\`{^e}} +\defineactivetoken 172 {\h{^e}} +\defineactivetoken 173 {\~{^e}} +\defineactivetoken 174 {\d{^e}} +\defineactivetoken 175 {\'{^o}} + +\defineactivetoken 176 {\`{^o}} +\defineactivetoken 177 {\h{^o}} +\defineactivetoken 178 {\~{^o}} +\defineactivetoken 179 {\~{hO}} +\defineactivetoken 180 {\h{O}} +\defineactivetoken 181 {\d{^o}} +\defineactivetoken 182 {\`{ho}} +\defineactivetoken 183 {\h{ho}} +\defineactivetoken 184 {\d{i}} +\defineactivetoken 185 {\d{hU}} +\defineactivetoken 186 {\'{hU}} +\defineactivetoken 187 {\`{hU}} +\defineactivetoken 188 {\h{hU}} +\defineactivetoken 189 {\h{o}} +\defineactivetoken 190 {\'{ho}} +\defineactivetoken 191 {\h{U}} + +\defineactivetoken 192 {\`{A}} +\defineactivetoken 193 {\'{A}} +\defineactivetoken 194 {\^{A}} +\defineactivetoken 195 {\~{A}} +\defineactivetoken 196 {\h{A}} +\defineactivetoken 197 {\u{A}} +\defineactivetoken 198 {\h{ua}} +\defineactivetoken 199 {\~{ua}} +\defineactivetoken 200 {\`{E}} +\defineactivetoken 201 {\'{E}} +\defineactivetoken 202 {\^{E}} +\defineactivetoken 203 {\h{E}} +\defineactivetoken 204 {\`{I}} +\defineactivetoken 205 {\'{I}} +\defineactivetoken 206 {\~{I}} +\defineactivetoken 207 {\`{y}} + +\defineactivetoken 208 {\DJ{}} +\defineactivetoken 209 {\'{hu}} +\defineactivetoken 210 {\`{O}} +\defineactivetoken 211 {\'{O}} +\defineactivetoken 212 {\^{O}} +\defineactivetoken 213 {\d{a}} +\defineactivetoken 214 {\h{y}} +\defineactivetoken 215 {\`{hu}} +\defineactivetoken 216 {\h{hu}} +\defineactivetoken 217 {\`{U}} +\defineactivetoken 218 {\'{U}} +\defineactivetoken 219 {\~{y}} +\defineactivetoken 220 {\d{y}} +\defineactivetoken 221 {\'{Y}} +\defineactivetoken 222 {\~{ho}} +\defineactivetoken 223 {\h{u}} + +\defineactivetoken 224 {\`{a}} +\defineactivetoken 225 {\'{a}} +\defineactivetoken 226 {\^{a}} +\defineactivetoken 227 {\~{a}} +\defineactivetoken 228 {\h{a}} +\defineactivetoken 229 {\u{a}} +\defineactivetoken 230 {\~{hu}} +\defineactivetoken 231 {\~{^a}} +\defineactivetoken 232 {\`{e}} +\defineactivetoken 233 {\'{e}} +\defineactivetoken 234 {\^{e}} +\defineactivetoken 235 {\h{e}} +\defineactivetoken 236 {\`{i}} +\defineactivetoken 237 {\'{i}} +\defineactivetoken 238 {\~{i}} +\defineactivetoken 239 {\h{i}} + +\defineactivetoken 240 {\dj{}} +\defineactivetoken 241 {\d{hu}} +\defineactivetoken 242 {\`{o}} +\defineactivetoken 243 {\'{o}} +\defineactivetoken 244 {\^{o}} +\defineactivetoken 245 {\~{o}} +\defineactivetoken 246 {\h{o}} +\defineactivetoken 247 {\d{o}} +\defineactivetoken 248 {\d{u}} +\defineactivetoken 249 {\`{u}} +\defineactivetoken 250 {\'{u}} +\defineactivetoken 251 {\~{u}} +\defineactivetoken 252 {\h{u}} +\defineactivetoken 253 {\'{y}} +\defineactivetoken 254 {\d{ho}} +\defineactivetoken 255 {\~{hU}} + +\stopregime + +\endinput diff --git a/tex/context/base/regi-win.tex b/tex/context/base/regi-win.tex new file mode 100644 index 000000000..ae5d07b13 --- /dev/null +++ b/tex/context/base/regi-win.tex @@ -0,0 +1,115 @@ +%D \module +%D [ file=enco-win, +%D version=1997.08.29, +%D title=\CONTEXT\ Encoding Macros, +%D subtitle=Windows 1252 ANSI keys, +%D author={Tobias Burnus \& Hans Hagen}, +%D date=\currentdate, +%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +%D This module activates the (western) \MSWINDOWS\ high \ANSI\ +%D characters, such as ë and á. + +%D NOT OKAY YET. + +\startregime [windows] + +\defineactivetoken 132 {\char44\kern-.1em\char44 } +\defineactivetoken 133 {\dots} +\defineactivetoken 134 {\dag} +\defineactivetoken 135 {\ddag} +\defineactivetoken 139 {\leftsubguillemot} +\defineactivetoken 145 {\upperleftsinglesixquote} + +\defineactivetoken 146 {\char39 } +\defineactivetoken 147 {\char96\kern-.1em\char96 } +\defineactivetoken 148 {\char34 } +\defineactivetoken 150 {--} +\defineactivetoken 151 {---} +\defineactivetoken 155 {\rightsubguillemot} +\defineactivetoken 161 {!`} +\defineactivetoken 163 {\sterling} +\defineactivetoken 167 {\S} +\defineactivetoken 169 {\copyright} +\defineactivetoken 171 {\ifvmode\leavevmode\fi\leftguillemot\prewordbreak} +\defineactivetoken 191 {?`} + +\defineactivetoken 182 {\P} +\defineactivetoken 187 {\prewordbreak\rightguillemot} + +\defineactivetoken 138 {\Scaron} +\defineactivetoken 154 {\scaron} + +\defineactivetoken 192 {\Agrave} +\defineactivetoken 193 {\Aacute} +\defineactivetoken 194 {\Acircumflex} +\defineactivetoken 195 {\Atilde} +\defineactivetoken 196 {\Adiaeresis} +\defineactivetoken 197 {\Aring} +\defineactivetoken 198 {\AEligature} +\defineactivetoken 199 {\Ccedilla} +\defineactivetoken 200 {\Egrave} +\defineactivetoken 201 {\Eacute} +\defineactivetoken 202 {\Ecircumflex} +\defineactivetoken 203 {\Ediaeresis} +\defineactivetoken 204 {\Igrave} +\defineactivetoken 205 {\Iacute} +\defineactivetoken 206 {\Icircumflex} +\defineactivetoken 207 {\Idiaeresis} + +\defineactivetoken 209 {\Ntilde} +\defineactivetoken 210 {\Ograve} +\defineactivetoken 211 {\Oacute} +\defineactivetoken 212 {\Ocircumflex} +\defineactivetoken 213 {\Otilde} +\defineactivetoken 214 {\Odiaeresis} +\defineactivetoken 215 {\OEligature} +\defineactivetoken 216 {\Ostroke} +\defineactivetoken 217 {\Ugrave} +\defineactivetoken 218 {\Uacute} +\defineactivetoken 219 {\Ucircumflex} +\defineactivetoken 220 {\Udiaeresis} +\defineactivetoken 221 {\Ygrave} + +\defineactivetoken 223 {\ssharp} + +\defineactivetoken 224 {\agrave} +\defineactivetoken 225 {\aacute} +\defineactivetoken 226 {\acircumflex} +\defineactivetoken 227 {\atilde} +\defineactivetoken 228 {\adiaeresis} +\defineactivetoken 229 {\aring} +\defineactivetoken 230 {\aeligature} +\defineactivetoken 231 {\cdedille} +\defineactivetoken 232 {\egrave} +\defineactivetoken 233 {\eacute} +\defineactivetoken 234 {\ecircumflex} +\defineactivetoken 235 {\ediaeresis} +\defineactivetoken 236 {\igrave} +\defineactivetoken 237 {\iacute} +\defineactivetoken 238 {\icircumflex} +\defineactivetoken 239 {\idiaeresis} + +\defineactivetoken 241 {\ntilde} +\defineactivetoken 242 {\ograve} +\defineactivetoken 243 {\oacute} +\defineactivetoken 244 {\ocircumflex} +\defineactivetoken 245 {\otilde} +\defineactivetoken 246 {\odiaeresis} +\defineactivetoken 247 {\oeligature} +\defineactivetoken 248 {\ostroke} +\defineactivetoken 249 {\ugrave} +\defineactivetoken 250 {\uacute} +\defineactivetoken 251 {\ucircumflex} +\defineactivetoken 252 {\udiaeresis} +\defineactivetoken 253 {\ygrave} + +\defineactivetoken 255 {\ydiaeresis} + +\stopregime + +\endinput diff --git a/tex/context/base/s-abr-01.tex b/tex/context/base/s-abr-01.tex index 40c650745..33ae62647 100644 --- a/tex/context/base/s-abr-01.tex +++ b/tex/context/base/s-abr-01.tex @@ -19,20 +19,25 @@ \protect -\logo [ACROBAT] {Acrobat} +\logo [ACROBAT] {Acro\-bat} +\logo [ALGOL] {ALGOL} +\logo [AMSLATEX] {\AmSLaTeX} \logo [AMSTEX] {\AmSTeX} \logo [AMS] {ams} \logo [ANSI] {ansi} \logo [ASCIITEX] {ascii\TeX} \logo [ASCII] {ascii} \logo [BIBTEX] {bib\TeX} +\logo [BSD] {bsd} \logo [CDROM] {cdrom} +\logo [CD] {cd} \logo [CMR] {cmr} \logo [CMYK] {cmyk} \logo [CONTEXT] {\ConTeXt} \logo [CTAN] {ctan} \logo [CWEB] {cweb} \logo [DISTILLER] {distiller} +\logo [DTD] {dtd} \logo [DTK] {dtk} \logo [DVIPSONE] {dvipsone} \logo [DVIPS] {dvips} @@ -40,55 +45,67 @@ \logo [DVIWINDO] {dviwindo} \logo [DVI] {dvi} \logo [EC] {ec} -\logo [EMACS] {emacs} \logo [EIFFEL] {Eiffel} +\logo [EMACS] {emacs} \logo [EMTEX] {em\TeX} \logo [EPS] {eps} \logo [ETEX] {\eTeX} -\logo [FPTEX] {fp\TeX} +\logo [EUROMATH] {EuroMath} +\logo [FAQ] {faq} +%logo [FGA] {fga} \logo [FDF] {fdf} \logo [FGBBS] {fgbbs} -\logo [GUST] {Gust} +\logo [FPTEX] {fp\TeX} +\logo [FREEBSD] {FreeBSD} +\logo [FTP] {ftp} +\logo [GHOSTSCRIPT]{Ghost\-Script} +\logo [GHOSTVIEW] {Ghost\-View} +\logo [GIF] {gif} \logo [GNU] {gnu} -\logo [GHOSTSCRIPT]{GhostScript} -\logo [GHOSTVIEW] {GhostView} -\logo [GS] {GhostScript} +\logo [GS] {Ghost\-Script} +\logo [GUST] {Gust} \logo [HTML] {html} \logo [IBM] {ibm} \logo [INRSTEX] {inrs\TeX} -\logo [JAVASCRIPT] {JavaScript} +\logo [IRCNET] {IRCnet} +\logo [JAVASCRIPT] {Java\-Script} \logo [JAVA] {Java} +\logo [JPEG] {jpeg} \logo [JPG] {jpg} \logo [LAMSTEX] {\LamSTeX} \logo [LATEXTE] {\LaTeX2e} \logo [LATEXTN] {\LaTeX2.09} \logo [LATEX] {\LaTeX} +\logo [LINUX] {linux} \logo [LISP] {Lisp} +\logo [MAKEMPY] {MakeMPY} \logo [MAPS] {Maps} -\logo [MIKTEX] {Mik\TeX} +\logo [MATHML] {MathML} \logo [METAFONT] {\MetaFont} \logo [METAPOST] {\MetaPost} -\logo [OMEGA] {Omega} -\logo [PASCAL] {Pascal} -\logo [ALGOL] {ALGOL} +\logo [MIKTEX] {Mik\TeX} \logo [MLTEX] {ml\TeX} \logo [MODULA] {Modula} \logo [MOV] {mov} \logo [MPS] {mps} \logo [MSDOS] {msdos} -\logo [MSWINDOWS] {MSWindows} +\logo [MSWINDOWS] {MS~Windows} +\logo [NETPBM] {NetPBM} \logo [NTG] {ntg} \logo [NTS] {nts} -\logo [PDFTOPS] {pdftops} +\logo [OMEGA] {Omega} +\logo [PASCAL] {Pascal} \logo [PDFETEX] {pdf-\eTeX} \logo [PDFTEX] {pdf\TeX} +\logo [PDFTOPS] {pdftops} \logo [PDF] {pdf} -\logo [PERL] {Perl} \logo [PERLTK] {Perl/Tk} +\logo [PERL] {Perl} \logo [PICTEX] {\PiCTeX} \logo [PLAIN] {Plain} \logo [PNG] {png} -\logo [POSTSCRIPT] {PostScript} +\logo [POSIX] {posix} +\logo [POSTSCRIPT] {Post\-Script} \logo [PPCHTEX] {\PPCHTeX} \logo [PRAGMA] {Pragma ADE} \logo [PRESS] {press} @@ -96,24 +113,25 @@ \logo [PSCHECK] {pscheck} \logo [PSTOPAGE] {pstopage} \logo [PSTRICKS] {pstricks} -\logo [PS] {PostScript} +\logo [PS] {Post\-Script} \logo [RGB] {rgb} \logo [SGML] {sgml} -\logo [SQL] {sql} \logo [SI] {si} +\logo [SQL] {sql} \logo [TABLE] {\TaBlE} -\logo [TEXMF] {texmf} +\logo [TDS] {tds} % no sc te \logo [TETEX] {te\TeX} % no sc te \logo [TEXADRES] {\TeX adress} \logo [TEXBASE] {\TeX base} \logo [TEXEDIT] {\TeX edit} -\logo [TEXWORK] {\TeX work} \logo [TEXEXEC] {\TeX exec} \logo [TEXFORM] {\TeX form} -\logo [TEXSHOW] {\TeX show} +\logo [TEXMF] {texmf} \logo [TEXNL] {TEX-NL} +\logo [TEXSHOW] {\TeX show} \logo [TEXSPELL] {\TeX spell} \logo [TEXUTIL] {\TeX util} +\logo [TEXWORK] {\TeX work} \logo [TEX] {\TeX} \logo [TFM] {tfm} \logo [TIFFINFO] {tiffinfo} @@ -121,29 +139,28 @@ \logo [TIFF] {tiff} \logo [TIF] {tif} \logo [TPIC] {tpic} -\logo [TUGBOAT] {TugBoat} -\logo [TUGBOAT] {TugNews} -\logo [TUGNEWS] {Tug News} +\logo [TUGBOAT] {Tug\-Boat} +\logo [TUGNEWS] {Tug\-News} \logo [TUG] {tug} +\logo [UNICODE] {Uni\-code} +\logo [UNIX] {unix} \logo [URI] {uri} \logo [URL] {url} \logo [USA] {usa} -\logo [UNICODE] {Unicode} -\logo [UNIX] {unix} -\logo [LINUX] {linux} -\logo [WEB] {web} -\logo [WEBC] {web2c} +\logo [USENET] {usenet} \logo [WDT] {wdt} +\logo [WEBC] {web2c} +\logo [WEB] {web} +\logo [WINNT] {WinNT} +\logo [WINNX] {Win9x} \logo [WWW] {www} -\logo [XML] {xml} -\logo [XSL] {xsl} -\logo [XSLT] {xslt} +\logo [WYSIWYG] {wysiwyg} \logo [XDVI] {Xdvi} \logo [XINDY] {Xindy} +\logo [XML] {xml} +\logo [XSLT] {xslt} +\logo [XSL] {xsl} \logo [YandY] {y\&y} -\logo [WYSIWYG] {wysiwyg} -\logo [WINNX] {Win9x} -\logo [WINNT] {WinNT} \def\METAFUN {\MetaFun} diff --git a/tex/context/base/s-faq-01.tex b/tex/context/base/s-faq-01.tex index f3197842d..6e73d70d4 100644 --- a/tex/context/base/s-faq-01.tex +++ b/tex/context/base/s-faq-01.tex @@ -14,7 +14,7 @@ \usemodule[faq-00] \setuppapersize - [S6] + [S6][S6] \setuplayout [topspace=.5cm, diff --git a/tex/context/base/s-map-01.tex b/tex/context/base/s-map-01.tex index 07cb3b935..f50ffb845 100644 --- a/tex/context/base/s-map-01.tex +++ b/tex/context/base/s-map-01.tex @@ -1,9 +1,12 @@ +% This is an old version, I still have to patch the latest +% changes into this file. + %D \module %D [ file=s-map-01, %D version=1998.05.05, %D title=\CONTEXT\ Style File, %D subtitle=\MAPS\ basis stijl, -%D author={Taco Hoekwater \& Hans Hagen}, +%D author={Taco Hoekwater, Siep Kroonenberg \& Hans Hagen}, %D date=\currentdate, %D copyright={NTG / MAPS}] %C diff --git a/tex/context/base/s-pre-01.tex b/tex/context/base/s-pre-01.tex index 982c2b93f..60ab6765c 100644 --- a/tex/context/base/s-pre-01.tex +++ b/tex/context/base/s-pre-01.tex @@ -66,10 +66,10 @@ \setuplayout [topspace=12pt, header=0pt, - height=fit, footer=0pt, - bottomdistance=8pt, - bottom=10pt, + height=402pt, % 450 - 12 - 15 - 12 - 12 + 3 + bottomdistance=15pt, + bottom=12pt, backspace=12pt, margin=0pt, width=fit, @@ -111,7 +111,7 @@ %D \stoptypen %D \macros -%D {setupinteractions} +%D {setupinteraction} %D %D We did not enable interactive text support yet, so let's do %D that now. We force page reference to circumvent problems @@ -119,18 +119,30 @@ \setupinteraction [page=yes, + menu=on, state=start] %D \macros -%D {setupbottomtexts} +% %D {setupbottomtexts} +%D {setupinteractionmenu,startinteractionmenu} %D %D At the bottom of the screen we show two navigational bars. %D At the left we show the subpage bar, at the right we use a %D non default backward|/|forward bar. +% +% \setupbottomtexts +% [\InteractionBar] +% [\InteractionButtons] -\setupbottomtexts - [\InteractionBar] - [\InteractionButtons] +\setupinteractionmenu + [bottom] + [leftoffset=-3pt, + rightoffset=-3pt] + +\startinteractionmenu[bottom] + \txt \InteractionBar \\ + \txt \InteractionButtons \\ +\stopinteractionmenu %D \macros %D {interactionbar} @@ -142,7 +154,7 @@ \def\InteractionBar% {\ifnum\nofsubpages>1 \framed - [framecolor=white,linethickness=1pt, + [framecolor=white,rulethickness=1pt, height=\bottomheight,strut=no] {\interactionbar[alternative=f,width=.5\makeupwidth,height=1ex]} \fi} @@ -155,7 +167,7 @@ %D close the presentation. \setupinteractionbar - [framecolor=white,linethickness=1pt, + [framecolor=white,rulethickness=1pt, height=\bottomheight,strut=no] \def\InteractionButtons% @@ -271,7 +283,7 @@ \def\HeadLine#1#2% {\midaligned {\framed - [framecolor=backgroundcolor,linethickness=1pt, + [framecolor=backgroundcolor,rulethickness=1pt, width=.8\hsize,align=middle,strut=no] {#2}}} @@ -300,9 +312,8 @@ \def\PlaceSubjectList% {\blank \determinelistcharacteristics[Subject] - \ifnum\utilitylistlength>0 - \placelist[Subject] - \fi} + % \ifnum\utilitylistlength>0 \placelist[Subject] \fi} + \doifmode{*list}{\placelist[Subject]}} \setuplist [Subject, Topic] @@ -311,47 +322,49 @@ before=, after=] -%D \macros -%D {setuptexttexts} -%D -%D The topics will be listed in the right edge, using: - -\setuptexttexts - [edge] - [][\TopicList] +% %D \macros +% %D {setuptexttexts} +% %D +% %D The topics will be listed in the right edge, using: +% +% \setuptexttexts +% [edge] +% [][\TopicList] %D \macros -%D {setuplist, placelist} +%D {setuplist, placelist,startinteractionmenu} %D %D The actual topic list is typeset using a \type{\vbox}. We %D have to specify \type{criterium=all} because otherwise no %D list will be typeset. (By default lists are typeset %D locally.) -\def\TopicList% - {\vbox to \vsize - {\placelist - [Topic] - [alternative=none, - criterium=all, - command=\TopicLine] - \vss}} +\startinteractionmenu[right] + \placelist + [Topic] + [alternative=f, % command, % none, + maxwidth=\hsize, + width=\hsize, + offset=0pt, + criterium=all, + align=left] +\stopinteractionmenu \def\Topics#1% temporary hack {\Nopic{#1} \placelist[Topic][criterium=all]} -%D \macros -%D {limitatetext} -%D -%D Because topic lines can be rather long, so we use \type -%D {\limitatetext} to limit their length to the width of the -%D right edge. When needed, some dots are added (\unknown). -%D This macro is part of the collection of low level support -%D macros. - -\def\TopicLine#1#2#3% - {\limitatetext{#2}{\rightedgewidth}{\unknown}\par} +% %D \macros +% %D {limitatetext} +% %D +% %D Because topic lines can be rather long, so we use \type +% %D {\limitatetext} to limit their length to the width of the +% %D right edge. When needed, some dots are added (\unknown). +% %D This macro is part of the collection of low level support +% %D macros. +% +% \def\TopicLine#1#2#3% +% {\limitatetext{#2}{\rightedgewidth}{\unknown}\par} %D \macros %D {setuptexttexts, button} diff --git a/tex/context/base/s-pre-02.tex b/tex/context/base/s-pre-02.tex index 865a9fb08..d659594d6 100644 --- a/tex/context/base/s-pre-02.tex +++ b/tex/context/base/s-pre-02.tex @@ -194,6 +194,8 @@ %D At the bottom of the screen, we show three buttons. These %D direct us to the previous or next jump or exit the document. +% much too complicated, can be done in a few lines nowadays + \def\MPright#1#2% {\startreusableMPgraphic{rt:#1#2} z1 = ( 0, 0) ; diff --git a/tex/context/base/s-pre-15.tex b/tex/context/base/s-pre-15.tex index df27ea562..261e520d1 100644 --- a/tex/context/base/s-pre-15.tex +++ b/tex/context/base/s-pre-15.tex @@ -13,7 +13,7 @@ %D This is one of the styles I made for the presentation on %D the \NTS\ project at Euro\TeX\ 1998. You need balls to let -%D \TEX\ typeset graphics, but thsi style demonstrates that it +%D \TEX\ typeset graphics, but this style demonstrates that it %D can be done. %D %D This presentation is meant for presentations that build up @@ -154,7 +154,7 @@ \vfil#1\vfil\vfil \stopstandardmakeup} -\endinput +\doifnotmode{demo}{\endinput} %D A simple test on functionality. diff --git a/tex/context/base/s-pre-19.tex b/tex/context/base/s-pre-19.tex index f93deb1a7..d724a2760 100644 --- a/tex/context/base/s-pre-19.tex +++ b/tex/context/base/s-pre-19.tex @@ -153,7 +153,6 @@ p := Field[Text][Text] enlarged 36pt superellipsed .90 ; - fill Page withcolor \MPcolor{yellow} ; fill p withcolor \MPcolor{white} ; draw p withcolor \MPcolor{red} ; @@ -313,16 +312,16 @@ enddef ; % \useenvironment[pre-organic] % \setupoutput[pdftex] -\setupMPvariables[page][alternative=1] +\setupMPvariables[page][alternative=3] \TitlePage {A Few Nice Quotes\\ A Simple Style Demo\\ Hans Hagen, August 2000} -\Topic {Rudolf D. Hofstadter} \input douglas \page -\Topic {Donald E. Knuth} \input knuth \page -\Topic {Edward R. Tufte} \input tufte \page -\Topic {Hermann Zapf} \input zapf \page +\Topic {Douglas R. Hofstadter} \input douglas \page +\Topic {Donald E. Knuth} \input knuth \page +\Topic {Edward R. Tufte} \input tufte \page +\Topic {Hermann Zapf} \input zapf \page \stoptext diff --git a/tex/context/base/spec-dpm.tex b/tex/context/base/spec-dpm.tex new file mode 100644 index 000000000..5b009efd4 --- /dev/null +++ b/tex/context/base/spec-dpm.tex @@ -0,0 +1,397 @@ +%D \module +%D [ file=spec-dpm, +%D version=1998.11.24, +%D title=\CONTEXT\ Special Macros, +%D subtitle=DVIPDFM support, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +% untested - sp as unit not supported + +\unprotect + +%D This driver is build on top of the general \PDF\ macros, +%D as defined in \type{spec-fdf}, so we inherit that one. + +\startspecials[dpm][reset,fdf] + +%D \macros +%D {jobsuffix} +%D +%D Because no intermediate output format is used, we set the +%D jobsuffix to \PDF. + +\def\jobsuffix{pdf} + +%D Literal \PDF\ inclusion is implemented as: + +\def\PDFcode#1{\special{pdf: content #1}} + +%D \macros +%D {dosetuppaper} +%D +%D A simple one. + +\def\doDPMsetuppaper#1#2#3% + {\bgroup + \scratchdimen=#2\edef\width {\the\scratchdimen\space}% + \scratchdimen=#3\edef\height{\the\scratchdimen\space}% + \special{pdf: pagesize width \width height \height}% + \global\let\doDPMsetuppaper\gobblethreearguments + \egroup} + +\definespecial\dosetuppaper#1#2#3% + {\doDPMsetuppaper{#1}{#2}{#3}} + +%D \macros +%D {doinsertfile} +%D +%D Only \METAPOST, \JPG\ and \PDF\ inclusion are supported. + +\definespecial\doinsertfile#1#2#3#4#5#6#7#8#9% + {\dodoinsertfile{dpm}{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}{#9}} + +%\definefileinsertion{dpm}{mps}#1#2#3#4#5#6#7#8#9% +% {\hbox +% {\convertMPcolors{#1}% +% \scratchdimen=#3pt \PointsToReal{.01\scratchdimen}\xscale +% \scratchdimen=#4pt \PointsToReal{.01\scratchdimen}\yscale +% \convertMPtoPDF{#1}\xscale\yscale}} + +\definefileinsertion{dpm}{mps}#1#2#3#4#5#6#7#8#9% + {\ScaledPointsToWholeBigPoints{#7}\width + \ScaledPointsToWholeBigPoints{#8}\height + \special + {PSfile="#1"\space + llx=\EPSllx\space lly=\EPSlly\space + urx=\EPSurx\space ury=\EPSury\space + rwi=\width0\space rhi=\height0}} + +\definefileinsertion{dpm}{pdf}#1#2#3#4#5#6#7#8#9% + {\bgroup + \scratchdimen=#7sp\edef\width {\the\scratchdimen\space}% + \scratchdimen=#8sp\edef\height{\the\scratchdimen\space}% + \special{pdf: epdf width \width height \height (#1)}% + \egroup} + +\definefileinsertion{dpm}{jpg}#1#2#3#4#5#6#7#8#9% + {\bgroup + \scratchdimen=#7pt\edef\width {\the\scratchdimen\space}% + \scratchdimen=#8pt\edef\height{\the\scratchdimen\space}% + \special{pdf: image width \width height \height (#1)}% + \egroup} + +\definefileinsertion{dpm}{mov}{\doPDFinsertmov} +\definefileinsertion{dpm}{avi}{\doPDFinsertmov} + +%D \macros +%D {doinsertsoundtrack} +%D +%D Sounds are supported too. + +\definespecial\doinsertsoundtrack{\doPDFinsertsoundtrack} + +%D \macros +%D {doovalbox} + +\definespecial\doovalbox{\doPDFovalbox} + +%D \macros +%D {dostartgraymode,dostopgraymode, +%D dostartrgbcolormode,dostartcmykcolormode,dostartgraycolormode, +%D dostopcolormode, +%D dostartrotation,dostoprotation, +%D dostartscaling,dostopscaling, +%D dostartmirroring,dostopmirroring, +%D dostartnegative,dostopnegative} +%D +%D Unfortunately the direct \PDF\ inclusion is not suited +%D for the next macros, which means that we cannot use the +%D \type {\doPDF..} alternatives. Since \CONTEXT\ maintains +%D its own colorstack, we use the \DVIPS\ alternatives. + +\definespecial\dostartgraymode #1{\special{color gray #1}} +\definespecial\dostopgraymode {\special{color gray 0}} +\definespecial\dostartrgbcolormode #1#2#3{\special{color rgb #1 #2 #3}} +\definespecial\dostartcmykcolormode#1#2#3#4{\special{color cmyk #1 #2 #3 #4}} +\definespecial\dostartgraycolormode #1{\special{color gray #1}} +\definespecial\dostopcolormode {\special{color gray 0}} +\definespecial\dostartrotation #1{\special{pdf: bt rotate #1}} +\definespecial\dostoprotation {\special{pdf: et}} +\definespecial\dostartscaling #1#2{\special{pdf: bt xscale #1 yscale #2}} +\definespecial\dostopscaling {\special{pdf: et}} +\definespecial\dostartmirroring {\special{pdf: bt xscale -1}} % ? +\definespecial\dostopmirroring {\special{pdf: et}} + +%D Negation is not (yet) supported: + +\definespecial\dostartnegative {} +\definespecial\dostopnegative {} + +%D \macros +%D {dosetupinteraction, +%D dosetupopenaction,dosetupcloseaction} + +\definespecial\dosetupinteraction% + {\showmessage{\m!interactions}{21}{DVIPDFM}} + +\definespecial\dosetupopenaction {\doPDFsetupopenaction} +\definespecial\dosetupcloseaction{\doPDFsetupcloseaction} + +%D \macros +%D {doresetgotowhereever, +%D dostartthisisrealpage,dostartthisislocation, +%D dostartgotorealpage,dostartgotolocation,dostartgotoJS} + +\definespecial\doresetgotowhereever {\doPDFresetgotowhereever} +\definespecial\dostartthisislocation{\doPDFstartthisislocation} + +\definespecial\dostartgotolocation{\doPDFstartgotolocation} +\definespecial\dostartgotorealpage{\doPDFstartgotorealpage} +\definespecial\dostartgotoJS {\doPDFstartgotoJS} + +%D \macros +%D {doflushJSpreamble} + +\definespecial\doflushJSpreamble#1% + {\bgroup + \let\compositeJScode=\empty + \def\docommando##1% + {\edef\sanitizedJScode{\getJSpreamble{##1}}% + \@EA\doPSsanitizeJScode\sanitizedJScode\to\sanitizedJScode + \special{pdf: object @JS:#1 <</S /JavaScript /JS (\sanitizedJScode)>>}% + \edef\compositeJScode{\compositeJScode\space (##1) @JS:#1}}% + \processcommalist[#1]\docommando + \special{pdf: object @JS:JS <</Names [\compositeJScode]>>}% + \special{pdf: put @names <</JavaScript @JS:JS>>}% + \egroup} + +%D \macros +%D {dostarthide,dostophide} + +\definespecial\dostarthide{} +\definespecial\dostophide {} + +%D \macros +%D {dosetupscreen} + +\definespecial\dosetupscreen{\doPDFsetupscreen\printpapierhoogte} + +%D \macros +%D {dostartexecutecommand} + +\definespecial\dostartexecutecommand{\doPDFstartexecutecommand} + +%D \macros +%D {dosetupidentity} + +\definespecial\dosetupidentity#1#2#3#4#5% + {\bgroup + \enablePDFdocencoding + \special + {pdf: docinfo + <</Title (#1) /Subject (#2) /Author (#3) + /Creator (#4) /Producer (dvipdfm)>>}% + \egroup} + +%D \macros +%D {dostartrunprogam} + +\definespecial\dostartrunprogram{\doPDFstartrunprogram} + +%D \macros +%D {dostartgotoprofile, dostopgotoprofile, +%D dobeginofprofile, doendofprofile} + +\definespecial\dostartgotoprofile{\doPDFstartgotoprofile} + +\definespecial\dobeginofprofile#1#2#3#4% + {\bgroup + \setPDFdestination{#1}% + \scratchdimen=#2sp\edef\width {\the\scratchdimen\space}% + \scratchdimen=#3sp\edef\height{\the\scratchdimen\space}% + \doifsomething{\PDFdestination} + {\special + {pdf: thread @ART::\PDFdestination\space + width \width height \height + <</Title (\PDFdestination)>>}}% + \egroup} + +\definespecial\doendofprofile% + {} + +%D \macros +%D {doinsertbookmark} + +\definespecial\doinsertbookmark{\doPDFinsertbookmark} + +%D \macros +%D {dostartobject,dostopobject,doinsertobject} + +\definespecial\dostartobject#1#2#3#4#5% + {\bgroup + \setbox\nextbox=\hbox\bgroup + \dosetobjectreference{#1}{#2}{#1::#2}% + \scratchdimen=#3sp\edef\width {\the\scratchdimen\space}% + \scratchdimen=#4sp\edef\height{\the\scratchdimen\space}% + \special{pdf: bxobj @#1::#2 width \width height \height}} + +\definespecial\dostopobject% + {\special{pdf: exobj}% + \egroup + \smashbox\nextbox + \flushatshipout{\box\nextbox}% + \egroup} + +\definespecial\doinsertobject#1#2% + {\hbox + {\dogetobjectreference{#1}{#2}\PDFobjectreference + \ifx\PDFobjectreference\empty \else + \special{pdf: usexobj @\PDFobjectreference}% + \fi}} + +%D \macros +%D {dosetpagetransition} + +\definespecial\dosetpagetransition{\doPDFsetpagetransition} + +%D \macros +%D {doinsertcomment} + +\definespecial\doinsertcomment{\doPDFinsertcomment} + +%D \macros +%D {dopresetlinefield,dopresettextfield, +%D dopresetchoicefield,dopresetpopupfield,dopresetcombofield, +%D dopresetpushfield,dopresetcheckfield, +%D dopresetradiofield,dopresetradiorecord} + +\definespecial\dopresetlinefield {\doFDFpresetlinefield} +\definespecial\dopresettextfield {\doFDFpresettextfield} +\definespecial\dopresetchoicefield{\doFDFpresetchoicefield} +\definespecial\dopresetpopupfield {\doFDFpresetpopupfield} +\definespecial\dopresetcombofield {\doFDFpresetcombofield} +\definespecial\dopresetpushfield {\doFDFpresetpushfield} +\definespecial\dopresetcheckfield {\doFDFpresetcheckfield} +\definespecial\dopresetradiofield {\doFDFpresetradiofield} +\definespecial\dopresetradiorecord{\doFDFpresetradiorecord} + +%D \macros +%D {dodefinefieldset,dogetfieldset,doiffieldset} + +\definespecial\dodefinefieldset{\doFDFdefinefieldset} +\definespecial\dogetfieldset {\doFDFgetfieldset} +\definespecial\doiffieldset {\doFDFiffieldset} + +%D \macros +%D {doregistercalculationset} + +\definespecial\doregistercalculationset{\doFDFregistercalculationset} + +%D \macros +%D {doPDFdestination} + +\def\doPDFdestination name #1% + {\special{pdf: dest (#1) [@thispage /View [/Fit]]}} + +%D \macros +%D {doPDFaction,doPDFannotation,ifsharePDFactions} +%D +%D Sharing is not yet supported. + +\newif\ifsharePDFactions \sharePDFactionsfalse + +\def\doPDFaction width #1 height #2 action #3% + {\ifcase\similarreference\relax + \xdef\lastPDFaction{<<#3>>}% + \or + \ifsharePDFactions + \immediate\pdfobj{<<#3>>}\xdef\lastPDFaction{\the\pdflastobj\space0 R}% + \else + \xdef\lastPDFaction{<<#3>>}% + \fi + \fi + \ifcollectreferenceactions \else + \bgroup + \scratchdimen=#1sp\edef\width {\the\scratchdimen\space}% + \scratchdimen=#2sp\edef\height{\the\scratchdimen\space}% + \special{pdf: ann width \width height \height + <</Subtype /Link /Border [0 0 0] + \ifhighlighthyperlinks \else /H /N \fi + /A \lastPDFaction>>}% + \egroup + \fi} + +\def\doPDFannotation width #1 height #2 data #3% + {\bgroup + \scratchdimen=#1sp\edef\width {\the\scratchdimen\space}% + \scratchdimen=#2sp\edef\height{\the\scratchdimen\space}% + \special{pdf: ann width \width height \height + <</Subtype /Link /Border [0 0 0] /A <<#3>>}% + \egroup} + +%D \macros +%D {doPDFannotationobject} + +\def\doPDFannotationobject class #1 name #2 width #3 height #4 data #5% + {\bgroup + \scratchdimen=#3sp\edef\width {\the\scratchdimen\space}% + \scratchdimen=#4sp\edef\height{\the\scratchdimen\space}% + \special{pdf: ann @#1::#2 width \width height \height <<#5>>}% + \dosetobjectreference{#1}{#2}{@#1::#2}% + \egroup} + +%D \macros +%D {doPDFaddtocatalog,doPDFpageattribute,doPDFpagesattribute} + +\def\doPDFaddtocatalog#1% + {\special{pdf: put @catalog <<#1>>}} + +\def\doPDFpageattribute#1% + {\special{pdf: put @thispage <<#1>>}} + +\def\doPDFpagesattribute#1% + {\special{pdf: put @pages <<#1>>}} + +\let\doPDFresetpageattributes=\relax + +%D \macros +%D {doPDFbookmark} + +\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)>>}% + \fi} + +%D \macros +%D {doPDFdictionaryobject,doPDFarrayobject} + +\def\doPDFdictionaryobject class #1 name #2 data #3% + {\special{pdf: object @#1::#2 <<#3>>}} + +\def\doPDFarrayobject class #1 name #2 data #3% + {\special{pdf: object @#1::#2 [#3]}} + +%D \macros +%D {defaultobjectreference,doPDFgetobjectreference} + +\def\defaultobjectreference#1#2{#1::#2} + +\def\doPDFgetobjectreference#1#2#3% + {\dogetobjectreference{#1}{#2}#3% + \ifx#3\empty\else\edef#3{{#3}}\fi} + +%D Done. + +\stopspecials + +\protect + +\endinput diff --git a/tex/context/base/spec-dvi.tex b/tex/context/base/spec-dvi.tex index ad80d2ee1..7951e20b3 100644 --- a/tex/context/base/spec-dvi.tex +++ b/tex/context/base/spec-dvi.tex @@ -97,7 +97,7 @@ {\special{pos:papersize #1 #2}% \global\noexpand\let\noexpand\flushDVIpositionpapersize\relax}} -\prependtoks \flushDVIpositionpapersize \to \everyshipout +\prependtoksonce \flushDVIpositionpapersize \to \everyshipout \stopspecials diff --git a/tex/context/base/spec-fdf.tex b/tex/context/base/spec-fdf.tex index 0150390a3..22880a2ff 100644 --- a/tex/context/base/spec-fdf.tex +++ b/tex/context/base/spec-fdf.tex @@ -125,7 +125,9 @@ \let\doPDFresetpageattributes=\relax -\appendtoks\doPDFresetpageattributes\to\everyshipout +\appendtoksonce + \doPDFresetpageattributes +\to \everyshipout \ifx\PDFcode\undefined \ifx\pdfliteral\undefined @@ -163,13 +165,13 @@ \global\let\currentPDFcropbox \empty \global\let\currentPDFpagemode\empty -\appendtoks % hack to prevent duplicates +\appendtoksonce % hack to prevent duplicates \ifcase\realfolio\or\doPDFaddtocatalog{\currentPDFpagemode}\fi -\to\everyshipout +\to \everyshipout -\appendtoks +\appendtoksonce \doPDFpageattribute{\currentPDFcropbox}% -\to\everyshipout +\to \everyshipout %D \macros %D {doPDFsetupopenaction,doPDFsetupcloseaction, @@ -208,7 +210,9 @@ \global\let\PDFopenpageaction \empty \global\let\PDFclosepageaction\empty} -\appendtoks \checkPDFpageactions \to \everyshipout +\appendtoksonce + \checkPDFpageactions +\to \everyshipout %D \macros %D {doPDFstartthisislocation} @@ -376,7 +380,8 @@ \def\PDFexecutegotopage {/Named /N /GoToPage} \def\PDFexecutequery {/Named /N /AcroSrch:Query} \def\PDFexecutequeryagain {/Named /N /AcroSrch:NextHit} - +\def\PDFexecutefitwidth {/Named /N /FitWidth} +\def\PDFexecutefitheight {/Named /N /FitHeight} \def\doPDFstartexecutecommand#1#2#3#4% {\doifdefined{PDFexecute#3} @@ -506,16 +511,19 @@ \ScaledPointsToBigPoints{#7}\width \ScaledPointsToBigPoints{#8}\height \let\pdf@@options\empty - \def\pdf@@actions{/ShowControls false }% + \let\pdf@@actions\empty + \donefalse \@EA\processallactionsinset\@EA [#9] - [\v!herhaal=>\edef\pdf@@actions{\pdf@@actions /Mode /Repeat }, + [\v!sturing=>\donetrue, + \v!herhaal=>\edef\pdf@@actions{\pdf@@actions /Mode /Repeat }, \v!preview=>\edef\pdf@@options{\pdf@@options /Poster true }]% + \edef\pdf@@actions{\pdf@@actions /ShowControls \ifdone true\else false\fi}% \doPDFannotation width #7 height #8 data {/Subtype /Movie /T (movie \currentmovie) /Movie << /F (#1) /Aspect [\width\space\height] \pdf@@options >> - /A << \pdf@@actions>>}% + /A << \pdf@@actions >>}% \egroup} %D \macros @@ -838,7 +846,7 @@ {\FDFcollection\space\PDFobjectreference}% \fi} -\prependtoks \flushFDFnames \to \everylastshipout % test \everybye +\prependtoksonce \flushFDFnames \to \everylastshipout % test \everybye %D \macros %D {defineFDFfonts, @@ -952,20 +960,20 @@ \def\PDFpageviewwrd{ /Fit} \def\PDFpageview {/View [\PDFpageviewwrd] } -\definespecial\dosetuppageview#1% - {%\processaction - % [#1] - % [\v!passend=>\def\PDFpageviewkey{ fit}% - % \def\PDFpageviewwrd{ /Fit}, - % \v!breedte=>\def\PDFpageviewkey{ fith}% % watch the v-h - % \def\PDFpageviewwrd{ /FitH}, % swapping here - % \v!hoogte=>\def\PDFpageviewkey{ fitv}% % and here and - % \def\PDFpageviewwrd{ /FitV}, % here too - % \v!geen=>\def\PDFpageviewkey{ xyz}% - % \def\PDFpageviewwrd{ /XYZ 0 0 0}, - % \s!unknown=>\def\PDFpageviewkey{ fitv}% - % \def\PDFpageviewwrd{ /FitV}]% - }%\edef\PDFpageview{/View [\PDFpageviewwrd] }} +\def\dosetuppageview#1% + {\processaction + [#1] + [\v!passend=>\def\PDFpageviewkey{ fit}% + \def\PDFpageviewwrd{ /Fit}, + \v!breedte=>\def\PDFpageviewkey{ fith}% % watch the v-h + \def\PDFpageviewwrd{ /FitH}, % swapping here + \v!hoogte=>\def\PDFpageviewkey{ fitv}% % and here and + \def\PDFpageviewwrd{ /FitV}, % here too +% \v!standaard=>\def\PDFpageviewkey{ xyz 0 0 0}% +% \def\PDFpageviewwrd{ /XYZ 0 0 0}, + \s!unknown=>\def\PDFpageviewkey{ fit}% + \def\PDFpageviewwrd{ /Fit}]% + \edef\PDFpageview{/View [\PDFpageviewwrd]}} %D \macros %D {setFDFkids} @@ -1511,8 +1519,10 @@ \newevery\everysetfield\relax -\appendtoks \enablePDFdocencoding \to \everysetfield -\appendtoks \enablePDFcrlf \to \everysetfield +\appendtoksonce + \enablePDFdocencoding + \enablePDFcrlf +\to \everysetfield %D \macros %D {doPDFinsertcomment} @@ -1543,7 +1553,7 @@ {\vfill \doPDFannotation width #2 height #3 data {/Subtype /Text - \ifcase#5 \else/Open false\fi + \ifcase#5 \else/Open true\fi /Contents (\PDFdata) \PDFcomment \PDFidentifier diff --git a/tex/context/base/spec-ini.tex b/tex/context/base/spec-ini.tex index 8e4586f72..ffa0b8014 100644 --- a/tex/context/base/spec-ini.tex +++ b/tex/context/base/spec-ini.tex @@ -88,6 +88,17 @@ 7: ukjent driver -- \stopmessages +\startmessages romanian library: specials + title: specials + 1: -- incarcat + 2: nu este permis un nivel de imbricare mai mare -- + 3: -- s-a resetat + 4: comanda -- nu exista + 5: se incarca fisierul de definitii -- + 6: imbricarea nu este permisa + 7: driver necunoscut -- +\stopmessages + \startmessages dutch library: interactions 21: -- code tussengevoegd \stopmessages @@ -112,6 +123,10 @@ 21: -- kode satt inn / tilføyd \stopmessages +\startmessages romanian library: interactions + 21: -- cod inserat +\stopmessages + %D \TEX\ produces files in the \DVI\ format. This format is %D well defined and stable. In this format one||byte commands %D are used which can optionally be followed by length @@ -155,7 +170,9 @@ \def\jobsuffix{dvi} -\appendtoks \def\jobsuffix{dvi} \to \everyresetspecials +\appendtoksonce + \def\jobsuffix{dvi}% +\to \everyresetspecials %D A rather fundamental difference between special and direct %D settings is that the latter don't interfere with typesetting @@ -165,7 +182,9 @@ \newif\ifspecialbasedsettings \specialbasedsettingstrue -\appendtoks \specialbasedsettingstrue \to \everyresetspecials +\appendtoksonce + \specialbasedsettingstrue +\to \everyresetspecials %D Because there is no standardization in the use of specials, %D more than one driver or program can be supported. The @@ -415,51 +434,118 @@ %D additions however |<|like the specials that implement object %D handling|>| asked for non||grouped execution. -\def\executespecials#1#2% - {\def\doonespecial##1% - {\getvalue{##1\string#1}#2\relax}% - \processcommacommand - [\getvalue{\@@speclst@@\string#1}]\doonespecial} +%D \starttypen +%D \def\executespecials#1#2% +%D {\def\doonespecial##1% +%D {\getvalue{##1\string#1}#2\relax}% +%D \processcommacommand +%D [\getvalue{\@@speclst@@\string#1}]\doonespecial} +%D +%D \def\executespecial#1% +%D {\expandafter\ifcase\getvalue{\@@specarg@@\string#1}\relax +%D \def\next% +%D {\executespecials#1{}}% +%D \or +%D \def\next##1% +%D {\executespecials#1{{##1}}}% +%D \or +%D \def\next##1##2% +%D {\executespecials#1{{##1}{##2}}}% +%D \or +%D \def\next##1##2##3% +%D {\executespecials#1{{##1}{##2}{##3}}}% +%D \or +%D \def\next##1##2##3##4% +%D {\executespecials#1{{##1}{##2}{##3}{##4}}}% +%D \or +%D \def\next##1##2##3##4##5% +%D {\executespecials#1{{##1}{##2}{##3}{##4}{##5}}}% +%D \or +%D \def\next##1##2##3##4##5##6% +%D {\executespecials#1{{##1}{##2}{##3}{##4}{##5}{##6}}}% +%D \or +%D \def\next##1##2##3##4##5##6##7% +%D {\executespecials#1{{##1}{##2}{##3}{##4}{##5}{##6}{##7}}}% +%D \or +%D \def\next##1##2##3##4##5##6##7##8% +%D {\executespecials#1{{##1}{##2}{##3}{##4}{##5}{##6}{##7}{##8}}}% +%D \or +%D \def\next##1##2##3##4##5##6##7##8##9% +%D {\executespecials#1{{##1}{##2}{##3}{##4}{##5}{##6}{##7}{##8}{##9}}}% +%D \else +%D \def\next% +%D {\message{illegal special: \string#1}}% +%D \fi +%D \next} +%D \stoptypen +%D +%D Because specials happen quite often, we will use a bit more +%D brute force. Keep in mind that we have to collect the +%D arguments because we want to support more drivers at once. +%D +%D I tested this on the next test. Where the previous alternative +%D took about 32 seconds, the new alternative takes 25 seconds. +%D +%D \starttypen +%D \testfeature{10000}{\setbox0=\hbox{test \color[red]{oeps} test}} +%D \stoptypen + +\def\@@exsp{exsp} + +\setvalue{\@@exsp0}{{}} +\setvalue{\@@exsp1}#1{{{#1}}} +\setvalue{\@@exsp2}#1#2{{{#1}{#2}}} +\setvalue{\@@exsp3}#1#2#3{{{#1}{#2}{#3}}} +\setvalue{\@@exsp4}#1#2#3#4{{{#1}{#2}{#3}{#4}}} +\setvalue{\@@exsp5}#1#2#3#4#5{{{#1}{#2}{#3}{#4}{#5}}} +\setvalue{\@@exsp6}#1#2#3#4#5#6{{{#1}{#2}{#3}{#4}{#5}{#6}}} +\setvalue{\@@exsp7}#1#2#3#4#5#6#7{{{#1}{#2}{#3}{#4}{#5}{#6}{#7}}} +\setvalue{\@@exsp8}#1#2#3#4#5#6#7#8{{{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}}} +\setvalue{\@@exsp9}#1#2#3#4#5#6#7#8#9{{{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}{#9}}} + +%D \starttypen +%D \def\executespecials#1% +%D {\def\doonespecial##1% +%D {\csname##1\xspecialcommand\endcsname#1\relax}% +%D \@EA\rawprocesscommalist\@EA +%D [\csname\@@speclst@@\xspecialcommand\endcsname]\doonespecial} +%D +%D \def\executespecial#1% +%D {\def\xspecialcommand{\string#1}% +%D \@EA\@EA\@EA\executespecials\csname\@@exsp\csname\@@specarg@@\xspecialcommand\endcsname\endcsname} +%D \stoptypen + +%D Some more speed can be gained by using a dedicated string +%D processing routine. Now we can bring down the execution +%D time to 21 seconds, one third less than the original run time. + +\def\executespecials#1% + {\@EA\let\@EA\speciallist\csname\@@speclst@@\xspecialcommand\endcsname + \ifx\speciallist\empty\else + \def\doonespecial##1% + {\csname##1\xspecialcommand\endcsname#1\relax}% + \@EA\dodoonespecial\speciallist,\end,% + \fi} \def\executespecial#1% - {\expandafter\ifcase\getvalue{\@@specarg@@\string#1}\relax - \def\next% - {\executespecials#1{}}% - \or - \def\next##1% - {\executespecials#1{{##1}}}% - \or - \def\next##1##2% - {\executespecials#1{{##1}{##2}}}% - \or - \def\next##1##2##3% - {\executespecials#1{{##1}{##2}{##3}}}% - \or - \def\next##1##2##3##4% - {\executespecials#1{{##1}{##2}{##3}{##4}}}% - \or - \def\next##1##2##3##4##5% - {\executespecials#1{{##1}{##2}{##3}{##4}{##5}}}% - \or - \def\next##1##2##3##4##5##6% - {\executespecials#1{{##1}{##2}{##3}{##4}{##5}{##6}}}% - \or - \def\next##1##2##3##4##5##6##7% - {\executespecials#1{{##1}{##2}{##3}{##4}{##5}{##6}{##7}}}% - \or - \def\next##1##2##3##4##5##6##7##8% - {\executespecials#1{{##1}{##2}{##3}{##4}{##5}{##6}{##7}{##8}}}% - \or - \def\next##1##2##3##4##5##6##7##8##9% - {\executespecials#1{{##1}{##2}{##3}{##4}{##5}{##6}{##7}{##8}{##9}}}% - \else - \def\next% - {\message{illegal special: \string#1}}% - \fi - \next} + {\def\xspecialcommand{\string#1}% + \@EA\@EA\@EA\executespecials\csname\@@exsp\csname\@@specarg@@\xspecialcommand\endcsname\endcsname} -%D The \type{{{...}}} are needed because we pass all those -%D arguments to the specials support macro. +\def\dodoonespecial#1,% + {\ifx\end#1\else + \doonespecial{#1}\expandafter\dodoonespecial + \fi} + +%D This kind of saving only shows up when making interative +%D documents with lots of color switches. In such documents +%D tens of thousands of special calls are rather normal. +%D On a 650 Mhz Pentium, the previous test takes 15 seconds +%D less (on about 65 seconds). When processing 2000 page +%D interactive documents this saving can be neglected. + +%D In the previous macros, the \type{{{...}}} are needed +%D because we pass all those arguments to the specials support +%D macro. \let\openspecialfile = \relax \let\closespecialfile = \relax @@ -605,22 +691,12 @@ %D \NC \tttf spec-pdf \NC %D \tttf pdf \NC %D \NC -%D Adobe PDF V2.1 \NC +%D Adobe PDF \NC %D (Acrobat) \NC\MR %D \NC \tttf spec-win \NC %D \tttf dviwindo \NC %D YandY \NC %D (dviwindo) \NC\MR -%D \NC \tttf spec-1p0 \NC -%D \tttf pdf \NC -%D \NC -%D Adobe PDF V 1.0 \NC -%D (Acrobat) \NC\MR -%D \NC \tttf spec-2p0 \NC -%D \tttf pdf \NC -%D \NC -%D Adobe PDF V 2.0 \NC -%D (Acrobat) \NC\MR %D \NC \tttf spec-htm \NC %D \tttf html \NC %D \NC @@ -771,9 +847,9 @@ %D and for special applications, one may want to have access %D to the total number of pages. %D -%D \starttyping +%D \starttypen %D \dogetnofinsertpages{filename} -%D \stoptyping +%D \stoptypen %D %D The number is also available after the insert is placed, %D since inclusion may take place immediate when an insert is diff --git a/tex/context/base/spec-tpd.tex b/tex/context/base/spec-tpd.tex index d7059a8b5..14b5528b0 100644 --- a/tex/context/base/spec-tpd.tex +++ b/tex/context/base/spec-tpd.tex @@ -8,8 +8,8 @@ %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 \macros %D {jobsuffix} @@ -37,37 +37,37 @@ %D \PDFTEX\ primitives are permitted. If no primitives are %D available, we just stop reading any further. -\unprotect +\unprotect -\ifx\pdftexversion\undefined +\ifx\pdftexversion\undefined \writestatus{\m!systems}{you should use pdfTeX binaries}\wait - \protect\expandafter\endinput + \protect\expandafter\endinput \fi \ifnum\pdftexversion<13 \writestatus{\m!systems}{your pdfTeX version is much too old}\wait - \protect\expandafter\endinput + \protect\expandafter\endinput \fi \ifnum\pdftexversion<14 \writestatus{\m!systems}{please update your pdfTeX binaries} \fi -%D We default to 300 dots per inch image resolution. +%D We default to 300 dots per inch image resolution. -\ifx\pdfimageresolution\undefined +\ifx\pdfimageresolution\undefined \newcount\pdfimageresolution \fi \pdfimageresolution=300 -%D Another downward compatible hack: +%D Another downward compatible hack: -\ifx\pdflastximagepages\undefined +\ifx\pdflastximagepages\undefined \newcount\pdflastximagepages \pdflastximagepages=1 \fi -% %D Why are the Acrobat viewers so buggy? To prevent font cache +% %D Why are the Acrobat viewers so buggy? To prevent font cache % %D mismatches, we say: % % \ifx\pdfuniqueresname\undefined \else @@ -80,9 +80,9 @@ %D make sure no other specials are supported, else \PDFTEX\ %D will keep on telling us that we're wrong. We also load the %D general \PDF\ macros that are shared between this driver and -%D the \ACROBAT\ one. +%D the \ACROBAT\ one. -\startspecials[tpd][reset,fdf] +\startspecials[tpd][reset,fdf] %D This means that by saying %D @@ -92,29 +92,34 @@ %D %D we get ourselves full \PDF\ output. -%D For some internal testing we need to know the output -%D suffix. +%D For some internal testing we need to know the output +%D suffix. -\def\jobsuffix{pdf} +\def\jobsuffix{pdf} %D We don't use specials here, which means that we must flush -%D settings before the page is shipped out. +%D settings before the page is shipped out. \specialbasedsettingsfalse -%D Some more internal settings. +%D Some more internal settings. -\appendtoks \pdfoutput=0 \to \everyresetspecials +\appendtoksonce + \pdfoutput=0 +\to \everyresetspecials \pdfoutput =1 % we reset that one with \everyresetspecials \pdfcompresslevel=9 % apart from debugging, no reason for value 0 +\pdfdecimaldigits=5 % otherwise wrong rounding for mp stuff %D Just in case we mimmick specials, we have to make sure no %D default specials end up in the process. \let\defaultspecial=\gobbleoneargument -\appendtoks \let\defaultspecial\normalspecial \to \everyresetspecials +\appendtoksonce + \let\defaultspecial\normalspecial +\to \everyresetspecials \let\PDFcode\pdfliteral @@ -126,7 +131,7 @@ \definespecial\dosetuppaper#1#2#3% {\global\pdfpagewidth =#2\relax - \global\pdfpageheight=#3\relax} + \global\pdfpageheight=#3\relax} %D \macros %D {doinsertfile,dogetnofinsertpages} @@ -154,17 +159,17 @@ \dodoinsertfile{tpd}{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}{#9}% \egroup} -%D The number of pages in (for instance an \PDF) insert -%D file, can be asked for using: +%D The number of pages in (for instance an \PDF) insert +%D file, can be asked for using: -\definespecial\dogetnofinsertpages#1% - {\xdef\nofinsertpages{1}% global +\definespecial\dogetnofinsertpages#1% + {\xdef\nofinsertpages{1}% global \doifvalidpdfimagefileelse{#1}% {\pdfximage{#1}\xdef\nofinsertpages{\the\pdflastximagepages}} {}} %D Currently we support \type{pdf} for \PDF\ files, \type{mps} -%D for \METAPOST\ graphics, \type{png} and \type{jpg} for +%D for \METAPOST\ graphics, \type{png} and \type{jpg} for %D bitmap graphics. \definefileinsertion{tpd}{mps}#1#2#3#4#5#6#7#8#9% @@ -176,7 +181,7 @@ \global\let\PDFimagereference\empty}} %D The old, \TEX\ base \PDF\ insertion macro: -%D +%D %D \starttypen %D \def\dotpdinsertpdf#1#2#3#4#5#6#7#8#9% %D {\beforesplitstring#1\at.\to\filename @@ -184,17 +189,17 @@ %D \scratchdimen=#4pt \PointsToReal{.01\scratchdimen}\yscale %D \convertPDFtoPDF{\filename.pdf}\xscale\yscale{#5sp}{#6sp}{#7sp}{#8sp}} %D \stoptypen -%D -%D superseded by the next macros. +%D +%D superseded by the next macros. \definefileinsertion{tpd}{pdf}{\handlepdfimage} \definefileinsertion{tpd}{png}{\handlepdfimage} \definefileinsertion{tpd}{jpg}{\handlepdfimage} -%definefileinsertion{tpd}{tif}{\handlepdfimage} % unstable +%definefileinsertion{tpd}{tif}{\handlepdfimage} % unstable -%D The main file insertion macro is as follows. Because -%D \PDFTEX\ does not support arbitrary suffixes, we double -%D check on a user supplied filename, because \PDFTEX\ chokes +%D The main file insertion macro is as follows. Because +%D \PDFTEX\ does not support arbitrary suffixes, we double +%D check on a user supplied filename, because \PDFTEX\ chokes %D on unknown suffixes. \def\doifvalidpdfimagefileelse#1% @@ -209,7 +214,7 @@ % a temporary hack \doif{\filesuffix}{PDF}{\pdfimageresolution=72}% \doif{\filesuffix}{pdf}{\pdfimageresolution=72}% - % because pdfTeX scales back + % because pdfTeX scales back \fi}} {\let\filesuffix\s!unknown}% \doiffileinsertionsupportedelse{\filesuffix}} @@ -224,7 +229,7 @@ \doifnumberelse{\commalistelement} {\ifcase\commalistelement\else \edef\pdfimagepagenumber{page \commalistelement}% - \message{(pdf image \pdfimagepagenumber)}% + \message{(pdf image \pdfimagepagenumber)}% \fi} {}} @@ -257,34 +262,34 @@ \fi -%D As we will see now, \PDFTEX\ not only directly supports -%D \type{mps}, \type{png}, \type{pdf}, \type{jpg} but also +%D As we will see now, \PDFTEX\ not only directly supports +%D \type{mps}, \type{png}, \type{pdf}, \type{jpg} but also %D \type{mov}. In \CONTEXT\ we support movie inserts in a way -%D similar to figure inclusion. The next macro calls the +%D similar to figure inclusion. The next macro calls the %D general \PDF\ one. \definefileinsertion{tpd}{mov}{\doPDFinsertmov} \definefileinsertion{tpd}{avi}{\doPDFinsertmov} -%D \macros +%D \macros %D {doinsertsoundtrack} %D -%D We use numbers instead of labels to keep track of sounds. +%D We use numbers instead of labels to keep track of sounds. \definespecial\doinsertsoundtrack{\doPDFinsertsoundtrack} -%D \macros +%D \macros %D {measureTPDfiguresizetrue} %D -%D Because \PDFTEX\ measures the figure itself, we can use -%D this feature to bypass the normal prescan. Watch the -%D double check on the suffix. Else \PDFTEX\ would choke. +%D Because \PDFTEX\ measures the figure itself, we can use +%D this feature to bypass the normal prescan. Watch the +%D double check on the suffix. Else \PDFTEX\ would choke. -\newif\ifmeasureTPDfiguresize \measureTPDfiguresizetrue +\newif\ifmeasureTPDfiguresize \measureTPDfiguresizetrue %D For the moment we don't test for alternatives that %D themselves have alternatives, especially cylcic -%D dependencies. +%D dependencies. \ifnum\pdftexversion>13 @@ -360,21 +365,23 @@ \def\dogetfiguresizetif{\dogetTPDfiguresize\normaldogetfiguresizetif} \def\dogetfiguresizejpg{\dogetTPDfiguresize\normaldogetfiguresizejpg} -\appendtoks \let\dogetfiguresizepdf\normaldogetfiguresizepdf \to \everyresetspecials -\appendtoks \let\dogetfiguresizepng\normaldogetfiguresizepng \to \everyresetspecials -\appendtoks \let\dogetfiguresizetif\normaldogetfiguresizetif \to \everyresetspecials -\appendtoks \let\dogetfiguresizejpg\normaldogetfiguresizejpg \to \everyresetspecials +\appendtoksonce + \let\dogetfiguresizepdf\normaldogetfiguresizepdf + \let\dogetfiguresizepng\normaldogetfiguresizepng + \let\dogetfiguresizetif\normaldogetfiguresizetif + \let\dogetfiguresizejpg\normaldogetfiguresizejpg +\to \everyresetspecials %D \macros %D {doregisterfigure} %D -%D Here is the fuzzy, very special dependant figure -%D registration special. We need to refer to the innermost -%D object (ximage). +%D Here is the fuzzy, very special dependant figure +%D registration special. We need to refer to the innermost +%D object (ximage). -\ifnum\pdftexversion>13 +\ifnum\pdftexversion>13 - \definespecial\doregisterfigure#1#2% + \definespecial\doregisterfigure#1#2% {\doifundefined{IM::#1::#2} {\setxvalue{IM::#1::#2}{\the\pdflastximage}}% \xdef\PDFfigurereference{\getvalue{IM::#1::#2}}} @@ -384,8 +391,8 @@ %D \macros %D {doovalbox} %D -%D Drawing frames with round corners is inherited from the -%D main module. +%D Drawing frames with round corners is inherited from the +%D main module. \definespecial\doovalbox% {\doPDFovalbox} @@ -395,11 +402,11 @@ %D dostartrgbcolormode,dostartcmykcolormode,dostartgraycolormode, %D dostopcolormode, %D dostartrotation,dostoprotation, -%D dostartscaling,dostopscaling, -%D dostartmirroring,dostopmirroring, -%D dostartnegative,dostopnegative} +%D dostartscaling,dostopscaling, +%D dostartmirroring,dostopmirroring, +%D dostartnegative,dostopnegative} %D -%D These are implemented in the main \PDF\ module. +%D These are implemented in the main \PDF\ module. \definespecial\dostartgraymode {\doPDFstartgraymode} \definespecial\dostopgraymode {\doPDFstopgraymode} @@ -407,26 +414,26 @@ \definespecial\dostartcmykcolormode {\doPDFstartcmykcolormode} \definespecial\dostartgraycolormode {\doPDFstartgraycolormode} \definespecial\dostopcolormode {\doPDFstopcolormode} -\definespecial\dostartrotation {\doPDFstartrotation} -\definespecial\dostoprotation {\doPDFstoprotation} -\definespecial\dostartscaling {\doPDFstartscaling} -\definespecial\dostopscaling {\doPDFstopscaling} -\definespecial\dostartmirroring {\doPDFstartmirroring} -\definespecial\dostopmirroring {\doPDFstopmirroring} -\definespecial\dostartnegative {\doPDFstartnegative} -\definespecial\dostopnegative {\doPDFstopnegative} - -%D \macros +\definespecial\dostartrotation {\doPDFstartrotation} +\definespecial\dostoprotation {\doPDFstoprotation} +\definespecial\dostartscaling {\doPDFstartscaling} +\definespecial\dostopscaling {\doPDFstopscaling} +\definespecial\dostartmirroring {\doPDFstartmirroring} +\definespecial\dostopmirroring {\doPDFstopmirroring} +\definespecial\dostartnegative {\doPDFstartnegative} +\definespecial\dostopnegative {\doPDFstopnegative} + +%D \macros %D {dostartclipping,dostopclipping} %D -%D Clipping in \PDFTEX\ is rather trivial. We can even hook -%D in \METAPOST\ without problems. +%D Clipping in \PDFTEX\ is rather trivial. We can even hook +%D in \METAPOST\ without problems. \definespecial\dostartclipping#1#2#3% {\ScaledPointsToBigPoints{#2}\width \ScaledPointsToBigPoints{#3}\height \grabMPclippath{#1}{1}{\width}{\height} - {0 0 m \width\space 0 l \width \height l 0 \height l}% + {0 0 m \width\space 0 l \width \height l 0 \height l}% \pdfliteral {q 0 w \MPclippath\space W n}} @@ -477,9 +484,9 @@ %D with the \ACROBAT\ one, simply because \DISTILLER\ does not %D yet support something \type{\pdfnames}. -% \oneJSpreamblefalse % buggy in acrobat +% \oneJSpreamblefalse % buggy in acrobat -\definespecial\doflushJSpreamble#1% +\definespecial\doflushJSpreamble#1% {\bgroup \let\compositeJScode=\empty \def\docommando##1% @@ -534,7 +541,7 @@ {\bgroup \enablePDFdocencoding \pdfinfo - {%Producer (pdfTeX) % already there + {%Producer (pdfTeX) % already there /Title (#1) /Subject (#2) /Author (#3) @@ -568,10 +575,10 @@ \definespecial\dobeginofprofile#1#2#3#4% {\setPDFdestination{#1}% \doifsomething{\PDFdestination} - {\pdfthread - width #2sp height #3sp - attr {/Title (\PDFdestination)} % can be omitted - name {\PDFdestination}}} + {\pdfthread + width #2sp height #3sp + attr {/Title (\PDFdestination)} % can be omitted + name {\PDFdestination}}} \definespecial\doendofprofile% {} @@ -613,8 +620,8 @@ %D \type{FIG} trigger, that signals that we just embedded an %D image. Alternatively I could have introduced a dual object %D system, but the overhead in duplicate specials is currently -%D not what we want. I'd rather implement a more mature -%D object support system from scratch. +%D not what we want. I'd rather implement a more mature +%D object support system from scratch. \let\currentPDFresources\empty \let\PDFimageattributes \empty @@ -623,7 +630,7 @@ \ifnum\pdftexversion>13 - \definespecial\dostartobject#1#2#3#4#5% + \definespecial\dostartobject#1#2#3#4#5% {\bgroup \setbox\nextbox=\vbox\bgroup \def\dodostopobject% @@ -641,7 +648,7 @@ {\dodostopobject \egroup} - \definespecial\doinsertobject#1#2% + \definespecial\doinsertobject#1#2% {\bgroup \doifobjectreferencefoundelse{#1}{#2} {\dogetobjectreference{#1}{#2}\PDFobjectreference @@ -655,19 +662,19 @@ \else - \definespecial\dostartobject#1#2#3#4#5% + \definespecial\dostartobject#1#2#3#4#5% {\bgroup \setbox\nextbox=\vbox\bgroup \def\dodostopobject% {\egroup \pdfform\nextbox \dosetobjectreference{#1}{#2}{\the\pdflastform}}} - + \definespecial\dostopobject% {\dodostopobject \egroup} - \definespecial\doinsertobject#1#2% + \definespecial\doinsertobject#1#2% {\bgroup \dogetobjectreference{#1}{#2}\PDFobjectreference \pdfrefform\PDFobjectreference @@ -691,7 +698,7 @@ %D place deeply buried (for instance in the \type{\shipout} %D box. -%D \macros +%D \macros %D {doinsertcomment} %D %D Text annotation, or comments, are provided too: @@ -719,8 +726,8 @@ %D \macros %D {dodefinefieldset,dogetfieldset,doiffieldset} -%D -%D Field sets, needed for reset and submit handling, are +%D +%D Field sets, needed for reset and submit handling, are %D taken care of by: \definespecial\dodefinefieldset{\doFDFdefinefieldset} @@ -729,18 +736,18 @@ %D \macros %D {doregistercalculationset} -%D -%D The calculation order is defined using: +%D +%D The calculation order is defined using: \definespecial\doregistercalculationset{\doFDFregistercalculationset} -%D \macros +%D \macros %D {dosetposition, dosetpositionwdh} %D -%D Opposite to its \DVI\ counterpart, the \PDFTEX\ backend -%D can provide positional information directly. Since -%D \CONTEXT\ only uses relative positions, the origin is of -%D less importance. +%D Opposite to its \DVI\ counterpart, the \PDFTEX\ backend +%D can provide positional information directly. Since +%D \CONTEXT\ only uses relative positions, the origin is of +%D less importance. \def\doTPDsetposition#1#2#3% {\bgroup @@ -762,7 +769,7 @@ \definespecial\dosetpositionwhd#1#2#3#4% {\doTPDsetposition{\pospxywhd}{#1}{{#2}{#3}{#4}}} -%D \macros +%D \macros %D {doPDFdestination} %D %D Finally we implement some low level macros to deal with @@ -771,17 +778,17 @@ \def\doPDFdestination name #1% {\pdfdest name {#1}\PDFpageviewkey} -%D \macros -%D {doPDFaction,doPDFannotation,ifsharePDFactions} -%D +%D \macros +%D {doPDFaction,doPDFannotation,ifsharePDFactions} +%D %D Next we handle annotations. All link annotations are %D implemented using the action dictionary. This enables us to -%D use multiple actions. The second macro is for instance -%D used for movie inclusion. +%D use multiple actions. The second macro is for instance +%D used for movie inclusion. \newif\ifsharePDFactions \sharePDFactionstrue -\ifnum\pdftexversion>13 +\ifnum\pdftexversion>13 \def\doPDFaction width #1 height #2 action #3% {\ifcase\similarreference\relax @@ -797,8 +804,8 @@ \ifcollectreferenceactions \else \pdfannot width #1sp height #2sp depth 0sp - {/Subtype /Link - /Border [0 0 0] + {/Subtype /Link + /Border [0 0 0] \ifhighlighthyperlinks \else /H /N \fi /A \lastPDFaction}% \fi} @@ -819,8 +826,8 @@ \ifcollectreferenceactions \else \pdfannotlink % could be \pdfannot if not the - problem was there width #1sp height #2sp depth 0sp - user {/Subtype /Link - /Border [0 0 0] + user {/Subtype /Link + /Border [0 0 0] \ifhighlighthyperlinks \else /H /N \fi /A \lastPDFaction}% \pdfendlink @@ -848,13 +855,13 @@ \fi -%D \macros -%D {doPDFannotationobject} +%D \macros +%D {doPDFannotationobject} %D %D For field support we need annotation objects. Although in %D many cases we can do without indirect references (and use -%D the last annotation object number directly), we take the -%D save route. +%D the last annotation object number directly), we take the +%D save route. %\def\doPDFannotationobject class #1 name #2 width #3 height #4 data #5% % {\pdfannot width #3sp height -#4sp depth 0sp {#5}% @@ -864,11 +871,11 @@ {\doPDFannotation width #3 height #4 data {#5}% \dosetobjectreference{#1}{#2}{\the\pdflastannot}} -%D \macros +%D \macros %D {doPDFaddtocatalog,doPDFpageattribute,doPDFpagesattribute} %D -%D Next some simple ones. Watch the global directive and the -%D expansion in the page attribute macro. +%D Next some simple ones. Watch the global directive and the +%D expansion in the page attribute macro. \def\doPDFaddtocatalog% {\pdfcatalog} @@ -882,13 +889,15 @@ \def\doPDFresetattributes% {\global\pdfpageattr{}} -\appendtoks\doPDFresetattributes\to\everyaftershipout +\appendtoksonce + \doPDFresetattributes +\to \everyaftershipout -%D \macros -%D {doPDFbookmark} +%D \macros +%D {doPDFbookmark} %D -%D Well, isn't the next one ugly? Thanks to the \PDF\ -%D standard. +%D Well, isn't the next one ugly? Thanks to the \PDF\ +%D standard. % obsolete cq. buggy in pdfTeX % @@ -904,11 +913,11 @@ \ifcase#2 \else count \ifcase#5-\fi#2 \fi {#3}} -%D \macros +%D \macros %D {doPDFdictionaryobject,doPDFarrayobject} %D %D Where \PDFTEX\ has only one object primitive, optionally a -%D stream one, \ACROBAT\ has several operators. +%D stream one, \ACROBAT\ has several operators. \def\doPDFdictionaryobject class #1 name #2 data #3% {\flushatshipout @@ -918,12 +927,12 @@ {\flushatshipout {\immediate\pdfobj{[ #3 ]}\dosetobjectreference{#1}{#2}{\the\pdflastobj}}} -%D \macros +%D \macros %D {defaultobjectreference,doPDFgetobjectreference} %D %D Because in \PDFTEX\ we have to construct the object -%D references \type{N 0 R}, we can default to the non existing -%D zero object number. +%D references \type{N 0 R}, we can default to the non existing +%D zero object number. \def\defaultobjectreference#1#2% {0} @@ -934,25 +943,29 @@ %D \macros %D {initializePDFnegative} -%D -%D Here follow some rather obscure macros. They will only -%D come into action when one wants negated output. +%D +%D Here follow some rather obscure macros. They will only +%D come into action when one wants negated output. \let\PDFextgstates\empty \def\initializePDFnegative% - {\bgroup - \pdfcompresslevel=0 - \immediate\pdfobj attr {/FunctionType 4 /Range [0 1] /Domain [0 1]} stream {{1 exch sub}} - \immediate\pdfobj{<</Type /ExtGState /TR \the\pdflastobj\space0 R>>} - \xdef\PDFextgstates{\PDFextgstates/GSnegative \the\pdflastobj\space0 R} - \immediate\pdfobj{<</Type /ExtGState /TR /Identity>>} - \xdef\PDFextgstates{\PDFextgstates/GSpositive \the\pdflastobj\space0 R} + {%\bgroup + %\pdfcompresslevel=0 + \immediate\pdfobj stream attr {/FunctionType 4 /Range [0 1] /Domain [0 1]} {{1 exch sub}}% + \immediate\pdfobj{<</Type /ExtGState /TR \the\pdflastobj\space0 R>>}% + \xdef\PDFextgstates{\PDFextgstates/GSnegative \the\pdflastobj\space0 R}% + \immediate\pdfobj{<</Type /ExtGState /TR /Identity>>}% + \xdef\PDFextgstates{\PDFextgstates/GSpositive \the\pdflastobj\space0 R}% \global\let\initializePDFnegative\relax - \egroup - \expanded{\pdfpageresources{/ExtGState <<\PDFextgstates>>}}} - -%D Now we can finish this module. + %\egroup + \expanded{\global\pdfpageresources{/ExtGState <<\PDFextgstates>>}}} + +% %D We can set \METAPOST\ prologues to~2: + +\def\MPprologues{2} + +%D Now we can finish this module. \stopspecials diff --git a/tex/context/base/spec-yy.tex b/tex/context/base/spec-yy.tex index 31360dc24..e96ff4005 100644 --- a/tex/context/base/spec-yy.tex +++ b/tex/context/base/spec-yy.tex @@ -67,6 +67,9 @@ \dodoinsertfile{yy}{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}{#9}% \egroup} +\def\MPprologues{2} +\def\MPOSTdriver{dvipsone} + \stopspecials \endinput diff --git a/tex/context/base/supp-box.tex b/tex/context/base/supp-box.tex index aa6f3a7d5..0cdf9251b 100644 --- a/tex/context/base/supp-box.tex +++ b/tex/context/base/supp-box.tex @@ -21,9 +21,12 @@ %D First a hack to make this module loadable in plain \TEX. -\ifx\outer\relax \else +\ifx\myalloc@\undefined % seems like we're not in context \def\newbox{\alloc@4\box\chardef\insc@unt} \fi + +\ifx \scratchbox\undefined \newbox \scratchbox \fi +\ifx\globalscratchbox\undefined \newbox\globalscratchbox \fi %D \macros %D {nextdepth} @@ -397,15 +400,70 @@ {\kern\shapekern} {\vskip\shapeskip}} +%\def\doreshapebox#1#2#3#4% \shapebox, \shapepenalty, \shapekern, \shapeskip +% {\setbox\newshapebox=\normalvbox +% \bgroup +% \unvcopy\oldshapebox +% \setbox\newshapebox=\box\voidb@x +% \shapecounter=0 +% \doloop{\dodoreshapebox{#1}{#2}{#3}{#4}}% +% \unvbox\newshapebox +% \egroup} +% +%\def\dodoreshapebox#1#2#3#4% \shapebox, \shapepenalty, \shapekern, \shapeskip +% {\ifdim\lastskip=\!!zeropoint\relax +% \ifdim\lastkern=\!!zeropoint\relax +% \ifnum\lastpenalty=0 +% \setbox\shapebox=\lastbox +% \ifvoid\shapebox +% \unskip\unpenalty\unkern +% \else +% \ifdim\wd\shapebox=\shapesignal\relax +% \exitloop +% \else +% \shapecounter=0 +% \setbox\newshapebox= +% \normalvbox{#1\unvbox\newshapebox} +% \fi +% \fi +% \else +% \shapepenalty=\lastpenalty +% \setbox\newshapebox= +% \normalvbox{#2\unvbox\newshapebox} +% \unpenalty +% \fi +% \else +% \shapekern=\lastkern +% \setbox\newshapebox= +% \normalvbox{#3\unvbox\newshapebox} +% \unkern +% \fi +% \else +% \shapeskip=\lastskip +% \setbox\newshapebox= +% \normalvbox{#4\unvbox\newshapebox} +% \unskip +% \fi +% \ifnum\shapecounter>100 % can be less +% \message{<<forced exit from shapebox>>}% +% \exitloop +% \else +% \advance\shapecounter by 1 +% \fi} + +\newbox\tmpshapebox + \def\doreshapebox#1#2#3#4% \shapebox, \shapepenalty, \shapekern, \shapeskip - {\setbox\newshapebox=\normalvbox - \bgroup - \unvcopy\oldshapebox - \setbox\newshapebox=\box\voidb@x - \shapecounter=0 - \doloop{\dodoreshapebox{#1}{#2}{#3}{#4}}% - \unvbox\newshapebox - \egroup} + {\ifdim\ht\oldshapebox=\!!zeropoint + \setbox\newshapebox=\normalvbox{}% + \else + \setbox\newshapebox=\normalvbox + {\unvcopy\oldshapebox + \setbox\newshapebox=\box\voidb@x + \shapecounter=0 + \doloop{\dodoreshapebox{#1}{#2}{#3}{#4}}}% + \setbox\newshapebox\box\tmpshapebox + \fi} \def\dodoreshapebox#1#2#3#4% \shapebox, \shapepenalty, \shapekern, \shapeskip {\ifdim\lastskip=\!!zeropoint\relax @@ -419,40 +477,49 @@ \exitloop \else \shapecounter=0 - \setbox\newshapebox= - \normalvbox{#1\unvbox\newshapebox} + \global\setbox\tmpshapebox= + \normalvbox{#1\unvbox\tmpshapebox} \fi \fi \else \shapepenalty=\lastpenalty - \setbox\newshapebox= - \normalvbox{#2\unvbox\newshapebox} + \global\setbox\tmpshapebox= + \normalvbox{#2\unvbox\tmpshapebox} \unpenalty \fi \else \shapekern=\lastkern - \setbox\newshapebox= - \normalvbox{#3\unvbox\newshapebox} + \global\setbox\tmpshapebox= + \normalvbox{#3\unvbox\tmpshapebox} \unkern \fi \else \shapeskip=\lastskip - \setbox\newshapebox= - \normalvbox{#4\unvbox\newshapebox} + \global\setbox\tmpshapebox= + \normalvbox{#4\unvbox\tmpshapebox} \unskip \fi \ifnum\shapecounter>100 % can be less \message{<<forced exit from shapebox>>}% + \global\setbox\tmpshapebox=\copy\oldshapebox \exitloop \else \advance\shapecounter by 1 \fi} +%\def\beginofshapebox% +% {\setbox\oldshapebox=\normalvbox +% \bgroup +% \reshapingboxtrue +% \hbox to \shapesignal{\hss}} + \def\beginofshapebox% {\setbox\oldshapebox=\normalvbox \bgroup \reshapingboxtrue - \hbox to \shapesignal{\hss}} + \hbox to \shapesignal{\strut\hss} % plus \strut + \prevdepth\dp\strutbox % hm + }%\nointerlineskip} % suppress parskip \def\endofshapebox% {\endgraf @@ -461,8 +528,43 @@ \let\beginshapebox=\beginofshapebox \let\endshapebox =\endofshapebox +%\def\flushshapebox% +% {\ifdim\ht\newshapebox=\!!zeropoint\relax +% \else +% % make \prevdepth legal +% % \par before the next \vskip gives far worse results +% \ifdim\parskip>\!!zeropoint\vskip\parskip\else\par\fi +% % and take a look +% \ifdim\prevdepth=-1000pt +% \prevdepth=\!!zeropoint +% \fi +% \ifdim\prevdepth<\!!zeropoint\relax +% % something like a line or a signal or ... +% \donetrue +% \else\ifinner +% % not watertight and not ok +% \donefalse +% \else\ifdim\pagegoal=\maxdimen +% \donetrue +% \else +% % give the previous line a normal depth +% \donetrue +% \vbox{\forgetall\strut}\nobreak\kern-\lineheight % geen \vskip +% \vskip-\dp\strutbox +% \fi\fi\fi +% \unvcopy\newshapebox\relax +% % \prevdepth=0pt and \dp\newshapebox depend on last line +% \kern-\dp\newshapebox\relax +% % now \prevdepth=0pt +% \ifdone +% \kern\dp\strutbox +% \prevdepth\dp\strutbox +% \fi +% \fi} + \def\flushshapebox% - {\ifdim\ht\newshapebox=\!!zeropoint\relax + {\bgroup + \ifdim\ht\newshapebox=\!!zeropoint\relax \else % make \prevdepth legal % \par before the next \vskip gives far worse results @@ -482,18 +584,22 @@ \else % give the previous line a normal depth \donetrue - \vbox{\forgetall\strut}\nobreak\kern-\lineheight % geen \vskip - \vskip-\dp\strutbox + {\everypar\emptytoks\vbox{\strut}}\nobreak + \kern-\lineheight % geen \vskip + \kern-\parskip +% \vskip-\dp\strutbox \fi\fi\fi - \unvcopy\newshapebox\relax + \scratchdimen\dp\newshapebox + \unvbox\newshapebox % \prevdepth=0pt and \dp\newshapebox depend on last line - \kern-\dp\newshapebox\relax + \kern-\scratchdimen % ?? % now \prevdepth=0pt \ifdone \kern\dp\strutbox \prevdepth\dp\strutbox \fi - \fi} + \fi + \egroup} %D In real inner situations we can use: %D @@ -503,11 +609,15 @@ %D %D This one is used in \type{\framed}. +% The kern fails on for instance: +% +% \omlijnd[offset=0pt,hoogte=8mm,uitlijnen={rechts,laho}]{\bfa test} + \def\innerflushshapebox% {\ifdim\ht\newshapebox=\!!zeropoint\relax \else \unvcopy\newshapebox\relax - \kern-\dp\newshapebox\relax + % \kern-\dp\newshapebox\relax \fi} %D For absolute control, one can use \type{\doreshapebox} @@ -899,7 +1009,7 @@ \global\let\localbetweenisolatedwords\betweenisolatedwords \setbox0=\hbox % we default to spaces, but from inside out {\ignorespaces#1% \localbetweenisolatedwords can be overruled - \global\isolatedlastskip=\lastskip}% + \global\isolatedlastskip\lastskip}% \setbox2=\vbox {%\hyphenpenalty10000 % this one fails in \url breaking, \lefthyphenmin=\!!maxcard % but this trick works ok, due to them @@ -1092,7 +1202,7 @@ %D Centering on the available space is done by: %D %D \starttypen -%D \centeredbox <optional specs> {content} +%D \centerbox <optional specs> {content} %D \stoptypen %D %D When omitted, the current \type {\hsize} and \type @@ -1810,24 +1920,77 @@ %D \hbox{y:\foundbox{two}{a}} \par %D \stoptypen +% a first version +% +% \def\@@stackbox{boxstack:b:} +% \def\@@stackmax{boxstack:m:} +% \def\@@stacktag{boxstack:t:} +% +% \def\initializeboxstack#1% +% {\ifundefined{\@@stackbox#1}% +% \@EA\newbox\csname\@@stackbox#1\endcsname +% \else +% \@EA\global\@EA\setbox\csname\@@stackbox#1\endcsname\vbox{}% +% \fi +% % actually we should erase the old values +% \setgvalue{\@@stackmax#1}{0}} +% +% \def\savebox#1#2% stack name +% {\dowithnextbox +% {\doifdefined{\@@stackbox#1} +% {\@EA\doglobal\@EA\increment\csname\@@stackmax#1\endcsname +% \setxvalue{\@@stacktag#2}{\csname\@@stackmax#1\endcsname}% +% \global\setbox\csname\@@stackbox#1\endcsname=\vbox +% {\forgetall +% \setbox\scratchbox=\vbox{\box\nextbox} +% \ht\scratchbox=\!!onepoint +% \dp\scratchbox=\!!zeropoint +% \unvbox\csname\@@stackbox#1\endcsname +% \offinterlineskip +% \allowbreak +% \box\scratchbox}}}% +% \vbox} +% +% \def\foundbox#1#2% +% {\vbox +% {\doifdefined{\@@stackbox#1} +% {\doifdefined{\@@stacktag#2} +% {\setbox\scratchbox=\vbox +% {\splittopskip\!!zeropoint +% \setbox0=\copy\csname\@@stackbox#1\endcsname +% \dimen0=\getvalue{\@@stacktag#2}pt +% \advance\dimen0 by -\!!onepoint +% \setbox2=\vsplit0 to \dimen0 +% \ifdim\ht0>\!!onepoint +% \setbox0=\vsplit0 to \!!onepoint +% \fi +% \unvbox0\setbox0=\lastbox\unvbox0}% +% \unvbox\scratchbox}}}} + +\beginTEX \newbox + \def\@@stackbox{boxstack:b:} \def\@@stackmax{boxstack:m:} \def\@@stacktag{boxstack:t:} +\def\@@stacklst{boxstack:l:} \def\initializeboxstack#1% {\ifundefined{\@@stackbox#1}% \@EA\newbox\csname\@@stackbox#1\endcsname \else \@EA\global\@EA\setbox\csname\@@stackbox#1\endcsname\vbox{}% + \def\docommando##1{\global\letbeundefined{\@@stacktag#1:##1}}% + \processcommacommand[\getvalue{\@@stacklst#1}]\docommando \fi - % actually we should erase the old values + \setgvalue{\@@stacklst#1}{}% \setgvalue{\@@stackmax#1}{0}} -\def\savebox#1#2% stack name +\def\savebox#1#2% stack name {\dowithnextbox {\doifdefined{\@@stackbox#1} {\@EA\doglobal\@EA\increment\csname\@@stackmax#1\endcsname - \setxvalue{\@@stacktag#2}{\csname\@@stackmax#1\endcsname}% + \setxvalue{\@@stacktag#1:#2}{\csname\@@stackmax#1\endcsname}% + \setxvalue{\@@stacklst#1}{\getvalue{\@@stacklst#1},#2}% \global\setbox\csname\@@stackbox#1\endcsname=\vbox {\forgetall \setbox\scratchbox=\vbox{\box\nextbox} @@ -1842,11 +2005,11 @@ \def\foundbox#1#2% {\vbox {\doifdefined{\@@stackbox#1} - {\doifdefined{\@@stacktag#2} + {\doifdefined{\@@stacktag#1:#2} {\setbox\scratchbox=\vbox {\splittopskip\!!zeropoint \setbox0=\copy\csname\@@stackbox#1\endcsname - \dimen0=\getvalue{\@@stacktag#2}pt + \dimen0=\getvalue{\@@stacktag#1:#2}pt \advance\dimen0 by -\!!onepoint \setbox2=\vsplit0 to \dimen0 \ifdim\ht0>\!!onepoint @@ -1855,6 +2018,46 @@ \unvbox0\setbox0=\lastbox\unvbox0}% \unvbox\scratchbox}}}} +\def\doifboxelse#1#2% + {\doifdefinedelse{\@@stacktag#1:#2}} + +\endTEX + +\beginETEX \newbox + +\def\@@stackbox{@box@} +\def\@@stacklst{@xob@} + +\def\setstackbox#1#2% + {\ifcsname\csname\@otr@:\number#1:\number#2\endcsname\else + \expandafter\newbox\csname\@@stackbox:#1:#2\endcsname + \fi + \global\setbox\csname\@@stackbox:#1:#2\endcsname\vbox} + +\def\initializeboxstack#1% + {\def\docommando##1{\setstackbox{#1}{##1}{}}% + \processcommacommand[\getvalue{\@@stacklst#1}]\docommando + \setgvalue{\@@stacklst#1}{}} + +\def\savebox#1#2% stack name + {\setxvalue{\@@stacklst#1}{\getvalue{\@@stacklst#1},#2}% + \setstackbox{#1}{#2}} + +\def\foundbox#1#2% + {\vbox + {\ifcsname\csname\@@stackbox:#1:#2\endcsname + \copy\csname\@@stackbox:#1:#2\endcsname + \fi}} + +\long\def\doifboxelse#1#2#3#4% + {\ifcsname\csname\@@stackbox:#1:#2\endcsname + \ifvoid\csname\csname\@@stackbox:#1:#2\endcsname#4\else#3\fi + \else + #4% + \fi} + +\endETEX + %D \macros %D {removedepth, obeydepth} %D @@ -1929,16 +2132,16 @@ % \fi % \egroup} -%D Also new: -%D -%D \startbuffer -%D \normbox[1cm][bba]{m} % b(efore) a(fter) v(box) s(trut) f(rame) -%D \normbox[1cm][bba]{m} -%D \normbox[1cm][bba]{m} -%D \stopbuffer -%D -%D \typebuffer -%D \haalbuffer +% %D Also new: +% %D +% %D \startbuffer +% %D \normbox[1cm][bba]{m} % b(efore) a(fter) v(box) s(trut) f(rame) +% %D \normbox[1cm][bba]{m} +% %D \normbox[1cm][bba]{m} +% %D \stopbuffer +% %D +% %D \typebuffer +% %D \haalbuffer % % \def\dodonormbox#1#2#3#4#5#6#7% % {\doifnumberelse{#1} @@ -1969,6 +2172,15 @@ % \def\normbox% % {\dodoubleempty\donormbox} +% vcenter in text, we kunnen vcenter overloaden + +\def\halfwaybox% + {\dowithnextbox + {\dp\nextbox\!!zeropoint + \setbox\nextbox=\hbox{\lower.5\ht\nextbox\box\nextbox}% + \box\nextbox} + \hbox} + \protect \endinput diff --git a/tex/context/base/supp-fil.tex b/tex/context/base/supp-fil.tex index b9b517abb..d1f237815 100644 --- a/tex/context/base/supp-fil.tex +++ b/tex/context/base/supp-fil.tex @@ -253,9 +253,9 @@ \fi \else \immediate\closein\scratchread - #2% - \normalinput\readfilename\relax - \fi} + #2% % we skip over the \fi + \@EA\normalinput\@EA\readfilename\@EA\relax % so that we can end a + \fi} % document here too \def\readfile#1% {\let\readlevel=\maxreadlevel @@ -362,7 +362,7 @@ \doopenin{#1}{\pathplusfile{#2}{#3}}} %D \macros -%D {doiffileelse,doiflocfileelse,doifjobfileelse} +%D {doiffileelse,doiflocfileelse} %D %D The next alternative only looks if a file is present. No %D loading is done. This one obeys the standard \TEX\ @@ -444,8 +444,9 @@ % #3\fi\fi} \def\doifparentfileelse#1#2#3% - {\doifsamestringelse{#1}{\jobname} {#2} - {\doifsamestringelse{#1}{\outputfilename}{#2}{#3}}} + {\doifsamestringelse{#1}{\jobname }{#2} + {\doifsamestringelse{#1}{\jobname.\c!tex}{#2} + {\doifsamestringelse{#1}{\outputfilename}{#2}{#3}}}} % \newcounter\readingfilelevel % @@ -474,34 +475,99 @@ \newcounter\readingfilelevel +%\def\popfilecharacter#1#2% +% {\ifnum\catcode`#1=\@@other \ifnum#2=\@@other \else +% %\message{[popping catcode #1 to #2]}% +% \catcode`#1=#2\relax +% \fi \fi} +% +%\def\pushfilecharacter#1% +% {\ifnum\catcode`#1=\@@other \else +% %\message{[pushing catcode #1 from \the\catcode`#1]}% +% \catcode`#1=\@@other +% \fi} + \def\popfilecharacter#1#2% {\ifnum\catcode`#1=\@@other \ifnum#2=\@@other \else - \message{[popping catcode #1 to #2]}% + %\message{[popping catcode #1 to #2]}% \catcode`#1=#2\relax \fi \fi} -\def\pushfilecharacter#1% - {\ifnum\catcode`#1=\@@other \else - \message{[pushing catcode #1 from \the\catcode`#1]}% - \catcode`#1=\@@other - \fi} +\ifx\\\undefined \let\\\relax \fi \def\startreadingfile% beter een every {\doglobal\increment\readingfilelevel \setxvalue{popfilecharacters::\readingfilelevel}% - {\noexpand\popfilecharacter{/}{\the\catcode`/}% - \noexpand\popfilecharacter{"}{\the\catcode`"}% - \noexpand\popfilecharacter{<}{\the\catcode`<}% - \noexpand\popfilecharacter{>}{\the\catcode`>}}% - \pushfilecharacter{/}% - \pushfilecharacter{"}% - \pushfilecharacter{<}% - \pushfilecharacter{>}} + {\catcode`/ =\the\catcode`/% + \catcode`" =\the\catcode`"% + \catcode`< =\the\catcode`<% + \catcode`> =\the\catcode`>% + \catcode`\noexpand\\=\the\catcode`\\% + \catcode`\noexpand\{=\the\catcode`\{% + \catcode`\noexpand\}=\the\catcode`\}% + \catcode`\noexpand\%=\the\catcode`\%}% + \catcode`/ =\@@other + \catcode`" =\@@other + \catcode`< =\@@other + \catcode`> =\@@other + \catcode`\\=\@@escape + \catcode`\{=\@@begingroup + \catcode`\}=\@@endgroup + \catcode`\%=\@@comment} \def\stopreadingfile% {\getvalue{popfilecharacters::\readingfilelevel}% \doglobal\decrement\readingfilelevel} -\protect - -\endinput +%% % gebruikt voor normale (!) files, will change to proper +%% % installer maybe combined with verb module push/popper +%% +%% \def\startreadingfile% beter een every +%% {\doglobal\increment\readingfilelevel +%% \setxvalue{popfilecharacters::\readingfilelevel}% +%% {%\expnormalcatcodes +%% \expspecialcatcodes}% +%% %\setnormalcatcodes +%% \setspecialcatcodes} +%% +%% \def\stopreadingfile% +%% {\getvalue{popfilecharacters::\readingfilelevel}% +%% \doglobal\decrement\readingfilelevel} +%% +%% \ifx\\\undefined \let\\\relax \fi +%% \ifx\!\undefined \let\!\relax \fi +%% \ifx\?\undefined \let\?\relax \fi +%% +%% \def\expnormalcatcodes% +%% {\catcode`\noexpand\!=\the\catcode`\! \catcode`\noexpand\?=\the\catcode`\?% +%% \catcode`\noexpand\&=\the\catcode`\& +%% \catcode`\noexpand\#=\the\catcode`\# \catcode`\noexpand\$=\the\catcode`\$% +%% \catcode`\noexpand\%=\the\catcode`\% \catcode`\noexpand\\=\the\catcode`\\% +%% \catcode`\noexpand\^=\the\catcode`\^ \catcode`\noexpand\_=\the\catcode`\_% +%% \catcode`\noexpand\{=\the\catcode`\{ \catcode`\noexpand\}=\the\catcode`\}} +%% +%% \def\setnormalcatcodes% +%% {%\ifcase\protectionlevel +%% \catcode`\!=\@@other \catcode`\?=\@@other +%% %\else +%% % \catcode`\!=\@@letter \catcode`\?=\@@letter +%% %\fi +%% \catcode`\&=\@@alignment +%% \catcode`\#=\@@parameter \catcode`\$=\@@mathshift +%% \catcode`\%=\@@comment \catcode`\\=\@@escape +%% \catcode`\^=\@@superscript \catcode`\_=\@@subscript +%% \catcode`\{=\@@begingroup \catcode`\}=\@@endgroup} +%% +%% \def\expspecialcatcodes% +%% {\catcode`\noexpand/=\the\catcode`/% +%% \catcode`\noexpand"=\the\catcode`"% +%% \catcode`\noexpand<=\the\catcode`<% +%% \catcode`\noexpand>=\the\catcode`>} +%% +%% \def\setspecialcatcodes% +%% {\catcode`/=\@@other +%% \catcode`"=\@@other +%% \catcode`<=\@@other +%% \catcode`>=\@@other} + +\protect \endinput diff --git a/tex/context/base/supp-lan.tex b/tex/context/base/supp-lan.tex index f97ac3c1f..d540a86cb 100644 --- a/tex/context/base/supp-lan.tex +++ b/tex/context/base/supp-lan.tex @@ -1070,7 +1070,7 @@ \let\~=\tildeletter \let~=\~% \let\/=\slashletter \let/=\/% \let\savedurl\empty - \handletokens#1\with\scanurl + \handletokens#1\with\scanurl\savedurl \egroup} \egroup diff --git a/tex/context/base/supp-mis.tex b/tex/context/base/supp-mis.tex index 5178da896..a13775bb4 100644 --- a/tex/context/base/supp-mis.tex +++ b/tex/context/base/supp-mis.tex @@ -17,6 +17,16 @@ \ifx \undefined \writestatus \else \expandafter \endinput \fi +\def\StartLatexHack% Sigh. Why doesn't latex handle this itself + {\edef\StopLatexHack + {\catcode`\noexpand/=\the\catcode`/ + \catcode`\noexpand"=\the\catcode`" + \catcode`\noexpand<=\the\catcode`< + \catcode`\noexpand>=\the\catcode`>}% + \catcode`/=12 \catcode`"=12 \catcode`<=12 \catcode`>=12 } + +\StartLatexHack + %D \macros %D {ifnocontextobject} %D @@ -124,17 +134,17 @@ %D undefined. This way we can't mess up other macro packages, %D but of course previous definitions can mess up our modules. -\ifnocontextobject \scratchcounter \do \newcount \scratchcounter \fi -\ifnocontextobject \scratchdimen \do \newdimen \scratchdimen \fi -\ifnocontextobject \scratchskip \do \newskip \scratchskip \fi -\ifnocontextobject \scratchmuskip \do \newmuskip \scratchmuskip \fi -\ifnocontextobject \scratchbox \do \newbox \scratchbox \fi -\ifnocontextobject \scratchread \do \newread \scratchread \fi -\ifnocontextobject \scratchwrite \do \newwrite \scratchwrite \fi +\ifnocontextobject \scratchcounter \do \newcount \scratchcounter \fi +\ifnocontextobject \scratchtoks \do \newtoks \scratchtoks \fi +\ifnocontextobject \scratchdimen \do \newdimen \scratchdimen \fi +\ifnocontextobject \scratchskip \do \newskip \scratchskip \fi +\ifnocontextobject \scratchmuskip \do \newmuskip \scratchmuskip \fi +\ifnocontextobject \scratchbox \do \newbox \scratchbox \fi +\ifnocontextobject \scratchread \do \newread \scratchread \fi +\ifnocontextobject \scratchwrite \do \newwrite \scratchwrite \fi -\ifnocontextobject \nextbox \do \newbox \nextbox \fi - -\ifnocontextobject \nextdepth \do \newdimen \nextdepth \fi +\ifnocontextobject \nextbox \do \newbox \nextbox \fi +\ifnocontextobject \nextdepth \do \newdimen \nextdepth \fi \ifnocontextobject \CONTEXTtrue \do \newif\ifCONTEXT \fi \ifnocontextobject \donetrue \do \newif\ifdone \fi @@ -566,9 +576,24 @@ \fi +%D Very reduced: + +\long\def\appendtoks#1\to#2% + {\scratchtoks{#1}\expanded{#2{\the#2\the\scratchtoks}}} + +%D Well, also handy. + +\def\doiffileelse#1#2#3% + {\immediate\openin\scratchread=#1\relax + \ifeof\scratchread + \def\next{#3}% + \else + \def\next{#2}% + \fi + \immediate\closein\scratchread + \next} + %D That's it. Please forget this junk and take a look at how %D it should be done. -\protect - -\endinput +\StopLatexHack \protect \endinput diff --git a/tex/context/base/supp-mpe.tex b/tex/context/base/supp-mpe.tex index d3dc45ea0..8a10efe9c 100644 --- a/tex/context/base/supp-mpe.tex +++ b/tex/context/base/supp-mpe.tex @@ -155,7 +155,7 @@ \def\startMPresources% {\global\let\currentMPshades\empty \ifx\currentPDFresources\empty\else - \message{unused resources before shade \the\currentPDFshade}% + \message{[unused resources before shade \the\currentPDFshade]}% \fi \global\let\currentPDFresources\empty} @@ -194,18 +194,27 @@ %D When we are using \CONTEXT, we will fall back to the %D better color conversion routines. This also has the advantage %D that we don't have to parse and convert the file. In this -%D alternative, \type {\!MP} is not (yet) supported. +%D alternative, \type {\!MP} is not (yet) supported. Because +%D we can (for efficiency reasons) turn off strokecolor, +%D something we cannot do in \METAPOST\ converted code. + +\newif\ifPDFMPstrokecolor \PDFMPstrokecolortrue + +%D [This code should move to meta-ini.] \ifCONTEXT + \def\checkPDFMPstrokecolor% + {\ifPDFMPstrokecolor \PDFstrokecolortrue \fi} + \def\normalhandleMPrgbcolor% - {\dostartcolormodeR\gMPa1:\gMPa2:\gMPa3\od} + {{\checkPDFMPstrokecolor\dostartcolormodeR\gMPa1:\gMPa2:\gMPa3\od}} \def\normalhandleMPcmykcolor% - {\dostartcolormodeC\gMPa1:\gMPa2:\gMPa3:\gMPa4\od} + {{\checkPDFMPstrokecolor\dostartcolormodeC\gMPa1:\gMPa2:\gMPa3:\gMPa4\od}} \def\normalhandleMPgraycolor% - {\dostartcolormodeS\gMPa1\od} + {{\checkPDFMPstrokecolor\dostartcolormodeS\gMPa1\od}} \fi @@ -261,41 +270,62 @@ \resetMPcolor +%D Specials are define and recalled using: + +\def\MPspecial% + {MP special \gMPs\nofMParguments} + +\def\defineMPspecial#1#2% + {\setvalue{MP special #1}{#2}} + %D The path processing macro is slightly extended. +% \def\processMPpath% +% {\ifcase\MPspecialversion\else +% \ifnum\MPrgbnumber\lastMPrvalue=\MPspecialsignal +% \scratchcounter=\MPrgbnumber\lastMPbvalue +% \edef\currentMPspecial{\the\scratchcounter}% +% \ifnum\finiMPpath=2 +% \doifdefined{mps:Sh:\currentMPspecial} +% {\edef\currentMPshade{\getvalue{obj:Sh:\currentMPspecial}}% +% \doifinstringelse{\currentMPshade}{\currentMPshades} +% {}{\xdef\currentMPshades{\currentMPshades\currentMPshade}}% +% \chardef\finiMPpath=4 \PDFcode{q /Pattern cs}}% +% \fi +% \fi +% \fi +% \flushMPpath +% \closeMPpath +% \PDFcode +% {\ifcase\finiMPpath +% W n\or S\or f\or B\or W n /Sh\getvalue{mps:Sh:\currentMPspecial} sh Q% +% \fi}% +% \let\handleMPsequence=\dohandleMPsequence +% \resetMPstack +% \nofMPsegments=0 +% \handleMPsequence} + +\newtoks \invokeMPspecials + \def\processMPpath% - {\ifcase\MPspecialversion\else + {\let\extraMPpathcode\empty + \ifcase\MPspecialversion\else \ifnum\MPrgbnumber\lastMPrvalue=\MPspecialsignal \scratchcounter=\MPrgbnumber\lastMPbvalue \edef\currentMPspecial{\the\scratchcounter}% - \ifnum\finiMPpath=2 - \doifdefined{mps:Sh:\currentMPspecial} - {\edef\currentMPshade{\getvalue{obj:Sh:\currentMPspecial}}% - \doifinstringelse{\currentMPshade}{\currentMPshades} - {}{\xdef\currentMPshades{\currentMPshades\currentMPshade}}% - \chardef\finiMPpath=4 \PDFcode{q /Pattern cs}}% + \ifnum\finiMPpath=2 % to outer level + \the\invokeMPspecials \fi \fi \fi \flushMPpath \closeMPpath - \PDFcode - {\ifcase\finiMPpath - W n\or S\or f\or B\or W n /Sh\getvalue{mps:Sh:\currentMPspecial} sh Q% - \fi}% + \PDFcode{\ifcase\finiMPpath W n\or S\or f\or B\else W n\fi \extraMPpathcode}% \let\handleMPsequence=\dohandleMPsequence \resetMPstack \nofMPsegments=0 \handleMPsequence} -%D Specials are define and recalled using: - -\def\MPspecial% - {MP special \gMPs\nofMParguments} - -\def\defineMPspecial#1#2% - {\setvalue{MP special #1}{#2}} - %D Shading is an example of a more advanced graphic feature, %D but users will seldom encounter those complications. Here %D we only show a few simple examples, but many other @@ -430,6 +460,17 @@ %D \NC /N \NC smaller values, bigger inner circles \NC \NR %D \stoptabulatie +\def\invokeMPshadespecial% + {\doifdefined{mps:Sh:\currentMPspecial} + {\edef\currentMPshade{\getvalue{obj:Sh:\currentMPspecial}}% + \doifinstringelse{\currentMPshade}{\currentMPshades} + {}{\xdef\currentMPshades{\currentMPshades\currentMPshade}}% + \def\extraMPpathcode{/Sh\getvalue{mps:Sh:\currentMPspecial} sh Q}% + \chardef\finiMPpath=0 + \PDFcode{q /Pattern cs}}} + +\appendtoks \invokeMPshadespecial \to \invokeMPspecials + \defineMPspecial{2} {\startMPshading{14}% type 2 \immediate\pdfobj @@ -462,4 +503,100 @@ /Extend [true true]>>}% \stopMPshading} +%D Figure inclusion is kind of strange to \METAPOST, but when +%D Santiago Muelas started discussing this with me, I was able +%D to cook up a solution using specials. + +\def\invokeMPfigurespecial% + {\getvalue{mps:gr:\currentMPspecial}} % or \relax + +\appendtoks \invokeMPfigurespecial \to \invokeMPspecials + +\defineMPspecial{10} + {\setxvalue{mps:gr:\gMPs8}% + {\noexpand\handleMPfigurespecial + {\gMPs1}{\gMPs2}{\gMPs3}{\gMPs4}{\gMPs5}{\gMPs6}{\gMPs7}% + \noexpand\setxvalue{mps:gr:\gMPs8}{}}} + +% \def\handleMPfigurespecial#1#2#3#4#5#6#7% +% {\vbox to 0pt +% {\vss +% \hbox to 0pt +% {\pdfliteral{q #1 #2 #3 #4 #5 #6 cm}% +% \pdfimage width 1bp height 1bp {#7}% maybe 10 is better +% \pdfliteral{Q}% +% \hss}}} +% +% better, since xform reuse + +\def\handleMPfigurespecial#1#2#3#4#5#6#7% + {\vbox to \!!zeropoint + {\vss + \hbox to \!!zeropoint + {\ifcase\pdfoutput\or % will be hooked into the special driver + \doiffileelse{#7} + {\doifundefinedelse{mps:x:#7} + {\immediate\pdfximage width 1bp height 1bp {#7}% + \setxvalue{mps:x:#7}{\pdfrefximage\the\pdflastximage}}% + {\message{[reusing figure #7]}}% + \pdfliteral{q #1 #2 #3 #4 #5 #6 cm}% + \rlap{\getvalue{mps:x:#7}}% + \pdfliteral{Q}} + {\message{[unknown figure #7]}}% + \fi + \hss}}} + +%D An example of using both special features is the +%D following. +%D +%D \starttypen +%D \startMPpage +%D externalfigure "hakker1b.png" scaled 22cm rotated 10 shifted (-2cm,0cm); +%D externalfigure "hakker1b.png" scaled 10cm rotated -10 ; +%D externalfigure "hakker1b.png" scaled 7cm rotated 45 shifted (8cm,12cm) ; +%D path p ; p := unitcircle xscaled 15cm yscaled 20cm; +%D path q ; q := p rotatedaround(center p,90) ; +%D path r ; r := buildcycle(p,q) ; clip currentpicture to r ; +%D path s ; s := boundingbox currentpicture enlarged 5mm ; +%D picture c ; c := currentpicture ; currentpicture := nullpicture ; +%D circular_shade(s,0,.2red,.9red) ; +%D addto currentpicture also c ; +%D \stopMPpage +%D \stoptypen + +%D This is some experimental hyperlink driver that I wrote +%D for Mark Wicks. + +\defineMPspecial{20} + {\setxvalue{mps:hl:\gMPs6}% + {\noexpand\handleMPhyperlink + {\gMPs1}{\gMPs2}{\gMPs3}{\gMPs4}{\gMPs5}% + \noexpand\setxvalue{mps:hl:\gMPs6}{}}} + +\def\handleMPhyperlink#1#2#3#4#5% + {%\ifcase\pdfoutput\or + \setbox\scratchbox=\hbox + {\setbox\scratchbox=\null + \scratchdimen=#1bp\scratchdimen=-\scratchdimen + \advance\scratchdimen#3bp + \wd\scratchbox=\scratchdimen + \scratchdimen=#2bp\scratchdimen=-\scratchdimen + \advance\scratchdimen#4bp + \ht\scratchbox=\scratchdimen + \incolorfalse + \gotobox{\box\scratchbox}[#5]}% + \setbox\scratchbox=\hbox + {\scratchdimen\MPxoffset bp \advance\scratchdimen#1bp + \hskip\scratchdimen + \scratchdimen=\MPyoffset bp \advance\scratchdimen#2bp + \raise\scratchdimen\box\scratchbox}% + \smashbox\scratchbox + \box\scratchbox + }%\fi} + +\def\invokeMPhyperlinkspecial% + {\getvalue{mps:hl:\currentMPspecial}} % or \relax + +\appendtoks \invokeMPhyperlinkspecial \to \invokeMPspecials + \protect \endinput diff --git a/tex/context/base/supp-mps.tex b/tex/context/base/supp-mps.tex index 87af24b4a..015efa871 100644 --- a/tex/context/base/supp-mps.tex +++ b/tex/context/base/supp-mps.tex @@ -287,15 +287,21 @@ \newtoks \everyMPTEXgraphic +\newif\ifforceMPTEXgraphic + \long\def\checkMPTEXgraphic#1% - {\expandafter\convertargument #1\to\asciiA - \convertargument etex\to\asciiB - \convertargument text\to\asciiC - \expandtwoargsafter\doifinstringelse{\asciiB}{\asciiA} - {\global\MPTEXgraphictrue} - {\expandtwoargsafter\doifinstringelse{\asciiC}{\asciiA} - {\global\MPTEXgraphictrue} - {\global\MPTEXgraphicfalse}}} + {\ifforceMPTEXgraphic + \global\MPTEXgraphictrue + \else + \expandafter\convertargument #1\to\asciiA + \convertargument etex\to\asciiB + \convertargument text\to\asciiC + \expandtwoargsafter\doifinstringelse{\asciiB}{\asciiA} + {\global\MPTEXgraphictrue} + {\expandtwoargsafter\doifinstringelse{\asciiC}{\asciiA} + {\global\MPTEXgraphictrue} + {\global\MPTEXgraphicfalse}}% + \fi} \def\flushMPTEXgraphic% {\ifMPTEXgraphic \ifx\everyMPTEXgraphic\emptytoks \else @@ -349,10 +355,13 @@ \def\startwritingMPgraphic% {\bgroup - \def\_{\string_}% - \def\&{\string&}% - \def\{{\iftrue \string{\else}\fi}% - \def\}{\iffalse{\else\string}\fi}% + % will go to \appendtoks ... \to \everyMPgraphic + \let\#\hashletter + \let\_\underscoreletter + \let\&\ampercentletter + \def\{{\iftrue \string{\else}\fi}% ook nog ....letter + \def\}{\iffalse{\else\string}\fi}% ook nog ....letter + % \ifMPrun \else \allocateMPslot\currentMPgraphic \fi @@ -367,8 +376,8 @@ \theMPinclusions % no reset here ! \else \xdef\MPgraphic{\the\currentMPgraphic}% - \the\everyMPgraphic - \ifnum\currentMPgraphic=1 + \the\everyMPgraphic % here ? + \ifnum\currentMPgraphic<2 % mprun (0) or mpgraph (1) \immediate\openout\MPwrite=\MPgraphicfile.mp \immediate\write\MPwrite{\percentletter\space collected graphics of job "\jobname"}% \writeMPgraph @@ -683,6 +692,7 @@ \def\MPOSTbatchswitch {-int=batchmode} \def\MPOSTformatswitch{-progname=mpost -mem=} + \def\MPOSTdriver {dvips} \def\executeMPOST#1% {mpost @@ -692,7 +702,7 @@ \def\executeMPTEX#1% {texexec --batch \ifcase\interactionmode --logfile='mptex.log' \fi - --output=dvips + --output=\MPOSTdriver\space \ifuseMETAFUNformat --mpformat=metafun \fi --mptex --nomp --once #1} \def\executeMetaPost#1% @@ -851,7 +861,7 @@ %D \stoptypen %D %D This macro needs \type {supp-eps.tex} and provided no -%D scaling. For \LATEX\ users the next one wil do: +%D scaling. For \LATEX\ users the next one will do: %D %D \starttypen %D \def\includeMPgraphic#1#% @@ -913,6 +923,7 @@ \def}B\char125\relax EE \gdef\setMPspecials| B\setnaturalcatcodes + \catcode`\\=\@@escape \catcode`\%=\@@active \catcode`\[=\@@active \catcode`\]=\@@active diff --git a/tex/context/base/supp-mrk.tex b/tex/context/base/supp-mrk.tex index e8144b778..bb912a776 100644 --- a/tex/context/base/supp-mrk.tex +++ b/tex/context/base/supp-mrk.tex @@ -14,11 +14,77 @@ %D Remark: due to the lack of \type {\clearmark}, the \ETEX\ %D dedicated mechanism is not yet operational. +% for testing etex, can be much faster than normal +% +% \unprotect +% +% \newif\ifexpandmarks \expandmarkstrue +% +% \let\normalmark = \mark +% \let\normaltopmark = \topmark +% \let\normalbotmark = \botmark +% \let\normalfirstmark = \firstmark +% \let\normalsplitbotmark = \splitbotmark +% \let\normalsplitfirstmark = \splitfirstmark +% +% \let\normalmarks = \marks +% \let\normaltopmarks = \topmarks +% \let\normalbotmarks = \botmarks +% \let\normalfirstmarks = \firstmarks +% \let\normalsplitbotmarks = \splitbotmarks +% \let\normalsplitfirstmarks = \splitfirstmarks +% +% \def\newmark #1{\setgvalue{mrk\strippedcsname#1}{0}\newmarks#1} +% +% \def\gettopmark {\getmark\topmarks} +% \def\getbottommark {\getmark\botmarks} +% \def\getfirstmark {\getmark\firstmarks} +% \def\getsplitbottommark{\getmark\splitbotmarks} +% \def\getsplitfirstmark {\getmark\splitfirstmarks} +% +% \def\getbotmark {\getmark\botmarks} +% \def\getsplitbotmark {\getmark\splitbotmarks} +% \def\getsplittopmark {\getmark\splitfirstmarks} +% +% \def\getmark#1#2% +% {\ifcase\csname mrk\strippedcsname#2\endcsname\else +% \expandafter#1\expandafter#2% +% \fi} +% +% \long\def\setmark#1#2% +% {\setgvalue{mrk\strippedcsname#1}{0}% +% \ifexpandmarks +% \expanded{\normalmarks#1{#2}}% +% \else +% \normalmarks#1{#2}% +% \fi} +% +% \def\resetmark#1% +% {\setgvalue{mrk\strippedcsname#1}{1}\marks#1{}} +% +% \def\noninterferingmarks% +% {\let\savedsetmark\setmark +% \let\noninterferingmarks\relax +% \long\def\setmark##1##2% +% {\ifhmode\prewordbreak\hbox\fi{\savedsetmark{##1}{##2}}}} +% +% \let\getmarks \gobbleoneargument +% \let\getallmarks \relax +% \let\getsplitmarks \gobbleoneargument +% \let\getallsplitmarks\relax +% +% \let\newpersistentmark \newmark % checken +% \newif\ifnofirstmarker % checken +% +% \protect \endinput + %D There are 256 \COUNTERS, \DIMENSIONS, \SKIPS, \MUSKIPS\ and %D \BOXES, 16~in- and output buffers, but there is only one %D \MARK. In TugBoat~8 (1987, no~1) Jim Fox presents a set of %D macros that can be used to mimmick multiple marks. We -%D gladly adopt them here. +%D gladly adopt them here. I may rewrite this module from +%D scratch some day, since some low level \CONTEXT\ commands +%D can be used. %D %D This module was changed on behalf of \ETEX. The main %D extension is that \type{\get..} and alike is used instead of @@ -167,6 +233,8 @@ %D make calls from outside the output routine a bit more %D robust. +\let\domark\relax % saves a restore on the stack + \def\definenewmark#1#2% {\bgroup \makemarknames{#1}% @@ -252,6 +320,13 @@ %D found, this macro is reassigned and from then on serves %D in building the new list. +% Although the next couple of macros are already defined +% in syst-gen.tex, we repeat them here. + +\let\normalfi \fi % replaces \@fi +\let\normalelse \else % replaces \@else +\let\normalor \or % replaces \@or + \def\getmarks#1% {\bgroup \makemarknames{#1}% @@ -259,9 +334,9 @@ \edef\botmarker{0\normalbotmark}% \!!toksb={}% \nofirstmarkertrue - \let\@fi=\fi \let\fi=\relax - \let\@or=\or \let\or=\relax - \let\@else=\else \let\else=\relax + \let\fi=\relax + \let\or=\relax + \let\else=\relax \let\domark=\doscanmarks \getvalue{\marklist}\lastmark %\message{markstatus : [\the\!!toksa\the\!!toksb\the\!!toksc]}% @@ -279,9 +354,9 @@ \edef\botmarker{0\normalsplitbotmark}% \!!toksb={}% \nofirstmarkertrue - \let\@fi=\fi \let\fi=\relax - \let\@or=\or \let\or=\relax - \let\@else=\else \let\else=\relax + \let\fi=\relax + \let\or=\relax + \let\else=\relax \let\domark=\doscanmarks \getvalue{\marklist}\lastmark % \@EA\global\@EA\let\csname\marklist\endcsname=\savedmarklist @@ -292,22 +367,22 @@ \long\def\dodoscanmarks#1% {\ifnum\scratchcounter>\topmarker\relax - \@else + \normalelse \long\setgvalue{\@@marktop@@\markname}{#1}% - \@fi + \normalfi \ifnum\scratchcounter>\botmarker\relax \let\domark=\dorecovermarks \!!toksb=\@EA{\@EA\domark\the\scratchcounter{#1}}% - \@else + \normalelse \ifnofirstmarker \long\setgvalue{\@@markfirst@@\markname}{#1}% \ifnum\scratchcounter>\topmarker\relax \nofirstmarkerfalse - \@fi - \@fi + \normalfi + \normalfi \long\setgvalue{\@@markbot@@\markname}{#1}% \!!toksa=\@EA{\@EA\domark\the\scratchcounter{#1}}% - \@fi} + \normalfi} \def\doscanmarks% {\afterassignment\dodoscanmarks\scratchcounter=} diff --git a/tex/context/base/supp-num.tex b/tex/context/base/supp-num.tex index d0d72a191..8b30500eb 100644 --- a/tex/context/base/supp-num.tex +++ b/tex/context/base/supp-num.tex @@ -16,9 +16,9 @@ \unprotect %D \macros -%D {digitmode, digits} +%D {digits, setdigitmode, setdigitsign} %D -%D Depending on \type{\digitmode} the command \type{\digits} +%D Depending on the digit mode the command \type {\digits} %D normalizes number patterns depending on the language set. %D %D \starttypen @@ -34,12 +34,30 @@ %D The different modes are shown in: %D %D \startbuffer -%D / \setdigitmode 1 / \digits 12.345,90 / \digits 12.345.000 / \digits 1,23 / -%D / \setdigitmode 2 / \digits 12.345,90 / \digits 12.345.000 / \digits 1,23 / -%D / \setdigitmode 3 / \digits 12.345,90 / \digits 12.345.000 / \digits 1,23 / -%D / \setdigitmode 4 / \digits 12.345,90 / \digits 12.345.000 / \digits 1,23 / -%D / \setdigitmode 5 / \digits 12.345,90 / \digits 12.345.000 / \digits 1,23 / -%D / \setdigitmode 6 / \digits 12.345,90 / \digits 12.345.000 / \digits 1,23 / +%D \setdigitmode 1 \digits 12.345,90 \digits 12.345.000 \digits 1,23 +%D \setdigitmode 2 \digits 12.345,90 \digits 12.345.000 \digits 1,23 +%D \setdigitmode 3 \digits 12.345,90 \digits 12.345.000 \digits 1,23 +%D \setdigitmode 4 \digits 12.345,90 \digits 12.345.000 \digits 1,23 +%D \setdigitmode 5 \digits 12.345,90 \digits 12.345.000 \digits 1,23 +%D \setdigitmode 6 \digits 12.345,90 \digits 12.345.000 \digits 1,23 +%D \stopbuffer +%D +%D \typebuffer +%D +%D This is typset as: +%D +%D \startregels +%D \haalbuffer +%D \stopregels +%D +%D The sign can be typeset as is or within the space of a +%D digit. +%D +%D \startbuffer +%D \setdigitsign 0 \digits +12.345,90 +%D \setdigitmode 1 \digits +12.345,90 +%D \setdigitmode 2 \digits +12.345,90 +%D \setdigitmode 3 \digits +12.345,90 %D \stopbuffer %D %D \typebuffer @@ -50,11 +68,11 @@ %D \haalbuffer %D \stopregels -\chardef\digitinputmode =1 -\chardef\digitoutputmode=1 +\chardef\digitoutputmode=1 % 0..6 +\chardef\digitsignmode =0 % 0..3 -\def\setdigitmode#1% - {\chardef\digitoutputmode#1} +\def\setdigitmode{\chardef\digitoutputmode} +\def\setdigitsign{\chardef\digitsignmode} %D The digit modes are: %D @@ -67,75 +85,111 @@ %D \som thickmuskips \& period %D \stopopsomming -\let\collecteddigits \empty -\let\saveddigits \empty -\let\savedpowerdigits\empty -\chardef\powerdigits=0 +\let\collecteddigits \empty \chardef\digitinputmode =1 +\let\saveddigits \empty \chardef\skipdigit =0 +\let\savedpowerdigits\empty \chardef\powerdigits =0 + +%D The first stage of the \type {\digit} macro takes care of +%D the grouped call, the other branch handles the fuzzy +%D delimited calls. \def\digits% - {\bgroup\grabdigit} + {\bgroup\let~@\doifnextcharelse\bgroup\dodigits\grabdigit} + +\def\dodigits#1% + {\grabdigit#1\relax} \def\grabdigit% {\futurelet\next\scandigit} -\let\normalmath$ +%D Watch the test for \type {\nextobeyedline}, because the +%D endofline token can be \type {\def'd}, not \type {\let}'d, +%D we need to do an indirect test (see \type {verb-ini.tex}) +%D for details. +%D +%D \starttypen +%D \def ^^M{\obeyedline} +%D \def\nextbeyedline{\obeyedline} +%D \stoptypen + +\ifx\normalmathshift\undefined \let\normalmathshift=$ \fi \def\scandigit% - {\ifx\next\blankspace + {\ifx\next\blankspace + \let\next\handledigits + \else\ifx\next\nextobeyedline % the indirect one \let\next\handledigits \else\ifx\next\bgroup \let\next\handledigits \else\ifx\next\egroup \let\next\handledigits - \else\ifx\next\normalmath + \else\ifx\next\normalmathshift \let\next\handledigits \else \let\next\collectdigit - \fi\fi\fi\fi + \fi\fi\fi\fi\fi \next} +%D We store the power||of||ten (to be signaled by \type {^}, +%D \type {e} or~\type {E}) in a seperate macro so that we can +%D typeset it in superscript. The space placeholders are +%D replaced by a \type {@}. + +\def\savedigit#1#2% + {\edef#1{#1\saveddigits#2}\let\saveddigits\empty} + \long\def\collectdigit#1% - {\if\noexpand#1\relax + {\ifx#1~% + \savedigit\collecteddigits @% + \else\if#1_% + \savedigit\collecteddigits @% + \else\if\noexpand#1\relax \let\grabdigit\handledigits \else\ifcase\powerdigits - \if#1^% - \chardef\powerdigits=1 + \if#1E% + \chardef\powerdigits1 + \else\if#1e% + \chardef\powerdigits1 + \else\if#1^% + \chardef\powerdigits1 \else - \doifnumberelse{#1} - {\edef\collecteddigits{\collecteddigits\saveddigits#1}% - \let\saveddigits\empty} - {\def\saveddigits{#1}}% - \fi + \savedigit\collecteddigits#1% + %\doifnumberelse{#1} + % {\savedigit\collecteddigits#1} + % {\def\saveddigits{#1}}% + \fi\fi\fi \else - \doifnumberelse{#1} - {\edef\savedpowerdigits{\savedpowerdigits\saveddigits#1}% - \let\saveddigits\empty} - {\def\saveddigits{#1}}% - \fi\fi + \savedigit\savedpowerdigits#1% + %\doifnumberelse{#1} + % {\savedigit\savedpowerdigits#1} + % {\def\saveddigits{#1}}% + \fi\fi\fi\fi \grabdigit} \def\handledigits% - {\ifmmode + {%\ifcase\powerdigits + % \edef\collecteddigits{\collecteddigits\saveddigits}% + %\else + % \edef\savedpowerdigits{\savedpowerdigits\saveddigits}% + %\fi + \ifmmode \dohandledigits \else \dontleavehmode\hbox{$\dohandledigits$}% \fi - \saveddigits \egroup} +%D Although we could do with one pass, a second pass for +%D handling the stored sequence is more readable. + \def\dohandledigits% - {\mathcode`\,="013B - \mathcode`\.="013A + {\mathcode`\,="013B \mathcode`\.="013A % pretty hard coded \expandafter\handletokens\collecteddigits\with\scandigits \ifcase\powerdigits\else\digitpowerseperator^{\savedpowerdigits}\fi} -\def\scandigits#1% - {\if#1.\doscandigit1\else - \if#1,\doscandigit2\else - #1\fi\fi} - \def\doscandigit#1% - {\ifnum\digitinputmode=#1\relax + {\ifcase\skipdigit\else\hphantom{\fi + \ifnum\digitinputmode=#1\relax \ifcase\digitoutputmode \or .% \or ,% @@ -146,8 +200,103 @@ \fi \else \ifodd\digitoutputmode,\else.\fi + \fi + \ifcase\skipdigit\else}\fi} + +%D The signs can be made smaller and sqeezed into the width +%D of a digit. Watch the \type {\fontdimen22} trickery (this +%D font related register stored the math axis). + +\def\scandigits#1% + {\if#1.\doscandigit1\chardef\skipdigit0\else + \if#1,\doscandigit2\chardef\skipdigit0\else + \if#1@\hphantom{0}\chardef\skipdigit1\else + \if#1_\hphantom{0}\chardef\skipdigit1\else + \if#1/\digitsgn{\hphantom{+}}\chardef\skipdigit0\else + \if#1-\digitsgn-\chardef\skipdigit0\else + \if#1+\digitsgn+\chardef\skipdigit0\else + \if#1=\digitsgn\zeroamount\chardef\skipdigit0\else + \if#1s\digitsgn{\hphantom{\positive}}\chardef\skipdigit0\else + \if#1p\digitsgn\positive\chardef\skipdigit0\else + \if#1m\digitsgn\negative\chardef\skipdigit0\else + \if#1n\digitsgn\negative\chardef\skipdigit0\else + #1\chardef\skipdigit0\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} + +\def\digitsgn#1% + {\ifcase\digitsignmode#1\else + \hbox + {\setbox\scratchbox=\hbox{0}% + \scratchdimen\fontdimen22\textfont2 + \def\digitsgn##1##2% + {\advance\scratchdimen-\fontdimen22##12 + \raise\scratchdimen + \hbox to \wd\scratchbox{\hss$##2#1$\hss}}% + \ifcase\digitsignmode\or + \digitsgn\textfont \textstyle \or + \digitsgn\scriptfont \scriptstyle \or + \digitsgn\scriptscriptfont\scriptscriptstyle\fi}% \fi} +\ifx\undefined\zeroamount \def\zeroamount{-} \fi +\ifx\undefined\positive \def\positive {+} \fi +\ifx\undefined\negative \def\negative {-} \fi + +%D The digit parser handles a bunch of special characters as +%D well as different formats. We strongly suggest you to use +%D the grouped call. +%D +%D \starttabulatie[|l|l|l|] +%D \NC \type{.} \NC , . \NC comma or period \NC \NR +%D \NC \type{,} \NC , . \NC comma or period \NC \NR +%D \NC \type{@} \NC \NC invisible space \NC \NR +%D \NC \type{_} \NC \NC invisible space \NC \NR +%D \NC \type{/} \NC \NC invisible sign \NC \NR +%D \NC \type{-} \NC $-$ \NC minus sign \NC \NR +%D \NC \type{+} \NC $+$ \NC plus sign \NC \NR +%D \NC \type{s} \NC \NC invisible high sign \NC \NR +%D \NC \type{p} \NC $\positive$ \NC high plus sign \NC \NR +%D \NC \type{m} \NC $\negative$ \NC high minus sign \NC \NR +%D \NC \type{n} \NC $\negative$ \NC high minus (negative) sign \NC \NR +%D \NC \type{=} \NC $\zeroamount$ \NC zero padding \NC \NR +%D \stoptabulatie +%D +%D These triggers are used in the following examples. +%D +%D \startbuffer +%D \digits 12 +%D \digits{~~~.~~~.~~~.68.712,34} +%D \digits ~~~.~~~.~~~.68.712,34 +%D \digits ___.___.111.68.712,34 +%D \digits 111.111.111.68.712,34 +%D \digits 12.345,90 +%D \digits 12.345.000 +%D \digits 12,34 +%D \digits{392.857.230.68.712,34} +%D {\digits1234} +%D \digits{1234} +%D \digits 1234\relax +%D $\digits 123.222,00$ +%D \digits 123.222,00 +%D \digits 123.222,== +%D \digits 123.222,00^10 +%D \digits 123.222,00e10 +%D \digits /123.222,00e-12 +%D \digits -123.222,00e-12 +%D \digits +123.222,00e-12 +%D \digits n123.222,00e-12 +%D \digits s123.222,00e-12 +%D \digits p123.222,00e-12 +%D \stopbuffer +%D +%D \typebuffer +%D +%D \startregels +%D \haalbuffer +%D \stopregels + +%D \macros +%D {Digits} +%D %D We also permit: \let\Digits=\digits @@ -175,7 +324,7 @@ %D The seperator is defined as: \def\digitpowerseperator% - {\cdot10} + {\cdot10} % {\times10} %D \macros %D {digittemplate} diff --git a/tex/context/base/supp-pdf.tex b/tex/context/base/supp-pdf.tex index 559e95644..1d6ee9d7e 100644 --- a/tex/context/base/supp-pdf.tex +++ b/tex/context/base/supp-pdf.tex @@ -24,6 +24,7 @@ \ifx \undefined \writestatus \input supp-mis.tex \relax \fi \ifx \undefined \convertMPtoPDF \else \expandafter \endinput \fi +\ifx \undefined \StartLatexHack \else \StartLatexHack \fi %D This module handles some \PDF\ conversion and insertions %D topics. By default, the macros use the \PDFTEX\ primitive @@ -64,12 +65,13 @@ %D \pdfclippedimage <optional dimensions> {file} {l} {r} {t} {b} %D \stoptypen -\ifx\pdftexversion\undefined - \writestatus{\m!systems}{Why not use pdf(e)TeX binaries?} - \protect\expandafter\endinput -\fi +\ifx\pdftexversion\undefined % no \m!systems for the sake of latex + \writestatus{systems}{Why not use pdf(e)TeX binaries?} + \protect + \expandafter\endinput +\fi -\ifnum\pdftexversion>13 +\ifnum\pdftexversion>13 \def\pdfimage#1#% {\dopdfimage{#1}} @@ -110,7 +112,18 @@ \pdfrefxform\pdflastxform \egroup} -%D For old times sake: +%D If you want to save a few hash entries, you may prefer the +%D less readable alternatives, like: +%D +%D \starttypen +%D \def\pdfimage#1#% This one is less readable but needs no additional +%D {\bgroup % hash entry for the second stage macro. +%D \def\pdfimage##1% +%D {\immediate\pdfximage##1{#2}% +%D \pdfrefximage\pdflastximage\egroup}} +%D \stoptypen + +%D For old times sake: (will be removed some day) \let\pdfform =\pdfxform \let\pdflastform=\pdflastxform @@ -510,6 +523,7 @@ \def}B\char125\relax EE \gdef\setMPspecials| B\setnaturalcatcodes + \catcode`\\=\@@escape \catcode`\%=\@@active \catcode`\[=\@@active \catcode`\]=\@@active @@ -648,7 +662,7 @@ {\PDFcode{\!MP{\gMPa1} g \!MP{\gMPa1} G}} -%D Beginning and ending the graphics is taken care of by the +%D Begining and ending the graphics is taken care of by the %D macro \type{\handleMPgraphic}, which is redefined when %D the first graphics operator is met. @@ -720,7 +734,7 @@ \let\next=\handleMPsequence \ifskipemptyMPgraphic \ifdim\MPheight=\!!zeropoint\relax\ifdim\MPwidth=\!!zeropoint\relax - \def\next{\endinput\finishMPgraphic}% + \def\next{\endinput\finishMPgraphic}% \fi\fi \fi \next} @@ -765,6 +779,9 @@ %D finaly I saw the light. It proved that we also had to %D take care of \type{(split arguments)}. +\def\setMPfshowfont#1#2% + {\font\temp=#1\space at #2\relax\temp} + \def\handleMPfshow% {\bgroup \setbox\scratchbox=\hbox @@ -772,7 +789,7 @@ \edef\size{\gMPa\nofMParguments}% \ifx\size\PSnfont % round font size (to pt) \advance\nofMParguments by -1 - \expandafter\scratchdimen\gMPa\nofMParguments pt + \expandafter\scratchdimen\gMPa\nofMParguments pt\relax \ifdim\scratchdimen<1pt \def\size{1pt}% \else @@ -784,7 +801,8 @@ \edef\size{\size bp}% \fi \advance\nofMParguments by -1 - \font\temp=\gMPa\nofMParguments\space at \size + %\font\temp=\gMPa\nofMParguments\space at \size + \setMPfshowfont{\gMPa\nofMParguments}\size \advance\nofMParguments by -1 \temp \ifnum\nofMParguments=1 @@ -1432,6 +1450,7 @@ \def\convertMPtoPDF#1#2#3% {\bgroup + \ifx\pdfdecimaldigits\undefined\else \pdfdecimaldigits=5 \fi % new \setbox\scratchbox=\vbox\bgroup \forgetall \offinterlineskip @@ -1457,6 +1476,55 @@ \input#1\relax \deleteMPgraphic{#1}} +% strange rounding/clip in pdftex/viewer +% +% \def\finishMPgraphic% +% {\stopMPresources +% \egroup +% \ifx\pdftexversion\undefined\else\ifnum\pdftexversion<14 % for the moment +% \chardef\makeMPintoPDFobject=0 +% \fi\fi +% \ifcase\makeMPintoPDFobject\or\or\ifx\currentPDFresources\empty\else +% \chardef\makeMPintoPDFobject=1 +% \fi\fi +% \setbox\scratchbox=\vbox +% {\forgetall +% \hbox +% {\PDFcode{q \MPxscale\space 0 0 \MPyscale\space \MPxoffset\space \MPyoffset\space cm}% +% \lower\MPyshift\box\scratchbox % unscaled shift +% \PDFcode{Q}}}% +% \ht\scratchbox\MPheight +% \wd\scratchbox\MPwidth +% \dp\scratchbox\!!zeropoint +% \ifcase\makeMPintoPDFobject +% \box\scratchbox +% \or +% \immediate\pdfxform resources{\currentPDFresources}\scratchbox +% \xdef\lastPDFMPobject{\the\pdflastxform}% +% \pdfrefxform\lastPDFMPobject +% \global\let\currentPDFresources\empty +% \else +% \box\scratchbox +% \fi +% \egroup} +% +% funny clip in viewer +% +% \setbox\scratchbox=\vbox +% {\forgetall +% \dimen0=\MPllx bp +% \dimen2=\MPlly bp +% \setbox\scratchbox=\hbox{\hskip-\dimen0\raise-\dimen2\box\scratchbox}% +% \ht\scratchbox=\!!zeropoint +% \dp\scratchbox=\!!zeropoint +% \wd\scratchbox=\!!zeropoint +% \hbox +% {\PDFcode{q \MPxscale\space 0 0 \MPyscale\space 0 0 cm}% +% \lower\MPshift\box\scratchbox +% \PDFcode{Q}}}% + +\let\PDFMPformoffset\!!zeropoint + \def\finishMPgraphic% {\stopMPresources \egroup @@ -1466,41 +1534,44 @@ \ifcase\makeMPintoPDFobject\or\or\ifx\currentPDFresources\empty\else \chardef\makeMPintoPDFobject=1 \fi\fi - \setbox\scratchbox=\vbox + \setbox\scratchbox=\vbox {\forgetall - \hbox + \hbox {\PDFcode{q \MPxscale\space 0 0 \MPyscale\space \MPxoffset\space \MPyoffset\space cm}% \lower\MPyshift\box\scratchbox % unscaled shift \PDFcode{Q}}}% \ht\scratchbox\MPheight \wd\scratchbox\MPwidth - \dp\scratchbox\!!zeropoint + \dp\scratchbox\!!zeropoint\relax \ifcase\makeMPintoPDFobject \box\scratchbox \or + \scratchdimen=\PDFMPformoffset\relax + \ifdim\scratchdimen>\!!zeropoint % compensate for error + \setbox\scratchbox=\vbox spread 2\scratchdimen + {\forgetall + \vss + \hbox spread 2\scratchdimen + {\hss + \box\scratchbox + \hss}% + \vss}% + \fi \immediate\pdfxform resources{\currentPDFresources}\scratchbox \xdef\lastPDFMPobject{\the\pdflastxform}% - \pdfrefxform\lastPDFMPobject + \ifdim\scratchdimen>\!!zeropoint % compensate for error + \vbox to \MPheight + {\forgetall + \vss\hbox to \MPwidth{\hss\pdfrefxform\lastPDFMPobject\hss}\vss}% + \else + \pdfrefxform\lastPDFMPobject + \fi \global\let\currentPDFresources\empty \else \box\scratchbox \fi - \egroup} - -% funny clip in viewer -% -% \setbox\scratchbox=\vbox -% {\forgetall -% \dimen0=\MPllx bp -% \dimen2=\MPlly bp -% \setbox\scratchbox=\hbox{\hskip-\dimen0\raise-\dimen2\box\scratchbox}% -% \ht\scratchbox=\!!zeropoint -% \dp\scratchbox=\!!zeropoint -% \wd\scratchbox=\!!zeropoint -% \hbox -% {\PDFcode{q \MPxscale\space 0 0 \MPyscale\space 0 0 cm}% -% \lower\MPshift\box\scratchbox -% \PDFcode{Q}}}% + \egroup + \endinput} %D \macros %D {deleteMPgraphic, @@ -1539,6 +1610,6 @@ %D does all the calculations. Converting other \POSTSCRIPT\ %D files would drive both me and \TEX\ crazy. -\protect +\ifx\undefined\StopLatexHack \else \StopLatexHack \fi -\endinput +\protect \endinput diff --git a/tex/context/base/supp-ran.tex b/tex/context/base/supp-ran.tex index ec0f73f15..b83f4ad52 100644 --- a/tex/context/base/supp-ran.tex +++ b/tex/context/base/supp-ran.tex @@ -55,8 +55,9 @@ \else - \let\normalnextrandom = \nextrandom - \let\restorerandomseed = \relax + \let\normalnextrandom = \nextrandom + + \global\chardef\randomseedfrozen=0 \def\nextrandom% {\bgroup @@ -65,7 +66,8 @@ \let\month=\normalmonth \let\year =\normalyear \normalnextrandom - \gdef\nextrandom{\restorerandomseed\normalnextrandom}% + \gdef\nextrandom% + {\ifcase\randomseedfrozen\normalnextrandom\fi}% \egroup} % avoid scratch dimens 0 and 2 @@ -83,9 +85,14 @@ \fi \def\freezerandomseed% - {\xdef\restorerandomseed% - {\global\randomi\number\randomi - \global\let\noexpand\restorerandomseed\relax}} + {\ifcase\randomseedfrozen + \nextrandom \global\chardef\randomseedfrozen=1 + \fi} + +\def\defrostrandomseed% + {\ifcase\randomseedfrozen\else + \global\chardef\randomseedfrozen=0 \nextrandom + \fi} \let\getrandomcount = \setrannum \let\getrandomdimen = \setrandim diff --git a/tex/context/base/symb-ini.tex b/tex/context/base/symb-ini.tex index 18822256e..1a56505b2 100644 --- a/tex/context/base/symb-ini.tex +++ b/tex/context/base/symb-ini.tex @@ -51,6 +51,11 @@ 1: leser inn symbolsett -- \stopmessages +\startmessages romanian library: symbols + title: simboluri + 1: se incarca setul de simboluri -- +\stopmessages + %D \macros %D {definesymbol, symbol} %D @@ -108,8 +113,8 @@ {\doifdefinedelse{\??ss:#1}{\dodosymbol{#1}}{#1}}% \fi\fi} -\def\dodosymbol#1% - {{\the\everysymbol\getvalue{\??ss:#1}}} +\def\dodosymbol#1% \relax's prevent lookahead problems + {{\the\everysymbol\getvalue{\??ss:#1}\relax}\relax} \newtoks\everysymbol diff --git a/tex/context/base/symb-nav.tex b/tex/context/base/symb-nav.tex index 3e59ef5da..ad802f729 100644 --- a/tex/context/base/symb-nav.tex +++ b/tex/context/base/symb-nav.tex @@ -13,59 +13,59 @@ \unprotect -\def\ContextNavigation#1{\getglyph{ContextNavigation}{\char#1}} +\def\ContextNavigationGlyph#1{\getglyph{ContextNavigation}{\char#1}} \startsymbolset [navigation 1] - \definesymbol [\v!vorigepagina] [\ContextNavigation{1}] - \definesymbol [\v!volgendepagina] [\ContextNavigation{2}] - \definesymbol [\v!eerstepagina] [\ContextNavigation{3}] - \definesymbol [\v!laatstepagina] [\ContextNavigation{4}] - \definesymbol [\v!PreviousJump] [\ContextNavigation{5}] - \definesymbol [\v!NextJump] [\ContextNavigation{6}] - \definesymbol [\v!CloseDocument] [\ContextNavigation{7}] - \definesymbol [\v!PauseMovie] [\ContextNavigation{8}] + \definesymbol [\v!vorigepagina] [\ContextNavigationGlyph{1}] + \definesymbol [\v!volgendepagina] [\ContextNavigationGlyph{2}] + \definesymbol [\v!eerstepagina] [\ContextNavigationGlyph{3}] + \definesymbol [\v!laatstepagina] [\ContextNavigationGlyph{4}] + \definesymbol [\v!PreviousJump] [\ContextNavigationGlyph{5}] + \definesymbol [\v!NextJump] [\ContextNavigationGlyph{6}] + \definesymbol [\v!CloseDocument] [\ContextNavigationGlyph{7}] + \definesymbol [\v!PauseMovie] [\ContextNavigationGlyph{8}] - \definesymbol [\v!vorigesubpagina] [\ContextNavigation{1}] - \definesymbol [\v!volgendesubpagina] [\ContextNavigation{2}] - \definesymbol [\v!eerstesubpagina] [\ContextNavigation{3}] - \definesymbol [\v!laatstesubpagina] [\ContextNavigation{4}] + \definesymbol [\v!vorigesubpagina] [\ContextNavigationGlyph{1}] + \definesymbol [\v!volgendesubpagina] [\ContextNavigationGlyph{2}] + \definesymbol [\v!eerstesubpagina] [\ContextNavigationGlyph{3}] + \definesymbol [\v!laatstesubpagina] [\ContextNavigationGlyph{4}] \stopsymbolset \startsymbolset [navigation 2] - \definesymbol [\v!vorigepagina] [\ContextNavigation{101}] - \definesymbol [\v!volgendepagina] [\ContextNavigation{102}] - \definesymbol [\v!eerstepagina] [\ContextNavigation{103}] - \definesymbol [\v!laatstepagina] [\ContextNavigation{104}] - \definesymbol [\v!PreviousJump] [\ContextNavigation{105}] - \definesymbol [\v!NextJump] [\ContextNavigation{106}] - \definesymbol [\v!CloseDocument] [\ContextNavigation{107}] - \definesymbol [\v!PauseMovie] [\ContextNavigation{108}] - - \definesymbol [\v!vorigesubpagina] [\ContextNavigation{101}] - \definesymbol [\v!volgendesubpagina] [\ContextNavigation{102}] - \definesymbol [\v!eerstesubpagina] [\ContextNavigation{103}] - \definesymbol [\v!laatstesubpagina] [\ContextNavigation{104}] + \definesymbol [\v!vorigepagina] [\ContextNavigationGlyph{101}] + \definesymbol [\v!volgendepagina] [\ContextNavigationGlyph{102}] + \definesymbol [\v!eerstepagina] [\ContextNavigationGlyph{103}] + \definesymbol [\v!laatstepagina] [\ContextNavigationGlyph{104}] + \definesymbol [\v!PreviousJump] [\ContextNavigationGlyph{105}] + \definesymbol [\v!NextJump] [\ContextNavigationGlyph{106}] + \definesymbol [\v!CloseDocument] [\ContextNavigationGlyph{107}] + \definesymbol [\v!PauseMovie] [\ContextNavigationGlyph{108}] + + \definesymbol [\v!vorigesubpagina] [\ContextNavigationGlyph{101}] + \definesymbol [\v!volgendesubpagina] [\ContextNavigationGlyph{102}] + \definesymbol [\v!eerstesubpagina] [\ContextNavigationGlyph{103}] + \definesymbol [\v!laatstesubpagina] [\ContextNavigationGlyph{104}] \stopsymbolset \startsymbolset [navigation 3] - \definesymbol [\v!vorigepagina] [\ContextNavigation{201}] - \definesymbol [\v!volgendepagina] [\ContextNavigation{202}] - \definesymbol [\v!eerstepagina] [\ContextNavigation{203}] - \definesymbol [\v!laatstepagina] [\ContextNavigation{204}] - \definesymbol [\v!PreviousJump] [\ContextNavigation{205}] - \definesymbol [\v!NextJump] [\ContextNavigation{206}] - \definesymbol [\v!CloseDocument] [\ContextNavigation{207}] - \definesymbol [\v!PauseMovie] [\ContextNavigation{208}] - - \definesymbol [\v!vorigesubpagina] [\ContextNavigation{201}] - \definesymbol [\v!volgendesubpagina] [\ContextNavigation{202}] - \definesymbol [\v!eerstesubpagina] [\ContextNavigation{203}] - \definesymbol [\v!laatstesubpagina] [\ContextNavigation{204}] + \definesymbol [\v!vorigepagina] [\ContextNavigationGlyph{201}] + \definesymbol [\v!volgendepagina] [\ContextNavigationGlyph{202}] + \definesymbol [\v!eerstepagina] [\ContextNavigationGlyph{203}] + \definesymbol [\v!laatstepagina] [\ContextNavigationGlyph{204}] + \definesymbol [\v!PreviousJump] [\ContextNavigationGlyph{205}] + \definesymbol [\v!NextJump] [\ContextNavigationGlyph{206}] + \definesymbol [\v!CloseDocument] [\ContextNavigationGlyph{207}] + \definesymbol [\v!PauseMovie] [\ContextNavigationGlyph{208}] + + \definesymbol [\v!vorigesubpagina] [\ContextNavigationGlyph{201}] + \definesymbol [\v!volgendesubpagina] [\ContextNavigationGlyph{202}] + \definesymbol [\v!eerstesubpagina] [\ContextNavigationGlyph{203}] + \definesymbol [\v!laatstesubpagina] [\ContextNavigationGlyph{204}] \stopsymbolset diff --git a/tex/context/base/syst-con.tex b/tex/context/base/syst-con.tex new file mode 100644 index 000000000..b3af03237 --- /dev/null +++ b/tex/context/base/syst-con.tex @@ -0,0 +1,125 @@ +%D \module +%D [ file=syst-con, +%D version=2000.12.10, % actually very old -) +%D title=\CONTEXT\ System Macros, +%D subtitle=Conversions, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\writestatus{loading}{Context System Macro's / Conversions} + +\unprotect + +%D When the number of conversions grew, it did no longer make +%D sense to spread them over multiple files. So, instead of +%D defining these in \type {font-ini}, we now have a dedicated +%D module. + +%D \macros +%D {lchexnumber,uchexnumber,lchexnumbers} +%D +%D In addition to the uppercase hex conversion, as needed in +%D math families, we occasionally need a lowercase one, for +%D instance when we want to compose gbsong fontnames. + +\def\uchexnumber#1% + {\ifcase#1 0\or 1\or 2\or 3\or 4\or 5\or 6\or 7\or + 8\or 9\or A\or B\or C\or D\or E\or F\else 0\fi} + +\def\lchexnumber#1% + {\ifcase#1 0\or 1\or 2\or 3\or 4\or 5\or 6\or 7\or + 8\or 9\or a\or b\or c\or d\or e\or f\else 0\fi} + +\let\hexnumber=\uchexnumber + +\def\lchexnumbers#1% + {\ifcase#1 + 00\or 01\or 02\or 03\or 04\or 05\or 06\or 07\or 08\or 09\or 0a\or 0b\or 0c\or 0d\or 0e\or 0f\or + 10\or 11\or 12\or 13\or 14\or 15\or 16\or 17\or 18\or 19\or 1a\or 1b\or 1c\or 1d\or 1e\or 1f\or + 20\or 21\or 22\or 23\or 24\or 25\or 26\or 27\or 28\or 29\or 2a\or 2b\or 2c\or 2d\or 2e\or 2f\or + 30\or 31\or 32\or 33\or 34\or 35\or 36\or 37\or 38\or 39\or 3a\or 3b\or 3c\or 3d\or 3e\or 3f\or + 40\or 41\or 42\or 43\or 44\or 45\or 46\or 47\or 48\or 49\or 4a\or 4b\or 4c\or 4d\or 4e\or 4f\or + 50\or 51\or 52\or 53\or 54\or 55\or 56\or 57\or 58\or 59\or 5a\or 5b\or 5c\or 5d\or 5e\or 5f\or + 60\or 61\or 62\or 63\or 64\or 65\or 66\or 67\or 68\or 69\or 6a\or 6b\or 6c\or 6d\or 6e\or 6f\or + 70\or 71\or 72\or 73\or 74\or 75\or 76\or 77\or 78\or 79\or 7a\or 7b\or 7c\or 7d\or 7e\or 7f\or + 80\or 81\or 82\or 83\or 84\or 85\or 86\or 87\or 88\or 89\or 8a\or 8b\or 8c\or 8d\or 8e\or 8f\or + 90\or 91\or 92\or 93\or 94\or 95\or 96\or 97\or 98\or 99\or 9a\or 9b\or 9c\or 9d\or 9e\or 9f\or + a0\or a1\or a2\or a3\or a4\or a5\or a6\or a7\or a8\or a9\or aa\or ab\or ac\or ad\or ae\or af\or + b0\or b1\or b2\or b3\or b4\or b5\or b6\or b7\or b8\or b9\or ba\or bb\or bc\or bd\or be\or bf\or + c0\or c1\or c2\or c3\or c4\or c5\or c6\or c7\or c8\or c9\or ca\or cb\or cc\or cd\or ce\or cf\or + d0\or d1\or d2\or d3\or d4\or d5\or d6\or d7\or d8\or d9\or da\or db\or dc\or dd\or de\or df\or + e0\or e1\or e2\or e3\or e4\or e5\or e6\or e7\or e8\or e9\or ea\or eb\or ec\or ed\or ee\or ef\or + f0\or f1\or f2\or f3\or f4\or f5\or f6\or f7\or f8\or f9\or fa\or fb\or fc\or fd\or fe\or ff\fi} + +%D \macros +%D {octnumber} +%D +%D For unicode remapping purposes, we need octal numbers. + +\def\octnumber#1% + {\ifcase#1 + 000\or 001\or 002\or 003\or 004\or 005\or 006\or 007\or + 010\or 011\or 012\or 013\or 014\or 015\or 016\or 017\or + 020\or 021\or 022\or 023\or 024\or 025\or 026\or 027\or + 030\or 031\or 032\or 033\or 034\or 035\or 036\or 037\or + 040\or 041\or 042\or 043\or 044\or 045\or 046\or 047\or + 050\or 051\or 052\or 053\or 054\or 055\or 056\or 057\or + 060\or 061\or 062\or 063\or 064\or 065\or 066\or 067\or + 070\or 071\or 072\or 073\or 074\or 075\or 076\or 077\or + 100\or 101\or 102\or 103\or 104\or 105\or 106\or 107\or + 110\or 111\or 112\or 113\or 114\or 115\or 116\or 117\or + 120\or 121\or 122\or 123\or 124\or 125\or 126\or 127\or + 130\or 131\or 132\or 133\or 134\or 135\or 136\or 137\or + 140\or 141\or 142\or 143\or 144\or 145\or 146\or 147\or + 150\or 151\or 152\or 153\or 154\or 155\or 156\or 157\or + 160\or 161\or 162\or 163\or 164\or 165\or 166\or 167\or + 170\or 171\or 172\or 173\or 174\or 175\or 176\or 177\or + 200\or 201\or 202\or 203\or 204\or 205\or 206\or 207\or + 210\or 211\or 212\or 213\or 214\or 215\or 216\or 217\or + 220\or 221\or 222\or 223\or 224\or 225\or 226\or 227\or + 230\or 231\or 232\or 233\or 234\or 235\or 236\or 237\or + 240\or 241\or 242\or 243\or 244\or 245\or 246\or 247\or + 250\or 251\or 252\or 253\or 254\or 255\or 256\or 257\or + 260\or 261\or 262\or 263\or 264\or 265\or 266\or 267\or + 270\or 271\or 272\or 273\or 274\or 275\or 276\or 277\or + 300\or 301\or 302\or 303\or 304\or 305\or 306\or 307\or + 310\or 311\or 312\or 313\or 314\or 315\or 316\or 317\or + 320\or 321\or 322\or 323\or 324\or 325\or 326\or 327\or + 330\or 331\or 332\or 333\or 334\or 335\or 336\or 337\or + 340\or 341\or 342\or 343\or 344\or 345\or 346\or 347\or + 350\or 351\or 352\or 353\or 354\or 355\or 356\or 357\or + 360\or 361\or 362\or 363\or 364\or 365\or 366\or 367\or + 370\or 371\or 372\or 373\or 374\or 375\or 376\or 377\fi} + +%D \macros +%D {rawcharacter} +%D +%D This conversion macro produces raw characters. We have to +%D construct the macro in a special way to avoid problems with +%D characters with special meanings. So, we revert to the +%D lowercase conversion trick to bypass \TEX's input parser. + +\bgroup + +\catcode`\^^@=12 % ascii null == ignored in plain +\catcode`\^^?=12 % ascii delete == invalid in plain + +\let\or\relax + +\xdef\rawcharacter{ ^^00\or} + +\dorecurse{255} + {\lccode`a=\recurselevel + \lowercase{\xdef\rawcharacter{\rawcharacter a\or}}} + +\@EA\gdef\@EA\rawcharacter\@EA#\@EA1\@EA + {\@EA\ifcase\@EA#\@EA1\rawcharacter\fi} + +\egroup + +\protect \endinput diff --git a/tex/context/base/syst-etx.tex b/tex/context/base/syst-etx.tex index e00eab73c..20c7f2653 100644 --- a/tex/context/base/syst-etx.tex +++ b/tex/context/base/syst-etx.tex @@ -143,7 +143,7 @@ %D low level macros. We reserve some extra space for inserts %D and as soon as we near the end of the first register %D memory bank (often some 10 less than 255), we switch to the -%D slower range \@@medallocation||\@@maxallocation. +%D slower range \type {\@@medallocation}||\type {\@@maxallocation}. \beginETEX \new... diff --git a/tex/context/base/syst-ext.tex b/tex/context/base/syst-ext.tex index 04a118cbd..85bb8fbe5 100644 --- a/tex/context/base/syst-ext.tex +++ b/tex/context/base/syst-ext.tex @@ -38,13 +38,13 @@ %D {doglobal, %D redoglobal,dodoglobal,resetglobal} %D -%D The two macros \type{\redoglobal} and \type{\dodoglobal} are +%D The two macros \type {\redoglobal} and \type{\dodoglobal} are %D used in this and some other modules to enforce a user -%D specified \type{\doglobal} action. The last and often only +%D specified \type {\doglobal} action. The last and often only %D global assignment in a macro is done with -%D \type{\dodoglobal}, but all preceding ones with -%D \type{\redoglobal}. When using only alternatives, one can -%D reset this mechanism with \type{\resetglobal}. +%D \type {\dodoglobal}, but all preceding ones with +%D \type {\redoglobal}. When using only alternatives, one can +%D reset this mechanism with \type {\resetglobal}. \def\doglobal% {\let\redoglobal\global @@ -63,8 +63,8 @@ {\ifx\redoglobal\relax \let\redoglobal\global \def\dodoglobal{\resetglobal\global}% - \else - \writestatus{system}{global not reset, warn me!}% + %\else + % \writestatus{system}{global not reset, warn me!}% \fi} \def\saveglobal @@ -202,21 +202,15 @@ {\dodododoincrement(#1,1)} \def\dodoincrement(#1% - {\doifnextcharelse{,} - {\dodododoincrement(#1} - {\dodododoincrement(#1,1}} + {\doifnextcharelse,% + {\dodododoincrement(#1}{\dodododoincrement(#1,1}} \def\doincrement#1% {\def\incrementsign{#1}% - \doifnextcharelse{(} - {\dodoincrement} - {\dododoincrement}} - -\def\increment% - {\doincrement+} + \doifnextcharelse(\dodoincrement\dododoincrement} -\def\decrement% - {\doincrement-} +\def\increment{\doincrement+} +\def\decrement{\doincrement-} %D \macros %D {newsignal} @@ -414,30 +408,74 @@ \let\nextrecurse\relax -\long\def\dostepwiserecurse#1#2#3#4% - {%\let\nextrecurse\relax - \ifcase#2\relax - \let\recurselevel\zerocountervalue - \let\nextrecurse\relax - \else - \global\advance\outerrecurse by 1 - \setevalue{\@@irecurse\recursedepth}{\number#1}% - \setevalue{\@@nrecurse\recursedepth}{\number#2}% - \setevalue{\@@srecurse\recursedepth}{\number#3}% - \ifnum#3>0\relax\ifnum#2<#1\relax - \else - \setevalue{\@@drecurse\recursedepth}{>}% - \long\setvalue{\@@arecurse\recursedepth}{#4}% - \let\nextrecurse\dodorecurse - \fi\fi - \ifnum#3<0\relax\ifnum#1<#2\relax +% not entirely correct +% +% \long\def\dostepwiserecurse#1#2#3#4% +% {%\let\nextrecurse\relax +% \ifcase#2\relax +% \let\recurselevel\zerocountervalue +% \let\nextrecurse\relax +% \else +% \global\advance\outerrecurse by 1 +% \setevalue{\@@irecurse\recursedepth}{\number#1}% +% \setevalue{\@@nrecurse\recursedepth}{\number#2}% +% \setevalue{\@@srecurse\recursedepth}{\number#3}% +% \ifnum#3>0\relax\ifnum#2<#1\relax +% \else +% \setevalue{\@@drecurse\recursedepth}{>}% +% \long\setvalue{\@@arecurse\recursedepth}{#4}% +% \let\nextrecurse\dodorecurse +% \fi\fi +% \ifnum#3<0\relax\ifnum#1<#2\relax +% \else +% \setevalue{\@@drecurse\recursedepth}{<}% +% \long\setvalue{\@@arecurse\recursedepth}{#4}% +% \let\nextrecurse\dodorecurse +% \fi\fi +% \fi +% \nextrecurse} + +\long\def\dosetstepwiserecurse#1#2#3#4#5% + {\global\advance\outerrecurse by 1 + \setevalue{\@@drecurse\recursedepth}{#1}% + \setevalue{\@@irecurse\recursedepth}{\number#2}% + \setevalue{\@@nrecurse\recursedepth}{\number#3}% + \setevalue{\@@srecurse\recursedepth}{\number#4}% + \long\setvalue{\@@arecurse\recursedepth}{#5}% + \dodorecurse} + +%D Acceptable. +%D +%D \starttypen +%D \long\def\dostepwiserecurse#1#2#3% +%D {\let\nextrecurse\gobblefourarguments +%D \ifnum#3>0\relax\ifnum#2<#1\relax\else +%D \def\nextrecurse{\dosetstepwiserecurse>}% +%D \fi\fi +%D \ifnum#3<0\relax\ifnum#1<#2\relax\else +%D \def\nextrecurse{\dosetstepwiserecurse<}% +%D \fi\fi +%D \nextrecurse{#1}{#2}{#3}} +%D \stoptypen +%D +%D Better. + +\long\def\dostepwiserecurse#1#2#3% + {\let\nextrecurse\gobblefourarguments + \ifnum#3>0\relax + \ifnum#2<#1\relax \else - \setevalue{\@@drecurse\recursedepth}{<}% - \long\setvalue{\@@arecurse\recursedepth}{#4}% - \let\nextrecurse\dodorecurse - \fi\fi + \def\nextrecurse{\dosetstepwiserecurse>}% + \fi + \else + \ifnum#3<0\relax + \ifnum#1<#2\relax + \else + \def\nextrecurse{\dosetstepwiserecurse<}% + \fi + \fi \fi - \nextrecurse} + \nextrecurse{#1}{#2}{#3}} \def\donorecurse% {} @@ -580,7 +618,7 @@ \def\doloop% {\dostepwiserecurse{1}{\maxdimen}{1}} -\def\exitloop +\def\exitloop% {\setvalue{\@@irecurse\recursedepth}{\maxdimen}} %D We don't declare new counters for \type{\looplevel} and @@ -804,8 +842,11 @@ \long\def\convertargument#1\to#2% {\dodoglobal\edef#2{\detokenize{#1}}} +% \long\def\convertcommand#1\to#2% +% {\@EA\dodoglobal\@EA\edef\@EA#2\@EA{\@EA\detokenize\@EA{#1}}} + \long\def\convertcommand#1\to#2% - {\@EA\dodoglobal\@EA\edef\@EA#2\@EA{\@EA\detokenize\@EA{#1}}} + {\dodoglobal\edef#2{\@EA\detokenize\@EA{#1}}} \endETEX @@ -934,7 +975,7 @@ {\let\ExpandCommand#1\complexorsimple\ExpandFirstAfter} \def\ExpandSecondAfter#1#2#3% - {\def\!!stringa{#2}% + {\edef\!!stringa{#2}% was \def \edef\!!stringb{#3}% \@EA#1\@EA{\@EA\!!stringa\@EA}\@EA{\!!stringb}} @@ -1311,9 +1352,11 @@ %D \type{CAPITALS}. This suggestion is feasible, because %D \CONTEXT only defines lowcased macros. -\def\checkdefined#1#2#3% redefined in mult-ini - {\doifdefined{#3} - {\writestatus{#1}{#2 #3 replaces a macro, use CAPITALS!}}} +\def\showdefinederror#1#2% + {\writestatus{system}{#1 #2 replaces a macro, use CAPITALS!}} + +\def\checkdefined#1#2#3% + {\doifdefined{#3}{\showdefinederror{#2}{#3}}} %D \macros %D {GotoPar,GetPar} @@ -1585,7 +1628,8 @@ \let\normalegroup\egroup %D \macros -%D {appendtoks,prependtoks,flushtoks,dotoks} +%D {appendtoks,prependtoks,appendtoksonce,prependtoksonce, +%D doifintokselse,flushtoks,dotoks} %D %D We use \TOKENLISTS\ sparsely within \CONTEXT, because the %D comma separated lists are more suitable for the user @@ -1608,86 +1652,63 @@ %D \starttypen %D \def\appendtoks#1\to#2% %D {\scratchtoks={#1}% -%D \edef\next{\noexpand#2={\the#2\the\scratchtoks}}% -%D \next -%D \dodoglobal#2=#2} +%D \expanded{\dodoglobal\noexpand#2{\the#2\the\scratchtoks}}} %D %D \def\prependtoks#1\to#2% %D {\scratchtoks={#1}% -%D \edef\next{\noexpand#2={\the\scratchtoks\the#2}}% -%D \next -%D \dodoglobal#2=#2} +%D \expanded{\dodoglobal\noexpand#2{\the\scratchtoks\the#2}}} %D \stoptypen %D %D But here we prefer: -% haha, far to complex +% before we had the once only alternatives, we had: % -% \def\appendtoks% -% {\bgroup -% \let\bgroup\relax -% \futurelet\scratchtoken\doappendtoks} -% -% \def\doappendtoks% -% {\ifx\scratchtoken\normalbgroup -% \egroup\expandafter\dodoappendtoks -% \else -% \egroup\expandafter\dododoappendtoks -% \fi} -% -% \def\dodoappendtoks#1% -% {\dododoappendtoks{{#1}}} -% -% \def\dododoappendtoks#1\to#2% -% {\scratchtoks={#1}% -% \edef\scratchtoken{\noexpand#2={\the#2\the\scratchtoks}}% -% \scratchtoken -% \dodoglobal#2=#2} -% -% \def\prependtoks% -% {\bgroup -% \let\bgroup\relax -% \futurelet\scratchtoken\doprependtoks} -% -% \def\doprependtoks% -% {\ifx\scratchtoken\normalbgroup -% \egroup\expandafter\dodoprependtoks -% \else -% \egroup\expandafter\dododoprependtoks -% \fi} -% -% \def\dodoprependtoks#1% -% {\dododoprependtoks{{#1}}} +% \def\appendtoks {\doappendtoks \relax} +% \def\prependtoks{\doprependtoks\relax} +% +% \long\def\doappendtoks#1\to#2% +% {\scratchtoks\@EA{\gobbleoneargument#1}% +% \expanded{\dodoglobal\noexpand#2{\the#2\the\scratchtoks}}} % -% \def\dododoprependtoks#1\to#2% -% {\scratchtoks={#1}% -% \edef\scratchtoken{\noexpand#2={\the\scratchtoks\the#2}}% -% \scratchtoken -% \dodoglobal#2=#2} - -\def\appendtoks% - {\doappendtoks\relax} - -\long\def\doappendtoks#1\to#2% - {\@EA\scratchtoks\@EA{\gobbleoneargument#1}% - \long\edef\scratchtoken{\noexpand#2={\the#2\the\scratchtoks}}% - \scratchtoken - \dodoglobal#2=#2} - -\def\prependtoks% - {\doprependtoks\relax} - -\long\def\doprependtoks#1\to#2% - {\scratchtoks={#1}% - \long\edef\scratchtoken{\noexpand#2={\the\scratchtoks\the#2}}% - \scratchtoken - \dodoglobal#2=#2} +% \long\def\doprependtoks#1\to#2% +% {\scratchtoks\@EA{\gobbleoneargument#1}% +% \expanded{\dodoglobal\noexpand#2{\the\scratchtoks\the#2}}} + +\def\appendtoks {\doappendtoks \relax} +\def\prependtoks {\doprependtoks \relax} +\def\appendtoksonce {\doappendtoksonce \relax} +\def\prependtoksonce{\doprependtoksonce\relax} + +\def\dodoappendtoks#1% + {\expanded{\dodoglobal\noexpand#1{\the#1\the\scratchtoks}}} + +\def\dodoprependtoks#1% + {\expanded{\dodoglobal\noexpand#1{\the\scratchtoks\the#1}}} + +\long\def\doappendtoks#1\to% + {\scratchtoks\@EA{\gobbleoneargument#1}\dodoappendtoks} + +\long\def\doprependtoks#1\to% + {\scratchtoks\@EA{\gobbleoneargument#1}\dodoprependtoks} + +\long\def\doappendtoksonce#1\to#2% + {\scratchtoks\@EA{\gobbleoneargument#1}% + \doifintokselse\scratchtoks{#2}{}{\dodoappendtoks{#2}}} + +\long\def\doprependtoksonce#1\to#2% + {\scratchtoks\@EA{\gobbleoneargument#1}% + \doifintokselse\scratchtoks{#2}{}{\dodoprependtoks{#2}}} + +\def\doifintokselse#1#2% #1 en #2 zijn toks + {\edef\!!stringa{\the#1}\convertcommand\!!stringa\to\asciiA + \edef\!!stringb{\the#2}\convertcommand\!!stringb\to\asciiB + \doifinstringelse\asciiA\asciiB} %D Hm. \def\flushtoks#1% {\scratchtoks=#1\relax - \dodoglobal#1={}% + \dodoglobal#1=\emptytoks \the\scratchtoks\relax} \let\dotoks=\the @@ -2305,6 +2326,21 @@ {\@EA\ifx\csname#1\endcsname\empty\else#2\fi} %D \macros +%D {doifallcommonelse} +%D +%D A complete match of two sets can be tested with +%D \type {\doifallcommonelse}, where the first two +%D arguments are sets. + +\def\doifallcommonelse#1#2#3#4% + {\def\p!docommoncheck##1% + {\doifnotinset{##1}{#2}{\donefalse}% + \ifdone\else\quitcommalist\fi}% + \donetrue + \processcommalist[#1]\p!docommoncheck + \ifdone#3\else#4\fi} + +%D \macros %D {DOIF,DOIFELSE,DOIFNOT} %D %D \TEX\ is case sensitive. When comparing arguments, this @@ -2460,14 +2496,15 @@ %D argument must be broken into words when made interactive. %D Watch the use of \type{\noexpand}. +% \long\def\doifsomespaceelse#1#2#3% +% {\def\p!doifsomespaceelse##1 ##2##3\war% +% {\if\noexpand##2@#3\else#2\fi}% +% \p!doifsomespaceelse#1 @ @\war} + +\def\p!doifsomespaceelse#1 #2#3\war{\if\noexpand#2@} + \long\def\doifsomespaceelse#1#2#3% - {\def\p!doifsomespaceelse##1 ##2##3\war% - {\if\noexpand##2@% - #3% - \else - #2% - \fi}% - \p!doifsomespaceelse#1 @ @\war} + {\p!doifsomespaceelse#1 @ @\war#3\else#2\fi} %D \macros %D {adaptdimension,balancedimensions} @@ -2763,7 +2800,14 @@ %D This command is used in for instance the language module %D \type{lang-ini}. -\def\dontleavehmode{\ifmmode\else$ $\fi} +%\def\dontleavehmode{\ifhmode\else\ifmmode\else$ $\fi\fi} +% +% The (thanks to Taco) better alternative: + +\def\dontleavehmode% + {\ifhmode\else \ifmmode\else + {\mathsurround\z@\everymath\emptytoks$ $}% + \fi \fi} %D \macros %D {uppercasestring,lowercasestring} @@ -3280,9 +3324,13 @@ %D \setdimensionwithunit\scratchdimen{10cm}{cm} %D \setdimensionwithunit\scratchdimen{10cm}{} %D \stoptypen +%D +%D As an alternative for the next macro we can use a global +%D assignment inside a box. The \type{\empty}'s permits +%D gobbling while preventing spurious \type{\relax}'s. \def\setdimensionwithunit#1#2#3% number unit dimension / nice trick - {\afterassignment\gobblefourarguments#1=#2#3pt\relax\relax\relax\relax\relax} + {\afterassignment\gobblefourarguments#1=#2#3pt\relax\empty\empty\empty\empty} \protect diff --git a/tex/context/base/syst-gen.tex b/tex/context/base/syst-gen.tex index 5896bef8f..5e61cdcad 100644 --- a/tex/context/base/syst-gen.tex +++ b/tex/context/base/syst-gen.tex @@ -161,9 +161,9 @@ \def\unprotect% {\ifcase\protectionlevel \edef\doprotectcharacters% - {\catcode`\noexpand @=\the\catcode`@\relax - \catcode`\noexpand !=\the\catcode`!\relax - \catcode`\noexpand ?=\the\catcode`?\relax}% + {\catcode`\noexpand @=\the\catcode`@ %\relax + \catcode`\noexpand !=\the\catcode`! %\relax + \catcode`\noexpand ?=\the\catcode`?}%\relax}% \catcode`@=11 \catcode`!=11 \catcode`?=11 @@ -182,7 +182,7 @@ \ifnum\protectionlevel>1 \message{<protect \the\protectionlevel>}% \fi - \advance\protectionlevel -1\relax} + \advance\protectionlevel -1 } %D Now it is defined, we can make use of this very useful %D macro. @@ -225,7 +225,7 @@ %D \macros %D {scratchcounter, %D scratchdimen,scratchskip,scratchmuskip, -%D scratchbox, +%D scratchbox,globalscratchbox, %D scratchtoks, %D ifdone} %D @@ -238,7 +238,7 @@ \newdimen \scratchdimen \newskip \scratchskip \newmuskip \scratchmuskip -\newbox \scratchbox +\newbox \scratchbox \newtoks \scratchtoks \newif \ifdone @@ -485,6 +485,9 @@ \def\resetvalue#1% {\expandafter\let\csname#1\endcsname\empty} +\def\ignorevalue#1#2% + {\expandafter\let\csname#1\endcsname\empty} + %D \macros %D {globallet} %D @@ -598,9 +601,9 @@ \beginETEX \protected \let \unexpanded \normalprotected -\let \honorunexpanded \relax -\let \forceunexpanded \relax -\let \resetunexpanded \relax +\let \honorunexpanded \empty % \relax +\let \forceunexpanded \empty % \relax +\let \resetunexpanded \empty % \relax \endETEX @@ -1592,7 +1595,7 @@ %D \def\processallactionsinset[#1]#2[#3]% %D {\doifelse{#1}{} %D {\processaction[][#3]} -%D {\advance\processlevel by 1\relax +%D {\advance\processlevel by 1 %D \def\p!compareprocessaction[##1=>##2][##3]% %D {\edef\!!stringa{##1}% %D \edef\!!stringb{##3}% @@ -1609,7 +1612,7 @@ %D {\p!compareprocessaction[####1][##1]}% %D \processcommalist[#3]\p!dodoprocessaction}% %D \processcommalist[#1]{\getvalue{\s!do\the\processlevel}}% -%D \advance\processlevel by -1\relax}} +%D \advance\processlevel by -1 }} %D \stoptypen %D %D The gain of speed in the (again) next implementation is @@ -2153,7 +2156,10 @@ {\@EA\gdef\csname#1#2\endcsname} % {#3}} \def\doresetvalue#1#2% - {\@EA\def\csname#1#2\endcsname{}} + {\@EA\let\csname#1#2\endcsname\empty} + +\def\doignorevalue#1#2#3% + {\@EA\let\csname#1#2\endcsname\empty} \def\docopyvalue#1#2#3% {\@EA\def\csname#1#3\endcsname{\csname#2#3\endcsname}} @@ -2192,25 +2198,24 @@ %D complain of it's missed. We will redefine this macro later %D on, when a more advanced message mechanism is implemented. +\def\showassignerror#1#2% + {\writestatus{setup}{missing '=' after '#1' in line #2}} + %\def\p!doassign#1[#2][#3=#4=#5]% % {\let\donottest\dontprocesstest % \edef\!!stringa{#5}% % \let\!!stringb\relax % \let\donottest\doprocesstest % \ifx\!!stringa\!!stringb -% \writestatus -% {setup} -% {missing '=' after '#3' in line \the\inputlineno}% +% \showassignerror{#3}% % \else % #1{#2}{#3}{#4}% % \fi} -\def\p!doassign#1[#2][#3=#4=#5]% redefined in mult-ini +\def\p!doassign#1[#2][#3=#4=#5]% {\ifx\empty#3\else % and definitely not \ifx#3\empty \ifx\relax#5% - \writestatus - {setup} - {missing '=' after '#3' in line \the\inputlineno}% + \showassignerror{#3}{\the\inputlineno\space(#2)}% \else #1{#2}{#3}{#4}% \fi @@ -2230,7 +2235,8 @@ {\dosetvalue{#1}{#2}{#3}}} %D \macros -%D {getparameters,geteparameters,getgparameters} % ,forgetparameters} +%D {getparameters,geteparameters,getgparameters, +%D forgetparameters} %D %D Using the assignment commands directly is not our %D ideal of user friendly interfacing, so we take some further @@ -2314,8 +2320,8 @@ \def\getgparameters% {\dogetparameters\dosetgvalue} -% \def\forgetparameters% -% {\dogetparameters\doresetvalue} +\def\forgetparameters% + {\dogetparameters\doignorevalue} \let\getexpandedparameters=\geteparameters @@ -2679,18 +2685,42 @@ \chardef\noexpectedarguments=0 \chardef\expectedarguments =0 -\long\def\dogetargument#1#2#3#4% redefined in mult-ini - {\doifnextcharelse{#1} - {\let\expectedarguments\noexpectedarguments - #3\dodogetargument} - {\ifnum\expectedarguments>\noexpectedarguments - \writestatus - {setup} - {\expectedarguments\space argument(s) expected - in line \the\inputlineno\space}% - \fi - \let\expectedarguments\noexpectedarguments - #4\dodogetargument#1#2}} +\def\showargumenterror#1#2% + {\writestatus{system}{#1 argument(s) expected in line #2}} + +% \long\def\dogetargument#1#2#3#4% redefined in mult-ini +% {\doifnextcharelse{#1} +% {\let\expectedarguments\noexpectedarguments +% #3\dodogetargument} +% {\ifnum\expectedarguments>\noexpectedarguments +% \showargumenterror{\expectedarguments} +% \fi +% \let\expectedarguments\noexpectedarguments +% #4\dodogetargument#1#2}} +% +% less to pass + +\def\doshowargumenterror% + {\ifnum\expectedarguments>\noexpectedarguments + \showargumenterror{\number\expectedarguments}{\number\inputlineno}% + \fi + \noshowargumenterror} + +\def\noshowargumenterror% + {\let\expectedarguments\noexpectedarguments} + +% \long\def\dogetargument#1#2#3#4% +% {\doifnextcharelse#1% +% {\noshowargumenterror#3\dodogetargument} +% {\doshowargumenterror#4\dodogetargument#1#2}} +% +% faster ? + +\long\def\dogetargument#1#2#3#4% + {\let\charactertoken=#1% + \def\!!stringa{\noshowargumenterror#3\dodogetargument}% + \def\!!stringb{\doshowargumenterror#4\dodogetargument#1#2}% + \futurelet\nexttoken\inspectnextcharacter} %\def\getsingleempty#1#2#3% % {\def\dodogetargument% @@ -3090,7 +3120,7 @@ %D {do something with arg} %D \stoptypen %D -%D The argumentss can be anything reasonable, but double +%D The arguments can be anything reasonable, but double %D \type{#}'s are needed in the specification part, like: %D %D \starttypen @@ -3108,7 +3138,7 @@ %D We will see some real applications of this command in the %D core modules. -\def\definestartstopcommand#1#2#3#4% +\def\definestartstopcommand#1#2#3#4% {\def\!stringa{#3}% \def\!stringb{\e!start#2}% \def\!stringc{#4}% @@ -3172,6 +3202,8 @@ \let\normalif \if \let\normalifx \ifx \let\normalifnum \ifnum +\let\normalifdim \ifdim +\let\normalifcat \ifcat \let\normalifcase \ifcase \let\normalor \or \let\normalelse \else @@ -3180,15 +3212,38 @@ \def\beginrobusttest {\bgroup \let\if\relax\let\ifx\relax\let\ifnum\relax\let\ifcase\relax + \let\ifcat\relax\let\ifdim\relax \let\or\relax\let\else\relax\let\fi\relax} \let\endrobusttest\egroup +% \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{\bgroup\def\\ {\egroup\dogetgroupargument#1#2}\\}% +% %\normalelse\normalifx\nextargument\blankspace % but may never be default +% % \def\nextargument{\bgroup\def\\ {\egroup\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 - \let\expectedarguments\noexpectedarguments + \noshowargumenterror \def\nextargument{#1\dodogetargument}% %\normalelse\normalifx\nextargument\lineending % this can be an option % \def\nextargument{\bgroup\def\\ {\egroup\dogetgroupargument#1#2}\\}% @@ -3196,13 +3251,7 @@ % \def\nextargument{\bgroup\def\\ {\egroup\dogetgroupargument#1#2}\\}% \normalelse \endrobusttest - \ifnum\expectedarguments>\noexpectedarguments - \writestatus - {setup} - {\the\expectedarguments\space argument(s) expected - in line \the\inputlineno\space}% - \fi - \let\expectedarguments\noexpectedarguments + \doshowargumenterror \def\nextargument{#2\dodogetargument{}}% \normalfi%\normalfi\normalfi % so let's get rid of it \nextargument}% @@ -3337,14 +3386,16 @@ % \egroup} \chardef\statuswidth=15 -\newcount\statuscounter +\chardef\statuswrite=16 \def\writestring% - {\immediate\write16} + {\immediate\write\statuswrite} \def\writeline% {\writestring{}} +\newcount\statuscounter + \def\dosplitstatus#1% {\advance\statuscounter -1 \ifcase\statuscounter @@ -3360,7 +3411,7 @@ \def\writestatus#1#2% {\bgroup \scratchtoks\emptytoks - \statuscounter=\statuswidth + \statuscounter\statuswidth \expandafter\dosplitstatus#1% \space\space\space\space\space\space\space \space\space\space\space\space\space\space @@ -3368,6 +3419,25 @@ \expanded{\writestring{\the\scratchtoks\space:\space#2}}% \egroup} +%D The next implementation saves only some 10 words of format +%D memory, but we hardly gain any speed. +%D +%D \starttypen +%D \def\dosplitstatus#1#2#3#4#5#6#7#8#9% +%D {#1#2#3#4#5#6#7#8#9\dodosplitstatus} +%D +%D \def\dodosplitstatus#1#2#3#4#5#6\end% +%D {#1#2#3#4#5} +%D +%D \def\writestatus#1#2% +%D {\writestring +%D {\expandafter\dosplitstatus#1% +%D \space\space\space\space\space +%D \space\space\space\space\space +%D \space\space\space\space\space\end +%D \space:\space#2}} +%D \stoptypen + %D \macros %D {emptytoks} %D diff --git a/tex/context/base/thrd-tab.tex b/tex/context/base/thrd-tab.tex index d64d19436..466895abb 100644 --- a/tex/context/base/thrd-tab.tex +++ b/tex/context/base/thrd-tab.tex @@ -9,11 +9,6 @@ % TABLE 1.0 % Copyright Michael J. Wichura August 1988 -%% The following three lines were inserted by C.E.K. of Personal TeX on 9-6-89 -%% \input nine -%% \input eight -%% \font\csc=cmcsc10 - % The TABLE macros are divided into sections, roughly according to % function: diff --git a/tex/context/base/verb-ini.tex b/tex/context/base/verb-ini.tex index 93bf539b4..ce6ff8d90 100644 --- a/tex/context/base/verb-ini.tex +++ b/tex/context/base/verb-ini.tex @@ -11,6 +11,9 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. +%D Today I would implement the pretty handler slightly +%D different, using stack and intermediate flushing. + %D Because this module is quite independant of system macros, %D it can be used as a stand||alone verbatim environment. %D @@ -157,6 +160,12 @@ \gdef\ignorepages {\catcode`\^^L=\@@ignore} % \@@active\def^^L{\obeyedline}} \gdef\ignoreeofs {\catcode`\^^Z=\@@ignore} +%D For testing (see digit parser) we need an indirect macro +%D in order to compare the next (\type {\next}) token +%D (possibly \type {^^M}) being \type {\obeyedline}. + +\gdef\nextobeyedline{\obeyedline} + \egroup %D \macros @@ -438,7 +447,7 @@ \escapechar=-1 \xdef\verbatimname{\string#1}% \egroup - \def\endofdisplayverbatim{\csname\verbatimname\endcsname}% + \def\endofdisplayverbatim{\csname\verbatimname\endcsname}% \bgroup \parindent\!!zeropoint \ifdim\lastskip<\parskip @@ -532,7 +541,7 @@ {\catcode`\!=\@@other \catcode`\?=\@@other \catcode`\@=\@@other \catcode`\#=\@@other \catcode`\&=\@@other \catcode`\|=\@@other \catcode`\$=\@@other \catcode`\^=\@@other \catcode`\_=\@@other - \catcode`\*=\@@other \catcode`\/=\@@other + \catcode`\*=\@@other \catcode`\/=\@@other \catcode`\-=\@@other \catcode`\+=\@@other \catcode`\==\@@other \catcode`\<=\@@other \catcode`\>=\@@other \catcode`\"=\@@other \catcode`\'=\@@other \catcode`\`=\@@other @@ -621,16 +630,22 @@ %D %D With \type {\makeallletter} each character ($>0$) gets the %D category code 12. +%D +%D The next alternative was okay when memory was still low. +%D +%D \startypen +%D \def\makeallother% +%D {\dorecurse{255}{\catcode\recurselevel=\@@other}} +%D \stoptypen +%D +%D Today we prebuild a token list: + +\newtoks\makeallothertoks -% \newtoks\makeallothertoks -% -% \dorecurse{255} -% {\@EA\appendtoks\@EA\catcode\recurselevel=\@@other\to\makeallothertoks} -% -% \def\makeallother{\the\makeallothertoks} +\dorecurse{255} + {\@EA\appendtoks\@EA\catcode\recurselevel=\@@other\to\makeallothertoks} -\def\makeallother% - {\dorecurse{255}{\catcode\recurselevel=\@@other}} +\def\makeallother{\the\makeallothertoks} %D The main copying routine of display verbatim does an %D ordinary string||compare on the saved closing command and @@ -1752,29 +1767,29 @@ \def\permitshiftedendofverbatim% {\let\doifendofverbatim=\doifinstringelse} - \def\processdisplayverbatim#1% - {\par - \bgroup - \escapechar=-1 - \xdef\verbatimname{\string#1}% - \egroup - \def\endofdisplayverbatim{\csname\verbatimname\endcsname}% - \bgroup - \parindent\!!zeropoint - \ifdim\lastskip<\parskip - \removelastskip - \vskip\parskip - \fi - \parskip\!!zeropoint - \processingverbatimtrue - \expandafter\let\csname\verbatimname\endcsname=\relax - \expandafter\convertargument\csname\verbatimname\endcsname - \to\endofverbatimcommand - \verbatimfont \spaceskip=.5em \xspaceskip=\spaceskip - \global\linepartrue % needed for paragraph numbering - \setupcopyverbatim - \initializeverbatimline - \copyverbatimline} +% \def\processdisplayverbatim#1% +% {\par +% \bgroup +% \escapechar=-1 +% \xdef\verbatimname{\string#1}% +% \egroup +% \def\endofdisplayverbatim{\csname\verbatimname\endcsname}% +% \bgroup +% \parindent\!!zeropoint +% \ifdim\lastskip<\parskip +% \removelastskip +% \vskip\parskip +% \fi +% \parskip\!!zeropoint +% \processingverbatimtrue +% \expandafter\let\csname\verbatimname\endcsname=\relax +% \expandafter\convertargument\csname\verbatimname\endcsname +% \to\endofverbatimcommand +% \verbatimfont \spaceskip=.5em \xspaceskip=\spaceskip +% \global\linepartrue % needed for paragraph numbering +% \setupcopyverbatim +% \initializeverbatimline +% \copyverbatimline} {\obeylines% \long\gdef\copyverbatimline#1 @@ -1794,10 +1809,35 @@ %D As a bonus, we provide the next alternative, which takes %D end tags like \type {Hello World!}. - \def\processtaggeddisplayverbatim#1% +% \def\processtaggeddisplayverbatim#1% +% {\par +% \let\endofdisplayverbatim\relax +% \convertargument#1\to\endofverbatimcommand +% \bgroup +% \parindent\!!zeropoint +% \ifdim\lastskip<\parskip +% \removelastskip +% \vskip\parskip +% \fi +% \parskip\!!zeropoint +% \processingverbatimtrue +% \verbatimfont \spaceskip=.5em \xspaceskip=\spaceskip +% \global\linepartrue % needed for paragraph numbering +% \setupcopyverbatim +% \initializeverbatimline +% \copyverbatimline} + + \def\doprocessdisplayverbatim#1#2% {\par - \let\endofdisplayverbatim\relax - \convertargument#1\to\endofverbatimcommand + \bgroup + \escapechar=-1 + \xdef\verbatimname{\string#2}% + \egroup + \ifcase#1% + \let\endofdisplayverbatim\relax + \else + \def\endofdisplayverbatim{\csname\verbatimname\endcsname}% + \fi \bgroup \parindent\!!zeropoint \ifdim\lastskip<\parskip @@ -1806,12 +1846,22 @@ \fi \parskip\!!zeropoint \processingverbatimtrue + \ifcase#1% + \convertargument#2\to\endofverbatimcommand + \else + \expandafter\let\csname\verbatimname\endcsname=\relax + \expandafter\convertargument\csname\verbatimname\endcsname + \to\endofverbatimcommand + \fi \verbatimfont \spaceskip=.5em \xspaceskip=\spaceskip \global\linepartrue % needed for paragraph numbering \setupcopyverbatim \initializeverbatimline \copyverbatimline} + \def\processdisplayverbatim {\doprocessdisplayverbatim1} + \def\processtaggeddisplayverbatim{\doprocessdisplayverbatim0} + \fi \protect diff --git a/tex/context/base/verb-mp.tex b/tex/context/base/verb-mp.tex index 7a5c788a7..c7ab2071f 100644 --- a/tex/context/base/verb-mp.tex +++ b/tex/context/base/verb-mp.tex @@ -13,6 +13,8 @@ \writestatus{loading}{Context Support Macros / Pretty METAPOST Verbatim} +% bug: in mp-char.mp the char should not be highlighted + %D This module was first used when I documented our new %D company logo. This interpreter is modeled after the \PERL\ %D one. diff --git a/tex/context/base/verb-xml.tex b/tex/context/base/verb-xml.tex index 5806349bf..52304fc53 100644 --- a/tex/context/base/verb-xml.tex +++ b/tex/context/base/verb-xml.tex @@ -8,8 +8,8 @@ %D copyright={Berend de Boer \& Hans Hagen}] %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. % This module will be cleaned up a bit in the process of more % flexible verbatim options. @@ -40,7 +40,7 @@ %D </capacity> %D </resource> %D </resources> -%D \stopXML +%D \stopXML %D %D Another format: %D @@ -58,6 +58,12 @@ %D letter=\ss] %D +\ifx\XMLlinebreak\undefined + \gdef\XMLlinebreak{\ifhmode\allowbreak\fi} % new, often long lines +\fi + +\doglobal\newif\ifXMLmarkkeys \global\XMLmarkkeystrue + \gdef\setupprettyXMLtype% {\def\prettyidentifier{XML}% \XMLsetvariables @@ -72,13 +78,18 @@ \global\inXMLspecialfalse \global\inXMLcommentfalse \global\inXMLtagnamefalse - \global\inXMLattributefalse} + \global\inXMLattributefalse + \global\inXMLentityfalse} \gdef\XMLsetcontrols% {\saveprettycontrols \def\obeyedspace% - {\XMLstartattribute - \oldobeyedspace}% + {\ifinXMLvalue + \else % more tests ? + \XMLstartattribute + \fi + \oldobeyedspace + \XMLlinebreak}% \def\flushrestofverbatimline% {\endXMLtagname}% \let\obeytabs=\ignoretabs} @@ -87,20 +98,20 @@ {\setpretty`\<=10 \setpretty`\>=11 \setpretty`\?=12 \setpretty`\/=13 \setpretty`\!=14 \setpretty`\-=15 - \setpretty`\\=17 - % \setpretty`\0=17 - % \setpretty`\1=17 \setpretty`\2=17 \setpretty`\3=17 - % \setpretty`\4=17 \setpretty`\5=17 \setpretty`\6=17 - % \setpretty`\7=17 \setpretty`\8=17 \setpretty`\9=17 + \setpretty`\\=17 + \setpretty`\0=17 + \setpretty`\1=17 \setpretty`\2=17 \setpretty`\3=17 + \setpretty`\4=17 \setpretty`\5=17 \setpretty`\6=17 + \setpretty`\7=17 \setpretty`\8=17 \setpretty`\9=17 \setpretty`\==16 \setpretty`\"=20 \setpretty`\(=30 \setpretty`\)=30 \setpretty`\,=30 \setpretty`\*=30 \setpretty`\+=30 \setpretty`\#=30 \setpretty`\:=30 - \setpretty`\&=40 } + \setpretty`\&=41 \setpretty`\;=42 } \gdef\XMLsethandlers% - {%\installprettyhandler 17 \XMLnormal + {\installprettyhandler 17 \XMLnormal \installprettyhandler 10 \XMLwhattag \installprettyhandler 11 \XMLstoptag \installprettyhandler 12 \XMLtypeonetwo @@ -110,7 +121,8 @@ \installprettyhandler 16 \XMLtypeonesix \installprettyhandler 20 \XMLdoublequote \installprettyhandler 30 \XMLtypethree - \installprettyhandler 40 \XMLampersand} + \installprettyhandler 41 \XMLbampersand + \installprettyhandler 42 \XMLeampersand } \doglobal\newif\ifinXMLpi \doglobal\newif\ifinXMLtag @@ -119,13 +131,14 @@ \doglobal\newif\ifinXMLcomment \doglobal\newif\ifinXMLtagname \doglobal\newif\ifinXMLattribute +\doglobal\newif\ifinXMLentity % the list of actions to be executed per state % test if we have a normal tag, processing instruction or a special, % i.e. <, <? or <! -%\gdef\XMLnormal#1{\getpretty{#1}} +\gdef\XMLnormal#1{\getpretty{#1}} \gdef\XMLwhattag% {\handlenextnextpretty\XMLdowhattag\XMLstarttag} @@ -135,9 +148,9 @@ \let\next=\getpretties \else \getprettydata{#2}% - \ifnum\prettytype=12 + \ifnum\prettytype=12 % ? \let\next=\XMLstartpi - \else\ifnum\prettytype=14 + \else\ifnum\prettytype=14 % ! \let\next=\XMLstartspecial \else \let\next=\XMLstarttag @@ -149,27 +162,28 @@ \gdef\XMLstartpi#1#2% {\beginofpretty[\!!prettythree]\getpretties{#1}{#2}\endofpretty% - \beginofpretty[\!!prettyone]% \global\inXMLtagtrue \global\inXMLpitrue - \global\inXMLtagnametrue} + \global\inXMLtagnametrue + \beginofpretty[\!!prettyone]} -% format <! (<!--, <!DOCTYPE, <![CDATA[ and such +% format <!, <!--, <!DOCTYPE, <![CDATA[ and such \gdef\XMLstartspecial#1#2% {\beginofpretty[\!!prettythree]\getpretties{#1}{#2}\endofpretty% - \beginofpretty[\!!prettyone]% \global\inXMLtagtrue \global\inXMLspecialtrue - \global\inXMLtagnametrue} - + \global\inXMLtagnametrue + \beginofpretty[\!!prettyone]} % formats plain < + \gdef\XMLstarttag#1% - {\beginofpretty[\!!prettythree]\getpretty{#1}\endofpretty - \beginofpretty[\!!prettyone]% + {\XMLlinebreak + \beginofpretty[\!!prettythree]\getpretty{#1}\endofpretty \global\inXMLtagtrue - \global\inXMLtagnametrue} + \global\inXMLtagnametrue + \beginofpretty[\!!prettyone]} % catch > @@ -184,17 +198,18 @@ \endXMLtagname \beginofpretty[\!!prettythree]\getpretty{#1}\endofpretty \doXMLstoptag + \XMLlinebreak \fi \fi} \gdef\doXMLstoptag% {\global\inXMLpifalse % either end process instruction \global\inXMLspecialfalse % or special - \global\inXMLtagfalse % and tag ends always + \global\inXMLtagfalse % tag ends always \global\inXMLtagnamefalse} % just to be sure % end typeset name of tag -% because called often, we also use it to end the default +% because called often, we also use it to end the default % attribute color. \gdef\endXMLtagname% @@ -202,17 +217,20 @@ \endofpretty \inXMLtagnamefalse \else - \XMLstopattribute + \XMLstopattribute \fi} % start attribute formatting inside a tag if applicable \gdef\XMLstartattribute% - {\ifinXMLcomment - \else - \endXMLtagname - \ifinXMLtag - \doXMLstartattribute + {\ifinXMLcomment \else + \ifinXMLpi + \ifXMLmarkkeys\else\endXMLtagname\fi % option + \else + \endXMLtagname + \ifinXMLtag + \doXMLstartattribute + \fi \fi \fi} @@ -226,7 +244,7 @@ {\inXMLattributetrue \beginofpretty[\!!prettythree]} -% `?' character, needed to recognize <? (see above) +% `?' character, needed to recognize ?> \gdef\XMLtypeonetwo% {\endXMLtagname @@ -234,27 +252,12 @@ \gdef\doXMLtypeonetwo#1#2% {\getprettydata{#2}% - \ifnum\prettytype=11 - \let\next=\dododoXMLtypeonetwo - \else - \let\next=\dodoXMLtypeonetwo + \ifnum\prettytype=11 % > + \expandafter\dododoXMLtypeonetwo + \else % treat as `green' character + \expandafter\XMLtypethree \fi - \next{#1}#2} - -\gdef\dodoXMLtypeonetwo#1% - {\ifinXMLcomment - \getpretty{#1}% - \else - \ifinXMLtag - \ifinXMLvalue - \getpretty{#1}% - \else - \beginofpretty[\!!prettytwo]\getpretty{#1}\endofpretty - \fi - \else - \getpretty{#1}% - \fi - \fi} + {#1}#2} \gdef\dododoXMLtypeonetwo#1#2% {\ifinXMLcomment @@ -264,7 +267,12 @@ \ifinXMLvalue \getpretties{#1}{#2}% \else - \beginofpretty[\!!prettythree]\getpretties{#1}{#2}\endofpretty + \ifinXMLpi + \beginofpretty[\!!prettythree]\getpretties{#1}{#2}\endofpretty + \else % treat as green character + \beginofpretty[\!!prettytwo]\getpretty{#1}\endofpretty + \beginofpretty[\!!prettythree]#2\endofpretty + \fi \doXMLstoptag \fi \else @@ -302,8 +310,7 @@ % so the comment can stop. \gdef\XMLtypeonefive% - {\endXMLtagname - \handlenextnextpretty\doXMLtypeonefive\doXMLout} + {\handlenextnextpretty\doXMLtypeonefive\doXMLout} \gdef\doXMLtypeonefive#1#2% {\getprettydata{#2}% @@ -323,24 +330,23 @@ \next{#1}#2} \gdef\startXMLcomment#1#2% - {\beginofpretty[\!!prettyfour]\getpretties{#1}{#2}% + {\beginofpretty[\!!prettythree]\getpretties{#1}{#2}\endofpretty + \beginofpretty[\!!prettyfour]% \global\inXMLcommenttrue} -\gdef\dodoXMLtypeonefive#1% encountered - - {\getpretty{#1}\handlenextnextpretty\dododoXMLtypeonefive\doXMLout} +\gdef\dodoXMLtypeonefive#1% encountered - + {\def\prev{#1}\handlenextnextpretty\dododoXMLtypeonefive\doXMLout} -\gdef\dododoXMLtypeonefive#1#2% - {\getprettydata{#2}#1#2% - \ifnum\prettytype=11 - \endofpretty - \global\inXMLcommentfalse - \fi} +\gdef\nodoXMLtypeonefive% encountered - + {\getpretty{\prev}\doXMLout} -%\gdef\doXMLout#1% -% {\getpretty{#1}} -% -%\gdef\doXMLouttwo#1#2% -% {\getpretties{#1}{#2}} +\gdef\dododoXMLtypeonefive#1#2% + {\getprettydata{#2}% + \ifnum\prettytype=11 + \endofpretty\getpretty{\prev}#1\empty\global\inXMLcommentfalse#2% + \else + \getpretty{\prev}#1#2% + \fi} \global\let\doXMLout \getpretty \global\let\doXMLouttwo\getpretties @@ -349,24 +355,24 @@ \gdef\XMLtypeonesix#1% {\ifinXMLtag - \endofpretty - \beginofpretty[\!!prettythree]\getpretty{#1}\endofpretty - \beginofpretty[\!!prettyone]% + \endofpretty + \beginofpretty[\!!prettythree]\getpretty{#1}\endofpretty + \beginofpretty[\!!prettyone]% \else - \getpretty{#1}% + \getpretty{#1}% \fi} % catch attribute value parts \gdef\XMLdoublequote#1% {\ifinXMLcomment - \getpretty{#1}% - \else - \ifinXMLtag + \getpretty{#1}% + \else + \ifinXMLtag \ifinXMLvalue \global\inXMLvaluefalse \beginofpretty[\!!prettythree]\getpretty{#1}\endofpretty - \beginofpretty[\!!prettyone]% + \ifXMLmarkkeys\beginofpretty[\!!prettyone]\fi \else \endofpretty \beginofpretty[\!!prettythree]\getpretty{#1}\endofpretty @@ -379,7 +385,7 @@ % symbols like `(', `)' and `,' should be green -\gdef\XMLtypethree#1% +\gdef\XMLtypethree#1% {\ifinXMLcomment \getpretty{#1}% \else @@ -398,12 +404,21 @@ % special characters with `&' -\gdef\XMLampersand#1% +\gdef\XMLbampersand#1% {\ifinXMLcomment \getpretty{#1}% \else \endXMLtagname - \beginofpretty[\!!prettytwo]\getpretty{#1}\endofpretty + \beginofpretty[\!!prettytwo]\getpretty{#1}\endofpretty + \global\inXMLentitytrue + \fi} + +\gdef\XMLeampersand#1% + {\ifinXMLcomment + \getpretty{#1}% + \else + \beginofpretty[\!!prettytwo]\getpretty{#1}\endofpretty + \global\inXMLentityfalse \fi} -\protect \endinput +\protect \endinput diff --git a/tex/context/base/x-fig-00.tex b/tex/context/base/x-fig-00.tex new file mode 100644 index 000000000..070363ed3 --- /dev/null +++ b/tex/context/base/x-fig-00.tex @@ -0,0 +1,153 @@ +%D \module +%D [ file=x-fig-00, +%D version=2001.03.21, +%D title=\CONTEXT\ Style File, +%D subtitle=Figure Base Loading, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +%D This module implements an interface to a figure database +%D and file. The database is formatted in \XML. +%D +%D \starttypen +%D <!-- texexec --pdf --use=fig-01 figtest.xml --> +%D +%D <figurelibrary language="nl"> +%D +%D <description> +%D <organization>PRAGMA Advanced Document Engineering</organization> +%D <project>Manuals</project> +%D <product>Beginners Manual</product> +%D <comment>A bunch of figures.</comment> +%D </description> +%D +%D <figure> +%D <file>koe.pdf</file> +%D <label>a dutch cow</label> +%D <copyright>Corel Draw Suite</copyright> +%D <comment>I bet that you've seen this cow before.</comment> +%D </figure> +%D +%D </figurelibrary> +%D \stoptypen +%D +%D You can convert this base into a \PDF\ file using +%D \TEXEXEC\ and another module in this suite. +%D +%D \starttypen +%D texexec --pdf --use=fig-01 yourfile.xml +%D \stoptypen +%D +%D You can now select a graphic from this file using the +%D +%D \starttypen +%D \externalfigure[a dutch cow][width=4cm] +%D \stoptypen +%D +%D This module overloads this command so that it first +%D searched in the list of databases. +%D +%D \starttypen +%D \usefigurebases[yourfile] +%D \stoptypen +%D +%D The special keyword \type {reset} can be used to reset +%D this list. + +\startcommands dutch english + german czech + italian romanian + + usefigurebase: gebruikfiguurbestand usefigurebase + usefigurebase usefigurebase + usefigurebase usefigurebase + +\stopcommands + +\unprotect + +\startXMLnamespace [-] [figbase] + +\defineXMLprocess [figurelibrary] +\defineXMLignore [description] +\defineXMLignore [copyright] +\defineXMLignore [comment] +\defineXMLignore [status] +\defineXMLpush [file] +\defineXMLpush [label] +\defineXMLenvironment [figure] \figbase@StartFigure \figbase@StopFigure + +\stopXMLnamespace + +\def\figbase@StartFigure% + {\bgroup} + +\def\figbase@StopFigure% + {\doglobal\increment\figurefilepage + \doif{\askedlabel}{\XMLpop{label}} + {\xdef\figurefilename{\XMLpop{file}}\endinput}% + \egroup} + +\def\getfigurefilename#1#2% + {\startnointerference + \startXMLnamespace[-][figbase] + \resetfigurefilebase + \XMLassign{file} {} + \XMLassign{label}{} + \xdef\figurefilebase{#1}% + \doglobal\newcounter\figurefilepage + \def\askedlabel{#2} + \processXMLfile{#1.xml} + \stopXMLnamespace + \stopnointerference} + +\def\resetfigurefilebase% + {\global\let\figurefilebase\empty + \global\let\figurefilename\empty + \global\let\figurefilepage\empty} + +\let\normalcalculateexternalfigure\calculateexternalfigure + +\def\calculateexternalfigure[#1][#2][#3][#4][#5][#6]% + {\resetfigurefilebase + \ifx\figurebaselist\empty + \normalcalculateexternalfigure + [#1][#2][#3][#4][#5][#6]% + \else + \def\docommando##1% + {\getfigurefilename{##1}{#3}% + \ifx\figurefilename\empty\else\quitcommalist\fi}% + \processcommacommand[\figurebaselist]\docommando + \ifx\figurefilename\empty + \stripspaces\from#3\to\figurefilename % to be sure + \normalcalculateexternalfigure + [#1][#2][\figurefilename][#4][#5][#6]% + \else + \normalcalculateexternalfigure + [#1][#2][\figurefilebase.pdf][\c!pagina=\figurefilepage,#4][#5][#6]% + \fi + \fi} + +\let\figurebaselist\empty + +\def\usefigurebase[#1]% + {\doifelse{#1}{\v!reset} + {\let\figurebaselist\empty} + {\appendcommacommand{#1}\figurebaselist}} + +\endinput + +\usefigurebase[figtest] + +\externalfigure[koetje] [width=3cm] +\externalfigure[de molen op de dijk][width=3cm] +\externalfigure[de molen op de dijk][width=2cm] +\externalfigure[weet ik veel] [width=3cm] +\externalfigure[weet ik veel] [width=2cm] +\externalfigure[weet ik wat] [width=2cm] +\externalfigure[koe] [width=2cm] diff --git a/tex/context/base/x-fig-01.tex b/tex/context/base/x-fig-01.tex new file mode 100644 index 000000000..b640e039d --- /dev/null +++ b/tex/context/base/x-fig-01.tex @@ -0,0 +1,345 @@ +%D \module +%D [ file=x-fig-00, +%D version=2001.03.21, +%D title=\CONTEXT\ Style File, +%D subtitle=Figure Base Generation, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +%D See \type {x-fig-01.tex} for more information on how to use +%D and generate figure databses. This file loads the file +%D named \type {\inputfilename} (\TEXEXEC\ will set this +%D variable). You can apply this style to a database by +%D saying: +%D +%D \starttypen +%D texexec --pdf --use=fig-01 yourfile.xml +%D \stoptypen +%D +%D The following modes are supported: +%D +%D \starttabulatie[|lT|l|] +%D \NC letter \NC map the preview on letter size \NC \NR +%D \NC compact \NC use an alternative presentation \NC \NR +%D \stoptabulatie +%D +%D The resulting file has the following characteristics: +%D +%D \startopsomming[opelkaar] +%D \som the document is split into three sections: first each +%D figure is shown at its own page, then an overview of +%D figures is shown with some data alongside, and +%D finaly an index and table of contents shows up +%D \som there is no title page, which means that one can +%D access a figure by page number without offset +%D \som the document is opened at the first overview page, +%D that is, when the viewer supports it +%D \som the graphic is shown 3~times: on a page of its own, +%D scaled to a fixed dimension, and relative to a4 or +%D letter paper size +%D \som the labels can be accessed in an index and list at +%D the end of the document +%D \stopopsomming + +\usemodule[fig-00] + +\doifnothing {\inputfilename} {\end} +\doiffileelse {\inputfilename.xml} {} {\end} + +\def\StartDescription% + {\bgroup + \defineXMLpush[organization] + \defineXMLpush[project] + \defineXMLpush[product] + \defineXMLpush[comment]} + +\def\StopDescription% + {\subject [begin] {Figure collection} + \starttabulate[|lBe|p|] + \doifXMLdataelse{organization} + {\NC organization \NC \XMLpop{organization} \NC \NR}{} + \doifXMLdataelse{project} + {\NC project \NC \XMLpop{project} \NC \NR}{} + \doifXMLdataelse{product} + {\NC product \NC \XMLpop{product} \NC \NR}{} + \doifXMLdataelse{comment} + {\NC comment \NC \XMLpop{comment} \NC \NR}{} + \stoptabulate + \blank[2*big] + \egroup} + +\def\StartFigureA% + {\bgroup + \XMLassign{file}{unknown} + \defineXMLpush[file] + \defineXMLpush[label] + \defineXMLpush[copyright] + \defineXMLpush[comment] + \defineXMLpush[status]} + +\defineoverlay[page][\overlaybutton{to:\CurrentPage}] + +\def\StopFigureA% + {\doglobal\increment\CurrentPage + \setupbackgrounds[page][background=page] + \pagereference[from:\CurrentPage] + \pagefigure[\XMLpop{file}] + \setupbackgrounds[page][background=] + \egroup} + +\def\StartFigureB% + {\StartFigureA} + +\defineregister + [figureindex] + [figureindices] + +\setupregister + [figureindex] + [ownnumber=yes, + criterium=text, + interaction=text, + indicator=no] + +\definelist + [figurelist] + +\setuplist + [figurelist] + [criterium=text, + pagenumber=no, + width=2em, + interaction=all] + +\setupcolors + [state=start] + +\setuptolerance + [verytolerant] + +% the next hack will be replaced by a layout definition + +\startbuffer[paper] +\startnotmode[letter] + \framed + [width=210mm,height=297mm,offset=10pt,frame=off, + background=color,backgroundcolor=white] + {\externalfigure[\XMLpop{file}][reset=yes]} +\stopnotmode +\startmode[letter] + \framed + [width=8.5in,height=11in,offset=10pt,frame=off, + background=color,backgroundcolor=white] + {\externalfigure[\XMLpop{file}][reset=yes]} +\stopmode +\stopbuffer + +\setupbuttons + [offset=10pt, + width=broad, + strut=no, + rulethickness=1pt, + framecolor=darkred] + +\def\StopFigureB% + {\par + \doglobal\increment\CurrentPage + \button + {\hbox to \hsize + {\forgetall \dontcomplain + \pagereference[to:\CurrentPage]% + \expanded{\writetolist[figurelist]{\CurrentPage}{\XMLpop{label}}}% + \expanded{\figureindex{\CurrentPage}{\XMLpop{label}}}% + \startnotmode[compact]% + \vbox to 100pt + {\hsize30pt + \vskip5pt + \hbox to \hsize{\hss\strut\bf\CurrentPage\hss}% + \vfill}% + \advance\hsize by -30pt + \stopnotmode + \startmode[compact]% + \advance\hsize by -10pt + \hskip10pt + \stopmode + \framed + [width=150pt,height=100pt,offset=10pt,frame=off, + background=color,backgroundcolor=white] + {\externalfigure + [\XMLpop{file}] + [maxheight=80pt,frame=off,maxwidth=130pt,factor=max]}% + \freezedimenmacro\naturalfigurewidth \let\FigWid\naturalfigurewidth + \freezedimenmacro\naturalfigureheight\let\FigHei\naturalfigureheight + \advance\hsize by -150pt + \hskip10pt + \advance\hsize by -10pt + \vbox to 100pt + {\hsize40pt + \externalfigure + [paper] + [type=buffer,frame=on, + framecolor=darkred,rulethickness=.5pt, + width=40pt,object=no] + \startmode[compact]% + \vfill + \hbox to \hsize{\hss\strut\bf\CurrentPage\hss}% + \stopmode + \vfill}% + \advance\hsize by -40pt +% \startnotmode[compact]% +% \hskip20pt +% \advance\hsize by -20pt +% \stopnotmode +% \startmode[compact]% + \hskip10pt + \advance\hsize by -10pt +% \stopmode + \vbox to 100pt + {\blank[disable] + \starttabulate[|Bel|p|] + \NC file \NC \XMLpop{file} \NC \NR + \doifXMLdataelse{label} + {\NC label \NC \XMLpop{label} \NC \NR} + {} + \NC w$\times$h \NC \FigWid$\times$\FigHei \NC \NR + \doifXMLdataelse{copyright} + {\NC copyright \NC \XMLpop{copyright} \NC \NR} + {} + \doifXMLdataelse{status} + {\doifelse{\XMLpop{status}}{obsolete} + {\NC status \NC \bf\darkred\XMLpop{status} \NC \NR} + {\NC status \NC \XMLpop{status} \NC \NR}} + {} + \doifXMLdataelse{comment} + {\NC comment \NC \XMLpop{comment} \NC \NR} + {} + \stoptabulate + \vfill}}}% + [from:\CurrentPage] + \vskip10pt + \egroup} + +\def\StartFigureC% + {\StartFigureA} + +\def\StopFigureC% + {\doglobal\increment\NumberOfFigures + \egroup} + +\setuplayout + [topspace=15pt,backspace=15pt, + header=0pt,footer=0pt,bottom=20pt,bottomdistance=10pt, + width=middle,height=fit] + +\setupbackgrounds + [page] + [background=, + backgroundcolor=gray] + +\setupinteractionscreen + [width=max, + height=max] + +\setupcolors + [state=start] + +\setupinteraction + [style=, + color=, + contrastcolor=, + state=start] + +\setuphead + [section] + [style=bfb] + +\setupbodyfont + [pos] + +\setupinteractionmenu + [bottom] + [left=\hfill, + middle=\hskip10pt, + frame=off, + style=bold, + background=color, + backgroundcolor=darkred, + foregroundcolor=white] + +\startinteractionmenu[bottom] + \but [begin] begin \\ + \but [index] index \\ + \but [list] list \\ + \but [CloseDocument] close \\ + \but [PreviousJump] go back \\ +\stopinteractionmenu + +\setupinteraction + [openaction=page(\NumberOfFigures)] + +\defineXMLenvironment [figurelibrary] \StartLibrary \StopLibrary + +\starttext + +\def\StartLibrary{\mainlanguage[\XMLpar{figurelibrary}{language}{en}]} +\def\StopLibrary {} + +\defineXMLignore + [description] + +\defineXMLenvironment + [figure] + \StartFigureC + \StopFigureC + +\doglobal\newcounter\CurrentPage + +\processXMLfilegrouped{\inputfilename.xml} + +\increment\NumberOfFigures + +\defineXMLignore + [description] + +\defineXMLenvironment + [figure] + \StartFigureA + \StopFigureA + +\doglobal\newcounter\CurrentPage + +\processXMLfilegrouped{\inputfilename.xml} + +\setuppapersize + [S6][S6] + +\setupbackgrounds + [page] + [background=color] + +\setupinteraction + [menu=on] + +\defineXMLenvironment [description] \StartDescription \StopDescription +\defineXMLenvironment [figure] \StartFigureB \StopFigureB + +\doglobal\newcounter\CurrentPage + +\processXMLfilegrouped{\inputfilename.xml} \page + +\subject [list] {List of figures} + +\placelist[figurelist] \page + +\subject [index] {Index of figures} + +\startcolumns +\placeregister[figureindex] +\stopcolumns + +\stoptext diff --git a/tex/context/base/xtag-ext.tex b/tex/context/base/xtag-ext.tex new file mode 100644 index 000000000..d092ca2dd --- /dev/null +++ b/tex/context/base/xtag-ext.tex @@ -0,0 +1,74 @@ +%D \module +%D [ file=xtag-ext, +%D version=2001.03.21, +%D title=\CONTEXT\ XML Support, +%D subtitle=Extra Macros, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\unprotect + +\beginTEX + \writestatus{xml}{sorry, xml is only supported in (pdf)etex} + \endinput +\endTEX + +\writestatus{loading}{Context XML Macros (extras)} + +\unprotect + +%D \macros +%D {startXMLnamespace} +%D +%D You can define macros within a namespace, so that they +%D will not conflict (don't confuse this with \XML\ +%D namespaces. +%D +%D \starttypen +%D \startXMLnamespace [tag] | [-] [tag] | [+] [tag] +%D definitions +%D \stopXMLnamespace +%D \stoptypen +%D +%D When a \type {[+]} is specified, the namespaces will +%D nest. + +\let\normal@@XMLelement\@@XMLelement +\let\XMLnamespace\empty + +\def\startXMLnamespace% + {\dodoubleempty\dostartXMLnamespace} + +\def\dostartXMLnamespace[#1][#2]% + {\pushmacro\@@XMLelement + \pushmacro\@@XMLnamespace + \ifsecondargument + \doifelse{#1}{-} + {\donostartXMLnamespace{#1}} + {\doifelse{#1}{+} + {\dodostartXMLnamespace{#1}{#2}} + {\donostartXMLnamespace{#1}}}% + \else + \donostartXMLnamespace{#1}% + \fi + \unprotect} + +\def\donostartXMLnamespace#1% + {\protect + \edef\XMLnamespace{#1}% + \let\@@XMLelement\normal@@XMLelement} + +\def\dodostartXMLnamespace#1#2% + {\edef\XMLnamespace{\XMLnamespace:#2}% + \edef\@@XMLelement{\@@XMLelement:#2}} + +\def\stopXMLnamespace% + {\popmacro\@@XMLnamespace + \popmacro\@@XMLelement} + +\protect \endinput diff --git a/tex/context/base/xtag-ini.tex b/tex/context/base/xtag-ini.tex new file mode 100644 index 000000000..1e3194cd5 --- /dev/null +++ b/tex/context/base/xtag-ini.tex @@ -0,0 +1,946 @@ +%D \module +%D [ file=xtag-ini, +%D version=2000.12.20, +%D title=\CONTEXT\ XML Support, +%D subtitle=Initialization, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\unprotect + +\def\unspaced#1% + {\dounspaced#1\end} + +\def\dounspaced#1% + {\ifx#1\end + \else\ifx#1\blankspace + \@EA\@EA\@EA\dounspaced + \else + #1\@EA\@EA\@EA\dounspaced + \fi\fi} + +\def\unspaceargument#1\to#2% + {\convertargument#1\to#2% + \@EA\edef\@EA#2\@EA{\@EA\unspaced\@EA{#2}}} + +\protect + +\beginTEX + \writestatus{xml}{sorry, xml is only supported in (pdf)etex} + \endinput +\endTEX + +\writestatus{loading}{Context XML Macros (ini)} + +%D Remark: some hard coded character things will be replaced +%D by named glyphs as soon as the upgraded encoding modules +%D are released. At that moment, unicode support will be +%D provided in accordance with the normal support in \CONTEXT. + +%D Like it or not, this module deals with angle bracketed +%D input. Processing \XML\ alike input in \CONTEXT\ has been +%D possible since 1994, but several methods ran in parallel +%D and were implemented in modules like \type {m-sgml}. +%D +%D There is no one optimal solution for processing \XML\ data. +%D The oldest method was based on a very simple preprocessor +%D written in \PERL: \type {<command>} was converted into +%D \type {\begSGML[command]} and optional parameters were +%D passed. +%D +%D A second method is to use a \PERL\ or \XSL\ transformation +%D script that produces \CONTEXT\ commands. This method is +%D much slower, mainly because the whole document is read into +%D memory and a document tree is to be build. The advantage is +%D that processing of the resulting document is fast. +%D +%D The third method uses a basic parser written in the \TEX\ +%D language, and apart from a few pitfalls, this method is +%D clean and efficient, but not always robust. Because errors +%D in the input are not catched on forhand, processing in +%D \TEX\ may fail due to errors. But, given that a document +%D can be validated on forehand, this is no big problem. +%D +%D Each method has it's advantage, but especially the third +%D method puts some demands on \CONTEXT, since no interference +%D between the parser and the core commands may occur. What +%D method is used, depends on the situation. +%D +%D All three methods introduce some problems in interfacing to +%D core \CONTEXT\ functionality. This is due to the fact that +%D sometimes we want to typeset content directly, while on +%D other cases we just want to pick up data for later usage, +%D either or not using delimited arguments. And, when moving +%D data around, there is always the expansion problem to deal +%D with. +%D +%D In order to be able to incorporate \XML\ style definitions +%D into basic \TEX\ styles, we will provide some basic +%D functionality in the core itself. + +%D We will be dealing with elements, which means that we have +%D to take care of \type {<this>} and \type {</that>}, but +%D also with \type {<such/>} and \type {<so />}. In due time +%D this module will deal with all these animals in a +%D convenient way. In some cases the upper and lowercase +%D alternatives need to be dealt with, although this is not +%D realy needed since XML is case sensitive. +%D +%D We also have to handle entities, like \type {&you;} and +%D \type {&me;}. These are quite easy to deal with and need to +%D be hooked into the encoding and abbreviation mechanisms. +%D +%D And then there are the parameters to be taken care of. Here +%D we meet \type {key="value"} but also \type {key='eulav'} +%D and even the spacy \typ {key = "value"}. +%D +%D Since we have to handlers for each element and entity, we +%D will create a few namespaces. Special care has to be +%D given to preformated code. + +\unprotect + +\def\@@XML {XML:} +\def\@@XMLentity {\@@XML ent} +\def\@@XMLelement {\@@XML ele} +\def\@@XMLvariable {\@@XML var} +\def\@@XMLvalue {\@@XML val} +\def\@@XMLpars {\@@XML par} +\def\@@XMLdata {\@@XML dat} +\def\@@XMLcode {\@@XML cod} +\def\@@XMLinstruction {\@@XML ins} + +\newtoks\XMLtoks +\newtoks\XMLresetlist + +\chardef\XMLargumentmode=0 + +\newif\ifignoreXMLcase +\newif\ifignoreXMLspaces +\newif\iffixedXMLfont + +%D \macros +%D {compound} +%D +%D We will overload the already active \type {|} so we have +%D to save its meaning in order to be able to use this handy +%D macro. +%D +%D \starttypen +%D so test\compound{}test can be used instead of test||test +%D \stoptypen + +\let\docompound=| \def\compound#1{\docompound#1|} + +%D We will implement the parser by making a few characters +%D active. For that reason we also have to save their +%D original meaning. The core handlers are \type +%D {\doXMLentity} and \type {\doXMLelement}. + +%D \macros +%D {enableXML} +%D +%D The macro \type {\enableXML} will be used to turn on the +%D parser. This means that after that, \TEX\ commands starting +%D with a backslash will not longer be read as such. There is +%D a way around this, but for convenience \TEXEXEC\ will take +%D care of processing raw \XML\ files in a transparant way. + +\bgroup +\catcode`\*=\@@comment +\catcode`\.=\@@escape +.catcode`.B=.@@begingroup +.catcode`.E=.@@endgroup + +.catcode`.&=.@@active .gdef.letterampersand B.string&E +.catcode`.<=.@@active .gdef.letterless B.string<E + +.catcode`.#=.@@active .gdef.letterhash B.string#E +.catcode`.$=.@@active .gdef.letterdollar B.string$E +.catcode`.%=.@@active +.catcode`.\=.@@active .gdef.letterbackslash B.string\E +.catcode`.^=.@@active .gdef.letterhat B.string^E +.catcode`._=.@@active .gdef.letterunderscore B.string_E +.catcode`.{=.@@active .gdef.letterbgroup B.string{E +.catcode`.}=.@@active .gdef.letteregroup B.string}E +.catcode`.|=.@@active .gdef.letterbar B.string|E +.catcode`.~=.@@active .gdef.lettertilde B.string~E + +.gdef.enableXMLexpansion + B.def<B.doXMLelementE.let&=.doXMLentityE + +.gdef.disableXMLexpansion + B.unexpanded.def<B.doXMLelementE.let&=.doXMLentityE + +.gdef.enableXML* + B.catcode`.!=.@@other* + .catcode`.?=.@@other* + .catcode`.&=.@@active .let&=.doXMLentity* + .catcode`.<=.@@active .unexpanded.def<B.doXMLelementE* + .catcode`.>=.@@other* + .catcode`.#=.@@active .def#B&tex-hash;E* + .catcode`.$=.@@active .def$B&tex-dollar;E* + .catcode`.%=.@@active .def%B&tex-percent;E* + .catcode`.\=.@@active .def\B&tex-backslash;E* + .catcode`.^=.@@active .def^B&tex-hat;E* + .catcode`._=.@@active .def_B&tex-underscore;E* + .catcode`.{=.@@active .def{B&tex-leftbrace;E* + .catcode`.}=.@@active .def}B&tex-rightbrace;E* + .catcode`.|=.@@active .def|B&tex-bar;E* + .catcode`.~=.@@other* active .def~B&tex-tilde;E* + .relax* needed for successive .if's + E + +.egroup + +%D An element can be singular or paired. A singular element is +%D called an empty element. The following definitions are +%D equivalent: +%D +%D \starttypen +%D <eerste></eerste> <eerste/> <eerste /> +%D \stoptypen +%D +%D Empty elements can have arguments too. Conforming the +%D standard, each key must have a value. These are separated +%D by an \type {=} sign and the value is delimited by either +%D \type {"} or \type {'}. There may be spaces around the +%D equal sign. +%D +%D \starttypen +%D <eerste a= "b" c ="d" /> <eerste a = "b" c="d"/> +%D \stoptypen +%D +%D Officially the following definition is not valid: +%D +%D \starttypen +%D <eerste>some text</eerste> <eerste/> <eerste /> +%D \stoptypen +%D +%D Although we can handle both cases independently, this is +%D seldom needed. +%D +%D Processing instructions are identified by a~\type {?} and are +%D like empty elements. +%D +%D \starttypen +%D <?doel a="b" c="d"?> <?doel a="b" c="d" ?> +%D \stoptypen +%D +%D Comment is formatted as follows. +%D +%D \starttypen +%D <!-- comment --> +%D \stoptypen +%D +%D Verbatim code inits purest form is called \type {CDATA} and +%D is embedded in the following ugly and therefore recognizable +%D way: +%D +%D \starttypen +%D <![CDATA[ +%D Dit is nogal verbatim ! +%D Dit is nogal verbatim ! +%D Dit is nogal verbatim ! +%D ]]> +%D \stoptypen + +%D The parser is implemented as a multi||step macro. Because +%D \type {!} and \type {?} should be picked up correctly, we +%D need to define a few macros in unprotected mode! +%D +%D Because \XML\ is defined with some restrictions in mind, +%D parsing the elements is not that complicated. First we have +%D to determine if we're dealing with a comment or processing +%D instruction. We need a bit of grouping because we have to +%D mess up with catcodes. We probably have to treat a few +%D more catcode and first character cases. + +\protect + +\long\def\doXMLelement#1% + {\bgroup % maybe tab and space needs some treatment too: \catcode`\ =10 % \@@space + \catcode`\^^M= 10 + \if#1!\let\next \xdoXMLelement \else + \if#1?\let\next \ydoXMLelement \else + \let\next \zdoXMLelement \fi\fi + \next#1} + +%D By using a few {\expandafter}'s we can us a \type {\next} +%D construction. We could speed the first char test up a bit +%D by using an installer and something \typ {\getvalue +%D {#1doXMLelement}} (todo). + +\long\def\doXMLelement#1% + {\bgroup % maybe tab and space needs some treatment too: \catcode`\ =10 % \@@space + \catcode`\^^M= 10 + \if#1!\expandafter \xdoXMLelement \else + \if#1?\expandafter\expandafter\expandafter \ydoXMLelement \else + \expandafter\expandafter\expandafter \zdoXMLelement \fi\fi + #1} + +%D The (yet experimental) \type {CDATA} parser is implemented +%D on top of the verbatim environment. + +\long\def\xdoXMLelement !#1 % !-- --> or !xyz > + {\egroup + \doifelse{#1}{--} + {\long\def\nextelement{\gobbleuntil{-->}}} + {\doifelse{#1}{[CDATA[} + {\long\def\nextelement{\skipfirstverbatimlinefalse + \processtaggeddisplayverbatim{]]>}}} + {\long\def\nextelement{\gobbleuntil{>}}}}% + \nextelement} + +%D In our case, processing instructions are only needed if +%D we want specific \CONTEXT\ support. This may be useful in +%D applications where the data is generated by an +%D application. We will implement a \CONTEXT\ code handler +%D later. + +\long\def\ydoXMLelement#1 #2?>% ?target ?> + {\egroup\dodoXMLprocessor{#1}{#2}} + +%D The normal elements are handled by \type {\dodoXMLelement}. + +\long\def\zdoXMLelement#1>% + {\egroup\dodoXMLelement#1 >} + +%D Now we switch to unprotected mode again. + +\unprotect + +%D The processing instructions handler is implemented as +%D follows. + +\long\def\dodoXMLprocessor#1% + {\ifundefined{\@@XMLinstruction:#1}% + \let\next\gobbleoneargument + \else + \def\next{\getvalue{\@@XMLinstruction:#1}}% + \fi + \next} + +\long\def\defineXMLprocessor[#1]#2% watch the ? + {\long\setvalue{\@@XMLinstruction:?#1}{#2}} + +%D As an example, we implement a \CONTEXT\ code handler: + +\defineXMLprocessor[context] {\contextXMLcommand} +\defineXMLprocessor[context-command]{\contextXMLcommand} + +\def\contextXMLcommand#1% + {\def\disableXML{\global\let\afterXMLprocessor\empty}% + \global\let\afterXMLprocessor\enableXML + \setnormalcatcodes\scantokens{#1}\afterXMLprocessor} + +\defineXMLprocessor[context-directive]{\contextXMLdirective} + +\def\contextXMLdirective#1% + {\docontextXMLdirective#1 dummy dummy dummy\end} + +\def\docontextXMLdirective#1 #2 #3 #4\end% class var value + {\setvalue{\@@XMLvariable:#1:#2}{#3}} + +\defineXMLprocessor[context-message]{\contextXMLmessage} + +\def\contextXMLmessage#1% + {\writestatus{xml}{#1}} + +\def\setnormalcatcodes% + {\catcode`\!=\@@other \catcode`\?=\@@other + \catcode`\&=\@@alignment \catcode`\<=\@@other + \catcode`\#=\@@parameter \catcode`\$=\@@mathshift + \catcode`\%=\@@comment \catcode`\\=\@@escape + \catcode`\^=\@@superscript \catcode`\_=\@@subscript + %\catcode`\|=\@@active \catcode`\~=\@@active + \catcode`\{=\@@begingroup \catcode`\}=\@@endgroup} + +%D Given the previous definition, and given that \ETEX\ is +%D used, we can now say: +%D +%D \starttypen +%D <?context {\bf Start Of Some \TeX\ Text} ?> +%D \stoptypen +%D +%D A non||\ETEX\ solution is also possible, using buffers, +%D but for the moment we assume that \ETEX\ is used. + +%D Next we will implement the normal element handler. + +\let\currentXMLarguments\empty +\let\currentXMLelement \empty + +\long\def\dodoXMLelement#1 #2>% + {\getvalue{\@@XMLpars:#1}% parameter list + \def\!!stringa{#2}% + \def\!!stringb{/ }% + \ifx\!!stringa\empty + \let\currentXMLarguments\empty + \def\currentXMLelement{#1}% + \else\ifx\!!stringa\!!stringb + \let\currentXMLarguments\empty + \def\currentXMLelement{#1/}% + \else + \def\currentXMLelement{#1}% + \def\currentXMLarguments{#2}% + %\getXMLarguments\currentXMLelement{#2}% + \dogetXMLarguments\currentXMLelement#2>% + \fi \fi + \executeXMLelement\currentXMLelement} + +\def\executeXMLelement#1% + {\getvalue{\@@XMLelement:#1}} + +\newif\ifXMLrawentities + +% \bgroup +% +% \catcode`<=\@@active +% +% \gdef\defineXMLentity[#1]#2% +% {\unspaceargument#1\to\ascii +% \long\setvalue{\@@XMLelement:ent:\@EA\firstofoneargument\ascii/}{#2}} +% +% \gdef\doXMLentity#1;% +% {\ifXMLrawentities#1\else\executeXMLentity{#1}\fi} +% +% \gdef\executeXMLentity#1% +% {<ent:#1/>} +% +% \gdef\getXMLentity#1% +% {\getvalue{\@@XMLelement:ent:#1/}} +% +% \gdef\doifXMLentityelse#1#2#3% +% {\ifundefined{\@@XMLelement:ent:#1/}#3\else#2\fi} +% +% \egroup + +\gdef\defineXMLentity[#1]#2% + {\unspaceargument#1\to\ascii + \long\setvalue{\@@XMLentity:\@EA\firstofoneargument\ascii}{#2}} + +\gdef\doXMLentity#1;% + {\ifXMLrawentities#1\else\executeXMLentity{#1}\fi} + +\def\executeXMLentity#1% internal ! ! ! + {\getXMLentity{#1}} + +\def\expandedXMLentity#1% + {\getvalue{\@@XMLentity:#1}} + +\unexpanded\def\getXMLentity#1% + {\getvalue{\@@XMLentity:#1}} + +\gdef\doifXMLentityelse#1#2#3% + {\ifundefined{\@@XMLentity:#1}#3\else#2\fi} + +\long\def\getXMLarguments#1#2% + {\dogetXMLarguments{#1}#2>} + +\long\def\dogetXMLarguments#1% + {\XMLtoks\emptytoks + \def\@@XMLclass{#1}% + \let\dodoparseXMLarguments\doparseXMLarguments + \doparseXMLarguments} + +\def\dosetXMLargument#1% + {\setvalue{\@@XMLvariable:\@@XMLclass:\@@XMLname}{#1}% + %\message{[\@@XMLname=#1]}% + \let\dodoparseXMLarguments\doparseXMLarguments + \dodoparseXMLarguments} + +\long\def\doparseXMLarguments#1% space goes ok + {\if#1>% + \let\dodoparseXMLarguments\empty + \else\if#1=% + \edef\@@XMLname{\the\XMLtoks}% + \XMLtoks\emptytoks + \else\if#1"% + \let\dodoparseXMLarguments\dodoparseXMLargumentsD + \else\if#1'% + \let\dodoparseXMLarguments\dodoparseXMLargumentsS + \else\if#1/% + \edef\currentXMLelement{\currentXMLelement/}% + \else + \@EA\XMLtoks\@EA{\the\XMLtoks#1}% + \fi\fi\fi\fi\fi + \dodoparseXMLarguments} + +\def\dodoparseXMLargumentsD#1"{\dosetXMLargument{#1}} +\def\dodoparseXMLargumentsS#1'{\dosetXMLargument{#1}} + +%D The previous macros were the basic parser and their working +%D is left to the imagination of the reader. These macros +%D will be improved. + +%D + +\bgroup + +\catcode`<=\@@active + +\long\gdef\dododefineXMLsingular#1#2% + {\long\setvalue{\@@XMLelement:#1/}{#2}} + +\long\gdef\dododefineXMLcommand#1#2% + {\long\setvalue{\@@XMLelement:#1/}{#2}% + \long\setvalue{\@@XMLelement:#1}{#2}} + +\long\gdef\dododefineXMLgrouped#1#2% + {\long\setvalue{\@@XMLelement:#1}{\groupedcommand{#2}{}\bgroup}% + \long\setvalue{\@@XMLelement:/#1}{\egroup}} + +\long\gdef\dododefineXMLargument#1#2% watch the {} around ##1 + {\long\setvalue{\@@XMLelement:#1/}{#2{}}% + \long\setvalue{\@@XMLelement:#1}##1</#1>{#2{##1}}} + +\long\gdef\dododefineXMLignore#1% + {\long\setvalue{\@@XMLelement:#1/}{}% + \long\setvalue{\@@XMLelement:#1}##1</#1>{}} + +\long\gdef\dododefineXMLpickup#1#2#3% + {\long\setvalue{\@@XMLelement:#1/}{#2#3}% + \long\setvalue{\@@XMLelement:#1}##1</#1>{#2##1#3}} + +\long\gdef\dododefineXMLenvironment#1#2#3% + {\long\setvalue{\@@XMLelement:#1/}{#2#3}% % genereert evt relax + \long\setvalue{\@@XMLelement:#1}{#2}% + \long\setvalue{\@@XMLelement:/#1}{#3}} + +\long\gdef\dododefineXMLpush#1% + {\long\setvalue{\@@XMLelement:#1/}{\long\setvalue{\@@XMLdata:#1}{}}% + \long\setvalue{\@@XMLelement:#1}##1</#1>{\long\setvalue{\@@XMLdata:#1}{##1}}} + +\long\gdef\dododefineXMLprocess#1% + {\long\setvalue{\@@XMLelement:#1/}{}% + \long\setvalue{\@@XMLelement:#1}{}% + \long\setvalue{\@@XMLelement:/#1}{}} + +\long\gdef\dododefineXMLnested#1#2#3% + {\long\setvalue{\@@XMLelement:#1}{\getXMLgrouped{#1}{#2}{#3}}} + +\egroup + +%D The high level definition macros. + +\def\defineXMLsingular {\dodoubleempty\dodefineXMLsingular} +\def\defineXMLcommand {\dodoubleempty\dodefineXMLcommand} +\def\defineXMLgrouped {\dodoubleempty\dodefineXMLgrouped} +\def\defineXMLargument {\dodoubleempty\dodefineXMLargument} +\def\defineXMLignore {\dodoubleempty\dodefineXMLignore} +\def\defineXMLpickup {\dodoubleempty\dodefineXMLpickup} +\def\defineXMLenvironment{\dodoubleempty\dodefineXMLenvironment} +\def\defineXMLpush {\dodoubleempty\dodefineXMLpush} +\def\defineXMLprocess {\dodoubleempty\dodefineXMLprocess} +\def\defineXMLnested {\dodoubleempty\dodefineXMLnested} + +\long\def\dodefineXMLsingular[#1][#2]#3% + {\defineXMLmethod\dododefineXMLsingular{#1}{#2}{#3}{}} + +\long\def\dodefineXMLcommand[#1][#2]#3% + {\defineXMLmethod\dododefineXMLcommand{#1}{#2}{#3}{}} + +\long\def\dodefineXMLgrouped[#1][#2]#3% + {\defineXMLmethod\dododefineXMLgrouped{#1}{#2}{#3}{}} + +\long\def\dodefineXMLargument[#1][#2]#3% + {\defineXMLmethod\dododefineXMLargument{#1}{#2}{#3}{}} + +\long\def\dodefineXMLignore[#1][#2]% + {\defineXMLmethod\dododefineXMLignore{#1}{#2}{}{}} + +\long\def\dodefineXMLpickup[#1][#2]#3#4% + {\defineXMLmethod\dododefineXMLpickup{#1}{#2}{#3}{#4}} + +\long\def\dodefineXMLenvironment[#1][#2]#3#4% + {\defineXMLmethod\dododefineXMLenvironment{#1}{#2}{#3}{#4}} + +\long\def\dodefineXMLpush[#1][#2]% + {\defineXMLmethod\dododefineXMLpush{#1}{#2}{}{}} + +\long\def\dodefineXMLprocess[#1][#2]% + {\defineXMLmethod\dododefineXMLprocess{#1}{#2}{}{}} + +\long\def\dodefineXMLnested[#1][#2]#3#4% + {\defineXMLmethod\dododefineXMLnested{#1}{#2}{#3}{#4}} + +\long\def\defineXMLmethod#1#2#3#4#5% command element pars begin end + {\ifsecondargument + \doifassignmentelse{#3} + {\setvalue{\@@XMLpars:#2}{\getrawparameters[\@@XMLvariable:#2:][#3]}} + {}% ? ? ? + % \def\docommando##1% can be made faster + % {\expanded{\XMLtoks{\the\XMLtoks\def\csname\@@XMLvariable:##1\endcsname{}}}}% + % \XMLtoks\emptytoks\processcommalist[#3]\docommando}% + \fi + \ifignoreXMLcase + \lowercasestring#2\to\ascii \@EA#1\@EA{\ascii}{#4}{#5}% + \uppercasestring#2\to\ascii \@EA#1\@EA{\ascii}{#4}{#5}% + \else + #1{#2}{#4}{#5}% + \fi} + +\def\doifXMLdataelse#1#2#3% % \relax too, so no etex +% {\expandafter\ifx\csname\@@XMLdata:#1\endcsname\relax + {\ifundefined{\@@XMLdata:#1}% + #3% + \else\expandafter\ifx\csname\@@XMLdata:#1\endcsname\empty + #3% + \else\expandafter\ifx\csname\@@XMLdata:#1\endcsname\relax + #3% + \else + #2% + \fi\fi\fi} + +\def\XMLpop#1% +% {\expandafter\ifx\csname\@@XMLdata:#1\endcsname\relax\else +% \csname\@@XMLdata:#1\endcsname +% \fi} + {\ifundefined{\@@XMLdata:#1}\else\getvalue{\@@XMLdata:#1}\fi} + +\def\XMLappend#1#2% + {\edef\!!stringa{\@@XMLdata:#1}% + \doifXMLdataelse{#1}% + {\@EA\@EA\@EA\setvalue\@EA\@EA\@EA\!!stringa\@EA\@EA\@EA + {\csname\!!stringa\endcsname#2}} + {\setvalue\!!stringa{#2}}} + +\def\XMLprepend#1#2% + {\edef\!!stringa{\@@XMLdata:#1}% + \doifXMLdataelse{#1}% + {\@EA\@EA\@EA\setvalue\@EA\@EA\@EA\!!stringa\@EA\@EA\@EA + {#2\csname\!!stringa\endcsname}} + {\setvalue\!!stringa{#2}}} + +\def\XMLerase#1% + {\letvalue{\@@XMLdata:#1}\empty} + +\def\XMLassign#1% + {\setvalue{\@@XMLdata:#1}} + +\def\defXMLstring#1#2% + {\@EA\convertcommand\csname\@@XMLdata:#2\endcsname\to#1} + +\def\XMLshow#1% + {\showvalue{\@@XMLdata:#1\endcsname}} + +\def\defXMLlowerclean#1% lowercase ! evt tzt upper too + {\bgroup + \lccode`\#=32\lccode`\$=32\lccode`\%=32\lccode`\\=32\lccode`\^=32 + \lccode`\_=32\lccode`\{=32\lccode`\}=32\lccode`\|=32\lccode`\~=32 + \@EA\lowercase\@EA{\@EA\xdef\@EA#1\@EA{#1}}% + \egroup} + +\def\processXMLparelse#1#2#3#4% + {\processaction + [\XMLpar{#1}{#2}{}] + [#3,\s!unknown=>{#4},\s!default={#4}]} + +%D We can pick up key|/|value pairs, but we still need a way +%D to process these. + +\def\mapXMLvalue#1#2#3% td align center -> middle + {\setvalue{\@@XMLvalue:#1:#2:#3}} + +\def\XMLvar#1#2#3% td align center + {\ifundefined{\@@XMLvariable:#1:#2}% + \XMLval{#1}{#2}{#3}% + \else + \XMLval{#1}{#2}{\getvalue{\@@XMLvariable:#1:#2}}% + \fi} + +\def\XMLval#1#2#3% + {\ifundefined{\@@XMLvalue:#1:#2}% + #3% + \else + \getvalue{\@@XMLvalue:#1:#2}% + \fi} + +\def\XMLpar#1#2#3% + {\ifundefined{\@@XMLvariable:#1:#2}% + #3% + \else + \getvalue{\@@XMLvariable:#1:#2}% + \fi} + +\def\XMLstr#1% + {{\enableXML\scantokens{#1}\unskip}} + +\def\XMLstrpar#1#2#3% + {{\enableXML + \ifundefined{\@@XMLvariable:#1:#2}% + \scantokens{#3}% + \else + \scantokens\@EA\@EA\@EA + {\csname\@@XMLvariable:#1:#2\endcsname}\unskip + \fi}} + +\def\doifXMLvarelse#1#2#3#4% geen etex, \relax too + {\expandafter\ifx\csname\@@XMLvariable:#1:#2\endcsname\relax#4\else + \expandafter\ifx\csname\@@XMLvariable:#1:#2\endcsname\empty#4\else#3\fi\fi} + +\def\doifXMLvalelse#1#2#3#4% geen etex, \relax too + {\expandafter\ifx\csname\@@XMLvalue:#1:#2\endcsname\relax#4\else + \expandafter\ifx\csname\@@XMLvalue:#1:#2\endcsname\empty#4\else#3\fi\fi} + +\let\doifXMLparelse\doifXMLvarelse + +\def\dogotoXML% + {\ifx\nexttoken<% + \expandafter\nexttoken + \else + \expandafter\gotoXML + \fi} + +\def\gotoXML% + {\afterassignment\dogotoXML\let\nexttoken=} + +%D + +\beginETEX \scantokens + +\long\def\startXMLcode[#1] #2 \stopXMLcode + {\setgvalue{\@@XMLcode:#1}{\startXMLdata#2\stopXMLdata}} + +\def\getXMLcode[#1]% \expandXMLcode + {\getvalue{\@@XMLcode:#1}} + +% \long\def\startXMLdata#1\stopXMLdata% +% {\bgroup\enableXML\scantokens{#1}\egroup} +% +% \defineXMLentity[tex-backslash] {\catchXMLpar} +% +% \def\catchXMLpar#1#2#3 +% {\if#1p\if#2a\if#3r\ifmmode\else\endgraf\fi +% \else\texescape\fi\else\texescape\fi\else\texescape\fi} + +\long\def\startXMLdata + {\bgroup + \catcode`\^^I=\@@space + \catcode`\^^M=\@@space + \catcode`\^^L=\@@space + \dostartXMLdata} + +\long\def\dostartXMLdata#1\stopXMLdata + {\enableXML\scantokens{#1}\egroup} + +\long\def\dostartXMLdata#1\stopXMLdata + {\enableXML\scantokens{#1}\ifhmode\unskip\unskip\fi\egroup} + +\def\XMLdata#1% + {{\enableXML\scantokens{#1}\ifhmode\unskip\unskip\fi}} + +\endETEX + +\beginTEX + +\long\def\startXMLcode[#1] #2 \stopXMLcode% + {{\infofont[embedded XML code only works in ETEX]}\par} + +\endTEX + +%D + +\def\bXMLs{\ifignoreXMLspaces\ignorespaces\fi} +\def\eXMLs{\ifignoreXMLspaces\ifhmode\unskip\fi\fi} + +\protect + +% \defineXMLcommand{placeindex/} +% {\placeindex[criterium=all]} +% +% \defineXMLargument{index} +% {\index[\XMLvar{index}{key}{}]} + +%D Here we implement the handling of preformatted code. + +\unprotect + +\def\startXMLpreformatted#1% + {\startpacked + #1% + \fixedXMLfonttrue + \obeylines + \obeyspaces + \setbox\scratchbox=\hbox{x}% + \edef\obeyedspace{\noindent\noexpand\kern\the\wd\scratchbox}} + +\def\stopXMLpreformatted#1% + {\stoppacked} + +%D + +\def\XMLinput{\enableXML\input} \global\let\inputXML\XMLinput + +% options + +\def\processXMLfile #1{\enableXML\processfile{#1}} +\def\processXMLfilegrouped#1{{\enableXML\processfile{#1}\relax\ifmmode\else\par\fi}} + +% partially defined here + +\fetchruntimecommand\showXMLfile {\f!xtagprefix vis} +\fetchruntimecommand\showXMLbuffer{\f!xtagprefix vis} + +\fetchruntimecommand\showXMLtxt {\f!xtagprefix vis} +\fetchruntimecommand\showXMLpar {\f!xtagprefix vis} +\fetchruntimecommand\showXMLlin {\f!xtagprefix vis} +\fetchruntimecommand\showXMLwrd {\f!xtagprefix vis} +\fetchruntimecommand\showXMLemp {\f!xtagprefix vis} + +%D \type +%D {processXMLbuffer} +%D +%D For illustrative purposes, we need to be able to reuse +%D definitions, which is why we implement a buffer processor +%D here. The macro \type {\processXMLbuffer} behaves like +%D any buffer processor. + +\def\processXMLbuffer% + {\dosingleempty\doprocessXMLbuffer} + +\def\doprocessXMLbuffer[#1]% + {\doifelsenothing{#1} + {\doprocessXMLbuffer[\jobname]} + {\bgroup + \def\dodoprocessXMLbuffer##1% + {\enableXML\processXMLfile{\TEXbufferfile{##1}}}% + \processcommalist[#1]\dodoprocessXMLbuffer + \egroup}} + +%D Loading specific modules takes place with \type +%D {\useXMLfilters}. + +\def\useXMLfilter[#1]% + {\processcommalist[#1]\douseXMLfilter} + +\def\douseXMLfilter#1% + {\doifundefined{\c!file\f!xtagprefix#1} + {\setvalue{\c!file\f!xtagprefix#1}{}% + \makeshortfilename[\f!xtagprefix#1]% + \writestatus{xml}{loading module #1}% will be \showmessage + \startreadingfile + \readsysfile{\shortfilename}{}{}% + \stopreadingfile}} + +%D Temporarily here. + +\newtoks\groupedtoks + +\bgroup + +\catcode`\<=\@@active + +\long\unexpanded\gdef\getXMLgrouped#1#2#3% + {\groupedtoks\emptytoks + \convertargument<#1>\to\xxascii + \convertargument<#1 \to\yyascii + \newcounter\groupedlevel + \long\def\dogetgrouped##1</#1>% + {\appendtoks##1\to\groupedtoks + \convertargument##1\to\ascii + \doloop + {\@EA\@EA\@EA\aftersplitstring\@EA\ascii\@EA\at\xxascii\to\ascii + \ifx\ascii\empty + \exitloop + \else + \increment\groupedlevel + \fi}% + \convertargument##1\to\ascii + \doloop + {\@EA\@EA\@EA\aftersplitstring\@EA\ascii\@EA\at\yyascii\to\ascii + \ifx\ascii\empty + \exitloop + \else + \increment\groupedlevel + \fi}% + \ifnum\groupedlevel>0 + \decrement\groupedlevel + \appendtoks</#1>\to\groupedtoks + \else + \edef\dogetgrouped{\noexpand#2\the\groupedtoks\noexpand#3}% + \fi + \dogetgrouped}% + \dogetgrouped} + +% cleaner but hardly faster unless big strings are passed + +\long\gdef\docountXMLgrouped#1\end#2\end + {\long\def\dosplitstring##1#2##2@@##3\end% + {\def\ascii{##2}% + \ifx\ascii\empty \else + \advance\scratchcounter 1 + \dosplitstring##2@@#2@@\end + \fi}% + \dosplitstring#1@@#2@@\end} + +\long\unexpanded\gdef\getXMLgrouped#1#2#3% + {\groupedtoks\emptytoks + \scratchcounter=0 + \long\def\dogetgrouped##1</#1>% + {\appendtoks##1\to\groupedtoks + \docountXMLgrouped##1\end<#1>\end + \docountXMLgrouped##1\end<#1 \end + \ifcase\scratchcounter + \def\dogetgrouped{\@EA#2\the\groupedtoks#3}% + \else + \advance\scratchcounter -1 + \appendtoks</#1>\to\groupedtoks + \fi + \dogetgrouped}% + \dogetgrouped} + +\egroup + +% {pre}{pos}{before}{after} +% +%\unexpanded\def\getgrouped#1#2#3#4% +% {\groupedtoks\emptytoks +% \convertargument#1\to\xxascii +% \newcounter\groupedlevel +% \def\dogetgrouped##1#2% +% {\appendtoks##1\to\groupedtoks +% \convertargument##1\to\ascii +% \doloop +% {\@EA\@EA\@EA\aftersplitstring\@EA\ascii\@EA\at\xxascii\to\ascii +% \ifx\ascii\empty +% \exitloop +% \else +% \increment\groupedlevel +% \fi}% +% \ifnum\groupedlevel>0 +% \decrement\groupedlevel +% \appendtoks#2\to\groupedtoks +% \else +% \edef\dogetgrouped{\noexpand#3\the\groupedtoks\noexpand#4}% +% \fi +% \dogetgrouped}% +% \dogetgrouped} + +% interesting and fully expandable + +\def\XMLifequalelse#1#2#3#4#5% + {\ifundefined{\@@XMLvariable:#1:#2}% + #5% + \else + \@EA\@EA\@EA\@@ifequal\csname\@@XMLvariable:#1:#2\endcsname + \relax\@@and#3\relax\@@then#4\@@else#5\@@fi + \fi} + +\def\expifequalelse#1#2#3#4% + {\@@ifequal#1\relax\relax\@@and#2\relax\relax\@@then#3\@@else#4\@@fi} + +\def\@@ifequal#1#2\@@and#3#4\@@then#5\@@else#6\@@fi% + {\ifx#1\relax + \ifx#3\relax#5\else#6\fi + \else + \ifx#3\relax#6\else\@@ifequal#2\@@and#4\@@then#5\@@else#6\@@fi\fi + \fi} + +\protect \endinput diff --git a/tex/context/base/xtag-vis.tex b/tex/context/base/xtag-vis.tex new file mode 100644 index 000000000..234238f4f --- /dev/null +++ b/tex/context/base/xtag-vis.tex @@ -0,0 +1,122 @@ +%D \module +%D [ file=xtag-vis, +%D version=2001.01.10, +%D title=\CONTEXT\ XML Support, +%D subtitle=Visualization, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\writestatus{loading}{Context XML Macros (visualization)} + +\unprotect + +\bgroup + +\catcode`\.=\@@escape +.catcode`.B=.@@begingroup +.catcode`.E=.@@endgroup +.catcode`.#=.@@active +.catcode`.$=.@@active +.catcode`.%=.@@active +.catcode`.\=.@@active +.catcode`.^=.@@active +.catcode`._=.@@active +.catcode`.{=.@@active +.catcode`.}=.@@active +.catcode`.|=.@@active +.catcode`.~=.@@active + +.gdef.verbatimXML + B.catcode`.#=.@@active .let#.letterhash + .catcode`.$=.@@active .let$.dollar + .catcode`.%=.@@active .let%.percent + .catcode`.\=.@@active .let\.letterbackslash + .catcode`.^=.@@active .let^.letterhat + .catcode`._=.@@active .let_.letterunderscore + .catcode`.{=.@@active .let{.leftargument + .catcode`.}=.@@active .let}.rightargument + .catcode`.|=.@@active .let|.letterbar + .catcode`.~=.@@active .let~.lettertilde + E + +.egroup + +\definepalet + [xtag] + [0=darkgreen, + 1=darkred, + 2=darkblue, + 3=darkgray] + +\newcount\XMLlevel + +\def\@XMLindent#1% +% {\ifnum\XMLlevel>0\advance\leftskip#11em\relax\fi} + {\advance\leftskip#11em\relax} + +\def\@XMLlevel#1% + {\advance\XMLlevel#11\relax} + +\def\@XMLentity#1% + {\noindent + \hbox + {\localcolortrue + \startcolormode{xtag:3}\string\stopcolormode}} + +\def\@XMLelement#1% + {\ifhmode\unskip\fi + \noindent + \hbox + {\localcolortrue + \DoMod\XMLlevel by3to\scratchcounter + \startcolormode{xtag:\number\scratchcounter}\string<\currentXMLelement\stopcolormode + \ifcase#1\or\ifx\currentXMLarguments\empty\else + \startcolormode{xtag:3}\hskip.5em\currentXMLarguments\unskip\stopcolormode + \fi\fi + \startcolormode{xtag:\number\scratchcounter}\string>\stopcolormode}% + \ignorespaces} + +\def\nextXMLtext{\blank\@XMLlevel+\@XMLelement1\par} +\def\prevXMLtext{\par\@XMLelement0\par\@XMLlevel-\blank} +\def\nextXMLpara{\nextXMLline\par} +\def\prevXMLpara{\par\prevXMLline} +\def\nextXMLline{\par\@XMLlevel+\@XMLindent+\@XMLelement1} +\def\prevXMLline{\@XMLelement0\par\@XMLlevel-\@XMLindent-} +\def\nextXMLword{\@XMLlevel+\@XMLelement1} +\def\prevXMLword{\@XMLelement0\@XMLlevel-} + +\def\someXMLword{\@XMLlevel+\@XMLelement1\@XMLlevel-} + +\def\setXMLshow#1#2#3[#4]% + {\def\docommando##1{#1[##1]#2#3}\processcommalist[#4]\docommando} + +\def\showXMLtxt{\setXMLshow\defineXMLenvironment\nextXMLtext\prevXMLtext} +\def\showXMLpar{\setXMLshow\defineXMLenvironment\nextXMLpara\prevXMLpara} +\def\showXMLlin{\setXMLshow\defineXMLenvironment\nextXMLline\prevXMLline} +\def\showXMLwrd{\setXMLshow\defineXMLenvironment\nextXMLword\prevXMLword} +\def\showXMLemp{\setXMLshow\defineXMLsingular\someXMLword\relax} + +\def\showXMLfile#1% + {{\tttf\dontcomplain + \let\executeXMLentity\@XMLentity + \enableXML\verbatimXML + \processfile{#1}}} + +\def\showXMLbuffer% + {\dosingleempty\doshowXMLbuffer} + +\def\doshowXMLbuffer[#1]% + {\doifelsenothing{#1} + {\doshowXMLbuffer[\jobname]} + {\bgroup + \def\dodoprocessXMLbuffer##1% + {\showXMLfile{\TEXbufferfile{##1}}}% + \processcommalist[#1]\dodoprocessXMLbuffer + \egroup}} + +\protect \endinput diff --git a/tex/context/config/cont-cz.ini b/tex/context/config/cont-cz.ini new file mode 100644 index 000000000..7df97918f --- /dev/null +++ b/tex/context/config/cont-cz.ini @@ -0,0 +1,5 @@ +% This is a configuration file needed for Thomas Esser's teTeX. Don't +% forget to uncomment the context specific lines in "fmtutil --edit". +% You may want to read the ConTeXt installation manual "minstall.pdf". +\input cont-cz.tex +\endinput diff --git a/tex/context/config/cont-de.ini b/tex/context/config/cont-de.ini new file mode 100644 index 000000000..bf5b3b397 --- /dev/null +++ b/tex/context/config/cont-de.ini @@ -0,0 +1,5 @@ +% This is a configuration file needed for Thomas Esser's teTeX. Don't +% forget to uncomment the context specific lines in "fmtutil --edit". +% You may want to read the ConTeXt installation manual "minstall.pdf". +\input cont-de.tex +\endinput diff --git a/tex/context/config/cont-en.ini b/tex/context/config/cont-en.ini new file mode 100644 index 000000000..6b101ed65 --- /dev/null +++ b/tex/context/config/cont-en.ini @@ -0,0 +1,5 @@ +% This is a configuration file needed for Thomas Esser's teTeX. Don't +% forget to uncomment the context specific lines in "fmtutil --edit". +% You may want to read the ConTeXt installation manual "minstall.pdf". +\input cont-en.tex +\endinput diff --git a/tex/context/config/cont-it.ini b/tex/context/config/cont-it.ini new file mode 100644 index 000000000..3214b5b7d --- /dev/null +++ b/tex/context/config/cont-it.ini @@ -0,0 +1,5 @@ +% This is a configuration file needed for Thomas Esser's teTeX. Don't +% forget to uncomment the context specific lines in "fmtutil --edit". +% You may want to read the ConTeXt installation manual "minstall.pdf". +\input cont-it.tex +\endinput diff --git a/tex/context/config/cont-nl.ini b/tex/context/config/cont-nl.ini new file mode 100644 index 000000000..afbe79042 --- /dev/null +++ b/tex/context/config/cont-nl.ini @@ -0,0 +1,5 @@ +% This is a configuration file needed for Thomas Esser's teTeX. Don't +% forget to uncomment the context specific lines in "fmtutil --edit". +% You may want to read the ConTeXt installation manual "minstall.pdf". +\input cont-nl.tex +\endinput diff --git a/tex/context/config/cont-ro.ini b/tex/context/config/cont-ro.ini new file mode 100644 index 000000000..4f766b66c --- /dev/null +++ b/tex/context/config/cont-ro.ini @@ -0,0 +1,5 @@ +% This is a configuration file needed for Thomas Esser's teTeX. Don't +% forget to uncomment the context specific lines in "fmtutil --edit". +% You may want to read the ConTeXt installation manual "minstall.pdf". +\input cont-ro.tex +\endinput diff --git a/tex/context/config/cont-uk.ini b/tex/context/config/cont-uk.ini new file mode 100644 index 000000000..6b7a680d1 --- /dev/null +++ b/tex/context/config/cont-uk.ini @@ -0,0 +1,5 @@ +% This is a configuration file needed for Thomas Esser's teTeX. Don't +% forget to uncomment the context specific lines in "fmtutil --edit". +% You may want to read the ConTeXt installation manual "minstall.pdf". +\input cont-uk.tex +\endinput diff --git a/tex/context/config/cont-usr.tex b/tex/context/config/cont-usr.tex index a02a01429..4ced0fdc8 100644 --- a/tex/context/config/cont-usr.tex +++ b/tex/context/config/cont-usr.tex @@ -32,6 +32,7 @@ \definefilesynonym [lang-en.pat] [ushyph1.tex] \definefilesynonym [lang-fi.pat] [fihyph.tex] \definefilesynonym [lang-fr.pat] [frhyph.tex] +\definefilesynonym [lang-hu.pat] [huhyph.tex] \definefilesynonym [lang-hr.pat] [hrhyph.tex] \definefilesynonym [lang-it.pat] [ithyph.tex] \definefilesynonym [lang-la.pat] [lahyph7.tex] @@ -41,7 +42,7 @@ \definefilesynonym [lang-pt.pat] [pthyph.tex] \definefilesynonym [lang-ro.pat] [rohyph.tex] \definefilesynonym [lang-sk.pat] [skhyph.tex] -\definefilesynonym [lang-sp.pat] [sphyph.tex] +\definefilesynonym [lang-es.pat] [eshyph.tex] \definefilesynonym [lang-sv.pat] [sehyph.tex] \definefilesynonym [lang-tr.pat] [trhyph.tex] \definefilesynonym [lang-uk.pat] [ukhyphen.tex] @@ -95,8 +96,9 @@ % \installlanguage [\s!pl] [\c!status=\v!start] % polish % \installlanguage [\s!pt] [\c!status=\v!start] % portuguese % \installlanguage [\s!ro] [\c!status=\v!start] % romanian +% \installlanguage [\s!hu] [\c!status=\v!start] % hungarian % \installlanguage [\s!sk] [\c!status=\v!start] % slovak -% \installlanguage [\s!es] [\c!status=\v!start] % spanish + \installlanguage [\s!es] [\c!status=\v!start] % spanish % \installlanguage [\s!sv] [\c!status=\v!start] % swedish % \installlanguage [\s!tr] [\c!status=\v!start] % turkish % \installlanguage [\s!uk] [\c!status=\v!start] % english uk @@ -122,6 +124,7 @@ % \setupcurrentlanguage[\s!pl] % \setupcurrentlanguage[\s!pt] % \setupcurrentlanguage[\s!ro] +% \setupcurrentlanguage[\s!hu] % \setupcurrentlanguage[\s!sk] % \setupcurrentlanguage[\s!es] % \setupcurrentlanguage[\s!sv] diff --git a/tex/generic/context/mptopdf.tex b/tex/generic/context/mptopdf.tex index 15c56831d..665971088 100644 --- a/tex/generic/context/mptopdf.tex +++ b/tex/generic/context/mptopdf.tex @@ -111,6 +111,7 @@ \def\processMPfile#1 % {\pdfoutput=1 + \pdfcompresslevel=9 \chardef\makeMPintoPDFobject=1 \hsize=100in \vsize=\hsize |