diff options
| author | Hans Hagen <pragma@wxs.nl> | 2003-02-11 00:00:00 +0100 | 
|---|---|---|
| committer | Hans Hagen <pragma@wxs.nl> | 2003-02-11 00:00:00 +0100 | 
| commit | 94506ae16cbb3851986ebf900316894301f46667 (patch) | |
| tree | 139caa4675899b887099882d8254f29805196001 | |
| parent | d0b8c8944555fc6250ff5af04c01acfe37b93e0d (diff) | |
| download | context-94506ae16cbb3851986ebf900316894301f46667.tar.gz | |
stable 2003.02.11
53 files changed, 1772 insertions, 887 deletions
| diff --git a/context/config/texexec.rme b/context/config/texexec.rme index 30ecfedf0..0a2735a8e 100644 --- a/context/config/texexec.rme +++ b/context/config/texexec.rme @@ -76,10 +76,12 @@ for  tetex  set  TeXExecutable     to  pdfetex  for  tetex  set  TeXVirginFlag     to  -ini  for  tetex  set  TeXPassString     to  -progname=context   for  tetex  set  TeXBatchFlag      to  -int=batchmode  +for  tetex  set  TeXNonStopFlag    to  -int=nonstopmode  for  tetex  set  MpToTeXExecutable to  mpto  for  tetex  set  MpVirginFlag      to  -ini   for  tetex  set  MpPassString      to  -progname=mpost  for  tetex  set  MpBatchFlag       to  -int=batchmode  +for  tetex  set  MpNonStopFlag     to  -int=nonstopmode  % These also apply to fpTeX.  @@ -87,10 +89,12 @@ for  fptex  set  TeXExecutable     to  pdfetex  for  fptex  set  TeXVirginFlag     to  -ini  for  fptex  set  TeXPassString     to  -progname=context   for  fptex  set  TeXBatchFlag      to  -int=batchmode  +for  tetex  set  TeXNonStopFlag    to  -int=nonstopmode  for  fptex  set  MpToTeXExecutable to  mpto  for  fptex  set  MpVirginFlag      to  -ini   for  fptex  set  MpPassString      to  -progname=mpost  for  fptex  set  MpBatchFlag       to  -int=batchmode +for  tetex  set  MpNonStopFlag     to  -int=nonstopmode  % MikTeX users probably have to set up some paths too. @@ -98,10 +102,12 @@ for  miktex  set  TeXExecutable     to  pdfetex  for  miktex  set  TeXVirginFlag     to  --initialize  for  miktex  set  TeXPassString     to  --alias=context   for  miktex  set  TeXBatchFlag      to  --interaction=batchmode  +for  miktex  set  TeXNonStopFlag    to  --interaction=nonstopmode  for  miktex  set  MpToTeXExecutable to  mptotex  for  miktex  set  MpVirginFlag      to  --initialize  for  miktex  set  MpPassString      to  --alias=mpost  for  miktex  set  MpBatchFlag       to  --interaction=batchmode  +for  miktex  set  MpNonStopFlag     to  --interaction=nonstopmode  for  miktex  set  TeXFormatFlag     to  --undump=  for  miktex  set  MpFormatFlag      to  --undump= diff --git a/context/perltk/texexec.pl b/context/perltk/texexec.pl index dd6975041..e0f66d3ff 100644 --- a/context/perltk/texexec.pl +++ b/context/perltk/texexec.pl @@ -23,6 +23,7 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' && eval 'exec perl -S $0 $  #  Thanks to Thomas Esser     for hooking it into web2c  #  Thanks to Taco   Hoekwater for suggesting improvements  #  Thanks to Wybo Dekker      for the advanced help interface  +#  Thanks to Fabrice Popineau for windows path trickery   # (I still have to completely understand the help code -) @@ -35,10 +36,12 @@ use Time::Local   ;  use Config        ;  use Getopt::Long  ;  use Class::Struct ; # needed for help subsystem -#   Data::Dumper  ; # needed for help subsystem +#se Data::Dumper  ; # needed for help subsystem +use FindBin       ;  my %ConTeXtInterfaces ; # otherwise problems with strict  my %ResponceInterface ; # since i dunno how to allocate else +  # my %Help ;  # use strict ; @@ -85,6 +88,7 @@ my $Convert          = '' ;  my $DoMPTeX          = 0 ;  my $DoMPXTeX         = 0 ;  my $EnterBatchMode   = 0 ; +my $EnterNonStopMode = 0 ;  my $Environments     = '' ;  my $Modules          = '' ;  my $FastMode         = 0 ; @@ -153,6 +157,7 @@ my $ForceXML         = 0 ;  &GetOptions    ( "arrange"       => \$Arrange          ,      "batch"         => \$EnterBatchMode   , +    "nonstop"       => \$EnterNonStopMode ,      "color"         => \$UseColor         ,      "centerpage"    => \$CenterPage       ,      "convert=s"     => \$Convert          , @@ -265,7 +270,7 @@ if (($LogFile ne '')&&($LogFile =~ /\w+\.log$/io))      *STDOUT = *LOGFILE ;      *STDERR = *LOGFILE } -my $Program = " TeXExec 3.1 - ConTeXt / PRAGMA ADE 1997-2002" ; +my $Program = " TeXExec 3.2 - ConTeXt / PRAGMA ADE 1997-2003" ;  print "\n$Program\n\n" ; @@ -274,11 +279,25 @@ if ($Verbose)  my $pathslash = '/' ; if ($0 =~ /\\/) { $pathslash = "\\" }  my $cur_path  = ".$pathslash" ; -my $own_path  = $0 ; $own_path =~ s/texexec(\.pl|\.bat|)//io ; -my $own_type  = $1 ;  + +#  $own_path  = $0 ; $own_path =~ s/texexec(\.pl|\.bat|)//io ; +#  $own_type  = $1 ;  +#  $own_stub  = "" ;  + +# we need to handle window's "Program Files" path (patch by Fabrice P) + +my $own_path  = "$FindBin::Bin/" ; +my $own_type  = $0 ;  +my $own_quote = ($own_path =~ m/^[^\"].* / ? "\"" : "") ;   my $own_stub  = "" ;  -if ($own_type =~ /pl/oi) { $own_stub = "perl " }  +if ($own_type =~ /(\.(pl|bin|exe))$/io)  +  { $own_type = $1 }  +else +  { $own_type = '' }  + +if ($own_type =~ /pl/oi)             +  { $own_stub = "perl " }   sub checked_path    { my $path = shift  ; @@ -325,7 +344,8 @@ my $kpsewhich = '' ;  sub found_ini_file    { my $suffix = shift ; -    my $IniPath = `$kpsewhich --format="other text files" -progname=context texexec.$suffix` ; +  # my $IniPath = `$kpsewhich --format="other text files" -progname=context texexec.$suffix` ; +    my $IniPath = `$own_quote$kpsewhich$own_quote --format="other text files" -progname=context texexec.$suffix` ;      chomp($IniPath) ;      return $IniPath } @@ -506,7 +526,9 @@ my $TeXScriptsPath    = IniValue('TeXScriptsPath'    , '' ) ;  my $TeXExecutable     = IniValue('TeXExecutable'     , 'tex' ) ;  my $TeXVirginFlag     = IniValue('TeXVirginFlag'     , '-ini' ) ;  my $TeXBatchFlag      = IniValue('TeXBatchFlag'      , '-int=batchmode' ) ; +my $TeXNonStopFlag    = IniValue('TeXNonStopFlag'    , '-int=nonstopmode' ) ;  my $MpBatchFlag       = IniValue('MpBatchFlag'       , '-int=batchmode' ) ; +my $MpNonStopFlag     = IniValue('MpNonStopFlag'     , '-int=nonstopmode' ) ;  my $TeXPassString     = IniValue('TeXPassString'     , '' ) ;  my $TeXFormatFlag     = IniValue('TeXFormatFlag'     , '' ) ;  my $MpFormatFlag      = IniValue('MpFormatFlag'      , '' ) ; @@ -524,7 +546,7 @@ my $TcXPath           = IniValue('TcXPath'           , '' ) ;  if (($Verbose)&&($kpsewhich ne ''))    { print "\n" ; -    my $CnfFile = `$kpsewhich -progname=context texmf.cnf` ; +    my $CnfFile = `$own_quote$kpsewhich$own_quote -progname=context texmf.cnf` ;      chomp $CnfFile ;      print " applications will use : $CnfFile\n" } @@ -624,6 +646,7 @@ SetInterfaces ( "xx" , "experimental" , "english"   ) ;  # $Help{ARRANGE}     = "             --arrange   process and arrange\n" ;  # $Help{BATCH}       = "               --batch   run in batch mode (don't pause)\n" ; +# $Help{NONSTOP}     = "             --nonstop   run in non stop 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{USEMODULE}   = "           --usemodule   load some modules first\n" ; @@ -777,6 +800,7 @@ SetInterfaces ( "xx" , "experimental" , "english"   ) ;  #     else  #       { print $Help{ARRANGE}     ;  #         print $Help{BATCH}       ; +#         print $Help{NONSTOP}     ;  #         print $Help{CENTERPAGE}  ;  #         print $Help{COLOR}       ;  # #       print $Help{CONVERT}     ; @@ -984,13 +1008,17 @@ sub MPJobName  sub RunPerlScript    { my ($ScriptName, $Options) = @_ ; +    my $cmd = '' ;       if ($dosish) -      { if (-e "$own_path$ScriptName$own_type") -          { system ("$own_stub$own_path$ScriptName$own_type $Options") }  +      { if (-e "own_path$ScriptName$own_type")   +          { $cmd = "$own_stub$own_quote$own_path$ScriptName$own_type$own_quote $Options" }           elsif (-e "$TeXScriptsPath$ScriptName$own_type") -          { system ("$own_stub$TeXScriptsPath$ScriptName$own_type $Options") } } +          { $cmd = "$own_stub$own_quote$TeXScriptsPath$ScriptName$own_type$own_quote $Options" }  +        else  +          { $cmd = "" } }      else -      { system ("$ScriptName $Options") } } +      { $cmd = "$ScriptName $Options" }  +    unless ($cmd eq "") { system($cmd) } }  sub ConvertXMLFile    { my $FileName = shift ; RunPerlScript($SGMLtoTeX, "$FileName.xml") } @@ -1038,13 +1066,16 @@ sub MakeOptionFile        { print OPT "\\setuplanguage[$MainLanguage]\n" }      # can best become : \use...[mik] / [web]      if ($TeXShell =~ /MikTeX/io) -      { print OPT "\\def\\MPOSTbatchswitch \{$MpBatchFlag\}" ; -        print OPT "\\def\\MPOSTformatswitch\{$MpPassString $MpFormatFlag\}" } +      { print OPT "\\def\\MPOSTbatchswitch   \{$MpBatchFlag\}" ; +        print OPT "\\def\\MPOSTnonstopswitch \{$MpNonStopFlag\}" ; +        print OPT "\\def\\MPOSTformatswitch  \{$MpPassString $MpFormatFlag\}" }      #      if ($FullFormat ne 'standard')        { print OPT "\\setupoutput[$FullFormat]\n" }      if ($EnterBatchMode)        { print OPT "\\batchmode\n" } +    if ($EnterNonStopMode) +      { print OPT "\\nonstopmode\n" }      if ($UseColor)        { print OPT "\\setupcolors[\\c!status=\\v!start]\n" }      if ($NoMPMode||$NoMPRun||$AutoMPRun) @@ -1318,11 +1349,13 @@ sub RunTeX              ($Format =~ /^cont/) &&              ($TeXPassString !~ /progname/io))            { $TeXProgNameFlag = "-progname=context" } } -    $cmd  = "$TeXProgramPath$TeXExecutable $TeXProgNameFlag " . +    $cmd  = "$own_quote$TeXProgramPath$TeXExecutable$own_quote $TeXProgNameFlag " .              "$TeXPassString $PassOn " ;     #$cmd .= " -kpathsea-debug=62536 " ;      if ($EnterBatchMode)        { $cmd .= "$TeXBatchFlag " } +    if ($EnterNonStopMode) +      { $cmd .= "$TeXNonStopFlag " }      if ($TeXTranslation ne '')        { $cmd .= "-translate-file=$TeXTranslation " }      $cmd .= "$TeXFormatFlag$TeXFormatPath$Format $JobName.$JobSuffix" ; @@ -1401,7 +1434,8 @@ sub RunTeXMP      if ($MPJobName ne "")        { if (open(MP, "$MPJobName"))            { $_ = <MP> ; chomp ;  # we should handle the prefix as well -if (/^\%\s+translate.*?\=([\w\d\-]+)/io) { $TeXTranslation = $1 }  +            if (/^\%\s+translate.*?\=([\w\d\-]+)/io)  +              { $TeXTranslation = $1 }               if (/collected graphics of job \"(.+)\"/i)                { $MPFoundJobName = $1 }              close(MP) ; @@ -1411,10 +1445,13 @@ if (/^\%\s+translate.*?\=([\w\d\-]+)/io) { $TeXTranslation = $1 }                        { print "   generating graphics : metaposting $MPJobName\n" ;                          my $ForceMpy = "" ;                          if ($MpyForce) { $ForceMpy = "--mpyforce" } -my $ForceTCX = '' ;  -if ($TeXTranslation ne '') { $ForceTCX = "--translate=$TeXTranslation " } +                        my $ForceTCX = '' ;  +                        if ($TeXTranslation ne '')  +                          { $ForceTCX = "--translate=$TeXTranslation " }                          if ($EnterBatchMode)                            { RunPerlScript ($TeXExec,"$ForceTCX $ForceMpy --mptex --nomp --batch $MPJobName") } +                        elsif ($EnterNonStopMode) +                          { RunPerlScript ($TeXExec,"$ForceTCX $ForceMpy --mptex --nomp --nonstop $MPJobName") }                          else                            { RunPerlScript ($TeXExec,"$ForceTCX $ForceMpy --mptex --nomp $MPJobName") } }                      else @@ -1505,20 +1542,21 @@ sub RunConTeXtFile          if ($TeXTranslation ne '')            { print "           translation : $TeXTranslation\n" }          my $Options = '' ; -        if ($FastMode)       { $Options .= " fast" } -        if ($FinalMode)      { $Options .= " final" } -        if ($Verbose)        { $Options .= " verbose" } -        if ($TypesetListing) { $Options .= " listing" } -        if ($TypesetModule)  { $Options .= " module" } -        if ($TypesetFigures) { $Options .= " figures" } -        if ($MakeFormats)    { $Options .= " make" } -        if ($RunOnce)        { $Options .= " once" } -        if ($UseColor)       { $Options .= " color" } -        if ($EnterBatchMode) { $Options .= " batch" } -        if ($NoMPMode)       { $Options .= " nomp" } -        if ($CenterPage)     { $Options .= " center" } -        if ($Arrange)        { $Options .= " arrange" } -        if ($NoArrange)      { $Options .= " no-arrange" } +        if ($FastMode)         { $Options .= " fast" } +        if ($FinalMode)        { $Options .= " final" } +        if ($Verbose)          { $Options .= " verbose" } +        if ($TypesetListing)   { $Options .= " listing" } +        if ($TypesetModule)    { $Options .= " module" } +        if ($TypesetFigures)   { $Options .= " figures" } +        if ($MakeFormats)      { $Options .= " make" } +        if ($RunOnce)          { $Options .= " once" } +        if ($UseColor)         { $Options .= " color" } +        if ($EnterBatchMode)   { $Options .= " batch" } +        if ($EnterNonStopMode) { $Options .= " nonstop" } +        if ($NoMPMode)         { $Options .= " nomp" } +        if ($CenterPage)       { $Options .= " center" } +        if ($Arrange)          { $Options .= " arrange" } +        if ($NoArrange)        { $Options .= " no-arrange" }          if ($Options)            { print "               options :$Options\n" }          if ($ConTeXtModes) @@ -1913,7 +1951,7 @@ sub RunCombine  sub LocatedFormatPath    { my $FormatPath = shift ;      if (($FormatPath eq '')&&($kpsewhich ne '')) -      { $FormatPath = `$kpsewhich --show-path=fmt` ; +      { $FormatPath = `$own_quote$kpsewhich$own_quote --show-path=fmt` ;          chomp $FormatPath ;          $FormatPath =~ s/\.+\;//o ; # should be a sub          $FormatPath =~ s/\;.*//o ; @@ -1931,7 +1969,7 @@ sub RunOneFormat      my @TeXFormatPath ;      my $TeXPrefix = "" ;      if (($fmtutil ne "")&&($FormatName !~ /metafun|mptopdf/io)) -      { my $cmd = "$fmtutil --byfmt $FormatName" ; +      { my $cmd = "$own_quote$fmtutil$own_quote --byfmt $FormatName" ;          if ($Verbose) { print "\n$cmd\n\n" }          MakeUserFile ; # this works only when the path is kept          MakeResponseFile ; @@ -1993,7 +2031,7 @@ sub RunMpFormat      my $CurrentPath = cwd() ;      $MpFormatPath = LocatedFormatPath($MpFormatPath) ;      if ($MpFormatPath ne '') { chdir "$MpFormatPath" } -    my $cmd = "$MpExecutable $MpVirginFlag $MpPassString $MpFormat" ; +    my $cmd = "$own_quote$MpExecutable$own_quote $MpVirginFlag $MpPassString $MpFormat" ;      if ($Verbose) { print "\n$cmd\n\n" }      system ( $cmd ) ;      if (($MpFormatPath ne '')&&($CurrentPath ne '')) @@ -2139,7 +2177,7 @@ sub doRunMP ###########              close(MP) }          if ($TexFound)            { print "       metapost to tex : $MpName\n" ; -            $Problems = system ("$MpToTeXExecutable $MpFile > $MpTex" ) ; +            $Problems = system ("$own_quote$MpToTeXExecutable$own_quote $MpFile > $MpTex" ) ;              if (-e $MpTex && !$Problems)                { open (TMP,">>$MpTex") ;                  print TMP "\\end\{document\}\n" ; # to be sure @@ -2151,16 +2189,18 @@ sub doRunMP ###########                    { RunSomeTeXFile ($MpTmp, "tex") }                      if (-e $MpDvi && !$Problems)                        { print "       dvi to metapost : $MpName\n" ; -                        $Problems = system ("$DviToMpExecutable $MpDvi $MpName.mpx") } +                        $Problems = system ("$own_quote$DviToMpExecutable$own_quote $MpDvi $MpName.mpx") }                      # $Problems = system ("dvicopy $MpDvi texexec.dvi") ; -                    # $Problems = system ("$DviToMpExecutable texexec.dvi $MpName.mpx") } +                    # $Problems = system ("$own_quote$DviToMpExecutable$own_quote texexec.dvi $MpName.mpx") }                     unlink $MpBck ;                      rename $MpTex, $MpBck ;                     unlink $MpDvi } }              print "              metapost : $MpName\n" ; -            my $cmd = $MpExecutable ; +            my $cmd = "$own_quote$MpExecutable$own_quote" ;              if ($EnterBatchMode)                { $cmd .= " $MpBatchFlag " } +            if ($EnterNonStopMode) +              { $cmd .= " $MpNonStopFlag " }              if (($MpFormat ne '')&&($MpFormat !~ /(plain|mpost)/oi))                { print "                format : $MpFormat\n" ;                  $cmd .= " $MpPassString $MpFormatFlag$MpFormat " } @@ -2186,7 +2226,7 @@ sub RunMPX        { local $/ = "\0777" ; $_ = <MP> ; close(MP) ;          if (/(btex|etex|verbatimtex)/o)            { print "   generating mpx file : $MpName\n" ; -            $Problems = system ("$MpToTeXExecutable $MpFile > $MpTex" ) ; +            $Problems = system ("$own_quote$MpToTeXExecutable$own_quote $MpFile > $MpTex" ) ;              if (-e $MpTex && !$Problems)                { open (TMP,">>$MpTex") ;                  print TMP "\\end\n" ; # to be sure @@ -2196,7 +2236,7 @@ sub RunMPX                  else                    { RunSomeTeXFile ($MpTmp, "tex") }                  if (-e $MpDvi && !$Problems) -                  { $Problems = system ("$DviToMpExecutable $MpDvi $MpName.mpx") } +                  { $Problems = system ("$own_quote$DviToMpExecutable$own_quote $MpDvi $MpName.mpx") }             unlink $MpTex ;             unlink $MpDvi } } } } @@ -2322,6 +2362,8 @@ arrange process and arrange  -----------  batch run in batch mode (don't pause)  ----------- +nonstop run in non stop mode (don't pause) +-----------  centerpage center the page on the paper  -----------  color enable color (when not yet enabled) diff --git a/context/perltk/texexec.rme b/context/perltk/texexec.rme index 30ecfedf0..0a2735a8e 100644 --- a/context/perltk/texexec.rme +++ b/context/perltk/texexec.rme @@ -76,10 +76,12 @@ for  tetex  set  TeXExecutable     to  pdfetex  for  tetex  set  TeXVirginFlag     to  -ini  for  tetex  set  TeXPassString     to  -progname=context   for  tetex  set  TeXBatchFlag      to  -int=batchmode  +for  tetex  set  TeXNonStopFlag    to  -int=nonstopmode  for  tetex  set  MpToTeXExecutable to  mpto  for  tetex  set  MpVirginFlag      to  -ini   for  tetex  set  MpPassString      to  -progname=mpost  for  tetex  set  MpBatchFlag       to  -int=batchmode  +for  tetex  set  MpNonStopFlag     to  -int=nonstopmode  % These also apply to fpTeX.  @@ -87,10 +89,12 @@ for  fptex  set  TeXExecutable     to  pdfetex  for  fptex  set  TeXVirginFlag     to  -ini  for  fptex  set  TeXPassString     to  -progname=context   for  fptex  set  TeXBatchFlag      to  -int=batchmode  +for  tetex  set  TeXNonStopFlag    to  -int=nonstopmode  for  fptex  set  MpToTeXExecutable to  mpto  for  fptex  set  MpVirginFlag      to  -ini   for  fptex  set  MpPassString      to  -progname=mpost  for  fptex  set  MpBatchFlag       to  -int=batchmode +for  tetex  set  MpNonStopFlag     to  -int=nonstopmode  % MikTeX users probably have to set up some paths too. @@ -98,10 +102,12 @@ for  miktex  set  TeXExecutable     to  pdfetex  for  miktex  set  TeXVirginFlag     to  --initialize  for  miktex  set  TeXPassString     to  --alias=context   for  miktex  set  TeXBatchFlag      to  --interaction=batchmode  +for  miktex  set  TeXNonStopFlag    to  --interaction=nonstopmode  for  miktex  set  MpToTeXExecutable to  mptotex  for  miktex  set  MpVirginFlag      to  --initialize  for  miktex  set  MpPassString      to  --alias=mpost  for  miktex  set  MpBatchFlag       to  --interaction=batchmode  +for  miktex  set  MpNonStopFlag     to  --interaction=nonstopmode  for  miktex  set  TeXFormatFlag     to  --undump=  for  miktex  set  MpFormatFlag      to  --undump= diff --git a/context/perltk/texfont.pl b/context/perltk/texfont.pl index 51db205b0..ed6286945 100644 --- a/context/perltk/texfont.pl +++ b/context/perltk/texfont.pl @@ -32,6 +32,7 @@ use strict ;  my $savedoptions = join (" ",@ARGV) ;  use Config ; +use FindBin ;  use File::Copy ;  use Getopt::Long ; @@ -49,7 +50,7 @@ my $installpath = "" ; my @searchpaths = () ;  if (defined($ENV{TEXMFLOCAL})) { $installpath = "TEXMFLOCAL" }  if (defined($ENV{TEXMFFONTS})) { $installpath = "TEXMFFONTS" } -if ($installpath eq "") { $installpath = "TEXMFFONTS" } # redundant  +#  ($installpath eq "") { $installpath = "TEXMFFONTS" } # redundant   if ($installpath eq "") { $installpath = "TEXMFLOCAL" } # redundant   @searchpaths = ('TEXMFFONTS','TEXMFLOCAL','TEXMFMAIN') ; @@ -117,6 +118,15 @@ my $width = "" ;      "width=s"      => \$width,      "expert"       => \$expert) ; +# for/from Fabrice:  + +my $own_path = "$FindBin::Bin/" ; +$FindBin::RealScript =~ m/([^\.]*)(\.pl|\.bat|\.exe|)/io ; +my $own_name = $1 ; +my $own_type = $2 ; +my $own_stub  = "" ;  +if ($own_type =~ /pl/oi) { $own_stub = "perl " }  +  # so we can use both combined   if (!$novirtual) { $virtual = 1 }  @@ -139,7 +149,7 @@ sub error  # The banner.   print "\n" ; -report ("TeXFont 1.6 - ConTeXt / PRAGMA ADE 2000-2002") ; +report ("TeXFont 1.7 - ConTeXt / PRAGMA ADE 2000-2003") ;  print "\n" ;  # Handy for scripts: one can provide a preferred path, if it  @@ -245,7 +255,7 @@ if (($batch)||($ARGV[0] =~ /.+\.dat$/io))        { if ($batchfile !~ /\.dat$/io) { $batchfile .= ".dat" } }      unless (-f $batchfile)        { report ("trying to locate : $batchfile") ; -        $batchfile = `kpsewhich -progname=context --format="other text file" $batchfile` ; +        $batchfile = `kpsewhich -progname=context --format="other text files" $batchfile` ;          chomp $batchfile }      error ("unknown batch file $batchfile") unless -e $batchfile ;      report ("processing batch file : $batchfile") ; @@ -268,7 +278,8 @@ if (($batch)||($ARGV[0] =~ /.+\.dat$/io))                  s/\s+/ /gio ;                  s/(--en.*\=)\?/$1$encoding/io ;                  report ("batch line : $_") ; -                system ("perl $0 --fontroot=$fontroot $_") } +              # system ("perl $0 --fontroot=$fontroot $_") } +                system ("$own_stub$own_path$own_name$own_type --fontroot=$fontroot $_") }              close (BAT) }      exit } @@ -675,8 +686,11 @@ foreach my $file (@files)      else         { $thename = $usename ; $theencoding = " $encoding.enc" }       # quit rest if no type 1 file +    my $pfb_sourcepath = $sourcepath ; +    $pfb_sourcepath =~ s@/afm/@/type1/@ ;      unless ((-e "$pfbpath/$fontname.pfb")|| -           (-e "$sourcepath/$fontname.pfb"))  +            (-e "$pfb_sourcepath/$fontname.pfb")|| +            (-e "$sourcepath/$fontname.pfb"))        { if ($tex) { $report .= "missing file: \\type \{$fontname.pfb\}\n" }         report ("missing pfb file : $fontname.pfb") }      # now add entry to map  diff --git a/context/perltk/texutil.pl b/context/perltk/texutil.pl index f3fb75514..3eb529122 100644 --- a/context/perltk/texutil.pl +++ b/context/perltk/texutil.pl @@ -23,11 +23,13 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' && eval 'exec perl -S $0 $  #  Thanks to Taco      Hoekwater for making the file -w proof  #  Thanks to Alex      Knowles   and friends for the right JPG specs  #  Thanks to Sebastian Rahtz     for the eps to PDF method +#  Thanks to Fabrice   Popineau  for windows bin code  #  undocumented:  # -#  --analyze file.pdf       : reports some statistics -#  --purge   [jobname]      : removes temporary files +#  --analyze  file.pdf  : reports some statistics +#  --purge    [jobname] : removes temporary files +#  --purgeall [jobname] : removes all temporary files  #D This is \TEXUTIL, a utility program (script) to be used  #D alongside the \CONTEXT\ macro package. This \PERL\ script is @@ -38,7 +40,7 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' && eval 'exec perl -S $0 $  #D binary version, like scanning illustrations other than \EPS.  #D I would suggest to keep an eye on the version number: -$Program = "TeXUtil 7.4 - ConTeXt / PRAGMA ADE 1992-2002" ; +$Program = "TeXUtil 7.5 - ConTeXt / PRAGMA ADE 1992-2003" ;  #D By the way, this is my first \PERL\ script, which means  #D that it will be improved as soon as I find new and/or more @@ -73,6 +75,7 @@ $Program = "TeXUtil 7.4 - ConTeXt / PRAGMA ADE 1992-2002" ;  #D \PRAGMA\ environment system.  use Getopt::Long ; +use FindBin ;  #D We don't want error messages and accept partial switches,  #D which saves users some typing. @@ -88,7 +91,7 @@ $UserInterface  = "en" ;  $UnknownOptions = 0 ;  $TcXPath        = '' ; -#D We need this for calling GS.   +#D We need this for calling GS.  use Config        ; @@ -119,6 +122,7 @@ my $dosish = ($Config{'osname'} =~ /^(ms)?dos|^os\/2|^(ms|cyg)win/i) ;        "criterium=f"       =>\$ProcessCriterium,        "unknown"           =>\$ProcessUnknown,     "purge"          => \$PurgeFiles, +   "purgeall"       => \$PurgeAllFiles,     "analyze"        => \$AnalyzeFile,     "help"           => \$ProcessHelp,     "silent"         => \$ProcessSilent, @@ -160,13 +164,13 @@ sub CloseTerminal  $InputFile = "@ARGV" ; # niet waterdicht  sub CompFileName -  { my ($a,$b) = @_ ;  -    my ($fa,$sa) = split(/\./,$a) ;  -    my ($fb,$sb) = split(/\./,$b) ;   -    if (($sa =~ /^\d+$/o)&&($sb =~ /^\d+$/o))  -      { $a = $fa . "." . sprintf("%10d",$sa) ; $a =~ s/\s/0/o ;  -        $b = $fb . "." . sprintf("%10d",$sb) ; $b =~ s/\s/0/o }  -    return (lc ($a) cmp lc ($b)) }  +  { my ($a,$b) = @_ ; +    my ($fa,$sa) = split(/\./,$a) ; +    my ($fb,$sb) = split(/\./,$b) ; +    if (($sa =~ /^\d+$/o)&&($sb =~ /^\d+$/o)) +      { $a = $fa . "." . sprintf("%10d",$sa) ; $a =~ s/\s/0/o ; +        $b = $fb . "." . sprintf("%10d",$sb) ; $b =~ s/\s/0/o } +    return (lc ($a) cmp lc ($b)) }  sub CheckInputFiles   { @UserSuppliedFiles = glob $_[0] ; @@ -602,7 +606,7 @@ if ($UserInterface eq "nl")  "                       --quotes : quotes converteren                    \n" .  "                       --tcxpath : tcx filter pad                       \n" .  "                                                                        \n" . -"              --purge    tijdelijke (klad) files verwijderen            \n" . +"           --purge(all)    tijdelijke (klad) files verwijderen            \n" .  "                                                                        \n" .  "           --documents   documentatie file genereren / tex->ted         \n" .  "             --sources   broncode file genereren / tex->tes             \n" . @@ -633,7 +637,7 @@ elsif ($UserInterface eq "de")  "                       --quotes : Konvertiere akzentuierte Buchstaben   \n" .  "                       --tcxpath : tcx Filter Path                      \n" .  "                                                                        \n" . -"              --purge    entferne temporaere ConTeXt-Dateien            \n" . +"          --purge(all)    entferne temporaere ConTeXt-Dateien            \n" .  "                                                                        \n" .  "           --documents   Erstelle Dokumentationsdatei / tex->ted        \n" .  "             --sources   Erstelle reine Quelltextdateien / tex->tes     \n" . @@ -664,7 +668,7 @@ elsif ($UserInterface eq "it")  "                       --quotes : converti caratteri accentati          \n" .  "                       --tcxpath : percorso del filtro tcx              \n" .  "                                                                        \n" . -"              --purge    rimuovi i file temporanei ConTeXt              \n" . +"         --purge(all)    rimuovi i file temporanei ConTeXt              \n" .  "                                                                        \n" .  "           --documents   genera file di documentazione / tex->ted       \n" .  "             --sources   genera solo sorgente / tex->tes                \n" . @@ -695,7 +699,7 @@ else  "                       --quotes : convert quotes characters             \n" .  "                       --tcxpath : tcx filter path                      \n" .  "                                                                        \n" . -"              --purge    clean up temporary context files               \n" . +"         --purge(all)    clean up temporary context files               \n" .  "                                                                        \n" .  "           --documents   generate documentation file / tex->ted         \n" .  "             --sources   generate source only file / tex->tes           \n" . @@ -828,7 +832,7 @@ sub HandleKey      $STR[$SortN] = $str ;      $CHR[$SortN] = $chr ;      $MAP[$SortN] = $map ; -#print "$chr$map = $alf\n" ;  +#print "$chr$map = $alf\n" ;  #    $ALF{"$chr$map"} = $alf }      $ALF{"$map"} = $alf } @@ -843,7 +847,7 @@ sub SanitizedString            { my $s = $STR[$i] ;              my $c = $CHR[$i] ;              my $m = $MAP[$i] ; -          # print "[$i $s $c $m]\n" ;  +          # print "[$i $s $c $m]\n" ;              $string =~ s/($s)/$c/ge ;              $copied =~ s/($s)/$m/ge }          $string .= "\x00"; @@ -958,7 +962,7 @@ my $NOfPositionsFound  = 0 ;  my $TotalNOfPositions  = 0 ;  my $TotalNOfMPgraphics = 0 ; -my $SectionSeparator = ":" ;  +my $SectionSeparator = ":" ;  sub InitializeCommands    { print TUO "%\n" . "% $Program / Commands\n" . "%\n" ; @@ -973,9 +977,9 @@ sub HandleCommand        { $TotalNOfPositions = $1 }      elsif ($RestOfLine =~ /^initializevariable\\totalnofMPgraphics\{(.*)\}/i)        { $TotalNOfMPgraphics = $1 } -# todo: reg how to  -#    elsif ($RestOfLine =~ /^thisissectionseparator\{(.*)\}/o)  -#      { $SectionSeparator = $1 }  +# todo: reg how to +#    elsif ($RestOfLine =~ /^thisissectionseparator\{(.*)\}/o) +#      { $SectionSeparator = $1 }      print TUO "\\$RestOfLine\n" }  sub FlushCommands @@ -1022,13 +1026,14 @@ sub RunExtraPrograms  my $pm_path ;  BEGIN -  { # $pm_path = `kpsewhich --format="other text files" --progname=context texutil.pl` ; -    # chomp($pm_path) ; +  { ## $pm_path = `kpsewhich --format="other text files" --progname=context texutil.pl` ; +    ## chomp($pm_path) ;      # $pm_path =~ s/texutil\.pl.*// } -    $pm_path = $0 ; -    $pm_path =~ s/\\/\//o ; +    # $pm_path = $0 ; +    # $pm_path =~ s/\\/\//o ;      # $pm_path =~ s/texutil\.pl.*//io ; -    $pm_path =~ s/(.*)texutil.*?$/$1/i ; +    ## $pm_path =~ s/(.*)texutil.*?$/$1/i ; +    $pm_path = "$FindBin::Bin/" ;      if ($pm_path eq "") { $pm_path = "./" } }  use lib $pm_path ; @@ -1191,7 +1196,7 @@ $RegStat{"e"} = 2 ; # end up between from and to  $RegStat{"t"} = 3 ;  $RegStat{"s"} = 4 ; -my $RegSep = "$SectionSeparator$SectionSeparator" ;  +my $RegSep = "$SectionSeparator$SectionSeparator" ;  sub HandleRegister # the } { makes sure that local {} is ok    { ($SecondTag, $RestOfLine) = split(/ /, $RestOfLine, 2) ; @@ -1314,7 +1319,7 @@ sub HandleRegister # the } { makes sure that local {} is ok  #D \haalbuffer After being sorted, these entries are  #D turned into something \TEX\ using: -$CollapseEntries = 0 ;  +$CollapseEntries = 0 ;  $RegisterEntry[0] = ("") ; @@ -1323,11 +1328,11 @@ sub How  sub FlushSavedLine    { if (($CollapseEntries)&&($SavedFrom ne "")) -      { if ($SavedTo ne "")  +      { if ($SavedTo ne "")            { print TUO "\\registerfrom$SavedFrom" ; -            print TUO "\\registerto$SavedTo" }  +            print TUO "\\registerto$SavedTo" }          else -          { print TUO "\\registerpage$SavedFrom" } }  +          { print TUO "\\registerpage$SavedFrom" } }      $SavedFrom  = "" ;      $SavedTo    = "" ;      $SavedEntry = "" } @@ -1350,7 +1355,7 @@ sub FlushRegisters      $SavedFrom  = "" ;      $SavedTo    = "" ; -    $SavedEntry = "" ;  +    $SavedEntry = "" ;      for ($n=1 ; $n<=$NOfEntries ; ++$n)        { ($Class, $LCKey, $Key, $Entry, $TextHow, $RegisterState, @@ -1415,8 +1420,8 @@ sub FlushRegisters              $LastRealPage = $RealPage }          elsif (($Copied) ||                ! (($LastPage eq $Page) and ($LastRealPage eq $RealPage))) -          { # print "$LastPage / $Page // $LastRealPage / $RealPage\n" ;   -            $NextEntry = "{$Class}{$PreviousA}{$PreviousB}{$PreviousC}{$PageHow,$TextHow}" ;  +          { # print "$LastPage / $Page // $LastRealPage / $RealPage\n" ; +            $NextEntry = "{$Class}{$PreviousA}{$PreviousB}{$PreviousC}{$PageHow,$TextHow}" ;              $SavedLine = "{$Class}{$PageHow,$TextHow}{$Location}{$Page}{$RealPage}\n" ;              if ($RegisterState eq $RegStat{"f"})                { FlushSavedLine ; @@ -1425,15 +1430,15 @@ sub FlushRegisters                { FlushSavedLine ;                  print TUO "\\registerto$SavedLine" }              else -              { if ($CollapseEntries)  +              { if ($CollapseEntries)                    { if ($SavedEntry ne $NextEntry)                        { $SavedFrom = $SavedLine }                      else                        { $SavedTo = $SavedLine } -                    $SavedEntry = $NextEntry }  -                else  +                    $SavedEntry = $NextEntry } +                else                   { print TUO "\\registerpage$SavedLine" } -              }  +              }              ++$NOfSanePages ;              $LastPage = $Page ;              $LastRealPage = $RealPage } } @@ -2017,7 +2022,7 @@ sub ConvertEpsToEps    { my ( $SuppliedFileName , $LLX, $LLY, $URX, $URY ) = @_ ;      ($FileName, $FileSuffix) = SplitFileName ($SuppliedFileName) ;      if ($ProcessEpsToPdf) -      { if ($dosish) { $gs = "gswin32c" } else { $gs = "gs" }  +      { if ($dosish) { $gs = "gswin32c" } else { $gs = "gs" }          unlink "$FileName.pdf" ;          $GSCommandLine = "-q " .                           "-sDEVICE=pdfwrite " . @@ -2680,6 +2685,9 @@ my @texonlysuffixes =  my @texnonesuffixes =    ("tuo","tub","top") ; +if ($PurgeAllFiles)  +  { push @forsuresuffixes, @texnonesuffixes  ; @texnonesuffixes = [] }  +  sub PurgeFiles # no my in foreach    { my $pattern = $ARGV[0] ; my $strippedname ;      if ($pattern eq '') @@ -2766,6 +2774,7 @@ elsif  ($ProcessInfos     ) { HandleEditorCues }  elsif  ($ProcessFigures   ) { HandleFigures    }  elsif  ($ProcessLogFile   ) { HandleLogFile    }  elsif  ($PurgeFiles       ) { PurgeFiles       } +elsif  ($PurgeAllFiles    ) { PurgeFiles       }  elsif  ($AnalyzeFile      ) { AnalyzeFile      }  elsif  ($ProcessHelp      ) { ShowHelpInfo     } # redundant  else                        { ShowHelpInfo     } diff --git a/metapost/context/base/mp-core.mp b/metapost/context/base/mp-core.mp index 5f1341a69..ad90766f4 100644 --- a/metapost/context/base/mp-core.mp +++ b/metapost/context/base/mp-core.mp @@ -336,10 +336,12 @@ enddef ;  boolean compensate_multi_par_topskip ;   boolean span_multi_column_pars ;   boolean auto_multi_par_hsize ;  +boolean enable_multi_par_fallback ;  compensate_multi_par_topskip := true ;   span_multi_column_pars       := false ;  auto_multi_par_hsize         := false ; % true ; +enable_multi_par_fallback    := true ;  vardef multi_par_at_top (expr i) =     (round (ypart ulcorner multipars[i]) = round (ypart ulcorner  @@ -715,6 +717,27 @@ fi ;    % first loop  +  if enable_multi_par_fallback  and  +     (nxy[fpos]=RealPageNumber) and  +     (nxy[tpos]=RealPageNumber) and not  +     (InsideSomeTextArea(lxy[fpos]) and  +      InsideSomeTextArea(rxy[tpos])) :  + +  % fallback  + +     multipar :=  +  +      llxy[fpos] --  +      lrxy[tpos] --  +      urxy[tpos] --  +      ulxy[fpos] -- cycle ; +  +      save_multipar (i,1,multipar) ; + +  else : + +  % normal  +    for i=1 upto NOfTextAreas :      TopSkipCorrection := 0 ; @@ -725,6 +748,7 @@ fi ;      if (nxy[fpos]=RealPageNumber) and (InsideTextArea(i,par_start_pos)) : +        % first one in chain        ii := i ; @@ -839,19 +863,6 @@ fi ;          fi ; -      elseif (nxy[tpos]=RealPageNumber) : - -        % outside text area, fall back / test on: pascal werkboek  - -        multipar :=  -  -          llxy[fpos] --  -          lrxy[tpos] --  -          urxy[tpos] --  -          ulxy[fpos] -- cycle ; -  -          save_multipar (i,1,multipar) ; -        else :          multipar := if obey_multi_par_hang : @@ -949,6 +960,10 @@ snapped_multi_pos(ulxy[tpos]) --    endfor ; +  % end of normal/fallback  + +fi ;  +    if span_multi_column_pars :      endgroup ;    fi ; diff --git a/metapost/context/base/mp-page.mp b/metapost/context/base/mp-page.mp index 032844ce3..05a433395 100644 --- a/metapost/context/base/mp-page.mp +++ b/metapost/context/base/mp-page.mp @@ -119,6 +119,24 @@ vardef InsideSavedTextArea (expr _i_, _xy_) =      (round(ypart _xy_) <= round(ypart urcorner SavedTextAreas[_i_])) )  enddef ;  +vardef InsideSomeTextArea(expr _xy_) =  +  save ok ; boolean ok ; ok := false ;  +  for i := 1 upto NOfTextAreas :  +    if InsideTextArea(i,_xy_) : ok := true ; fi ;   +    exitif ok ;  +  endfor ; +  ok  +enddef ; + +vardef InsideSomeSavedTextArea(expr _xy_) =  +  save ok ; boolean ok ; ok := false ;  +  for i := 1 upto NOfSavedTextAreas :  +    if InsideSavedTextArea(i,_xy_) : ok := true ; fi ;   +    exitif ok ;  +  endfor ; +  ok  +enddef ; +  vardef TextAreaX (expr x) =     numeric _TextAreaX_ ; _TextAreaX_ := 0 ;     for i := 1 upto NOfTextAreas :  diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex index da32e7dbe..3b3b6884a 100644 --- a/tex/context/base/cont-new.tex +++ b/tex/context/base/cont-new.tex @@ -15,17 +15,147 @@  % todo achtergronden in kolommen  %D This file is loaded at runtime, thereby providing an -%D excellent place for hacks and new features. +%D excellent place for hacks, patches, extensions and new  +%D features.   \unprotect  \writestatus{\m!systems}{beware: some patches loaded from cont-new.tex!} +\def\dodocomplexplaatsblok[#1][#2][#3]#4% +  {\flushnotes +   \ifsomefloatwaiting +     % this was \checkwaitingfloats spread all over +     \doifinsetelse\v!altijd{#2} +       {\showmessage\m!floatblocks5\empty} +       {\doifcommonelse +          {#2} +          {\v!tekst,\v!naast,% \v!pagina, +           \v!links,\v!rechts,\v!inlinker,\v!inrechter,% +           \v!inmarge} +          {\doflushfloats} +          {}}% +     % but which should be done before using box \floatbox +   \fi +   \ifmargeblokken % waarschijnlijk gebroken ! ! ! ! +     \doifinset\v!marge{#2} +       {\bgroup\everypar{\egroup\the\everypar}% +        \hsize\@@mbbreedte}% +   \fi +   \global\insidefloattrue +   \begingroup % ** +   \the\everyinsidefloat +   \let\@@extrafloat\empty +   \presetmorefloatvariables{#2}% +   \dowithnextboxcontent % better a \the\everyfloattoks +     {\setlocalfloathsize +      \fuzzysnappingfalse  +      \postponefootnotes} % new +     {\xdocompletefloat{#1}{#3}{#1}{#2}{#1}{#4}% ** not yet done +      % we need to carry over the par because of side floats +      \doifnotinset\v!tekst{#2}{\carryoverpar\endgroup}%  +      \ifparfloat\blanko[\v!blokkeer]\fi}%  +     \vbox} + + + +\collectMPpositiongraphicstrue + +% adapted  + +\def\positionoverlay#1% the test prevents too many redundant positions +  {\ifpositioning     % in (not used) text* position layers +     \vbox to \overlayheight +       {\doifpositionactionelse{#1::\MPanchoridentifier}% +          {\edef\MPanchorid{#1::\MPanchoridentifier:\MPanchornumber}% +           \edef\MPanchor##1{\MPpos{\MPanchorid}}% +           \the\everyinsertpositionaction +           \copyposition{#1::\MPanchoridentifier}{#1::\MPanchoridentifier:\MPanchornumber}% +           \hpos +             {#1::\MPanchoridentifier:\MPanchornumber}% +            % this is ok +            %{\hbox to \overlaywidth{\dopositionaction{#1::\MPanchoridentifier}\hss}}}% +            % but this one prevents cyclic runs due to +            % rounding errors +             {\setbox\scratchbox\hbox to \overlaywidth +                {\dopositionaction{#1::\MPanchoridentifier}\hss}% +                 \ht\scratchbox\overlayheight +                 \dp\scratchbox\zeropoint +                 \box\scratchbox}}% +          {\hbox to \overlaywidth{\hss}}% +        \vfill}% +   \fi} + +% reverted back to template parsing  + +\def\thirdstagestartTABLE#1% +  {\global\setTABLEactiontrue +   \setTABLEaction\TABLEunknown +   \setTABLEforce\TABLEunknown +   \setTABLEerror\TABLEunknown +   \global\TABLEgraylinefalse +   \global\TABLEgraydonefalse +   \globalletempty\TABLEgrayline +   \globalletempty\nextTABLEgrayline +   \globalletempty\TABLEgraylineerror +   \globalletempty\TABLEgraylinestatus +   \resetVLvalues +   \appendtoks\popouterbarandquote\to\EveryTable +   \appendtoks\localTABLEsetup\to\EveryTable +   \BeginTable[\ifsplittables u\else b\fi]% +   \defineTABLEunits +   \defineTABLEsteps +   \defineTABLErules +   \defineTABLEdivisions +   \defineTABLEshorthands +   \defineTABLEbackgrounds +   \defineTABLEendings +   \forgetall % added +   \doifsomething{#1} +     {\def\TABLEformat{#1}% +      \getTABLEnofcolumns\TABLEformat  +      \expandafter\BeginFormat\TABLEformat\EndFormat}} + +\def\!ttDoHalign +  {\baselineskip \zeropoint +   \lineskiplimit\zeropoint +   \lineskip     \zeropoint +   \tabskip      \zeropoint +   % does not work in normal tex +   % \expanded{\getTABLEnofcolumns{\the\!taPreamble}}% added +   \halign \the\!taTableSpread \bgroup +   \span\the\!taPreamble +   \ifx \!tfRowOfWidths \empty \else \!tfRowOfWidths \cr \fi} + +\bgroup +\catcode`\|=\@@active  +%\gdef\protectTABLEbar{\let|\letterbar} % maybe in \cleanupfeatures +\doglobal \appendtoks \let|\letterbar \to \everycleanupfeatures   +\catcode`\|=\@@other   +\gdef\getTABLEnofcolumns#1% +  {\bgroup +   \cleanupfeatures % needed !  +%   \protectTABLEbar  +   \expanded{\convertargument#1}\to\ascii +   \@EA\doglobal\@EA\counttoken\@EA|\@EA\in\ascii\to\maxTABLEcolumn +   \global\advance\maxTABLEcolumn \minusone +   % in case of & counting, divide by 2  +   \egroup} +\egroup + + + +\def\fixedspace +  {\setbox\scratchbox\hbox\ifmmode{$0$}\else{0}\fi +   \hskip\wd\scratchbox\relax} + +\appendtoks \fixedspaces \to \everytable +  \def\toplinebox    {\dowithnextbox       {\ifdim\dp\nextbox>\strutdepth          \scratchdimen\dp\nextbox -        \advance\scratchdimen-\strutdepth  +        \advance\scratchdimen-\strutdepth          \getnoflines\scratchdimen          \struttedbox{\box\nextbox}%          \dorecurse\noflines{\vbox{\hsize\zeropoint\strut}}% @@ -34,7 +164,7 @@        \fi}%     \tbox} -\def\expandifnonempty#1%  +\def\expandifnonempty#1%    {\@EA\ifx\csname#1\endcsname\empty       \expandafter\secondoftwoarguments     \else @@ -51,17 +181,17 @@  \def\sectioncountervalue#1%    {\@@sectionvalue{\@@sectiesectie{#1}}} -\def\NormalizeFontSize#1#2#3#4#5% the normal struggle with accuracy  +\def\NormalizeFontSize#1#2#3#4#5% the normal struggle with accuracy    {\bgroup     \dimen0=#4% #4 can be \ht0 or so -   \setbox0\hbox{\definedfont[#5 at 5pt]#3}% 10pt  +   \setbox0\hbox{\definedfont[#5 at 5pt]#3}% 10pt     \ifdim\wd0>\zeropoint       \dimen2=#10 % #1 is \wd or \ht       \dimen4=\maxdimen % 10000pt       \divide\dimen4 \dimen2       \divide\dimen0 1638 % 1000       \dimen0=\number\dimen4\dimen0 -     \divide \dimen0 \plustwo % ...  +     \divide \dimen0 \plustwo % ...       \xdef\TheNormalizedFontSize{\the\dimen0}%     \else       \dimen0\bodyfontsize @@ -73,19 +203,19 @@  % todo namespace \@@meta:#1:... ! ! ! ! ! ! -\def\presetMPvariable   +\def\presetMPvariable    {\dodoubleargument\dopresetMPvariable} -\def\dopresetMPvariable[#1][#2=#3]%  +\def\dopresetMPvariable[#1][#2=#3]%    {\doifundefined{#1:#2}{\setvalue{#1:#2}{#3}}} -% experiment, not yet to be used  +% experiment, not yet to be used  \def\displaybreak    {\ifhmode       \removeunwantedspaces       \ifcase\raggedstatus\hfill\fi -     \strut\penalty-9999 % \break fails on case (3)  +     \strut\penalty-9999 % \break fails on case (3)     \fi}  \def\startdisplay{\displaybreak\ignorespaces\startopelkaar} @@ -116,9 +246,9 @@  \def\dopagefigure[#1][#2]%    {\dostartpagefigure[#1][#2]\stoppagefigure} -% pretty important (esp since we now ignore shipouts)  +% pretty important (esp since we now ignore shipouts)  % -% actually we should nil all writes, marks, specials  +% actually we should nil all writes, marks, specials  \appendtoks \globallet\popcolor\relax \to \everylastshipout @@ -127,14 +257,14 @@  % \translateMPinput{il2-pl}  % -% \startMPenvironment[global]  -%   \setupbodyfont[plr]  -% \stopMPenvironment  +% \startMPenvironment[global] +%   \setupbodyfont[plr] +% \stopMPenvironment  % -% \TeX: ± ¶  +% \TeX: ± ¶  %  % \startMPcode -% draw btex MetaPost: ± ¶ etex scaled 5 ;   +% draw btex MetaPost: ± ¶ etex scaled 5 ;  % \stopMPcode  \def\begintbl @@ -460,7 +590,7 @@  \def\startsetups % for international purposes    {\bgroup\doifnextcharelse[{\startsetupsA\stopsetups}%                              {\startsetupsB\stopsetups}} -  +  \def\startlocalsetups % for nested purposes    {\bgroup\doifnextcharelse[{\startsetupsA\stoplocalsetups}%                              {\startsetupsB\stoplocalsetups}} @@ -472,7 +602,7 @@  \def\startsetupsB#1#2 % space delimited    {\startsetupsA#1[#2]}% -\long\def\dostartsetups#1#2% watch out: not \grabuntil  +\long\def\dostartsetups#1#2% watch out: not \grabuntil    {\dograbuntil#1{\egroup\long\setvalue{\??su#2}}}  \newtoks\everyfirstparagraphintro diff --git a/tex/context/base/context.tex b/tex/context/base/context.tex index 83c94c796..4157b90b1 100644 --- a/tex/context/base/context.tex +++ b/tex/context/base/context.tex @@ -15,7 +15,7 @@  \catcode`\{=1 \catcode`\}=2  -\def\contextversion{2003.1.31} +\def\contextversion{2003.2.11}  %D Welcome to the main module. When this module is ran through  %D \type{initex} or \type{tex -i} or \type{whatevertex} using diff --git a/tex/context/base/core-fig.tex b/tex/context/base/core-fig.tex index 71678e91a..fe9d185ea 100644 --- a/tex/context/base/core-fig.tex +++ b/tex/context/base/core-fig.tex @@ -2149,61 +2149,119 @@  %       \egroup}%  %    \hbox} +% \def\doclip[#1]% nb top->bottom left->right +%   {\bgroup +%    \getparameters[\??cp][#1]% +%    \dowithnextbox +%      {\ifdim\@@cpbreedte>\zeropoint +%         \dimen0=\@@cpbreedte +%         \dimen4=\@@cphoffset +%       \else +%         \dimen0=\wd\nextbox +%         \divide\dimen0 \@@cpnx +%         \dimen4=\@@cpx\dimen0 +%         \advance\dimen4 -\dimen0 +%         \dimen0=\@@cpsx\dimen0 +%       \fi +%       \relax % sure +%       \ifdim\@@cphoogte>\zeropoint +%         \dimen2=\@@cphoogte +%         \dimen6=\ht\nextbox +%         \advance\dimen6 -\@@cpvoffset +%         \advance\dimen6 -\dimen2 +%       \else +%         \dimen2=\ht\nextbox +%         \divide\dimen2 \@@cpny +%         \dimen6=-\@@cpy\dimen2 +%         \advance\dimen6 -\@@cpsy\dimen2 +%         \advance\dimen6 \dimen2 +%         \dimen2=\@@cpsy\dimen2 +%         \advance\dimen6 \ht\nextbox +%       \fi +%       \setbox\nextbox\hbox                       % old  +%         {\advance\dimen4 -\@@cplinkeroffset      % new ! +%          \advance\dimen6  \@@cpbovenoffset       % new ! +%          \hskip-\dimen4\lower\dimen6\box\nextbox}% old  +%       \wd\nextbox\zeropoint +%       \ht\nextbox\zeropoint +%       \dp\nextbox\zeropoint +%       \setbox\nextbox\hbox +%         {\advance\dimen0 \@@cplinkeroffset        % new ! +%          \advance\dimen0 \@@cprechteroffset       % new ! +%          \advance\dimen2 \@@cpbovenoffset         % new ! +%          \advance\dimen2 \@@cponderoffset         % new ! +%          \dostartclipping\@@cpmp{\dimen0}{\dimen2}% old +%            \box\nextbox +%          \dostopclipping}% +%       \setbox\nextbox\hbox                      % new ! +%         {\dimen0-\@@cplinkeroffset              % new ! +%          \dimen2-\@@cpbovenoffset               % new ! +%          \hskip\dimen0\lower\dimen2\box\nextbox}% new ! +%       \wd\nextbox\dimen0 +%       \ht\nextbox\dimen2 +%       \dp\nextbox\zeropoint +%       \box\nextbox +%       \egroup}% +%    \hbox} +  \def\doclip[#1]% nb top->bottom left->right    {\bgroup     \getparameters[\??cp][#1]% -   \dowithnextbox +   \doifelse\@@cpstatus\v!start\dodoclip{\egroup\hbox}} + +\def\dodoclip +  {\dowithnextbox       {\ifdim\@@cpbreedte>\zeropoint -        \dimen0=\@@cpbreedte -        \dimen4=\@@cphoffset +        \!!dimena\@@cpbreedte +        \!!dimenc\@@cphoffset        \else -        \dimen0=\wd\nextbox -        \divide\dimen0 \@@cpnx -        \dimen4=\@@cpx\dimen0 -        \advance\dimen4 -\dimen0 -        \dimen0=\@@cpsx\dimen0 +        \!!dimena\wd\nextbox +        \divide\!!dimena \@@cpnx +        \!!dimenc\@@cpx\!!dimena +        \advance\!!dimenc -\!!dimena +        \!!dimena\@@cpsx\!!dimena        \fi        \relax % sure        \ifdim\@@cphoogte>\zeropoint -        \dimen2=\@@cphoogte -        \dimen6=\ht\nextbox -        \advance\dimen6 -\@@cpvoffset -        \advance\dimen6 -\dimen2 +        \!!dimenb\@@cphoogte +        \!!dimend\ht\nextbox +        \advance\!!dimend -\@@cpvoffset +        \advance\!!dimend -\!!dimenb        \else -        \dimen2=\ht\nextbox -        \divide\dimen2 \@@cpny -        \dimen6=-\@@cpy\dimen2 -        \advance\dimen6 -\@@cpsy\dimen2 -        \advance\dimen6 \dimen2 -        \dimen2=\@@cpsy\dimen2 -        \advance\dimen6 \ht\nextbox +        \!!dimenb\ht\nextbox +        \divide\!!dimenb \@@cpny +        \!!dimend-\@@cpy\!!dimenb +        \advance\!!dimend -\@@cpsy\!!dimenb +        \advance\!!dimend \!!dimenb +        \!!dimenb\@@cpsy\!!dimenb +        \advance\!!dimend \ht\nextbox        \fi -      \setbox\nextbox\hbox                       % old  -        {\advance\dimen4 -\@@cplinkeroffset      % new ! -         \advance\dimen6  \@@cpbovenoffset       % new ! -         \hskip-\dimen4\lower\dimen6\box\nextbox}% old  +      \setbox\nextbox\hbox                         % old  +        {\advance\!!dimenc -\@@cplinkeroffset      % new ! +         \advance\!!dimend -\@@cpbovenoffset       % new ! % - added  +         \hskip-\!!dimenc\lower\!!dimend\box\nextbox}% old         \wd\nextbox\zeropoint        \ht\nextbox\zeropoint        \dp\nextbox\zeropoint        \setbox\nextbox\hbox -        {\advance\dimen0 \@@cplinkeroffset        % new ! -         \advance\dimen0 \@@cprechteroffset       % new ! -         \advance\dimen2 \@@cpbovenoffset         % new ! -         \advance\dimen2 \@@cponderoffset         % new ! -         \dostartclipping\@@cpmp{\dimen0}{\dimen2}% old +        {\advance\!!dimena \@@cplinkeroffset        % new ! +         \advance\!!dimena \@@cprechteroffset       % new ! +         \advance\!!dimenb \@@cpbovenoffset         % new ! +         \advance\!!dimenb \@@cponderoffset         % new ! +         \dostartclipping\@@cpmp{\!!dimena}{\!!dimenb}% old             \box\nextbox           \dostopclipping}%        \setbox\nextbox\hbox                      % new ! -        {\dimen0-\@@cplinkeroffset              % new ! -         \dimen2-\@@cpbovenoffset               % new ! -         \hskip\dimen0\lower\dimen2\box\nextbox}% new ! -      \wd\nextbox\dimen0 -      \ht\nextbox\dimen2 +        {\!!dimena-\@@cplinkeroffset            % new ! +         \!!dimenb \@@cpbovenoffset             % new ! % - removed  +         \hskip\!!dimena\lower\!!dimenb\box\nextbox}% new ! +      \wd\nextbox\!!dimena +      \ht\nextbox\!!dimenb        \dp\nextbox\zeropoint        \box\nextbox        \egroup}%     \hbox} - +  \def\clip{\dosingleempty\doclip}  \def\setupclipping @@ -2272,17 +2330,19 @@    [buffer] [\jobname] [\c!type=\v!buffer,\c!object=\v!nee]  \setupclipping -  [\c!n=1, % was 2  +  [\c!status=\v!start, +   \c!n=1, % was 2      \c!nx=\@@cpn,\c!x=1,\c!sx=1,      \c!ny=\@@cpn,\c!y=1,\c!sy=1,      \c!breedte=\!!zeropoint,     \c!hoogte=\!!zeropoint,     \c!hoffset=\!!zeropoint,     \c!voffset=\!!zeropoint, -   \c!linkeroffset=\zeropoint, -   \c!rechteroffset=\zeropoint, -   \c!bovenoffset=\zeropoint, -   \c!onderoffset=\zeropoint, +\c!offset=\zeropoint, +   \c!linkeroffset=\@@cpoffset,  % \zeropoint, +   \c!rechteroffset=\@@cpoffset, % \zeropoint, +   \c!bovenoffset=\@@cpoffset,   % \zeropoint, +   \c!onderoffset=\@@cpoffset,   % \zeropoint,     \c!mp=]  \protect \endinput diff --git a/tex/context/base/core-lst.tex b/tex/context/base/core-lst.tex index 7fa85b83a..3c7164b22 100644 --- a/tex/context/base/core-lst.tex +++ b/tex/context/base/core-lst.tex @@ -34,7 +34,7 @@  % (define reference) to keep track of the current ref.   \def\doschrijfnaarlijst#1% -  {\doifelsevalue{\??li#1\c!status}{\v!start} +  {\doifelsevalue{\??li#1\c!status}\v!start       \dodoschrijfnaarlijst\gobblefourarguments{#1}}  \def\dodoschrijfnaarlijst#1#2#3#4% @@ -62,7 +62,7 @@     \else       \thisisnextinternal\currentlist     \fi -   \edef\schrijfwegnaarlijst% +   \edef\next % \schrijfwegnaarlijst%       {\writeutilitycommand%          {\listentry%             {\currentlist}% @@ -71,7 +71,7 @@             {\asciilistentry}%             {\sectionformat\sectionseparator\sectionseparator\dopaginanummer}%             {\noexpand\realfolio}}}% -   \schrijfwegnaarlijst +   \next % \schrijfwegnaarlijst     \endgroup}  \def\dododoschrijfnaarlijst#1% @@ -88,26 +88,46 @@  % so far  -\def\doschrijftussenlijst#1#2% -  {\doifvalue{\??li#1\c!status}{\v!start} -     {\dodoschrijftussenlijst{#1}{#2}}} +% \def\doschrijftussenlijst#1#2% +%   {\doifvalue{\??li#1\c!status}\v!start +%      {\dodoschrijftussenlijst{#1}{#2}}} +%  +% \def\dodoschrijftussenlijst#1#2% +%   {\begingroup +%    \convertargument#2\to\ascii +%    \makesectionformat +%    \doifelse{\@@nmstatus}\v!start +%      {\def\dopaginanummer{\noexpand\pagenumber}} +%      {\def\dopaginanummer{0}}% +%    \edef\schrijfwegnaarlijst% +%      {\writeutilitycommand% +%         {\listbetween% +%            {#1}% +%            {\ascii}% +%            {\sectionformat\sectionseparator\sectionseparator\dopaginanummer}% +%            {\noexpand\realfolio}}}% +%    \schrijfwegnaarlijst +%    \endgroup} +% +% no reason for indirectness  -\def\dodoschrijftussenlijst#1#2% -  {\begingroup -   \convertargument#2\to\ascii -   \makesectionformat -   \doifelse{\@@nmstatus}\v!start -     {\def\dopaginanummer{\noexpand\pagenumber}} -     {\def\dopaginanummer{0}}% -   \edef\schrijfwegnaarlijst% -     {\writeutilitycommand% -        {\listbetween% -           {#1}% -           {\ascii}% -           {\sectionformat\sectionseparator\sectionseparator\dopaginanummer}% -           {\noexpand\realfolio}}}% -   \schrijfwegnaarlijst -   \endgroup} +\def\doschrijftussenlijst#1#2% +  {\doifvalue{\??li#1\c!status}\v!start +     {\begingroup +      \convertargument#2\to\ascii +      \makesectionformat +      \doifelse{\@@nmstatus}\v!start +        {\def\dopaginanummer{\noexpand\pagenumber}} +        {\def\dopaginanummer{0}}% +      \edef\next % \schrijfwegnaarlijst +        {\writeutilitycommand% +           {\listbetween% +              {#1}% +              {\ascii}% +              {\sectionformat\sectionseparator\sectionseparator\dopaginanummer}% +              {\noexpand\realfolio}}}% +      \next % \schrijfwegnaarlijst +      \endgroup}}  \def\listentry#1%    {\executeifdefined{#1\c!lijst}\gobblefivearguments} diff --git a/tex/context/base/core-ntb.tex b/tex/context/base/core-ntb.tex index f6f5fa37e..e673cedd7 100644 --- a/tex/context/base/core-ntb.tex +++ b/tex/context/base/core-ntb.tex @@ -309,7 +309,12 @@    {\parseTD       [#1,\c!kleur=\tbltblkopkleur,\c!letter=\tbltblkopletter,%        \c!karakteruitlijnen=\v!nee]#2\eTD} + +%D new +\long\def\parseTN[#1]#2\eTN +  {\parseTD[#1]\digits#2\relax\eTD} +  \newtoks\TBLhead  \newtoks\TBLbody  \newtoks\TBLfoot @@ -351,6 +356,7 @@    {\pushTBL     % box not here      \bgroup +\resetcharacteralign % new      \getparameters       [\@@tbl\@@tbl]       [\c!uitlijnen={\v!rechts,\v!ruim,\v!hoog},#1]% @@ -380,6 +386,7 @@     \def\bTR{\dodoubleempty\parseTR}%     \def\bTD{\dodoubleempty\parseTD}%     \def\bTH{\dodoubleempty\parseTH}% +   \def\bTN{\dodoubleempty\parseTN}%     \endgraf}  % permits \expanded{\bTD ... \eTD} @@ -387,8 +394,9 @@  \unexpanded\def\eTR{}   \unexpanded\def\eTD{}  \unexpanded\def\eTH{} +\unexpanded\def\eTN{}  -\def\eTABLE% +\def\eTABLE    {% tricky and dirty order -)     \the\TBLhead     \edef\noftblheadlines{\number\maximumrow}%  @@ -822,9 +830,9 @@    {\edef\alignmentclass{#1}%     \edef\alignmentcharacter{\tbltbluitlijnkarakter}%     \ifcase\TBLpass\or -     \setfirstpasscharacteralign\checkalignment{\strut#2\unskip}% +     \setfirstpasscharacteralign\checkalignment{#2}% {\strut#2\unskip}%     \fi % force hsize, so always a second  -   \setsecondpasscharacteralign \checkalignment{\strut#2\unskip}%  +   \setsecondpasscharacteralign \checkalignment{#2}% {\strut#2\unskip}%      \ignorespaces}  \long\def\dohandleTBLcellA#1#2[#3]#4% diff --git a/tex/context/base/core-pos.tex b/tex/context/base/core-pos.tex index 85510c226..6af729aad 100644 --- a/tex/context/base/core-pos.tex +++ b/tex/context/base/core-pos.tex @@ -969,7 +969,7 @@             \the\everyinsertpositionaction             \copyposition{#1::\MPanchoridentifier}{#1::\MPanchoridentifier:\MPanchornumber}%             \hpos -             {#1::\MPanchoridentifier:\MPanchornumber} +             {#1::\MPanchoridentifier:\MPanchornumber}%               {\hbox to \overlaywidth{\dopositionaction{#1::\MPanchoridentifier}\hss}}}%            {\hbox to \overlaywidth{\hss}}%          \vfill}% diff --git a/tex/context/base/core-reg.tex b/tex/context/base/core-reg.tex index d90fc59d1..0a1e95929 100644 --- a/tex/context/base/core-reg.tex +++ b/tex/context/base/core-reg.tex @@ -59,7 +59,7 @@     \else       \def\dodostelregisterin##1%         {\getparameters[\??id##1][#2]% -        \doifvalue{\??id##1\c!koppeling}{\v!ja} +        \doifvalue{\??id##1\c!koppeling}\v!ja            {\appendtoks\koppelregister[##1][#2]\to\everystarttext}%          \preparepaginaprefix{\??id##1}}%     \fi diff --git a/tex/context/base/core-spa.tex b/tex/context/base/core-spa.tex index d9d93417b..f00a96e14 100644 --- a/tex/context/base/core-spa.tex +++ b/tex/context/base/core-spa.tex @@ -530,7 +530,7 @@    {% evt blokkeerfalse     \ifmmode\else\par\fi} -% Overloaded in cont-new!  +% Overloaded in cont-new!  % \def\docomplexdoblanko[#1]% pas op \relax's zijn nodig ivm volgende \if  %   {\global\blankoresetfalse @@ -605,7 +605,7 @@  %                \!!minus\skipgluefactor\blankoskip  %            \fi  %            \ifdim\prevdepth=\newprevdepth -%              % blokkeer  +%              % blokkeer  %            \else  %              \iffuzzyvskip  %                \removelastfuzzyvskip @@ -773,10 +773,10 @@                   \vskip\zeropoint                 \fi               \else -               % also new  +               % also new                 \ifdim\blankoskip=\zeropoint                   \ifblankogeenwit -                   \geenwitruimte  +                   \geenwitruimte                   \fi                 \fi               \fi @@ -1005,8 +1005,30 @@  \let\spatie     \space  \let\hardespatie\fixedspace  \let\geenspatie \nospace - -\def\opelkaar% + +% \startbuffer +% \startlines \tt \fixedspaces +%  0~1~~2~~~3~~~~4~~~~~5 +%  0~~~~~~~~~~~~~~~~~~~5 +% $0~1~~2~~~3~~~~4~~~~~5$ +% $0~~~~~~~~~~~~~~~~~~~5$ +% \stoplines +% +% \starttabulate[|~|] +% \NC  0~1~~2~~~3~~~~4~~~~~5  \NC \NR \NC  0~~~~~~~~~~~~~~~~~~~5  \NC \NR +% \NC $0~1~~2~~~3~~~~4~~~~~5$ \NC \NR \NC $0~~~~~~~~~~~~~~~~~~~5$ \NC \NR +% \stoptabulate +% +% \starttable[||] +% \NC  0~1~~2~~~3~~~~4~~~~~5  \NC \AR \NC  0~~~~~~~~~~~~~~~~~~~5  \NC \AR +% \NC $0~1~~2~~~3~~~~4~~~~~5$ \NC \AR \NC $0~~~~~~~~~~~~~~~~~~~5$ \NC \AR +% \stoptable +% \stopbuffer +% +% \setupbodyfont[cmr] \getbuffer +% \setupbodyfont[lbr] \getbuffer + +\def\opelkaar    {\nointerlineskip}  \def\omlaag[#1]% nog eens mooier, relateren aan blanko @@ -1149,15 +1171,15 @@  % \def\stelwitruimteopnieuwin  %   {\expanded{\stelwitruimtein[\currentwitruimte]}} -%  +%  % \newif\ifwitruimteflexibel \witruimteflexibeltrue -%  +%  % \definecomplexorsimple\stelwitruimtein -%  +%  % \def\complexstelwitruimtein[#1]%  %   {\expanded{\dostelwitruimtein[#1]}%  %    \dodostelwitruimtein} -%  +%  % \def\dostelwitruimtein[#1]%  %   {\processallactionsinset  %      [#1] @@ -1169,7 +1191,7 @@  %       \s!default=>\doifnot\currentwitruimte\v!geen\stelwitruimteopnieuwin,  %       \s!unknown=>\@EA\assigndimension\@EA{\commalistelement} % \@EA is nodig  %                     \tussenwit\blankokleinmaat\blankomiddelmaat\blankogrootmaat]}   % te vangen -%  +%  % \def\dodostelwitruimtein  %   {\edef\currentwitruimte  %      {\ifdim\tussenwit=\zeropoint @@ -1187,7 +1209,7 @@  %      \ifwitruimteflexibel \else \tussenwit1\tussenwit \fi  %    \fi  %    \parskip\tussenwit} -%  +%  % \def\simplestelwitruimtein% == snelle \stelwitruimtein[\s!default]  %   {\doifnot\currentwitruimte\v!geen\stelwitruimteopnieuwin  %    \dodostelwitruimtein} @@ -1219,11 +1241,11 @@     \fi     \parskip\tussenwit} -\definesystemvariable {ws} % whitespace  +\definesystemvariable {ws} % whitespace  \def\definewhitespacemethod[#1]#2{\setvalue{\??ws\??ws#1}{#2}} -\definewhitespacemethod [\v!herstel]    {}  +\definewhitespacemethod [\v!herstel]    {}  \definewhitespacemethod [\v!vast]       {\witruimteflexibelfalse}  \definewhitespacemethod [\v!flexibel]   {\witruimteflexibeltrue}  \definewhitespacemethod [\v!regel]      {\tussenwit  \baselineskip} @@ -1236,7 +1258,7 @@  \definewhitespacemethod [\s!default]    {\stelwitruimteopnieuwin}  \def\dowhitespacemethod#1% -  {\executeifdefined{\??ws\??ws#1}{\tussenwit#1}\relax}   +  {\executeifdefined{\??ws\??ws#1}{\tussenwit#1}\relax}  \def\geenwitruimte    {\ifdim\parskip>\zeropoint\relax @@ -1310,7 +1332,7 @@       \doifelse{#1}\v!blanko         \opelkaarfalse         \opelkaartrue -     \blanko[\v!blokkeer]       % dit is nog niet ok, gaat fout  +     \blanko[\v!blokkeer]       % dit is nog niet ok, gaat fout       \stelwitruimtein[\v!geen]  % bovenin vtop (dwz, baseline)    \fi} @@ -1490,7 +1512,7 @@  \def\setnormalbaselines    {\ifdim\normallineheight>\zeropoint       \lineheight\normallineheight -   \fi  +   \fi     \openlineheight\spacingfactor\lineheight     \openstrutheight\strutheightfactor\openlineheight     \openstrutdepth \strutdepthfactor \openlineheight @@ -1604,7 +1626,7 @@  \def\setupstrut%    {\dosingleempty\dosetupstrut} -\def\dosetupstrut[#1]% yet undocumented, todo: fontstrut  +\def\dosetupstrut[#1]% yet undocumented, todo: fontstrut    {\processaction       [#1]       [     \v!ja=>\setstrut, @@ -1763,7 +1785,7 @@       [    \v!links=>\global\advance\linkssmaller  \@@sllinks,           \v!midden=>\global\advance\middensmaller \@@slmidden,           \v!rechts=>\global\advance\rechtssmaller \@@slrechts, -           \v!geen=>,% handy for delimitedtexts  +           \v!geen=>,% handy for delimitedtexts          \s!unknown=>{\herhaalmetcommando[#1]\dosinglesmaller}]}  \def\complexstartsmaller[#1]% @@ -2083,7 +2105,7 @@  \def\forgetall    {\the\everyforgetall} -\newif\ifforgotten % rather good signal for inner  +\newif\ifforgotten % rather good signal for inner  \appendtoks \forgottentrue      \to \everyforgetall  \appendtoks \forgetragged       \to \everyforgetall @@ -2286,7 +2308,7 @@  \def\dosetleftskipadaption#1%    {\leftskipadaption\zeropoint -   \processaction[#1]  +   \processaction[#1]       [\v!standaard=>\leftskipadaption                      \ifdim\voorwit=\zeropoint\@@sllinks\else\voorwit\fi,               \v!ja=>\leftskipadaption @@ -2296,7 +2318,7 @@  \def\dosetrightskipadaption#1%    {\rightskipadaption\zeropoint -   \processaction[#1]  +   \processaction[#1]       [\v!standaard=>\rightskipadaption\@@slrechts,               \v!ja=>\rightskipadaption\@@slrechts,              \v!nee=>, @@ -2615,12 +2637,12 @@  \def\raggedleft    {\setraggedness\leftraggedness -   \setraggedskips1\leftraggedness\zeropoint\raggedspaceamount  +   \setraggedskips1\leftraggedness\zeropoint\raggedspaceamount       \raggedxspaceamount\zeropoint\zeropoint}  \def\raggedcenter    {\setraggedness\middleraggedness -   \setraggedskips2\middleraggedness\middleraggedness\raggedspaceamount  +   \setraggedskips2\middleraggedness\middleraggedness\raggedspaceamount       \raggedxspaceamount\zeropoint\zeropoint}  %D We used to have: @@ -2635,11 +2657,11 @@  \def\raggedright    {\setraggedness\rightraggedness -   \setraggedskips3\zeropoint\rightraggedness\raggedspaceamount  +   \setraggedskips3\zeropoint\rightraggedness\raggedspaceamount       \raggedxspaceamount\raggedfillamount\parindent}  \def\veryraggedleft -  {\setraggedskips1\raggedfillamount\zeropoint\raggedspaceamount  +  {\setraggedskips1\raggedfillamount\zeropoint\raggedspaceamount       \raggedxspaceamount\zeropoint\zeropoint}  %D When we want the last line to have a natural width: @@ -2652,11 +2674,11 @@  %D but this one is not accepted by the macros.  \def\veryraggedcenter -  {\setraggedskips2\raggedfillamount\raggedfillamount\raggedspaceamount  +  {\setraggedskips2\raggedfillamount\raggedfillamount\raggedspaceamount       \raggedxspaceamount\zeropoint\zeropoint}  \def\veryraggedright -  {\setraggedskips3\zeropoint\raggedfillamount\raggedspaceamount  +  {\setraggedskips3\zeropoint\raggedfillamount\raggedspaceamount       \raggedxspaceamount\zeropoint\parindent}  \def\ttraggedright @@ -2668,7 +2690,7 @@  \def\raggedwidecenter    {\setraggedness\middleraggedness -   \setraggedskips2\raggedhalffillamount\raggedhalffillamount  +   \setraggedskips2\raggedhalffillamount\raggedhalffillamount       \raggedspaceamount\raggedxspaceamount\zeropoint\zeropoint}  \newif\if@@asragged \@@asraggedtrue % old method diff --git a/tex/context/base/core-tbl.tex b/tex/context/base/core-tbl.tex index e0c662039..9238a4a55 100644 --- a/tex/context/base/core-tbl.tex +++ b/tex/context/base/core-tbl.tex @@ -703,6 +703,7 @@       \getvalue{\??tt\currenttabulate\c!voor}%     \fi     \bgroup +\resetcharacteralign     % todo: spacing around tabulate when bodyfont is set     % expansion en test needed ?     \doifvaluesomething{\??tt\currenttabulate\c!korps} @@ -904,7 +905,8 @@     \unexpanded \def\RQ{\tabulateequalcolumn 1}%     \unexpanded \def\HQ{\tabulateequalcolumn 2}%     \unexpanded \def\NG{\NC\handletabulatecharalign}% -   \unexpanded \def\ND{\NC\handletabulatedigits}% new, undocumented, test first +   \unexpanded \def\NN{\NC\handletabulatedigits}% new, undocumented, test first +   \unexpanded \def\ND{\NC\handletabulatedigits}% same, for old times sake      \def\HR % horizontal rule line (break untested)       {\TABLEnoalign          {\ifnum\noftabulatelines=\totalnoftabulatelines diff --git a/tex/context/base/core-uti.tex b/tex/context/base/core-uti.tex index 5cb9ad168..b82a7fb39 100644 --- a/tex/context/base/core-uti.tex +++ b/tex/context/base/core-uti.tex @@ -380,7 +380,7 @@        \fi        \stopnointerference}} -\def\loadtwopassdata% +\def\loadtwopassdata    {\ifx\alltwopasslists\empty\else       \def\twopassdata{0,0}% end condition        \processcommacommand[\alltwopasslists]\doloadtwopassdata diff --git a/tex/context/base/core-ver.tex b/tex/context/base/core-ver.tex index 1be4a50bf..e7511c2fb 100644 --- a/tex/context/base/core-ver.tex +++ b/tex/context/base/core-ver.tex @@ -556,13 +556,13 @@  %D \macros  %D   {typ,obeyhyphens,obeybreakpoints} -%D -%D Although it's not clear from the macros, one character trait -%D of this macros, which are build on top of the support -%D module, is that they don't hyphenate. We therefore offer the -%D alternative \type{\typ}. The current -%D implementation works all right, but a decent hyphenation -%D support of \type{\tt} text will be implemented soon. +%D  +%D Although it's not clear from the macros, one character +%D trait of this macros, which are build on top of the support +%D module, is that they don't hyphenate. We therefore offer +%D the alternative \type{\typ}. The current implementation +%D works all right, but a decent hyphenation support of +%D \type{\tt} text will be implemented soon.   \def\obeyhyphens    {\def\obeyedspace{\hskip\spaceskip}% diff --git a/tex/context/base/enco-cyr.tex b/tex/context/base/enco-cyr.tex index 98ba9f518..8a91f0380 100644 --- a/tex/context/base/enco-cyr.tex +++ b/tex/context/base/enco-cyr.tex @@ -1,6 +1,6 @@  %D \module  %D   [       file=enco-cyr, -%D        version=2003.01.24,  +%D        version=2003.01.24,  %D          title=\CONTEXT\ Encoding Macros,  %D       subtitle=Cyrillic,  %D         author=..., @@ -8,18 +8,16 @@  %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 The following kerning test is inspired by a test file  -%D provided by Victor Figurnov. I hope he still recognizes  -%D some bit and pieces.  -%D  +%D The following kerning test is inspired by a test file +%D provided by Victor Figurnov. I hope he still recognizes +%D some bit and pieces. +%D  %D \starttyping  %D \setupoutput[pdftex]  %D -%D \setuplayout[middle] \noheaderandfooterlines -%D  %D \startMPenvironment[global]  %D   \useregime[cyr]  %D   \useencoding[cyr] @@ -27,7 +25,7 @@  %D   \enableregime[cp1251]  %D   \setupbodyfont[cyr]  %D \stopMPenvironment -%D  +%D  %D \startbuffer  %D \starttabulate[|l|l|l|]  %D \NC \ruledhbox{Ãäå}          \NC \ruledhbox{AV}        \NC with kerning    \NC \NR @@ -35,27 +33,27 @@  %D \NC \ruledhbox{\tfd Ãäå}     \NC \ruledhbox{\tfd AV}   \NC with kerning    \NC \NR  %D \NC \ruledhbox{\tfd Ã{}ä{}å} \NC \ruledhbox{\tfd A{}V} \NC without kerning \NC \NR  %D \stoptabulate -%D  +%D  %D \showkerning{Êàê ñäåëàòü äîêóìåíò}  %D \stopbuffer -%D  +%D  %D \starttext -%D  -%D \title{Kerning test}  -%D  +%D +%D \title{Kerning test} +%D  %D \typebuffer -%D  +%D  %D \rm \subject{Serif      font} \getbuffer  %D \ss \subject{SansSerif  font} \getbuffer  %D \tt \subject{MonoSpacec font} \getbuffer -%D  +%D  %D \stoptext -%D \stoptyping  +%D \stoptyping -%D We start with a fallback, define by HH, who assumes that  +%D We start with a fallback, define by HH, who assumes that  %D this is phonetic. -\startencoding[default]  +\startencoding[default]  \definecharacter cyrillicA                 {A}  \definecharacter cyrillica                 {a} @@ -224,41 +222,32 @@  \definecharacter textogonek                 12  \definecharacter textcyrillicflex           18 -\definecharacter textcyrillicumlaut         19 +\definecharacter textdblgrave               19  \definecharacter textcyrillicbreve          20  \definecharacter endash                     21  \definecharacter emdash                     22 -\definecharacter emdash                     22  \definecharacter textcompwordmark           23 -\definecharacter textvisiblespace           32 -\definecharacter textdollar                 36 -\definecharacter textless                   60 -\definecharacter textgreater                62  \definecharacter textbackslash              92  \definecharacter textasciicircum            94  \definecharacter textunderscore             95  \definecharacter textbraceleft             123 -\definecharacter textbar                   124  \definecharacter textbraceright            125  \definecharacter textasciitilde            126  \definecharacter textnumero                157  \definecharacter textcurrency              158 -\definecharacter textsection               159 -\definecharacter textquotedbl               34 +\definecharacter sectionmark               159 -\definecharacter upperleftsinglesixquote    96 +\definecharacter quotedbl                   34 +\definecharacter quoteleft                  96   \definecharacter upperleftsingleninequote   39 -\definecharacter upperleftsinglesixquote    16 -\definecharacter upperleftdoubleninequote   17 +\definecharacter quotedblleft               16  +\definecharacter quotedblright              17   \definecharacter lowerleftdoubleninequote  189 - -\definecharacter upperrightsinglesixquote   96 -\definecharacter upperrightsingleninequote  39 -\definecharacter upperrightsinglesixquote   16 -\definecharacter upperrightdoubleninequote  17 -\definecharacter lowerrightdoubleninequote 189  +\definecharacter upperrightdoublesixquote   16  +\definecharacter upperrightdoubleninequote  17  +\definecharacter quotedblbase              189   \definecharacter cyrillicpalochka           13  \definecharacter cyrilliclangle             14 @@ -266,11 +255,7 @@  \definecharacter leftguillemot             190  \definecharacter rightguillemot            191 -\definecharacter leftsubguillemot          190 -\definecharacter rightsubguillemot         191 -  \definecharacter dotlessi                   25 -\definecharacter dotlessj                   26  \definecharacter cyrillicA                 192  \definecharacter cyrillica                 224 @@ -403,21 +388,8 @@  \definecharacter cyrillicW                  87  \definecharacter cyrillicw                 119 -% \defineaccentforchar " ^^c5  {\cyrillicYO} -% \defineaccentforchar " ^^e5  {\cyrillicyo} -% \defineaccentforchar U ^^c8  {\cyrillicISHRT} -% \defineaccentforchar U ^^e8  {\cyrillicishrt} -% \defineaccentforchar " ^^49  {\cyrillicYI} -% \defineaccentforchar " ^^69  {\cyrillicyi} -% \defineaccentforchar c ^^c7  {\cyrillicZDSC} -% \defineaccentforchar c ^^e7  {\cyrilliczdsc} -% \defineaccentforchar k ^^d1  {\cyrillicSDSC} -% \defineaccentforchar k ^^f1  {\cyrillicsdsc} -% \defineaccentforchar U ^^d3  {\cyrillicUSHRT} -% \defineaccentforchar U ^^f3  {\cyrillicushrt} - -\definecharacter textperthousand    {\%\char 24 } -\definecharacter textpertenthousand {\%\char 24\char 24 } +% \definecharacter textperthousand    {\%\char 24 } +% \definecharacter textpertenthousand {\%\char 24\char 24 }  \stopcoding @@ -456,40 +428,32 @@  \definecharacter textogonek                 12  \definecharacter textcyrillicflex           18 -\definecharacter textcyrillicumlaut         19 +\definecharacter textdblgrave               19  \definecharacter textcyrillicbreve          20  \definecharacter endash                     21  \definecharacter emdash                     22  \definecharacter textcompwordmark           23 -\definecharacter textvisiblespace           32 -\definecharacter textdollar                 36 -\definecharacter textless                   60 -\definecharacter textgreater                62  \definecharacter textbackslash              92  \definecharacter textasciicircum            94  \definecharacter textunderscore             95  \definecharacter textbraceleft             123 -\definecharacter textbar                   124  \definecharacter textbraceright            125  \definecharacter textasciitilde            126  \definecharacter textnumero                157  \definecharacter textcurrency              158 -\definecharacter textsection               159 -\definecharacter textquotedbl               34 - -\definecharacter upperleftsinglesixquote    96 +\definecharacter sectionmark               159 +\definecharacter quotedbl                   34 +\definecharacter quoteleft                  96  \definecharacter upperleftsingleninequote   39 -\definecharacter upperleftsinglesixquote    16 -\definecharacter upperleftdoubleninequote   17 +\definecharacter quotedblleft               16 +\definecharacter quotedblright              17  \definecharacter lowerleftdoubleninequote  189 -\definecharacter upperrightsinglesixquote   96 -\definecharacter upperrightsingleninequote  39 -\definecharacter upperrightsinglesixquote   16 +\definecharacter upperrightdoublesixquote   16  \definecharacter upperrightdoubleninequote  17 -\definecharacter lowerrightdoubleninequote 189 +\definecharacter quotedblbase              189  \definecharacter cyrillicpalochka           13  \definecharacter cyrilliclangle             14 @@ -497,11 +461,7 @@  \definecharacter leftguillemot             190  \definecharacter rightguillemot            191 -\definecharacter leftsubguillemot          190 -\definecharacter rightsubguillemot         191 -  \definecharacter dotlessi                   25 -\definecharacter dotlessj                   26  \definecharacter cyrillicA                 192  \definecharacter cyrillica                 224 @@ -636,16 +596,6 @@  \definecharacter cyrillicW                  87  \definecharacter cyrillicw                 119 -% \defineaccentforchar " ^^c5 {\cyrillicYO} -% \defineaccentforchar " ^^e5 {\cyrillicyo} -% \defineaccentforchar U ^^c8 {\cyrillicISHRT} -% \defineaccentforchar U ^^e8 {\cyrillicishrt} -% \defineaccentforchar U ^^d3 {\cyrillicUSHRT} -% \defineaccentforchar U ^^f3 {\cyrillicushrt} - -% \definecharacter textperthousand    {\%\char 24 } -% \definecharacter textpertenthousand {\%\char 24\char 24 } -  \stopcoding  \startmapping[t2c] @@ -668,68 +618,55 @@  \startcoding[t2c] -\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 textcyrillicflex            18 -\definecharacter textcyrillicumlaut          19 -\definecharacter textcyrillicbreve           20 - -\definecharacter endash                      21 -\definecharacter emdash                      22 -\definecharacter emdash                      22  +\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 textcompwordmark            23 -\definecharacter textvisiblespace            32 -\definecharacter textdollar                  36 -\definecharacter textless                    60 -\definecharacter textgreater                 62 -\definecharacter textbackslash               92 -\definecharacter textasciicircum             94 -\definecharacter textunderscore              95 -\definecharacter textbraceleft              123 -\definecharacter textbar                    124 -\definecharacter textbraceright             125 -\definecharacter textasciitilde             126 -\definecharacter textnumero                 157 -\definecharacter textcurrency               158 -\definecharacter textsection                159 -\definecharacter textquotedbl                34 +\definecharacter textcyrillicflex           18 +\definecharacter textdblgrave               19  +\definecharacter textcyrillicbreve          20 -\definecharacter cyrillicpalochka            13 -\definecharacter cyrilliclangle              14 -\definecharacter cyrillicrangle              15 +\definecharacter endash                     21 +\definecharacter emdash                     22 -\definecharacter leftguillemot              190 -\definecharacter rightguillemot             191 -\definecharacter leftsubguillemot           190 -\definecharacter rightsubguillemot          191 +\definecharacter textcompwordmark           23 +\definecharacter textbackslash              92 +\definecharacter textasciicircum            94 +\definecharacter textunderscore             95 +\definecharacter textbraceleft             123 +\definecharacter textbraceright            125 +\definecharacter textasciitilde            126 +\definecharacter textnumero                157 +\definecharacter textcurrency              158 +\definecharacter sectionmark               159  +\definecharacter quotedbl                   34  +\definecharacter quoteleft                  96  +\definecharacter upperleftsingleninequote   39 +\definecharacter quotedblleft               16  +\definecharacter quotedblright              17  +\definecharacter lowerleftdoubleninequote  189 +\definecharacter upperrightdoublesixquote   16  +\definecharacter upperrightdoubleninequote  17  +\definecharacter quotedblbase              189  -\definecharacter upperleftsinglesixquote     96 -\definecharacter upperleftsingleninequote    39 -\definecharacter upperleftsinglesixquote     16 -\definecharacter upperleftdoubleninequote    17 -\definecharacter lowerleftdoubleninequote   189 +\definecharacter cyrillicpalochka           13 +\definecharacter cyrilliclangle             14 +\definecharacter cyrillicrangle             15 -\definecharacter upperrightsinglesixquote    96 -\definecharacter upperrightsingleninequote   39 -\definecharacter upperrightsinglesixquote    16 -\definecharacter upperrightdoubleninequote   17 -\definecharacter lowerrightdoubleninequote  189 +\definecharacter leftguillemot             190 +\definecharacter rightguillemot            191 -\definecharacter dotlessi                    25 -\definecharacter dotlessj                    26 +\definecharacter dotlessi                   25  \definecharacter cyrillicA                  192  \definecharacter cyrillica                  224 @@ -864,16 +801,6 @@  \definecharacter cyrillicW                   87  \definecharacter cyrillicw                  119 -% \defineaccentforchar " ^^c5 {\cyrillicYO} -% \defineaccentforchar " ^^e5 {\cyrillicyo} -% \defineaccentforchar U ^^c8 {\cyrillicISHRT } -% \defineaccentforchar U ^^e8 {\cyrillicishrt } -% \defineaccentforchar k ^^91 {\cyrillicABHCHDSC} -% \defineaccentforchar k ^^b1 {\cyrillicabhchdsc} -%  -% \definecharacter textperthousand    {\%\char 24 } -% \definecharacter textpertenthousand {\%\char 24\char 24 } -  \stopcoding  \startmapping[x2] @@ -896,9 +823,22 @@  \startcoding[x2] +\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 endash                      21  \definecharacter emdash                      22 -\definecharacter emdash                      22  \definecharacter textcompwordmark            23  \definecharacter textvisiblespace            32 @@ -915,26 +855,25 @@  \definecharacter textnumero                 157  \definecharacter textcurrency               158  \definecharacter textsection                159 +\definecharacter sectionmark                159    \definecharacter textquotedbl                34  \definecharacter cyrillicpalochka            13  \definecharacter cyrilliclangle              14  \definecharacter cyrillicrangle              15 -      +  \definecharacter leftguillemot              190  \definecharacter rightguillemot             191 -\definecharacter leftsubguillemot           190 -\definecharacter rightsubguillemot          191  \definecharacter upperleftsinglesixquote     96  \definecharacter upperleftsingleninequote    39 -\definecharacter upperleftsinglesixquote     16 +\definecharacter upperleftdoublesixquote     16   \definecharacter upperleftdoubleninequote    17  \definecharacter lowerleftdoubleninequote   189  \definecharacter upperrightsinglesixquote    96  \definecharacter upperrightsingleninequote   39 -\definecharacter upperrightsinglesixquote    16 +\definecharacter upperrightdoublesixquote    16   \definecharacter upperrightdoubleninequote   17  \definecharacter lowerrightdoubleninequote  189 @@ -1117,25 +1056,6 @@  \definecharacter cyrillicDELTA               30  \definecharacter cyrillicdelta               31 -% \defineaccentforchar " ^^c5 {\cyrillicYO} -% \defineaccentforchar " ^^e5 {\cyrillicyo} -% \defineaccentforchar U ^^c8 {\cyrillicISHRT} -% \defineaccentforchar U ^^e8 {\cyrillicishrt} -% \defineaccentforchar " ^^49 {\cyrillicYI} -% \defineaccentforchar " ^^69 {\cyrillicyi} -% \defineaccentforchar c ^^c7 {\cyrillicZDSC} -% \defineaccentforchar c ^^e7 {\cyrilliczdsc} -% \defineaccentforchar k ^^d1 {\cyrillicSDSC} -% \defineaccentforchar k ^^f1 {\cyrillicsdsc} -% \defineaccentforchar U ^^d3 {\cyrillicUSHRT} -% \defineaccentforchar U ^^f3 {\cyrillicushrt} -% \defineaccentforchar k ^^44 {\cyrillicABHCHDSC} -% \defineaccentforchar k ^^64 {\cyrillicabhchdsc} -  -% \definecharacter textperthousand    {\%\char 24 } -% \definecharacter textperthousand    {\%\char 24 } -% \definecharacter textpertenthousand {\%\char 24\char 24 } -  \stopcoding  \startmapping[lcy] @@ -1159,7 +1079,7 @@  \startcoding[lcy] -%D Characters 0 to 127 are as in normal cmr slots  +%D Characters 0 to 127 are as in normal cmr slots  \definecharacter cyrillicA                128  \definecharacter cyrillicB                129 @@ -1243,17 +1163,8 @@  \definecharacter textnumero               252  \definecharacter leftguillemot            253  \definecharacter rightguillemot           254 -\definecharacter lowerleftdoubleninequote 255 - -% \defineaccentforchar " ^^85 {\cyrillicYO} -% \defineaccentforchar " ^^a5 {\cyrillicyo} -% \defineaccentforchar U ^^88 {\cyrillicISHRT} -% \defineaccentforchar U ^^a8 {\cyrillicishrt} -% \defineaccentforchar " ^^f6 {\cyrillicYI} -% \defineaccentforchar " ^^f7 {\cyrillicyi} -% \defineaccentforchar U ^^93 {\cyrillicUSHRT} -% \defineaccentforchar U ^^e3 {\cyrillicushrt} +\definecharacter quotedblbase             255   \stopcoding -\endinput  +\endinput diff --git a/tex/context/base/enco-def.tex b/tex/context/base/enco-def.tex index 95d03f870..d7d9ca82d 100644 --- a/tex/context/base/enco-def.tex +++ b/tex/context/base/enco-def.tex @@ -18,7 +18,8 @@  %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. +%D we have to revert to hacks. Thanks to all those users who +%D helped me to fill in the details!   \startencoding[default] @@ -90,35 +91,38 @@  \definecharacter textsterling     {\fakesterling}  \definecharacter textyen          {Y} +\definecharacter ordfeminine      {\high{\txx a}} +\definecharacter ordmasculine     {\high{\txx o}} +  \definecharacter percent          {\fakepercent}  \definecharacter perthousand      {\fakeperthousand}  \definecharacter softhyphen        45  -\definecharacter periodcentered   {\mathematics{\cdot}} +\definecharacter periodcentered   {\mathematics\cdot}  \definecharacter compoundwordmark  23   \definecharacter textasciicircum    94  \definecharacter textasciitilde    126  \definecharacter textslash          47  \definecharacter textbackslash    {\tex{}} % todo  -\definecharacter textbraceleft    {\mathematics{\{}} -\definecharacter textbraceright   {\mathematics{\}}} +\definecharacter textbraceleft    {\mathematics\{} +\definecharacter textbraceright   {\mathematics\}}  \definecharacter textunderscore   {\fakeunderscore}  \definecharacter textvisiblespace {\fakevisiblespace}  -\definecharacter textbrokenbar    {\mathematics{\vert}}  -\definecharacter textbullet       {\mathematics{\bullet}}  -\definecharacter textdag          {\mathematics{\dag}}  -\definecharacter textddag         {\mathematics{\ddag}}  +\definecharacter textbrokenbar    {\mathematics\vert}  +\definecharacter textbullet       {\mathematics\bullet}  +\definecharacter textdag          {\mathematics\dag}  +\definecharacter textddag         {\mathematics\ddag}   \definecharacter textdegree       {\mathematics{{}^{\circ}}}  -\definecharacter textdiv          {\mathematics{/}}  -\definecharacter textellipsis     {\mathematics{\cdots}}  -\definecharacter textfraction     {\mathematics{/}}  -\definecharacter textlognot       {\mathematics{\neg}} -\definecharacter textminus        {\mathematics{-}}  -\definecharacter textmu           {\mathematics{\mu}} -\definecharacter textmultiply     {\mathematics{\times}} -\definecharacter textpm           {\mathematics{\pm}}  +\definecharacter textdiv          {\mathematics\div} +\definecharacter textellipsis     {\mathematics\cdots}  +\definecharacter textfraction     {\mathematics/} +\definecharacter textlognot       {\mathematics\neg} +\definecharacter textminus        {\mathematics-}  +\definecharacter textmu           {\mathematics\mu} +\definecharacter textmultiply     {\mathematics\times} +\definecharacter textpm           {\mathematics\pm}   \definecharacter quotedbl         {"}  \definecharacter quotedblbase     {,,} @@ -224,8 +228,11 @@  \definecharacter Zacute           {\buildtextaccent\textacute Z}  \definecharacter zacute           {\buildtextaccent\textacute z} -\definecharacter Dstroke          {D} -\definecharacter dstroke          {d} +%definecharacter Dstroke          {D} +%definecharacter dstroke          {d} + +\definecharacter dstroke          {\pseudoencodeddj} +\definecharacter Dstroke          {\pseudoencodedDJ}  \definecharacter Hstroke          {H}  \definecharacter hstroke          {h}  \definecharacter Tstroke          {T} @@ -401,6 +408,32 @@  \def\leftsubguillemot          {\guilsingleleft}  \def\rightsubguillemot         {\guilsingleright} +%D A couple of fallbacks suggestion by users, slightly  +%D adapted and obscured by memory saving hacks.   + +\unprotect  + +\startencoding[default] + +\definecharacter textcent        {c\rlap{\hskip-.2\s!em +  \vrule\!!width.2\s!pt\!!height1.2\s!ex\!!depth.2\s!ex}} + +\definecharacter texteuro        {C\rlap{\hskip-.75\s!em +  \vrule\!!width.4\s!em\!!height.85\s!ex\!!depth-.8\s!ex}} + +\definecharacter textblacksquare {\dontleavehmode\hbox{% +  \vrule\!!width.3\s!em\!!height.4\s!em\!!depth-.1\s!em}} + +\definecharacter textbrokenbar   {\dontleavehmode\hbox{\kern.05\s!em +  \vrule\!!width.4\s!pt\!!height1.8\s!ex\!!depth-.85\s!ex +                                  \llap{% +  \vrule\!!width.4\s!pt\!!height.35\s!ex\!!depth.6\s!ex}% +                                  \kern.05\s!em}} + +\stopencoding  + +\protect  +  %D We also use symbolic names for math accents.  \startencoding[default] diff --git a/tex/context/base/enco-ini.tex b/tex/context/base/enco-ini.tex index 2fb13c9e8..e7a8cc80a 100644 --- a/tex/context/base/enco-ini.tex +++ b/tex/context/base/enco-ini.tex @@ -1475,9 +1475,13 @@    \ignoreencoding  \to \everycleanupfeatures  +\appendtoks  +  \keepencodedtokens  +\to \everysafeexpanded +  %D We preload several encodings:  -\useencoding[def,acc,raw,com,cas,mis]  +\useencoding[def,acc,raw,com,cas,mis] % mis shoudl come first   \useencoding[ans,il2,ec,tbo,pdf,uc,pol,x5] diff --git a/tex/context/base/enco-mis.tex b/tex/context/base/enco-mis.tex index 3ab1ad432..d80202994 100644 --- a/tex/context/base/enco-mis.tex +++ b/tex/context/base/enco-mis.tex @@ -23,39 +23,67 @@  \defineuppercasecom \Dj  \dj  \defineuppercasecom \DJ  \dj +\definecharacter dstroke {\pseudoencodeddj} +\definecharacter Dstroke {\pseudoencodedDJ} +  \stopmapping   %D We need proper names like in enco-com.tex! -\definecharacter dj {\pseudoencodeddj} -\definecharacter Dj {\pseudoencodedDJ} -\definecharacter DJ {\pseudoencodedDJ} +\definecharacter dj {\dstroke} % {\pseudoencodeddj} +\definecharacter Dj {\Dstroke} % {\pseudoencodedDJ} +\definecharacter DJ {\Dstroke} % {\pseudoencodedDJ}  \unprotect  -\def\pseudoencodeddj % like in babel  +% \def\pseudoencodeddj % like in babel  +%   {\leavevmode\hbox\bgroup +%    \setbox0\hbox{d}% +%    \dimen0=\ht0 +%    \advance\dimen0 1ex +%    \dimen0=.45\dimen0 +%    \dimen2\expandafter\withoutpt\the\fontdimen1\font\dimen0 +%    \advance\dimen2 .5ex +%    \rlap{\raise\dimen0\hbox{\kern\dimen2\vbox{\hrule\!!height0.1ex\!!width0.3em}}}% +%    \box0 +%    \egroup} +%  +% \def\pseudoencodedDJ % like in babel  +%   {\leavevmode +%    \hbox\bgroup +%    \setbox0\hbox{D}% +%    \dimen0=.55\ht0 +%    \dimen2\expandafter\withoutpt\the\fontdimen1\font\dimen0 +%    \advance\dimen2 .15ex  +%    \advance\dimen2 -.15\fontdimen7\font  +%    \rlap{\raise\dimen0\hbox{\kern\dimen2\vbox{\hrule\!!height0.1ex\!!width0.33em}}}% +%    \box0 +%    \egroup} + +\def\pseudoencodeddj % like in babel, but safer       {\leavevmode\hbox\bgroup -   \setbox0\hbox{d}% -   \dimen0=\ht0 -   \advance\dimen0 1ex -   \dimen0=.45\dimen0 +   \setbox\scratchbox\hbox{d}% +   \scratchdimen\ht\scratchbox +   \advance\scratchdimen 1ex +   \scratchdimen.45\scratchdimen     \dimen2\expandafter\withoutpt\the\fontdimen1\font\dimen0     \advance\dimen2 .5ex -   \rlap{\raise\dimen0\hbox{\kern\dimen2\vbox{\hrule\!!height0.1ex\!!width0.3em}}}% -   \box0 +   \hbox to \wd\scratchbox +     {\box\scratchbox\hss +      \raise\scratchdimen\hbox{\kern\dimen2\vbox{\hrule\!!height0.1ex\!!width0.3em}}}%     \egroup} -\def\pseudoencodedDJ % like in babel  +\def\pseudoencodedDJ % like in babel, but safer     {\leavevmode     \hbox\bgroup -   \setbox0\hbox{D}% -   \dimen0=.55\ht0 -   \dimen2\expandafter\withoutpt\the\fontdimen1\font\dimen0 +   \setbox\scratchbox\hbox{D}% +   \scratchdimen.55\ht\scratchbox +   \dimen2\expandafter\withoutpt\the\fontdimen1\font\scratchdimen     \advance\dimen2 .15ex      \advance\dimen2 -.15\fontdimen7\font  -   \dimen4\expandafter\withoutpt\the\fontdimen7\font\dimen0 -   \rlap{\raise\dimen0\hbox{\kern\dimen2\vbox{\hrule\!!height0.1ex\!!width0.33em}}}% -   \box0 +   \hbox to \wd\scratchbox +     {\box\scratchbox\hss +      \raise\scratchdimen\hbox{\kern\dimen2\vbox{\hrule\!!height0.1ex\!!width0.3em}}}%     \egroup}  % currency diff --git a/tex/context/base/enco-tbo.tex b/tex/context/base/enco-tbo.tex index b129eded7..26ea374cf 100644 --- a/tex/context/base/enco-tbo.tex +++ b/tex/context/base/enco-tbo.tex @@ -206,7 +206,7 @@  \definecharacter lstroke             7  \definecharacter Lstroke             6  \definecharacter ostroke           248 -\definecharacter Ostoke            216 +\definecharacter Ostroke           216  \definecharacter atilde            227  \definecharacter Atilde            195 diff --git a/tex/context/base/font-ini.tex b/tex/context/base/font-ini.tex index fa38f2c5b..1c5ca7074 100644 --- a/tex/context/base/font-ini.tex +++ b/tex/context/base/font-ini.tex @@ -15,6 +15,40 @@  \writestatus{loading}{Context Font Macros (ini)}  \unprotect + +% \def\fontrange#1%   +%   {\dofontrange{#1 =\bodyfontsize}} +%  +% \def\dofontrange#1%   +%   {\dodofontrange#1 \relax}% \fontstringA +%  +% \def\dodofontrange#1 #2 %   +%   {\ifdim\bodyfontsize#2% +%      #1\expandafter\gobbleuntilrelax +%    \else +%      \expandafter\dodofontrange +%    \fi} +%  +% \definefont +%   [crap] +%   [\fontrange +%      {Regular        <10pt  +%       RegularBold    <12pt  +%       RegularSlanted <15pt  +%       Regular} sa 1] +% +% may be better: +%  +% \definefontrange +%   [crap] +%   [Regular        <10pt  +%    RegularBold    <12pt  +%    RegularSlanted <15pt]  +%   [Regular sa 1] +% +% +% \dostepwiserecurse{2}{15}{1} +%   {{\switchtobodyfont[\recurselevel pt]\crap test}\endgraf}  % adapted, else wrong interlinespace @@ -3863,7 +3897,7 @@  %D hexadecimal format. Next we set the height of the accented  %D character to the natural height of the character. -\def\smashaccent#1% +\unexpanded\def\smashaccent#1%    {\dontleavehmode     \bgroup     \setbox\scratchbox\hbox{#1}% @@ -3903,7 +3937,7 @@  %D    oder\quad  %D    \ruledhbox{\"Uberhaupt}} -\def\moveaccent#1#2% +\unexpanded\def\moveaccent#1#2%    {\smashaccent       {\dimen0\fontdimen5\font        \dimen2\dimen0 diff --git a/tex/context/base/hand-def.tex b/tex/context/base/hand-def.tex index 935a79b84..581dc3065 100644 --- a/tex/context/base/hand-def.tex +++ b/tex/context/base/hand-def.tex @@ -20,6 +20,7 @@    \defineprotrudefactor . 0 1    \defineprotrudefactor : 0 1    \defineprotrudefactor ; 0 1 +  \defineprotrudefactor - 0 1    \defineprotrudefactor hyphen 0 1    \defineprotrudefactor endash 0 .5  diff --git a/tex/context/base/lang-cyr.tex b/tex/context/base/lang-cyr.tex index adc0defd6..20567e1e1 100644 --- a/tex/context/base/lang-cyr.tex +++ b/tex/context/base/lang-cyr.tex @@ -227,39 +227,42 @@  \setuplabeltext [\s!ru]    [\v!pagina=\cyrillics \cyrillict \cyrillicr                                        \cyrillica \cyrillicn \cyrillici                                        \cyrillicc \cyrillica \space] +\setuplabeltext [\s!ua]    [\v!pagina=\cyrillics \cyrillict \cyrillico +                                      \cyrillicr \cyrillicii\cyrillicn +                                      \cyrillick \cyrillica \space ] +  \setuplabeltext [\s!ru]  [\v!oppagina=\cyrillicn \cyrillica \space                                        \cyrillics \cyrillict \cyrillicr                                        \cyrillica \cyrillicn \cyrillici                                        \cyrillicc \cyrillice \space] +\setuplabeltext [\s!ua]  [\v!oppagina=\cyrillicn \cyrillica \space +                                      \cyrillics \cyrillict \cyrillico +                                      \cyrillicr \cyrillicii\cyrillicn +                                      \cyrillicc \cyrillicii\space ] +  \setuplabeltext [\s!ru] [\v!hierboven=\cyrillics \cyrillicm.\space                                        \cyrillicv \cyrillicery \cyrillicsh                                        \cyrillice] -\setuplabeltext [\s!ru] [\v!hieronder=\cyrillics \cyrillicm.\space -                                      \cyrillicn \cyrillici \cyrilliczh -                                      \cyrillice] -\setuplabeltext [\s!ru]       [\v!zie=\cyrillics \cyrillicm.\space] - -\setuplabeltext [\s!en]    [\v!pagina=\cyrillics \cyrillict \cyrillico -                                      \cyrillicr \cyrillicii\cyrillicn -                                      \cyrillick \cyrillica \space] -\setuplabeltext [\s!en]  [\v!oppagina=\cyrillicn \cyrillica \space -                                      \cyrillics \cyrillict \cyrillico -                                      \cyrillicr \cyrillicii\cyrillicn -                                      \cyrillicc \cyrillicii\space] -\setuplabeltext [\s!en] [\v!hierboven=\cyrillicya\cyrillick \space +\setuplabeltext [\s!ua] [\v!hierboven=\cyrillicya\cyrillick \space                                        \cyrillicp \cyrillico \cyrillick                                        \cyrillica \cyrillicz \cyrillica                                        \cyrillicn \cyrillico \space                                        \cyrillicv \cyrillici \cyrillicshch -                                      \cyrilice] -\setuplabeltext [\s!en] [\v!hieronder=\cyrillicya\cyrillick \space +                                      \cyrillice] + +\setuplabeltext [\s!ru] [\v!hieronder=\cyrillics \cyrillicm.\space +                                      \cyrillicn \cyrillici \cyrilliczh +                                      \cyrillice] +\setuplabeltext [\s!ua] [\v!hieronder=\cyrillicya\cyrillick \space                                        \cyrillicp \cyrillico \cyrillick                                        \cyrillica \cyrillicz \cyrillica                                        \cyrillicn \cyrillico \space                                        \cyrillicn \cyrillici \cyrilliczh                                        \cyrillicch\cyrillice] -\setuplabeltext [\s!en]       [\v!zie=\cyrillicd \cyrillici \cyrillicv.\ ] +\setuplabeltext [\s!ru]       [\v!zie=\cyrillics \cyrillicm.\space] +\setuplabeltext [\s!ua]       [\v!zie=\cyrillicd \cyrillici  +                                      \cyrillicv.\space ]  \setuplabeltext [\s!ru]   [\v!january=\cyrillicya\cyrillicn \cyrillicv                                        \cyrillica \cyrillicr \cyrillicya] diff --git a/tex/context/base/lang-lab.tex b/tex/context/base/lang-lab.tex index 6711490f8..4e3886770 100644 --- a/tex/context/base/lang-lab.tex +++ b/tex/context/base/lang-lab.tex @@ -138,10 +138,10 @@  \unexpanded\def\LABELTEXTS#1#2{\LEFTLABELTEXT{#1}#2\RIGHTLABELTEXT{#1}}  \newif\iflabeltextdone % needs to be reset elsewhere -\newif\iftracinglabels % shows missing labels  +\newif\iftracelabels % shows missing labels   \def\doreporttextprefixerror#1#2#3% -  {\iftracinglabels{\tttf[#2:~#3/#1]~}\fi} +  {\iftracelabels{\tttf[#2:~#3/#1]~}\fi}  \def\dosetexpandedheadlabeltext#1#2#3%    {\bgroup diff --git a/tex/context/base/lang-ura.tex b/tex/context/base/lang-ura.tex index 22072dc0e..6c7f84960 100644 --- a/tex/context/base/lang-ura.tex +++ b/tex/context/base/lang-ura.tex @@ -57,7 +57,9 @@     \c!leftquotation=\lowerleftdoubleninequote,     \c!rightquotation=\upperrightdoubleninequote,     \c!datum={\v!jaar,.,\ ,\v!maand,\ ,\v!dag,.}, -   \c!status=\v!stop] +   \c!status=\v!stop, +   \s!mapping=ec, +   \s!encoding=ec]  \installlanguage [finish]    [\s!fi]  \installlanguage [hungarian] [\s!hu] diff --git a/tex/context/base/m-graph.tex b/tex/context/base/m-graph.tex index 9b22ac078..0be24eee2 100644 --- a/tex/context/base/m-graph.tex +++ b/tex/context/base/m-graph.tex @@ -146,14 +146,14 @@    % @# is X_ or Y_; $ is Gxcvlin_ or Gycvlin_; l and h are numeric or string    % It would not be OK to set (@#low,@#high) to a pair expression because $ might    % try to rescale @#low when evaluating the right-hand side for @#high. -  vardef Gsetr_@#(suffix $)(expr l, h) = -    Gclbnds_@# ; -    if @#ctyp>0 : -       @#low  = if abs @#ctyp<>log: $ fi Mlog_Str l ; -       @#high = if abs @#ctyp<>log: $ fi Mlog_Str h ; +  vardef Gsetr_@\#(suffix $)(expr l, h) = +    Gclbnds_@\# ; +    if @\#ctyp>0 : +       @\#low  = if abs @\#ctyp<>log: $ fi Mlog_Str l ; +       @\#high = if abs @\#ctyp<>log: $ fi Mlog_Str h ;      else : -      -@#high = if abs @#ctyp<>log: $ fi Mlog_Str l ; -      -@#low  = if abs @#ctyp<>log: $ fi Mlog_Str h ; +      -@\#high = if abs @\#ctyp<>log: $ fi Mlog_Str l ; +      -@\#low  = if abs @\#ctyp<>log: $ fi Mlog_Str h ;      fi    enddef ;  \to \MPinitializations  diff --git a/tex/context/base/page-flt.tex b/tex/context/base/page-flt.tex index d8d6a548a..d96ddb385 100644 --- a/tex/context/base/page-flt.tex +++ b/tex/context/base/page-flt.tex @@ -334,16 +334,33 @@  % new : \place...[leftmargin,-2*line] +% (keep this) this fails on fxtb:2*3 +% +% \def\movesidefloat[#1]% +%   {\bgroup +%    \donefalse +%    \def\movesidefloat##1% +%      {\ifdone \else +%         \global\sidefloatdownshift\zeropoint +%         \donetrue +%       \fi +%       \global\advance\sidefloatdownshift##1\lineheight}% +%    \expanded{\dorepeatwithcommand[#1]}\domovesidefloat +%    \egroup} +% +% so we need to catch the :  +  \def\movesidefloat[#1]%    {\bgroup -   \donefalse -   \def\movesidefloat##1% -     {\ifdone \else -        \global\sidefloatdownshift\zeropoint -        \donetrue -      \fi -      \global\advance\sidefloatdownshift##1\lineheight}% -   \expanded{\dorepeatwithcommand[#1]}\domovesidefloat +   \cleanupfeatures +   \doifinstringelse{:}{#1} +     \donothing +     {\donefalse +      \def\movesidefloat##1% +        {\doifnumber{##1} +           {\ifdone\else\global\sidefloatdownshift\zeropoint\donetrue\fi +            \global\advance\sidefloatdownshift##1\lineheight}}% +      \expanded{\dorepeatwithcommand[#1]}\domovesidefloat}%     \egroup}  % or cleaner but longer: @@ -433,18 +450,18 @@          \fi}%       \doifinset\v!hangend{#2}         {\doifcommonelse{\v!inlinker,\v!linkermarge}{#2} -          {\letvalue{\??fl#1\c!maxbreedte}\leftmarginwidth}%  +          {\letvalue{\??fl#1\c!maxbreedte}\linkermargebreedte}%             {\doifcommon{\v!inrechter,\v!rechtermarge}{#2} -             {\letvalue{\??fl#1\c!maxbreedte}\rightmarginwidth}}}%  +             {\letvalue{\??fl#1\c!maxbreedte}\rechtermargebreedte}}}%        \doifvaluesomething{\??fl#1\c!maxbreedte}         {\scratchdimen\getvalue{\??fl#1\c!maxbreedte}\relax          \ifdim\wd#3>\scratchdimen            \doifcommonelse{\v!inrechter,\v!rechtermarge}{#2}                {\global\sidefloatshift-\scratchdimen       -             \global\advance\sidefloatshift-\rightmargindistance} +             \global\advance\sidefloatshift-\rechtermargeafstand}              {\doifcommonelse{\v!inlinker,\v!linkermarge}{#2}                 {\global\sidefloatshift-\scratchdimen       -                \global\advance\sidefloatshift-\leftmargindistance} +                \global\advance\sidefloatshift-\linkermargeafstand}                 {#4\setbox#3\hbox to \scratchdimen                   {\doifcommonelse{\v!rechts,\v!links}{#2}                      {\doifnotinset\v!rechts{#2}\hss @@ -1517,7 +1534,8 @@     \doifelsevaluenothing{\??fl#4\c!criterium}       {\dogetfloatbox{#1}\empty}       {\ifdim\wd\floatbox>\getvalue{\??fl#4\c!criterium}\relax -        \dogetfloatbox{#1}\v!hier +        \postcenterfloatbox{\wd\floatbox}% else we get left aligned   +        \dogetfloatbox{#1}\v!hier        % see details/pascal        \else          \dogetfloatbox{#1}\empty        \fi}} diff --git a/tex/context/base/page-lay.tex b/tex/context/base/page-lay.tex index f6c0d33be..938100570 100644 --- a/tex/context/base/page-lay.tex +++ b/tex/context/base/page-lay.tex @@ -1079,27 +1079,27 @@  \beginETEX \dimexpr  -  \def\leftmargintotal {\dimexpr(\linkermargebreedte +\linkermargeafstand )} -  \def\rightmargintotal{\dimexpr(\rechtermargebreedte+\rechtermargeafstand)} -  \def\leftedgetotal   {\dimexpr(\linkerrandbreedte  +\linkerrandafstand  )} -  \def\rightedgetotal  {\dimexpr(\rechterrandbreedte +\rechterrandafstand )} +  \def\leftmargintotal {\dimexpr(\linkermargebreedte  +\linkermargeafstand )} +  \def\rightmargintotal{\dimexpr(\rechtermargebreedte +\rechtermargeafstand)} +  \def\leftedgetotal   {\dimexpr(\linkerrandbreedte   +\linkerrandafstand  )} +  \def\rightedgetotal  {\dimexpr(\rechterrandbreedte  +\rechterrandafstand )} -  \def\leftsidetotal   {\dimexpr(\leftmarginwidth    +\leftedgetotal )} -  \def\rightsidetotal  {\dimexpr(\rightmarginwidth   +\rightedgetotal)} +  \def\leftsidetotal   {\dimexpr(\linkermargebreedte  +\leftedgetotal )} +  \def\rightsidetotal  {\dimexpr(\rechtermargebreedte +\rightedgetotal)} -  \def\leftcombitotal  {\dimexpr(\leftmargintotal    +\leftedgetotal )} -  \def\rightcombitotal {\dimexpr(\rightmargintotal   +\rightedgetotal)} +  \def\leftcombitotal  {\dimexpr(\leftmargintotal     +\leftedgetotal )} +  \def\rightcombitotal {\dimexpr(\rightmargintotal    +\rightedgetotal)} -  \def\innermargintotal{\dimexpr(\innermarginwidth   +\innermargindistance)} -  \def\outermargintotal{\dimexpr(\outermarginwidth   +\outermargindistance)} -  \def\inneredgetotal  {\dimexpr(\inneredgewidth     +\inneredgedistance  )} -  \def\outeredgetotal  {\dimexpr(\outeredgewidth     +\outeredgedistance  )} +  \def\innermargintotal{\dimexpr(\innermarginwidth    +\innermargindistance)} +  \def\outermargintotal{\dimexpr(\outermarginwidth    +\outermargindistance)} +  \def\inneredgetotal  {\dimexpr(\inneredgewidth      +\inneredgedistance  )} +  \def\outeredgetotal  {\dimexpr(\outeredgewidth      +\outeredgedistance  )} -  \def\innercombitotal {\dimexpr(\innermargintotal   +\inneredgetotal)} -  \def\outercombitotal {\dimexpr(\outermargintotal   +\outeredgetotal)} +  \def\innercombitotal {\dimexpr(\innermargintotal    +\inneredgetotal)} +  \def\outercombitotal {\dimexpr(\outermargintotal    +\outeredgetotal)} -  \def\innersidetotal  {\dimexpr(\innermarginwidth   + \inneredgetotal)} -  \def\outersidetotal  {\dimexpr(\outermarginwidth   + \outeredgetotal)} +  \def\innersidetotal  {\dimexpr(\innermarginwidth    + \inneredgetotal)} +  \def\outersidetotal  {\dimexpr(\outermarginwidth    + \outeredgetotal)}  \endETEX diff --git a/tex/context/base/page-set.tex b/tex/context/base/page-set.tex index f67abb84f..4e35eac77 100644 --- a/tex/context/base/page-set.tex +++ b/tex/context/base/page-set.tex @@ -1623,22 +1623,49 @@  %     \fi  %   \fi} +% \def\OTRSETnobalance +%   {\iflastcolumnfootnotes % testen ! optie +%      % inhibit flush of floats ! +%      \dostepwiserecurse\mofcolumns\nofcolumns\plusone +%        {\vskip-\lineheight\vbox{\strut}\vfill\eject}% +%    \else +%      \ifdim\pagetotal>\zeropoint  +%        \ifnum\mofcolumns=\nofcolumns +%          \OTRSETflushfinalfootnotes +%          \vfill \eject +%        \else +%          \vfill \eject +%          \OTRSETdofinalflush +%          \OTRSETdofinaloutput +%        \fi +%      \fi +%    \fi} +% +% no, this one looses empty 1page/1column with area (example **) +% +% \definecolumntextarea[title][x=1,y=4,nx=2,ny=7,state=start] +% \setupcolumntextareatext[title][\vtop to 5cm{a\\b\\b\\d}] +% +% \starttext  +% \startcolumnset \dorecurse{1}{\input tufte \par} \stopcolumnset +% \stoptext  +  \def\OTRSETnobalance    {\iflastcolumnfootnotes % testen ! optie       % inhibit flush of floats !       \dostepwiserecurse\mofcolumns\nofcolumns\plusone         {\vskip-\lineheight\vbox{\strut}\vfill\eject}% -   \else -     \ifdim\pagetotal>\zeropoint +   \else  +   % \ifdim\pagetotal>\zeropoint no, see example **          \ifnum\mofcolumns=\nofcolumns           \OTRSETflushfinalfootnotes -         \vfill \eject         \else -         \vfill \eject -         \OTRSETdofinalflush -         \OTRSETdofinaloutput +         % probably todo          \fi -     \fi +       \vfill \eject +       \OTRSETdofinalflush +       \OTRSETdofinaloutput +   % \fi      \fi}  \def\OTRSETstartnextpage @@ -2226,11 +2253,18 @@     \docalculatecolumnsetspan     \!!heighta\columntextareaparameter\c!ny\lineheight     % to do: met/zonder ht/dp -   \ifnum\columntextareaparameter\c!y=\zerocount +% wrong  +%   \ifnum\columntextareaparameter\c!y=\zerocount +%     \advance\!!heighta -\lineheight +%     \advance\!!heighta \topskip +%   \fi +%   \advance\!!heighta -\lineheight % option +% +   \ifnum\columntextareaparameter\c!y=\plusone       \advance\!!heighta -\lineheight       \advance\!!heighta \topskip     \fi -   \advance\!!heighta -\lineheight % option +%     \setbox\scratchbox\vbox       {\donetrue\localframed          [\??mt\currentcolumntestarea]  @@ -2242,13 +2276,20 @@     \advance\!!countb \minusone     \OTRSETsetgridcell       \!!counta\!!countb -     \hbox{\clip -       [\c!bovenoffset=\columntextareaparameter\c!clipoffset,% -        \c!onderoffset=\columntextareaparameter\c!clipoffset,% -        \c!linkeroffset=\columntextareaparameter\c!clipoffset,% -        \c!breedte=\!!widthb,% -        \c!hoogte=\!!heighta]% -       {\copy\scratchbox}}% +     \hbox +       {\ifcase\!!countc +          \copy\scratchbox % \box  +        \else +          \clip +            [%\c!bovenoffset=\columntextareaparameter\c!clipoffset,% +             %\c!onderoffset=\columntextareaparameter\c!clipoffset,% +             %\c!linkeroffset=\columntextareaparameter\c!clipoffset,% +\c!offset=\columntextareaparameter\c!clipoffset,% +\c!rechteroffset=\zeropoint, +             \c!breedte=\!!widthb,% +             \c!hoogte=\!!heighta]% +            {\copy\scratchbox}% +        \fi}%     \ifcase\!!countc\else       \advance\!!counta \columntextareaparameter\c!nx       \advance\!!counta -\!!countc @@ -2258,9 +2299,11 @@         \hbox           {\hskip-\namedlayoutparameter\v!oneven\c!rugwit            \clip -            [\c!bovenoffset=\columntextareaparameter\c!clipoffset,% -             \c!onderoffset=\columntextareaparameter\c!clipoffset,% -             \c!rechteroffset=\columntextareaparameter\c!clipoffset,% +            [%\c!bovenoffset=\columntextareaparameter\c!clipoffset,% +             %\c!onderoffset=\columntextareaparameter\c!clipoffset,% +             %\c!rechteroffset=\columntextareaparameter\c!clipoffset,% +\c!offset=\columntextareaparameter\c!clipoffset,% +\c!linkeroffset=\zeropoint,               \c!breedte=\!!widtha,%               \c!hoogte=\!!heighta,%               \c!hoffset=\!!widthb]% diff --git a/tex/context/base/page-sid.tex b/tex/context/base/page-sid.tex index 534fa457b..9a62c7934 100644 --- a/tex/context/base/page-sid.tex +++ b/tex/context/base/page-sid.tex @@ -360,7 +360,7 @@  \global     \setbox\floatbox\hbox       {\ifmarginfloat\else\ifrightfloat\else\kern\sidefloatleftshift\fi\fi -      \hskip\sidefloatshift +      \ifrightfloat\else\hskip\sidefloatshift\fi        \scratchdimen          \ifmarginfloat                       \sidefloattopskip @@ -389,6 +389,7 @@  %      \or \advance\scratchdimen\lineheight  %      \fi         \vbox{\vskip\scratchdimen\nointerlineskip#1}%  +      \ifrightfloat\kern\sidefloatshift\fi        % no \hskip, but \kern here         \ifmarginfloat\else\ifrightfloat\kern\sidefloatrightshift\fi\fi}%     \ifmarginfloat @@ -430,6 +431,9 @@       \global        \sidefloatwidth \wd\floatbox       \global\advance\sidefloatwidth \floatsideskip     \fi\fi +\ifdim\sidefloatwidth<\zeropoint +  \global\sidefloatwidth\zeropoint  +\fi      \global        \sidefloathsize  \hsize     \global\advance\sidefloathsize -\sidefloatwidth     \global        \sidefloatheight \ht\floatbox diff --git a/tex/context/base/regi-cyp.tex b/tex/context/base/regi-cyp.tex index 277f4b099..7d134df50 100644 --- a/tex/context/base/regi-cyp.tex +++ b/tex/context/base/regi-cyp.tex @@ -8,11 +8,11 @@  %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 In this file several rarely user cyrillic input regimes  -%D are defined.  +%D In this file several rarely user cyrillic input regimes +%D are defined.  \startregime[cp855] @@ -113,8 +113,8 @@  \defineactivetoken 250 {\cyrillicSHCH}  \defineactivetoken 251 {\cyrillicch}  \defineactivetoken 252 {\cyrillicCH} -\defineactivetoken 253 {\S} -\defineactivetoken 254 {\textblacksquare}          +\defineactivetoken 253 {\sectionmark}   +\defineactivetoken 254 {\textblacksquare}  \defineactivetoken 255 {\nonbreakablespace}  \stopregime @@ -189,8 +189,14 @@  \defineactivetoken 241 {\cyrillicyo}  \defineactivetoken 252 {\textnumero}  \defineactivetoken 253 {\textcurrency} -\defineactivetoken 254 {\textblacksquare}          +\defineactivetoken 254 {\textblacksquare}  \defineactivetoken 255 {\nonbreakablespace} +\defineactivetoken 246 {\mathematics\rightarrow}  +\defineactivetoken 247 {\mathematics\leftarrow}   +\defineactivetoken 248 {\mathematics\downarrow}   +\defineactivetoken 249 {\mathematics\uparrow}     +\defineactivetoken 250 {\textdiv}                   +\defineactivetoken 251 {\textpm}                     \stopregime @@ -262,11 +268,18 @@  \defineactivetoken 239 {\cyrillicya}  \defineactivetoken 240 {\cyrillicYO}  \defineactivetoken 241 {\cyrillicyo} -\defineactivetoken 248 {\textdegree}               -\defineactivetoken 249 {\bullet} -\defineactivetoken 250 {\textperiodcentered}       -\defineactivetoken 254 {\textblacksquare}          +\defineactivetoken 248 {\textdegree} +\defineactivetoken 249 {\textbullet}        +\defineactivetoken 250 {\periodcentered}    +\defineactivetoken 254 {\textblacksquare}  \defineactivetoken 255 {\nonbreakablespace} +\defineactivetoken 242 {\mathematics\geq}   +\defineactivetoken 243 {\mathematics\leq}   +\defineactivetoken 246 {\textdiv}           +\defineactivetoken 247 {\mathematics\sim}   +\defineactivetoken 251 {\textsurd}          +\defineactivetoken 252 {\high{\txx n}}      +\defineactivetoken 253 {\twosuperior}        \stopregime @@ -350,7 +363,7 @@  \defineactivetoken 251 {\cyrillicndsc}  \defineactivetoken 252 {\cyrillicSHHA}  \defineactivetoken 253 {\cyrillicshha} -\defineactivetoken 254 {\textblacksquare}          +\defineactivetoken 254 {\textblacksquare}  \defineactivetoken 255 {\nonbreakablespace}  \stopregime @@ -602,7 +615,7 @@  \defineactivetoken 250 {\cyrillicnje}  \defineactivetoken 251 {\cyrillictshe}  \defineactivetoken 252 {\'\cyrillick} -\defineactivetoken 253 {\S} +\defineactivetoken 253 {\sectionmark}    \defineactivetoken 254 {\cyrillicushrt}  \defineactivetoken 255 {\cyrillicdzhe} @@ -776,18 +789,43 @@  \defineactivetoken 190 {\cyrillicyu}  \defineactivetoken 191 {\cyrillicya}  \defineactivetoken 213 {\textnumero} -\defineactivetoken 214 {\S} -\defineactivetoken 248 {\textdegree}               -\defineactivetoken 249 {\bullet} -\defineactivetoken 250 {\textperiodcentered}       -\defineactivetoken 254 {\textblacksquare}          +\defineactivetoken 214 {\sectionmark}   +\defineactivetoken 248 {\textdegree} +\defineactivetoken 249 {\textbullet}      +\defineactivetoken 250 {\periodcentered}  +\defineactivetoken 254 {\textblacksquare}  \defineactivetoken 255 {\nonbreakablespace} +\defineactivetoken 224 {\mathematics\alpha}     +\defineactivetoken 225 {\mathematics\beta}      +\defineactivetoken 226 {\mathematics\Gamma}     +\defineactivetoken 227 {\mathematics\pi}        +\defineactivetoken 228 {\mathematics\Sigma}     +\defineactivetoken 229 {\mathematics\sigma}     +\defineactivetoken 230 {\textmu}                  +\defineactivetoken 231 {\mathematics\tau}       +\defineactivetoken 232 {\mathematics\Phi}       +\defineactivetoken 233 {\mathematics\Theta}     +\defineactivetoken 234 {\mathematics\Omega}     +\defineactivetoken 235 {\mathematics\delta}     +\defineactivetoken 236 {\mathematics\infty}     +\defineactivetoken 237 {\mathematics\emptyset}  +\defineactivetoken 238 {\mathematics\in}        +\defineactivetoken 239 {\mathematics\cap}       +\defineactivetoken 240 {\mathematics\equiv}     +\defineactivetoken 241 {\textpm}                  +\defineactivetoken 242 {\mathematics\geq}       +\defineactivetoken 243 {\mathematics\leq}       +\defineactivetoken 246 {\textdiv}                 +\defineactivetoken 247 {\mathematics\sim}       +\defineactivetoken 251 {\textsurd}                +\defineactivetoken 252 {\high{\txx n}}            +\defineactivetoken 253 {\twosuperior}              \stopregime  \startregime[mls] -% The symbols 194 to 253 are defined in Mongolian fonts in  +% The symbols 194 to 253 are defined in Mongolian fonts in  % the Mon\TeX\ package (?)  \defineactivetoken 128 {\cyrillicB} diff --git a/tex/context/base/regi-cyr.tex b/tex/context/base/regi-cyr.tex index ecb13973e..cc54551f6 100644 --- a/tex/context/base/regi-cyr.tex +++ b/tex/context/base/regi-cyr.tex @@ -24,27 +24,6 @@  %D Other, not so popular regimes, can be found in \type   %D {regi-cy2}. -% to do :  -% -% Some regimes contain symbols which are not yet defined in ConTeXt. -% Here are given some (probably not perfect) definitions, have to -% be substituted by real symbols if available. -% LaTeX names are used - -% \definecharacter textcent -%   {c\rlap{\hskip-.2em\vrule width.2ptheight1.2exdepth0.2ex\relax}} -% \definecharacter texteuro -%   {C\rlap{\hskip-.75em\vrule width.4emheight.85exdepth-0.8ex\relax}} -% \definecharacter textblacksquare -%   {\vrule width.3emheight.4emdepth-.1em\relax} -% \definecharacter textdegree -%   {\mathematics{{^\circ}}} -% \definecharacter texttrademark -%   {\high{\ss\tx TM}} -% \definecharacter textbrokenbar -%   {\kern0.05em\vrule width0.4ptheight1.8exdepth-0.85ex\llap{\vrule -%    width0.4ptheight0.35exdepth0.6ex}\kern0.05em} -  \startregime[cp1251]  \defineactivetoken 192 {\cyrillicA} @@ -116,11 +95,11 @@  \defineactivetoken 130 {\lowerleftsingleninequote}  \defineactivetoken 131 {\'\cyrillicg}  \defineactivetoken 132 {\lowerleftdoubleninequote} -\defineactivetoken 133 {\dots} -\defineactivetoken 134 {\dag} -\defineactivetoken 135 {\ddag} -\defineactivetoken 136 {\texteuro}       -\defineactivetoken 137 {\textperthousand} +\defineactivetoken 133 {\textellipsis}  +\defineactivetoken 134 {\textdag}       +\defineactivetoken 135 {\textddag}      +\defineactivetoken 136 {\texteuro}      +\defineactivetoken 137 {\perthousand}    \defineactivetoken 138 {\cyrillicLJE}  \defineactivetoken 139 {\leftsubguillemot}  \defineactivetoken 140 {\cyrillicNJE} @@ -130,12 +109,13 @@  \defineactivetoken 144 {\cyrillicdje}  \defineactivetoken 145 {\upperleftsinglesixquote}  \defineactivetoken 146 {\upperrightsingleninequote} -\defineactivetoken 147 {\upperleftsinglesixquote} +\defineactivetoken 147 {\upperleftdoublesixquote}   \defineactivetoken 148 {\upperrightdoubleninequote} -\defineactivetoken 149 {\bullet} +\defineactivetoken 149 {\textbullet}     \defineactivetoken 150 {\endash}  \defineactivetoken 151 {\emdash} -\defineactivetoken 153 {\texttrademark}  +\defineactivetoken 152 {\missingglyph}  +\defineactivetoken 153 {\trademark}      \defineactivetoken 154 {\cyrilliclje}  \defineactivetoken 155 {\rightsubguillemot}  \defineactivetoken 156 {\cyrillicnje} @@ -149,20 +129,20 @@  \defineactivetoken 164 {\textcurrency}  \defineactivetoken 165 {\cyrillicGUP}  \defineactivetoken 166 {\textbrokenbar}            -\defineactivetoken 167 {\S} +\defineactivetoken 167 {\sectionmark}       \defineactivetoken 168 {\cyrillicYO}  \defineactivetoken 169 {\copyright}  \defineactivetoken 170 {\cyrillicIE}  \defineactivetoken 171 {\leftguillemot} -\defineactivetoken 173 {\-} -\defineactivetoken 174 {\registered}   +\defineactivetoken 173 {\hyphen} +\defineactivetoken 174 {\registered}   \defineactivetoken 175 {\cyrillicYI}  \defineactivetoken 176 {\textdegree}                \defineactivetoken 178 {\cyrillicII}  \defineactivetoken 179 {\cyrillicii}  \defineactivetoken 180 {\cyrillicgup} -\defineactivetoken 182 {\P} -\defineactivetoken 183 {\textperiodcentered}       +\defineactivetoken 182 {\paragraphmark}    +\defineactivetoken 183 {\periodcentered}    \defineactivetoken 184 {\cyrillicyo}  \defineactivetoken 185 {\textnumero}  \defineactivetoken 186 {\cyrillicie} @@ -171,6 +151,9 @@  \defineactivetoken 189 {\cyrillicDZE}  \defineactivetoken 190 {\cyrillicdze}  \defineactivetoken 191 {\cyrillicyi} +\defineactivetoken 172 {\textlognot}       +\defineactivetoken 177 {\textpm}           +\defineactivetoken 181 {\textmu}            \stopregime @@ -250,11 +233,12 @@  \defineactivetoken 247 {\cyrillicushrt}  \defineactivetoken 248 {\textdegree}                \defineactivetoken 249 {\bullet} -\defineactivetoken 250 {\textperiodcentered}       +\defineactivetoken 250 {\periodcentered}     \defineactivetoken 252 {\textnumero}  \defineactivetoken 253 {\textcurrency}  \defineactivetoken 254 {\textblacksquare}           \defineactivetoken 255 {\nonbreakablespace} +\defineactivetoken 251 {\textsurd}           \stopregime @@ -412,11 +396,17 @@  \defineactivetoken 192 {\cyrillicyu}  \defineactivetoken 209 {\cyrillicya}  \defineactivetoken 148 {\textblacksquare}          -\defineactivetoken 149 {\bullet} +\defineactivetoken 149 {\textbullet}       \defineactivetoken 154 {\nonbreakablespace}  \defineactivetoken 156 {\textdegree}     -\defineactivetoken 158 {\textperiodcentered}       +\defineactivetoken 158 {\periodcentered}   \defineactivetoken 191 {\copyright} +\defineactivetoken 150 {\textsurd}            +\defineactivetoken 151 {\mathematics\sim}   +\defineactivetoken 152 {\mathematics\leq}   +\defineactivetoken 153 {\mathematics\geq}   +\defineactivetoken 157 {\twosuperior}         +\defineactivetoken 159 {\textdiv}              \stopregime @@ -490,16 +480,16 @@  \defineactivetoken 209 {\cyrillicya}  \defineactivetoken 147 {\upperleftsinglesixquote}  \defineactivetoken 148 {\textblacksquare}          -\defineactivetoken 149 {\bullet} +\defineactivetoken 149 {\textbullet}      % Changed by V.F. 07/02/2003 (was: \bullet)  \defineactivetoken 150 {\upperrightdoubleninequote}  \defineactivetoken 151 {\emdash}  \defineactivetoken 152 {\textnumero} -\defineactivetoken 153 {\texttrademark}            +\defineactivetoken 153 {\trademark}       % Changed by V.F. 07/02/2003 (was: \texttrademark)  \defineactivetoken 154 {\nonbreakablespace}  \defineactivetoken 155 {\rightguillemot}  \defineactivetoken 156 {\registered}            \defineactivetoken 157 {\leftguillemot} -\defineactivetoken 158 {\textperiodcentered}       +\defineactivetoken 158 {\periodcentered}  % Changed by V.F. 07/02/2003 (was: \textperiodcentered)  \defineactivetoken 159 {\textcurrency}  \defineactivetoken 164 {\cyrillicie}  \defineactivetoken 166 {\cyrillicii} @@ -628,17 +618,17 @@  \defineactivetoken 157 {\cyrillicEREV}  \defineactivetoken 158 {\cyrillicYU}  \defineactivetoken 159 {\cyrillicYA} -\defineactivetoken 160 {\dag} +\defineactivetoken 160 {\textdag}        % Changed by V.F. 07/02/2003 (was: dag)  \defineactivetoken 161 {\textdegree}      \defineactivetoken 162 {\textcent}       -\defineactivetoken 163 {\sterling} -\defineactivetoken 164 {\S} -\defineactivetoken 165 {\bullet} -\defineactivetoken 166 {\P} +\defineactivetoken 163 {\textsterling}   % Changed by V.F. 07/02/2003 (was: \sterling) +\defineactivetoken 164 {\sectionmark}    % Changed by V.F. 07/02/2003 (was: \S) +\defineactivetoken 165 {\textbullet}     % Changed by V.F. 07/02/2003 (was: \bullet} +\defineactivetoken 166 {\paragraphmark}  % Changed by V.F. 07/02/2003 (was: \P)  \defineactivetoken 167 {\cyrillicII}  \defineactivetoken 168 {\registered}  \defineactivetoken 169 {\copyright} -\defineactivetoken 170 {\texttrademark}  +\defineactivetoken 170 {\trademark}      % Changed by V.F. 07/02/2003 (was: \texttrademark}   \defineactivetoken 171 {\cyrillicDJE}  \defineactivetoken 172 {\cyrillicdje}  \defineactivetoken 174 {\'\cyrillicG} @@ -655,10 +645,10 @@  \defineactivetoken 191 {\cyrillicnje}  \defineactivetoken 192 {\cyrillicje}  \defineactivetoken 193 {\cyrillicDZE} -\defineactivetoken 196 {\florijn} +\defineactivetoken 196 {\textflorin}     % Changed by V.F. 07/02/2003 (was: \florijn)  \defineactivetoken 199 {\leftguillemot}  \defineactivetoken 200 {\rightguillemot} -\defineactivetoken 201 {\dots} +\defineactivetoken 201 {\textellipsis}   % Changed by V.F. 07/02/2003 (was: \dots)  \defineactivetoken 202 {\nonbreakablespace}  \defineactivetoken 203 {\cyrillicTSHE}  \defineactivetoken 204 {\cyrillictshe} @@ -667,7 +657,8 @@  \defineactivetoken 207 {\cyrillicdze}  \defineactivetoken 208 {\endash}  \defineactivetoken 209 {\emdash} -\defineactivetoken 210 {\upperleftsinglesixquote} +\defineactivetoken 210 {\upperleftdoublesixquote} % Changed by V.F. 07/02/2003 +                                                  %  (was: \upperleftsinglesixquote)  \defineactivetoken 211 {\upperrightdoubleninequote}  \defineactivetoken 212 {\upperleftsinglesixquote}  \defineactivetoken 213 {\upperrightsingleninequote} @@ -712,6 +703,18 @@  \defineactivetoken 253 {\cyrillicerev}  \defineactivetoken 254 {\cyrillicyu}  \defineactivetoken 255 {\textcurrency} +\defineactivetoken 173 {\mathematics{\neq}}     % Added by V.F. 07/02/2003 +\defineactivetoken 176 {\mathematics{\infty}}   % Added by V.F. 07/02/2003 +\defineactivetoken 177 {\textpm}                % Added by V.F. 07/02/2003 +\defineactivetoken 178 {\mathematics{\leq}}     % Added by V.F. 07/02/2003 +\defineactivetoken 179 {\mathematics{\geq}}     % Added by V.F. 07/02/2003 +\defineactivetoken 181 {\textmu}                % Added by V.F. 07/02/2003 +\defineactivetoken 182 {\mathematics{\partial}} % Added by V.F. 07/02/2003 +\defineactivetoken 194 {\textlognot}            % Added by V.F. 07/02/2003 +\defineactivetoken 195 {\textsurd}              % Added by V.F. 07/02/2003 +\defineactivetoken 197 {\mathematics{\approx}}  % Added by V.F. 07/02/2003 +\defineactivetoken 198 {\mathematics{\Delta}}   % Added by V.F. 07/02/2003 +\defineactivetoken 214 {\textdiv}               % Added by V.F. 07/02/2003  \stopregime @@ -749,17 +752,17 @@  \defineactivetoken 157 {\cyrillicEREV}  \defineactivetoken 158 {\cyrillicYU}  \defineactivetoken 159 {\cyrillicYA} -\defineactivetoken 160 {\dag} +\defineactivetoken 160 {\textdag}        % Changed by V.F. 07/02/2003 (was: \dag)  \defineactivetoken 161 {\textdegree}      \defineactivetoken 162 {\cyrillicGUP} -\defineactivetoken 163 {\sterling} -\defineactivetoken 164 {\S} -\defineactivetoken 165 {\bullet} -\defineactivetoken 166 {\P} +\defineactivetoken 163 {\textsterling}   % Changed by V.F. 07/02/2003 (was: \sterling) +\defineactivetoken 164 {\sectionmark}    % Changed by V.F. 07/02/2003 (was: \S) +\defineactivetoken 165 {\textbullet}     % Changed by V.F. 07/02/2003 (was: \bullet} +\defineactivetoken 166 {\paragraphmark}  % Changed by V.F. 07/02/2003 (was: \P)  \defineactivetoken 167 {\cyrillicII}  \defineactivetoken 168 {\registered}  \defineactivetoken 169 {\copyright} -\defineactivetoken 170 {\texttrademark}  +\defineactivetoken 170 {\trademark}      % Changed by V.F. 07/02/2003 (was: \texttrademark}   \defineactivetoken 171 {\cyrillicDJE}  \defineactivetoken 172 {\cyrillicdje}  \defineactivetoken 174 {\'\cyrillicG} @@ -777,10 +780,10 @@  \defineactivetoken 191 {\cyrillicnje}  \defineactivetoken 192 {\cyrillicje}  \defineactivetoken 193 {\cyrillicDZE} -\defineactivetoken 196 {\florijn} +\defineactivetoken 196 {\textflorin}     % Changed by V.F. 07/02/2003 (was: \florijn)  \defineactivetoken 199 {\leftguillemot}  \defineactivetoken 200 {\rightguillemot} -\defineactivetoken 201 {\dots} +\defineactivetoken 201 {\textellipsis}   % Changed by V.F. 07/02/2003 (was: \dots)  \defineactivetoken 202 {\nonbreakablespace}  \defineactivetoken 203 {\cyrillicTSHE}  \defineactivetoken 204 {\cyrillictshe} @@ -789,7 +792,8 @@  \defineactivetoken 207 {\cyrillicdze}  \defineactivetoken 208 {\endash}  \defineactivetoken 209 {\emdash} -\defineactivetoken 210 {\upperleftsinglesixquote} +\defineactivetoken 210 {\upperleftdoublesixquote} % Changed by V.F. 07/02/2003 +                                                  %  (was: \upperleftsinglesixquote)  \defineactivetoken 211 {\upperrightdoubleninequote}  \defineactivetoken 212 {\upperleftsinglesixquote}  \defineactivetoken 213 {\upperrightsingleninequote} @@ -834,6 +838,17 @@  \defineactivetoken 253 {\cyrillicerev}  \defineactivetoken 254 {\cyrillicyu}  \defineactivetoken 255 {\textcurrency} +\defineactivetoken 173 {\mathematics{\neq}}    % Added by V.F. 07/02/2003 +\defineactivetoken 176 {\mathematics{\infty}}  % Added by V.F. 07/02/2003 +\defineactivetoken 177 {\textpm}               % Added by V.F. 07/02/2003 +\defineactivetoken 178 {\mathematics{\leq}}    % Added by V.F. 07/02/2003 +\defineactivetoken 179 {\mathematics{\geq}}    % Added by V.F. 07/02/2003 +\defineactivetoken 181 {\textmu}               % Added by V.F. 07/02/2003 +\defineactivetoken 194 {\textlognot}           % Added by V.F. 07/02/2003 +\defineactivetoken 195 {\textsurd}             % Added by V.F. 07/02/2003 +\defineactivetoken 197 {\mathematics{\approx}} % Added by V.F. 07/02/2003 +\defineactivetoken 198 {\mathematics{\Delta}}  % Added by V.F. 07/02/2003 +\defineactivetoken 214 {\textdiv}              % Added by V.F. 07/02/2003  \stopregime diff --git a/tex/context/base/regi-mac.tex b/tex/context/base/regi-mac.tex index 6f5dd36fa..62d79a059 100644 --- a/tex/context/base/regi-mac.tex +++ b/tex/context/base/regi-mac.tex @@ -102,13 +102,10 @@  \defineactivetoken © {\copyright}  \defineactivetoken £ {\sterling} % ?  -\defineactivetoken ã {\char44\kern-.1em\char44 } % ?  -\defineactivetoken Ò {\char96\kern-.1em\char96 } % ?  -%defineactivetoken " {\char34 }                  % no   -\defineactivetoken Ô {\quoteleft}                % ?  -\defineactivetoken Õ {\char39 }                  % ?  -%defineactivetoken   {\guilsingleright}          % ?  -%defineactivetoken   {\guilsingleleft}           % ?  +\defineactivetoken ã {\quotedblleft } % {\char44\kern-.1em\char44 } % ?  +\defineactivetoken Ò {\quotedblbase } % {\char96\kern-.1em\char96 } % ?  +\defineactivetoken Ô {\quoteleft}                +\defineactivetoken Õ {\char39 }       % ?             \defineactivetoken Ç {\leftguillemot}  \defineactivetoken È {\rightguillemot} diff --git a/tex/context/base/regi-win.tex b/tex/context/base/regi-win.tex index e5082cb0a..36fd73f9d 100644 --- a/tex/context/base/regi-win.tex +++ b/tex/context/base/regi-win.tex @@ -3,7 +3,7 @@  %D        version=1997.08.29,  %D          title=\CONTEXT\ Encoding Macros,  %D       subtitle=Windows 1252 ANSI keys, -%D         author={Tobias Burnus \& Hans Hagen}, +%D         author={Tobias Burnus \& Hans Hagen \& Victor Figurnov},  %D           date=\currentdate,  %D      copyright=PRAGMA-ADE]  %C @@ -14,36 +14,72 @@  %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 128 {\texteuro} +\defineactivetoken 129 {\missingglyph} +\defineactivetoken 130 {\lowerleftsingleninequote} +\defineactivetoken 131 {\textflorin} +\defineactivetoken 132 {\lowerleftdoubleninequote}  \defineactivetoken 133 {\dots} -\defineactivetoken 134 {\dag} -\defineactivetoken 135 {\ddag} +\defineactivetoken 134 {\textdag} +\defineactivetoken 135 {\textddag} +\defineactivetoken 136 {\textcircumflex} +\defineactivetoken 137 {\perthousand} +\defineactivetoken 138 {\Scaron}  \defineactivetoken 139 {\leftsubguillemot} +\defineactivetoken 140 {\OEligature} +\defineactivetoken 141 {\missingglyph} +\defineactivetoken 142 {\missingglyph} +\defineactivetoken 143 {\missingglyph} +\defineactivetoken 144 {\missingglyph}  \defineactivetoken 145 {\upperleftsinglesixquote} - -\defineactivetoken 146 {\char39 } -\defineactivetoken 147 {\char96\kern-.1em\char96 } -\defineactivetoken 148 {\char34 } -\defineactivetoken 150 {--} -\defineactivetoken 151 {---} +\defineactivetoken 146 {\upperrightsingleninequote} +\defineactivetoken 147 {\upperleftdoublesixquote} +\defineactivetoken 148 {\upperrightdoubleninequote} +\defineactivetoken 149 {\textbullet} +\defineactivetoken 150 {\endash} +\defineactivetoken 151 {\emdash} +\defineactivetoken 152 {\texttilde} +\defineactivetoken 153 {\trademark} +\defineactivetoken 154 {\scaron}  \defineactivetoken 155 {\rightsubguillemot} -\defineactivetoken 161 {!`} -\defineactivetoken 163 {\sterling} -\defineactivetoken 167 {\S} +\defineactivetoken 156 {\oeligature} +\defineactivetoken 157 {\missingglyph} +\defineactivetoken 158 {\missingglyph} +\defineactivetoken 159 {\Ydiaeresis} +\defineactivetoken 160 {\nonbreakablespace} +\defineactivetoken 161 {\exclamdown} +\defineactivetoken 162 {\textcent} +\defineactivetoken 163 {\textsterling} +\defineactivetoken 164 {\textcurrency} +\defineactivetoken 165 {\textyen} +\defineactivetoken 166 {\textbrokenbar} +\defineactivetoken 167 {\sectionmark} +\defineactivetoken 168 {\textdiaeresis}  \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 170 {\ordfeminine} +\defineactivetoken 171 {\leftguillemot} +\defineactivetoken 172 {\textlognot} +\defineactivetoken 173 {\hyphen}   +\defineactivetoken 174 {\registered} +\defineactivetoken 175 {\textmacron}        +\defineactivetoken 176 {\textdegree} +\defineactivetoken 177 {\textpm} +\defineactivetoken 178 {\twosuperior} +\defineactivetoken 179 {\threesuperior} +\defineactivetoken 180 {\textacute} +\defineactivetoken 181 {\textmu} +\defineactivetoken 182 {\paragraphmark} +\defineactivetoken 183 {\periodcentered} +\defineactivetoken 184 {\textcedilla} +\defineactivetoken 185 {\onesuperior} +\defineactivetoken 186 {\ordmasculine} +\defineactivetoken 187 {\rightguillemot} +\defineactivetoken 188 {\onequarter} +\defineactivetoken 189 {\onehalf} +\defineactivetoken 190 {\threequarter} +\defineactivetoken 191 {\questiondown}  \defineactivetoken 192 {\Agrave}  \defineactivetoken 193 {\Aacute}  \defineactivetoken 194 {\Acircumflex} @@ -60,23 +96,22 @@  \defineactivetoken 205 {\Iacute}  \defineactivetoken 206 {\Icircumflex}  \defineactivetoken 207 {\Idiaeresis} - +\defineactivetoken 208 {\Eth}  \defineactivetoken 209 {\Ntilde}  \defineactivetoken 210 {\Ograve}  \defineactivetoken 211 {\Oacute}  \defineactivetoken 212 {\Ocircumflex}  \defineactivetoken 213 {\Otilde}  \defineactivetoken 214 {\Odiaeresis} -\defineactivetoken 215 {\OEligature} +\defineactivetoken 215 {\textmultiply}      \defineactivetoken 216 {\Ostroke}  \defineactivetoken 217 {\Ugrave}  \defineactivetoken 218 {\Uacute}  \defineactivetoken 219 {\Ucircumflex}  \defineactivetoken 220 {\Udiaeresis}  \defineactivetoken 221 {\Ygrave} - +\defineactivetoken 222 {\thorn}             \defineactivetoken 223 {\ssharp} -  \defineactivetoken 224 {\agrave}  \defineactivetoken 225 {\aacute}  \defineactivetoken 226 {\acircumflex} @@ -93,21 +128,21 @@  \defineactivetoken 237 {\iacute}  \defineactivetoken 238 {\icircumflex}  \defineactivetoken 239 {\idiaeresis} - +\defineactivetoken 240 {\eth}               \defineactivetoken 241 {\ntilde}  \defineactivetoken 242 {\ograve}  \defineactivetoken 243 {\oacute}  \defineactivetoken 244 {\ocircumflex}  \defineactivetoken 245 {\otilde}  \defineactivetoken 246 {\odiaeresis} -\defineactivetoken 247 {\oeligature} +\defineactivetoken 247 {\textdiv}           \defineactivetoken 248 {\ostroke}  \defineactivetoken 249 {\ugrave}  \defineactivetoken 250 {\uacute}  \defineactivetoken 251 {\ucircumflex}  \defineactivetoken 252 {\udiaeresis}  \defineactivetoken 253 {\ygrave} - +\defineactivetoken 254 {\Thorn}             \defineactivetoken 255 {\ydiaeresis}  \stopregime diff --git a/tex/context/base/spec-tpd.tex b/tex/context/base/spec-tpd.tex index 01bd94077..2bc130b00 100644 --- a/tex/context/base/spec-tpd.tex +++ b/tex/context/base/spec-tpd.tex @@ -531,7 +531,7 @@     \pdfliteral       {q 0 w \MPclippath\space W n}} -\definespecial\dostopclipping% +\definespecial\dostopclipping    {\pdfliteral{Q n}}  %D \macros diff --git a/tex/context/base/supp-ali.tex b/tex/context/base/supp-ali.tex index 30f9d25fe..87a844e7f 100644 --- a/tex/context/base/supp-ali.tex +++ b/tex/context/base/supp-ali.tex @@ -35,6 +35,8 @@  \chardef\characteralignmentmode=4  \chardef\characteralignmentslot=1 +\newtoks\@@characteralignlst +  \let\afterassignwidth \!!zeropoint  \let\beforeassignwidth\!!zeropoint @@ -46,26 +48,68 @@    {\popcharacteralign     \expanded{\dosetfirstpasscharacteralign{\alignmentcharacter}}} +% \def\dosetfirstpasscharacteralign#1% +%   {\def\checkalignment##1% +%      {\popcharacteralign +%       \let\\\empty +%       \setbox\scratchbox\hbox{#1}% +%       \edef\characterassignwidth{\the\wd\scratchbox}% +%       \setbox\scratchbox\hbox{}% +%       \docheckalignment#1##1#1\relax\relax +%       \scratchdimen-\wd\scratchbox +%       \setbox\scratchbox\hbox{##1}% +%       \advance\scratchdimen \wd\scratchbox +%       \ifdim\scratchdimen>\beforeassignwidth\relax +%         \edef\beforeassignwidth{\the\scratchdimen}% +%       \fi +%       \ifdim\scratchdimen=\zeropoint +%         \setbox\scratchbox\hbox{##1}% +%         \scratchdimen\wd\scratchbox +%         \ifcase\characteralignmentmode +%           % do nothing  +%         \else\ifnum\characteralignmentmode<3 +%           \advance\scratchdimen \characterassignwidth +%           \ifdim\scratchdimen>\beforeassignwidth\relax +%             \edef\beforeassignwidth{\the\scratchdimen}% +%           \fi +%         \else +%           \ifdim\scratchdimen>\afterassignwidth\relax +%             \edef\afterassignwidth{\the\scratchdimen}% +%           \fi +%         \fi\fi +%       \fi +%       \pushcharacteralign}% +%    \def\docheckalignment##1#1##2##3\relax +%      {\ifx##2\relax +%         \setbox\scratchbox\hbox{##1}% +%         \ifdim\wd\scratchbox>\afterassignwidth +%           \edef\afterassignwidth{\the\wd\scratchbox}% +%         \fi +%       \else +%         \docheckalignment##2##3\relax +%       \fi}} +  \def\dosetfirstpasscharacteralign#1%    {\def\checkalignment##1%       {\popcharacteralign        \let\\\empty        \setbox\scratchbox\hbox{#1}%        \edef\characterassignwidth{\the\wd\scratchbox}% -      \setbox\scratchbox\hbox{}% -      \docheckalignment#1##1#1\relax\relax +      \setbox\scratchbox\null +%      \docheckalignment#1##1#1\relax\relax +      \docheckalignment##1#1\relax\relax        \scratchdimen-\wd\scratchbox -      \setbox\scratchbox\hbox{##1}% +      \setbox\scratchbox\hbox{\ignorespaces##1\unskip}%        \advance\scratchdimen \wd\scratchbox        \ifdim\scratchdimen>\beforeassignwidth\relax          \edef\beforeassignwidth{\the\scratchdimen}%        \fi        \ifdim\scratchdimen=\zeropoint -        \setbox\scratchbox\hbox{##1}% +        \setbox\scratchbox\hbox{\ignorespaces##1\unskip}%          \scratchdimen\wd\scratchbox          \ifcase\characteralignmentmode            % do nothing  -        \else\ifnum\characteralignmentmode<3 +        \else\ifnum\characteralignmentmode<\plusthree            \advance\scratchdimen \characterassignwidth            \ifdim\scratchdimen>\beforeassignwidth\relax              \edef\beforeassignwidth{\the\scratchdimen}% @@ -79,36 +123,87 @@        \pushcharacteralign}%     \def\docheckalignment##1#1##2##3\relax       {\ifx##2\relax -        \setbox\scratchbox\hbox{##1}% +        \setbox\scratchbox\hbox{\ignorespaces##1\unskip}%          \ifdim\wd\scratchbox>\afterassignwidth            \edef\afterassignwidth{\the\wd\scratchbox}%          \fi        \else -        \docheckalignment##2##3\relax +        \docheckalignment##2##3\relax\relax        \fi}}  \def\setsecondpasscharacteralign    {\popcharacteralign     \expanded{\dosetsecondpasscharacteralign{\alignmentcharacter}}} +% \def\dosetsecondpasscharacteralign#1% +%   {\def\checkalignment##1% +%      {\popcharacteralign +%       \let\\\empty % beware, no grouping  +%       \setbox\scratchbox\hbox{#1}% +%       \edef\characterassignwidth{\the\wd\scratchbox}% +%       \setbox\scratchbox\hbox{}% +%       % new 12,34 vs 10\\ where 10 aligns on 12 if #1 = ,  +%       \ifcase\characteralignmentslot +%         \docheckalignment#1##1#1\relax\relax +%         \scratchdimen\wd\scratchbox +%         \setbox\scratchbox\hbox{##1\unskip}% +%       \else +%         \def\\{#1}% +%         \expanded{\docheckalignment#1##1#1\relax\relax}% +%         \scratchdimen\wd\scratchbox +%         \setbox\scratchbox\hbox +%           {\def\\{\hphantom{#1}}##1}%      +%       \fi +%       \ifdim\scratchdimen=\wd\scratchbox +%         \ifcase\characteralignmentmode +%           \noindent\box\scratchbox +%         \else +%           \noindent\hbox +%             {\dontcomplain +%              \hbox to \beforeassignwidth +%                {\ifcase\characteralignmentmode\or +%                   \box\scratchbox\hss +%                 \or +%                   \hss\box\scratchbox\hskip\characterassignwidth +%                 \or +%                   \hss\rlap{\box\scratchbox}% +%                 \or +%                   \hss\rlap{\hbox to \afterassignwidth{\hss\box\scratchbox}}% +%                 \fi}% +%              \hskip\afterassignwidth}% +%         \fi +%       \else +%         \noindent\hbox +%           {\hbox to \beforeassignwidth +%              {\hss\box\scratchbox\hskip-\scratchdimen}% +%            \hskip\afterassignwidth}% +%       \fi}% +%    \def\docheckalignment##1#1##2##3\relax +%      {\ifx##2\relax +%         \setbox\scratchbox\hbox{##1}% +%       \else +%         \docheckalignment##2##3\relax +%       \fi}} +  \def\dosetsecondpasscharacteralign#1%    {\def\checkalignment##1%       {\popcharacteralign        \let\\\empty % beware, no grouping         \setbox\scratchbox\hbox{#1}%        \edef\characterassignwidth{\the\wd\scratchbox}% -      \setbox\scratchbox\hbox{}% +      \setbox\scratchbox\null        % new 12,34 vs 10\\ where 10 aligns on 12 if #1 = ,         \ifcase\characteralignmentslot -        \docheckalignment#1##1#1\relax\relax +%       \docheckalignment#1##1#1\relax\relax +        \docheckalignment##1#1\relax\relax          \scratchdimen\wd\scratchbox -        \setbox\scratchbox\hbox{##1\unskip}% +        \setbox\scratchbox\hbox{\ignorespaces##1\unskip}%        \else          \def\\{#1}% -        \expanded{\docheckalignment#1##1#1\relax\relax}% +%        \expanded{\docheckalignment#1##1#1\relax\relax}% +        \expanded{\docheckalignment##1#1\relax\relax}%          \scratchdimen\wd\scratchbox -        \setbox\scratchbox\hbox -          {\def\\{\hphantom{#1}}##1}%      +        \setbox\scratchbox\hbox{\def\\{\hphantom{#1}}\ignorespaces##1\unskip}%             \fi        \ifdim\scratchdimen=\wd\scratchbox          \ifcase\characteralignmentmode @@ -136,15 +231,19 @@        \fi}%     \def\docheckalignment##1#1##2##3\relax       {\ifx##2\relax -        \setbox\scratchbox\hbox{##1}% +        \setbox\scratchbox\hbox{\ignorespaces##1\unskip}%        \else -        \docheckalignment##2##3\relax +        \docheckalignment##2##3\relax\relax        \fi}}  % provide a means to use multiple alignments mixed  \def\pushcharacteralign -  {\setxvalue{@cac@\alignmentclass}{\noexpand\do +  {\ifundefined{@cac@\alignmentclass}% +     \doglobal +       \appendetoks\noexpand\do{\alignmentclass}\to\@@characteralignlst +   \fi +   \setxvalue{@cac@\alignmentclass}{\noexpand\do       {\afterassignwidth}{\beforeassignwidth}{\alignmentcharacter}}}  \def\popcharacteralign @@ -152,7 +251,12 @@       {\def\afterassignwidth  {##1}%        \def\beforeassignwidth {##2}%        \def\alignmentcharacter{##3}}% -   \getvalue{@cac@\alignmentclass}} +   \executeifdefined{@cac@\alignmentclass}\donothing} +     +\def\resetcharacteralign % does not work well nested  +  {\def\do##1{\letbeundefined{@cac@##1}}% +   \the\@@characteralignlst +   \global\@@characteralignlst\emptytoks}   \long\def\startcharacteralign#1\stopcharacteralign    {\bgroup diff --git a/tex/context/base/supp-fil.tex b/tex/context/base/supp-fil.tex index db33a050d..396718e6b 100644 --- a/tex/context/base/supp-fil.tex +++ b/tex/context/base/supp-fil.tex @@ -100,6 +100,18 @@  \def\writeln#1{\write#1{}} +%D New! + +\def\doiffileexistselse#1% +  {\immediate\openin\scratchread=#1\relax +   \ifeof\scratchread +     \immediate\closein\scratchread +     \expandafter\secondoftwoarguments +   \else +     \immediate\closein\scratchread +     \expandafter\firstoftwoarguments +   \fi} +  %D \macros  %D   {doprocessfile,fileline,fileprocessedtrue,dofinishfile}  %D @@ -260,42 +272,102 @@  \def\maxreadlevel{3} +% \def\doreadfile#1#2#3#4% +%   {\sanitizefilename#2\to\readfilename +%    \checkfilename\readfilename +%    \ifcase\kindoffile +%      \iftracefiles\writestatus\m!systems{searching for \readfilename\space on #1}\fi +%      % not a full path or url, check for existence  +%      \doifelsenothing{#1} +%        {\def\next{\redoreadfile\readfilename{#3}{#4}}}% +%        {\def\next{\redoreadfile{\pathplusfile{#1}{\readfilename}}{#3}{#4}}}% +%    \else +%      % a full path or url, no further checking done   +%      \iftracefiles\writestatus\m!systems{assuming present \readfilename}\fi +%      \def\next{#3\dodoreadfile}% +%    \fi +%    \next} + +\newconditional\trackfilenames \settrue\trackfilenames  + +\let\trackedfilename\empty +  \def\doreadfile#1#2#3#4%    {\sanitizefilename#2\to\readfilename -   \checkfilename\readfilename -   \ifcase\kindoffile -     % not a full path or url, check for existence  -     \doifelsenothing{#1} -       {\def\next{\redoreadfile\readfilename{#3}{#4}}}% -       {\def\next{\redoreadfile{\pathplusfile{#1}{\readfilename}}{#3}{#4}}}% +   \let\trackedfilename\readfilename  +   \ifconditional\trackfilenames +     \ifundefined{fn..\trackedfilename}\donetrue\else\donefalse\fi +   \else +     \donetrue +   \fi  +   \ifdone +     \checkfilename\readfilename +     \ifcase\kindoffile +       \iftracefiles\writestatus\m!systems{searching for \readfilename\space on #1}\fi +       % not a full path or url, check for existence  +       \doifelsenothing{#1} +         {\def\next{\redoreadfile\readfilename{#3}{#4}}}% +         {\def\next{\redoreadfile{\pathplusfile{#1}{\readfilename}}{#3}{#4}}}% +     \else +       % a full path or url, no further checking done   +       \doiffileexistselse\readfilename +         {\iftracefiles\writestatus\m!systems{located \readfilename}\fi +          \def\next{#3\dodoreadfile}}% +         {\iftracefiles\writestatus\m!systems{not found \readfilename}\fi +          \def\next{#4}}% +     \fi     \else -     % a full path or url, no further checking done   +     \edef\readfilename{\getvalue{fn..\readfilename}}% +     \iftracefiles\writestatus\m!systems{already located \readfilename}\fi       \def\next{#3\dodoreadfile}%     \fi     \next} +% \def\redoreadfile#1#2#3% +%   {\immediate\openin\scratchread=#1\relax +%    \ifeof\scratchread +%      \iftracefiles\writestatus\m!systems{cannot locate #1}\fi +%      \immediate\closein\scratchread +%      \decrement\readlevel\relax +%      \ifnum\readlevel>\zerocount +%        \edef\readfilename{\pathplusfile{\f!parentpath}{\readfilename}}% +%        \def\next{\redoreadfile\readfilename{#2}{#3}}% +%      \else +%        \def\next{#3}% +%      \fi +%    \else +%      \immediate\closein\scratchread  +%      \edef\readfilename{#1}% +%      \iftracefiles\writestatus\m!systems{#1 located}\fi +%      \def\next{#2\dodoreadfile}% +%    \fi +%    \next}                +  \def\redoreadfile#1#2#3% -  {\immediate\openin\scratchread=#1\relax -   \ifeof\scratchread -     \iftracefiles\writestatus\m!systems{cannot locate #1}\fi -     \immediate\closein\scratchread -     \decrement\readlevel\relax -     \ifnum\readlevel>\zerocount -       \edef\readfilename{\pathplusfile{\f!parentpath}{\readfilename}}% -       \def\next{\redoreadfile\readfilename{#2}{#3}}% -     \else -       \def\next{#3}% -     \fi -   \else -     \immediate\closein\scratchread  -     \edef\readfilename{#1}% -     \iftracefiles\writestatus\m!systems{#1 located}\fi -     \def\next{#2\dodoreadfile}% -   \fi +  {\doiffileexistselse{#1}% +     {\edef\readfilename{#1}% +      \iftracefiles\writestatus\m!systems{#1 located}\fi +      \def\next{#2\dodoreadfile}}% +     {\iftracefiles\writestatus\m!systems{cannot locate #1}\fi +      \decrement\readlevel\relax +      \ifnum\readlevel>\zerocount +        \edef\readfilename{\pathplusfile{\f!parentpath}{\readfilename}}% +        \def\next{\redoreadfile\readfilename{#2}{#3}}% +      \else +        \def\next{#3}% +      \fi}%     \next}                +% \def\dodoreadfile % we provide hooks, for instance for \enableXML  +%   {\the\everybeforereadfile  +%    \normalinput\readfilename\relax +%    \the\everyafterreadfile}  +  \def\dodoreadfile % we provide hooks, for instance for \enableXML  -  {\the\everybeforereadfile  +  {\ifconditional\trackfilenames +     \setxvalue{fn..\trackedfilename}{\readfilename}% +   \fi +   \the\everybeforereadfile      \normalinput\readfilename\relax     \the\everyafterreadfile}  @@ -335,8 +407,13 @@  %D \type{\readsysfile} is not bound to the current directory  %D and obeys the \TEX\ implementation. +% \def\readsysfile#1% current path, obeys tex search  +%   {\let\readlevel\maxreadlevel +%   %\doreadfile{#1}} +%    \doreadfile\empty{#1}} +  \def\readsysfile#1% current path, obeys tex search  -  {\let\readlevel\maxreadlevel +  {\newcounter\readlevel    %\doreadfile{#1}}     \doreadfile\empty{#1}} diff --git a/tex/context/base/supp-ini.tex b/tex/context/base/supp-ini.tex index cc114de83..96639d108 100644 --- a/tex/context/base/supp-ini.tex +++ b/tex/context/base/supp-ini.tex @@ -30,7 +30,6 @@  \catcode`E=\@@endgroup  \catcode`.=\@@escape -  .catcode `.{ 12 .xdef .letteropenbrace       B.string{E  .catcode `.} 12 .xdef .letterclosebrace      B.string}E  .catcode `.& 12 .xdef .letterampersand       B.string&E diff --git a/tex/context/base/supp-mps.tex b/tex/context/base/supp-mps.tex index c8559f1fd..05442dc25 100644 --- a/tex/context/base/supp-mps.tex +++ b/tex/context/base/supp-mps.tex @@ -205,7 +205,8 @@  \long\def\startMPinclusions#1\stopMPinclusions    {\long\def\theMPinclusions -     {\@EA\expanded\@EA{\@EA\writeMPgraphic\@EA{\the\MPinitializations;}}% +     {% \expanded !  +      \@EA\expanded\@EA{\@EA\writeMPgraphic\@EA{\the\MPinitializations;}}%        \writeMPgraphic{#1}}}  \long\def\MPinclusions#1% @@ -866,14 +867,15 @@    \ifx\undefined\interactionmode \chardef\interactionmode=255 \fi -  \def\MPOSTbatchswitch {-int=batchmode} -  \def\MPOSTformatswitch{-progname=mpost -mem=} -  \def\MPOSTdriver      {dvips} +  \def\MPOSTbatchswitch   {-int=batchmode} +  \def\MPOSTnonstopswitch {-int=nonstopmode} +  \def\MPOSTformatswitch  {-progname=mpost -mem=} +  \def\MPOSTdriver        {dvips}    \def\executeMPOST#1%      {mpost  -      \ifcase\interactionmode \MPOSTbatchswitch\space \fi -      \ifuseMETAFUNformat \MPOSTformatswitch metafun \fi #1} +      \ifcase\interactionmode\MPOSTbatchswitch\or\MPOSTnonstopswitch\fi +      \space\ifuseMETAFUNformat \MPOSTformatswitch metafun \fi #1}    \def\executeMPTEX#1%      {texexec @@ -894,6 +896,10 @@  \fi +%D The batchmode and nonstopmode (introduced in 2003 for  +%D Patrick Gundlach) switches may differ per binary and are  +%D supported by \TEXEXEC. +  %D \macros  %D   {insertMPfile}  %D diff --git a/tex/context/base/syst-gen.tex b/tex/context/base/syst-gen.tex index 40f8701e2..4e8e95275 100644 --- a/tex/context/base/syst-gen.tex +++ b/tex/context/base/syst-gen.tex @@ -412,6 +412,34 @@    {\long\xdef\@@expanded{\noexpand#1}\@@expanded}  %D \macros +%D   {safeexpanded,everysafeexpanded} +%D +%D In addition we provide:  + +\newtoks\everysafeexpanded + +\long\def\safeexpanded#1% +  {\begingroup +   \the\everysafeexpanded\long\xdef\@@expanded{\noexpand#1}% +   \endgroup +   \@@expanded} + +\def\safeedef#1#2% +  {\begingroup +   \the\everysafeexpanded\long\xdef\@@expanded{\noexpand#2}% +   \endgroup +   \let#1\@@expanded} + +\def\safexdef#1#2% +  {\begingroup +   \the\everysafeexpanded\long\xdef\@@expanded{\noexpand#2}% +   \endgroup +   \global\let#1\@@expanded} + +%D You can append protective measures to the token register if  +%D needed, as we will do later.  + +%D \macros  %D   {expandoneargafter,expandtwoargsafter}  %D  %D These two commands make macros more readable by hiding a diff --git a/tex/context/base/type-enc.tex b/tex/context/base/type-enc.tex index 12cd9ac37..10441a464 100644 --- a/tex/context/base/type-enc.tex +++ b/tex/context/base/type-enc.tex @@ -209,6 +209,24 @@    \definefontsynonym [cmvtt10]  [plvtt10]  [encoding=pl0]  \stoptypescript +%D {\em Comments by Victor Figurnov:} the wcmb10, wcmbx10, +%D \unknown\ fonts below are taken from the Paradissa +%D collection by Basil Malyshev. These fonts don't conform t2a +%D encoding but are in MS Windows Cyrillic codepage 1251 +%D encoding. These fonts contain only 33 russian letters in +%D upper and lower case, the number sign, and guillemots. But +%D even among these characters only the basic 32 russian +%D letters (in upper and lower case) will be typeset correctly +%D with this definition. The letters cyrillicYO and +%D cyrillicyo, as well as number sign (textnumero) and +%D guillemots won't be typeset properly, because these symbols +%D have different positions in t2a and MS CP1251 encodings.  +%D +%D I think that the russian lh fonts and|/|or cm-super provide  +%D better alternatives (type1). Therefore, the names below  +%D match those of cm-super (\type {0NNN} instead of \type  +%D {NNN}, i.e.\ four digit numbers). +  \starttypescript [all] [computer-modern] [cyr]    \definefontsynonym [cmb10]    [wcmb10]    [encoding=t2a]    \definefontsynonym [cmbsy10]  [wcmbsy10]  [encoding=t2a] @@ -270,57 +288,57 @@    \definefontsynonym [cmb10]    [larb1000]   [encoding=t2a]    \definefontsynonym [cmbx10]   [labx1000]   [encoding=t2a]    \definefontsynonym [cmbx12]   [labx1200]   [encoding=t2a] -  \definefontsynonym [cmbx5]    [labx500]    [encoding=t2a] -  \definefontsynonym [cmbx6]    [labx600]    [encoding=t2a] -  \definefontsynonym [cmbx7]    [labx700]    [encoding=t2a] -  \definefontsynonym [cmbx8]    [labx800]    [encoding=t2a] -  \definefontsynonym [cmbx9]    [labx900]    [encoding=t2a] +  \definefontsynonym [cmbx5]    [labx0500]   [encoding=t2a]  +  \definefontsynonym [cmbx6]    [labx0600]   [encoding=t2a]  +  \definefontsynonym [cmbx7]    [labx0700]   [encoding=t2a]  +  \definefontsynonym [cmbx8]    [labx0800]   [encoding=t2a]  +  \definefontsynonym [cmbx9]    [labx0900]   [encoding=t2a]     \definefontsynonym [cmbxsl10] [labl1000]   [encoding=t2a]    \definefontsynonym [cmbxti10] [labi1000]   [encoding=t2a]    \definefontsynonym [cmcsc10]  [lacc1000]   [encoding=t2a]    \definefontsynonym [cmdunh10] [ladh1000]   [encoding=t2a]    \definefontsynonym [cmff10]   [laff1000]   [encoding=t2a]    \definefontsynonym [cmfi10]   [lafi1000]   [encoding=t2a] -  \definefontsynonym [cmfib8]   [lafb800]    [encoding=t2a] - %\definefontsynonym [cminch]   [lainch00]   [encoding=t2a]  +  \definefontsynonym [cmfib8]   [lafb0800]   [encoding=t2a]  + %\definefontsynonym [cminch]   [lainch00]   [encoding=t2a]    \definefontsynonym [cmitt10]  [lait1000]   [encoding=t2a]    \definefontsynonym [cmr10]    [larm1000]   [encoding=t2a]    \definefontsynonym [cmr12]    [larm1200]   [encoding=t2a]    \definefontsynonym [cmr17]    [larm1700]   [encoding=t2a] -  \definefontsynonym [cmr5]     [larm500]    [encoding=t2a] -  \definefontsynonym [cmr6]     [larm600]    [encoding=t2a] -  \definefontsynonym [cmr7]     [larm700]    [encoding=t2a] -  \definefontsynonym [cmr8]     [larm800]    [encoding=t2a] -  \definefontsynonym [cmr9]     [larm900]    [encoding=t2a] +  \definefontsynonym [cmr5]     [larm0500]   [encoding=t2a]  +  \definefontsynonym [cmr6]     [larm0600]   [encoding=t2a]  +  \definefontsynonym [cmr7]     [larm0700]   [encoding=t2a]  +  \definefontsynonym [cmr8]     [larm0800]   [encoding=t2a]  +  \definefontsynonym [cmr9]     [larm0900]   [encoding=t2a]     \definefontsynonym [cmsl10]   [lasl1000]   [encoding=t2a]    \definefontsynonym [cmsl12]   [lasl1200]   [encoding=t2a] -  \definefontsynonym [cmsl8]    [lasl800]    [encoding=t2a] -  \definefontsynonym [cmsl9]    [lasl900]    [encoding=t2a] +  \definefontsynonym [cmsl8]    [lasl0800]   [encoding=t2a]  +  \definefontsynonym [cmsl9]    [lasl0900]   [encoding=t2a]     \definefontsynonym [cmsltt10] [last1000]   [encoding=t2a]    \definefontsynonym [cmss10]   [lass1000]   [encoding=t2a]    \definefontsynonym [cmss12]   [lass1200]   [encoding=t2a]    \definefontsynonym [cmss17]   [lass1700]   [encoding=t2a] -  \definefontsynonym [cmss8]    [lass800]    [encoding=t2a] -  \definefontsynonym [cmss9]    [lass900]    [encoding=t2a] +  \definefontsynonym [cmss8]    [lass0800]   [encoding=t2a]  +  \definefontsynonym [cmss9]    [lass0900]   [encoding=t2a]     \definefontsynonym [cmssbx10] [lasx1000]   [encoding=t2a]   %\definefontsynonym [cmssdc10] [lassdc1000] [encoding=t2a]    \definefontsynonym [cmssi10]  [lasi1000]   [encoding=t2a]    \definefontsynonym [cmssi12]  [lasi1200]   [encoding=t2a]    \definefontsynonym [cmssi17]  [lasi1700]   [encoding=t2a] -  \definefontsynonym [cmssi8]   [lasi800]    [encoding=t2a] -  \definefontsynonym [cmssi9]   [lasi900]    [encoding=t2a] -  \definefontsynonym [cmssq8]   [lass800]    [encoding=t2a] % ssq->ss -  \definefontsynonym [cmssqi8]  [lasi800]    [encoding=t2a] % ssq->ss +  \definefontsynonym [cmssi8]   [lasi0800]   [encoding=t2a]  +  \definefontsynonym [cmssi9]   [lasi0900]   [encoding=t2a]  +  \definefontsynonym [cmssq8]   [lass0800]   [encoding=t2a]  +  \definefontsynonym [cmssqi8]  [lasi0800]   [encoding=t2a]     \definefontsynonym [cmtcsc10] [latc1000]   [encoding=t2a]    \definefontsynonym [cmti10]   [lati1000]   [encoding=t2a]    \definefontsynonym [cmti12]   [lati1200]   [encoding=t2a] -  \definefontsynonym [cmti7]    [lati700]    [encoding=t2a] -  \definefontsynonym [cmti8]    [lati800]    [encoding=t2a] -  \definefontsynonym [cmti9]    [lati900]    [encoding=t2a] +  \definefontsynonym [cmti7]    [lati0700]   [encoding=t2a]  +  \definefontsynonym [cmti8]    [lati0800]   [encoding=t2a]  +  \definefontsynonym [cmti9]    [lati0900]   [encoding=t2a]     \definefontsynonym [cmtt10]   [latt1000]   [encoding=t2a]    \definefontsynonym [cmtt12]   [latt1200]   [encoding=t2a] -  \definefontsynonym [cmtt8]    [latt800]    [encoding=t2a] -  \definefontsynonym [cmtt9]    [latt900]    [encoding=t2a] +  \definefontsynonym [cmtt8]    [latt0800]   [encoding=t2a]  +  \definefontsynonym [cmtt9]    [latt0900]   [encoding=t2a]     \definefontsynonym [cmu10]    [laui1000]   [encoding=t2a]    \definefontsynonym [cmvtt10]  [lavt1000]   [encoding=t2a]  \stoptypescript @@ -329,57 +347,57 @@    \definefontsynonym [cmb10]    [lbrb1000]   [encoding=t2b]    \definefontsynonym [cmbx10]   [lbbx1000]   [encoding=t2b]    \definefontsynonym [cmbx12]   [lbbx1200]   [encoding=t2b] -  \definefontsynonym [cmbx5]    [lbbx500]    [encoding=t2b] -  \definefontsynonym [cmbx6]    [lbbx600]    [encoding=t2b] -  \definefontsynonym [cmbx7]    [lbbx700]    [encoding=t2b] -  \definefontsynonym [cmbx8]    [lbbx800]    [encoding=t2b] -  \definefontsynonym [cmbx9]    [lbbx900]    [encoding=t2b] +  \definefontsynonym [cmbx5]    [lbbx0500]   [encoding=t2b]  +  \definefontsynonym [cmbx6]    [lbbx0600]   [encoding=t2b]  +  \definefontsynonym [cmbx7]    [lbbx0700]   [encoding=t2b]  +  \definefontsynonym [cmbx8]    [lbbx0800]   [encoding=t2b]  +  \definefontsynonym [cmbx9]    [lbbx0900]   [encoding=t2b]     \definefontsynonym [cmbxsl10] [lbbl1000]   [encoding=t2b]    \definefontsynonym [cmbxti10] [lbbi1000]   [encoding=t2b]    \definefontsynonym [cmcsc10]  [lbcc1000]   [encoding=t2b]    \definefontsynonym [cmdunh10] [lbdh1000]   [encoding=t2b]    \definefontsynonym [cmff10]   [lbff1000]   [encoding=t2b]    \definefontsynonym [cmfi10]   [lbfi1000]   [encoding=t2b] -  \definefontsynonym [cmfib8]   [lbfb800]    [encoding=t2b] - %\definefontsynonym [cminch]   [lbinch00]   [encoding=t2b]  +  \definefontsynonym [cmfib8]   [lbfb0800]   [encoding=t2b]  + %\definefontsynonym [cminch]   [lbinch00]   [encoding=t2b]    \definefontsynonym [cmitt10]  [lbit1000]   [encoding=t2b]    \definefontsynonym [cmr10]    [lbrm1000]   [encoding=t2b]    \definefontsynonym [cmr12]    [lbrm1200]   [encoding=t2b]    \definefontsynonym [cmr17]    [lbrm1700]   [encoding=t2b] -  \definefontsynonym [cmr5]     [lbrm500]    [encoding=t2b] -  \definefontsynonym [cmr6]     [lbrm600]    [encoding=t2b] -  \definefontsynonym [cmr7]     [lbrm700]    [encoding=t2b] -  \definefontsynonym [cmr8]     [lbrm800]    [encoding=t2b] -  \definefontsynonym [cmr9]     [lbrm900]    [encoding=t2b] +  \definefontsynonym [cmr5]     [lbrm0500]   [encoding=t2b]  +  \definefontsynonym [cmr6]     [lbrm0600]   [encoding=t2b]  +  \definefontsynonym [cmr7]     [lbrm0700]   [encoding=t2b]  +  \definefontsynonym [cmr8]     [lbrm0800]   [encoding=t2b]  +  \definefontsynonym [cmr9]     [lbrm0900]   [encoding=t2b]     \definefontsynonym [cmsl10]   [lbsl1000]   [encoding=t2b]    \definefontsynonym [cmsl12]   [lbsl1200]   [encoding=t2b] -  \definefontsynonym [cmsl8]    [lbsl800]    [encoding=t2b] -  \definefontsynonym [cmsl9]    [lbsl900]    [encoding=t2b] +  \definefontsynonym [cmsl8]    [lbsl0800]   [encoding=t2b]  +  \definefontsynonym [cmsl9]    [lbsl0900]   [encoding=t2b]     \definefontsynonym [cmsltt10] [lbst1000]   [encoding=t2b]    \definefontsynonym [cmss10]   [lbss1000]   [encoding=t2b]    \definefontsynonym [cmss12]   [lbss1200]   [encoding=t2b]    \definefontsynonym [cmss17]   [lbss1700]   [encoding=t2b] -  \definefontsynonym [cmss8]    [lbss800]    [encoding=t2b] -  \definefontsynonym [cmss9]    [lbss900]    [encoding=t2b] +  \definefontsynonym [cmss8]    [lbss0800]   [encoding=t2b]  +  \definefontsynonym [cmss9]    [lbss0900]   [encoding=t2b]     \definefontsynonym [cmssbx10] [lbsx1000]   [encoding=t2b]   %\definefontsynonym [cmssdc10] [lbssdc1000] [encoding=t2b]    \definefontsynonym [cmssi10]  [lbsi1000]   [encoding=t2b]    \definefontsynonym [cmssi12]  [lbsi1200]   [encoding=t2b]    \definefontsynonym [cmssi17]  [lbsi1700]   [encoding=t2b] -  \definefontsynonym [cmssi8]   [lbsi800]    [encoding=t2b] -  \definefontsynonym [cmssi9]   [lbsi900]    [encoding=t2b] -  \definefontsynonym [cmssq8]   [lbss800]    [encoding=t2b] % ssq->ss -  \definefontsynonym [cmssqi8]  [lbsi800]    [encoding=t2b] % ssq->ss +  \definefontsynonym [cmssi8]   [lbsi0800]   [encoding=t2b]  +  \definefontsynonym [cmssi9]   [lbsi0900]   [encoding=t2b]  +  \definefontsynonym [cmssq8]   [lbss0800]   [encoding=t2b]  +  \definefontsynonym [cmssqi8]  [lbsi0800]   [encoding=t2b]     \definefontsynonym [cmtcsc10] [lbtc1000]   [encoding=t2b]    \definefontsynonym [cmti10]   [lbti1000]   [encoding=t2b]    \definefontsynonym [cmti12]   [lbti1200]   [encoding=t2b] -  \definefontsynonym [cmti7]    [lbti700]    [encoding=t2b] -  \definefontsynonym [cmti8]    [lbti800]    [encoding=t2b] -  \definefontsynonym [cmti9]    [lbti900]    [encoding=t2b] +  \definefontsynonym [cmti7]    [lbti0700]   [encoding=t2b]  +  \definefontsynonym [cmti8]    [lbti0800]   [encoding=t2b]  +  \definefontsynonym [cmti9]    [lbti0900]   [encoding=t2b]     \definefontsynonym [cmtt10]   [lbtt1000]   [encoding=t2b]    \definefontsynonym [cmtt12]   [lbtt1200]   [encoding=t2b] -  \definefontsynonym [cmtt8]    [lbtt800]    [encoding=t2b] -  \definefontsynonym [cmtt9]    [lbtt900]    [encoding=t2b] +  \definefontsynonym [cmtt8]    [lbtt0800]   [encoding=t2b]  +  \definefontsynonym [cmtt9]    [lbtt0900]   [encoding=t2b]     \definefontsynonym [cmu10]    [lbui1000]   [encoding=t2b]    \definefontsynonym [cmvtt10]  [lbvt1000]   [encoding=t2b]  \stoptypescript @@ -388,57 +406,57 @@    \definefontsynonym [cmb10]    [lcrb1000]   [encoding=t2c]    \definefontsynonym [cmbx10]   [lcbx1000]   [encoding=t2c]    \definefontsynonym [cmbx12]   [lcbx1200]   [encoding=t2c] -  \definefontsynonym [cmbx5]    [lcbx500]    [encoding=t2c] -  \definefontsynonym [cmbx6]    [lcbx600]    [encoding=t2c] -  \definefontsynonym [cmbx7]    [lcbx700]    [encoding=t2c] -  \definefontsynonym [cmbx8]    [lcbx800]    [encoding=t2c] -  \definefontsynonym [cmbx9]    [lcbx900]    [encoding=t2c] +  \definefontsynonym [cmbx5]    [lcbx0500]   [encoding=t2c]  +  \definefontsynonym [cmbx6]    [lcbx0600]   [encoding=t2c]  +  \definefontsynonym [cmbx7]    [lcbx0700]   [encoding=t2c]  +  \definefontsynonym [cmbx8]    [lcbx0800]   [encoding=t2c]  +  \definefontsynonym [cmbx9]    [lcbx0900]   [encoding=t2c]     \definefontsynonym [cmbxsl10] [lcbl1000]   [encoding=t2c]    \definefontsynonym [cmbxti10] [lcbi1000]   [encoding=t2c]    \definefontsynonym [cmcsc10]  [lccc1000]   [encoding=t2c]    \definefontsynonym [cmdunh10] [lcdh1000]   [encoding=t2c]    \definefontsynonym [cmff10]   [lcff1000]   [encoding=t2c]    \definefontsynonym [cmfi10]   [lcfi1000]   [encoding=t2c] -  \definefontsynonym [cmfib8]   [lcfb800]    [encoding=t2c] - %\definefontsynonym [cminch]   [lcinch00]   [encoding=t2c] % maybe need subst +  \definefontsynonym [cmfib8]   [lcfb0800]   [encoding=t2c]  + %\definefontsynonym [cminch]   [lcinch00]   [encoding=t2c]    \definefontsynonym [cmitt10]  [lcit1000]   [encoding=t2c]    \definefontsynonym [cmr10]    [lcrm1000]   [encoding=t2c]    \definefontsynonym [cmr12]    [lcrm1200]   [encoding=t2c]    \definefontsynonym [cmr17]    [lcrm1700]   [encoding=t2c] -  \definefontsynonym [cmr5]     [lcrm500]    [encoding=t2c] -  \definefontsynonym [cmr6]     [lcrm600]    [encoding=t2c] -  \definefontsynonym [cmr7]     [lcrm700]    [encoding=t2c] -  \definefontsynonym [cmr8]     [lcrm800]    [encoding=t2c] -  \definefontsynonym [cmr9]     [lcrm900]    [encoding=t2c] +  \definefontsynonym [cmr5]     [lcrm0500]   [encoding=t2c]  +  \definefontsynonym [cmr6]     [lcrm0600]   [encoding=t2c]  +  \definefontsynonym [cmr7]     [lcrm0700]   [encoding=t2c]  +  \definefontsynonym [cmr8]     [lcrm0800]   [encoding=t2c]  +  \definefontsynonym [cmr9]     [lcrm0900]   [encoding=t2c]     \definefontsynonym [cmsl10]   [lcsl1000]   [encoding=t2c]    \definefontsynonym [cmsl12]   [lcsl1200]   [encoding=t2c] -  \definefontsynonym [cmsl8]    [lcsl800]    [encoding=t2c] -  \definefontsynonym [cmsl9]    [lcsl900]    [encoding=t2c] +  \definefontsynonym [cmsl8]    [lcsl0800]   [encoding=t2c]  +  \definefontsynonym [cmsl9]    [lcsl0900]   [encoding=t2c]     \definefontsynonym [cmsltt10] [lcst1000]   [encoding=t2c]    \definefontsynonym [cmss10]   [lcss1000]   [encoding=t2c]    \definefontsynonym [cmss12]   [lcss1200]   [encoding=t2c]    \definefontsynonym [cmss17]   [lcss1700]   [encoding=t2c] -  \definefontsynonym [cmss8]    [lcss800]    [encoding=t2c] -  \definefontsynonym [cmss9]    [lcss900]    [encoding=t2c] +  \definefontsynonym [cmss8]    [lcss0800]   [encoding=t2c]  +  \definefontsynonym [cmss9]    [lcss0900]   [encoding=t2c]     \definefontsynonym [cmssbx10] [lcsx1000]   [encoding=t2c]   %\definefontsynonym [cmssdc10] [lcssdc1000] [encoding=t2c]    \definefontsynonym [cmssi10]  [lcsi1000]   [encoding=t2c]    \definefontsynonym [cmssi12]  [lcsi1200]   [encoding=t2c]    \definefontsynonym [cmssi17]  [lcsi1700]   [encoding=t2c] -  \definefontsynonym [cmssi8]   [lcsi800]    [encoding=t2c] -  \definefontsynonym [cmssi9]   [lcsi900]    [encoding=t2c] -  \definefontsynonym [cmssq8]   [lcss800]    [encoding=t2c] % ssq->ss -  \definefontsynonym [cmssqi8]  [lcsi800]    [encoding=t2c] % ssq->ss +  \definefontsynonym [cmssi8]   [lcsi0800]   [encoding=t2c]  +  \definefontsynonym [cmssi9]   [lcsi0900]   [encoding=t2c]  +  \definefontsynonym [cmssq8]   [lcss0800]   [encoding=t2c]  +  \definefontsynonym [cmssqi8]  [lcsi0800]   [encoding=t2c]     \definefontsynonym [cmtcsc10] [lctc1000]   [encoding=t2c]    \definefontsynonym [cmti10]   [lcti1000]   [encoding=t2c]    \definefontsynonym [cmti12]   [lcti1200]   [encoding=t2c] -  \definefontsynonym [cmti7]    [lcti700]    [encoding=t2c] -  \definefontsynonym [cmti8]    [lcti800]    [encoding=t2c] -  \definefontsynonym [cmti9]    [lcti900]    [encoding=t2c] +  \definefontsynonym [cmti7]    [lcti0700]   [encoding=t2c]  +  \definefontsynonym [cmti8]    [lcti0800]   [encoding=t2c]  +  \definefontsynonym [cmti9]    [lcti0900]   [encoding=t2c]     \definefontsynonym [cmtt10]   [lctt1000]   [encoding=t2c]    \definefontsynonym [cmtt12]   [lctt1200]   [encoding=t2c] -  \definefontsynonym [cmtt8]    [lctt800]    [encoding=t2c] -  \definefontsynonym [cmtt9]    [lctt900]    [encoding=t2c] +  \definefontsynonym [cmtt8]    [lctt0800]   [encoding=t2c]  +  \definefontsynonym [cmtt9]    [lctt0900]   [encoding=t2c]     \definefontsynonym [cmu10]    [lcui1000]   [encoding=t2c]    \definefontsynonym [cmvtt10]  [lcvt1000]   [encoding=t2c]  \stoptypescript @@ -447,57 +465,57 @@    \definefontsynonym [cmb10]    [rxrb1000]   [encoding=x2]    \definefontsynonym [cmbx10]   [rxbx1000]   [encoding=x2]    \definefontsynonym [cmbx12]   [rxbx1200]   [encoding=x2] -  \definefontsynonym [cmbx5]    [rxbx500]    [encoding=x2] -  \definefontsynonym [cmbx6]    [rxbx600]    [encoding=x2] -  \definefontsynonym [cmbx7]    [rxbx700]    [encoding=x2] -  \definefontsynonym [cmbx8]    [rxbx800]    [encoding=x2] -  \definefontsynonym [cmbx9]    [rxbx900]    [encoding=x2] +  \definefontsynonym [cmbx5]    [rxbx0500]   [encoding=x2]  +  \definefontsynonym [cmbx6]    [rxbx0600]   [encoding=x2]  +  \definefontsynonym [cmbx7]    [rxbx0700]   [encoding=x2]  +  \definefontsynonym [cmbx8]    [rxbx0800]   [encoding=x2]  +  \definefontsynonym [cmbx9]    [rxbx0900]   [encoding=x2]     \definefontsynonym [cmbxsl10] [rxbl1000]   [encoding=x2]    \definefontsynonym [cmbxti10] [rxbi1000]   [encoding=x2]    \definefontsynonym [cmcsc10]  [rxcc1000]   [encoding=x2]    \definefontsynonym [cmdunh10] [rxdh1000]   [encoding=x2]    \definefontsynonym [cmff10]   [rxff1000]   [encoding=x2]    \definefontsynonym [cmfi10]   [rxfi1000]   [encoding=x2] -  \definefontsynonym [cmfib8]   [rxfb800]    [encoding=x2] - %\definefontsynonym [cminch]   [rxinch00]   [encoding=x2] % maybe need subst +  \definefontsynonym [cmfib8]   [rxfb0800]   [encoding=x2]  + %\definefontsynonym [cminch]   [rxinch00]   [encoding=x2]    \definefontsynonym [cmitt10]  [rxit1000]   [encoding=x2]    \definefontsynonym [cmr10]    [rxrm1000]   [encoding=x2]    \definefontsynonym [cmr12]    [rxrm1200]   [encoding=x2]    \definefontsynonym [cmr17]    [rxrm1700]   [encoding=x2] -  \definefontsynonym [cmr5]     [rxrm500]    [encoding=x2] -  \definefontsynonym [cmr6]     [rxrm600]    [encoding=x2] -  \definefontsynonym [cmr7]     [rxrm700]    [encoding=x2] -  \definefontsynonym [cmr8]     [rxrm800]    [encoding=x2] -  \definefontsynonym [cmr9]     [rxrm900]    [encoding=x2] +  \definefontsynonym [cmr5]     [rxrm0500]   [encoding=x2]  +  \definefontsynonym [cmr6]     [rxrm0600]   [encoding=x2]  +  \definefontsynonym [cmr7]     [rxrm0700]   [encoding=x2]  +  \definefontsynonym [cmr8]     [rxrm0800]   [encoding=x2]  +  \definefontsynonym [cmr9]     [rxrm0900]   [encoding=x2]     \definefontsynonym [cmsl10]   [rxsl1000]   [encoding=x2]    \definefontsynonym [cmsl12]   [rxsl1200]   [encoding=x2] -  \definefontsynonym [cmsl8]    [rxsl800]    [encoding=x2] -  \definefontsynonym [cmsl9]    [rxsl900]    [encoding=x2] +  \definefontsynonym [cmsl8]    [rxsl0800]   [encoding=x2]  +  \definefontsynonym [cmsl9]    [rxsl0900]   [encoding=x2]     \definefontsynonym [cmsltt10] [rxst1000]   [encoding=x2]    \definefontsynonym [cmss10]   [rxss1000]   [encoding=x2]    \definefontsynonym [cmss12]   [rxss1200]   [encoding=x2]    \definefontsynonym [cmss17]   [rxss1700]   [encoding=x2] -  \definefontsynonym [cmss8]    [rxss800]    [encoding=x2] -  \definefontsynonym [cmss9]    [rxss900]    [encoding=x2] +  \definefontsynonym [cmss8]    [rxss0800]   [encoding=x2]  +  \definefontsynonym [cmss9]    [rxss0900]   [encoding=x2]     \definefontsynonym [cmssbx10] [rxsx1000]   [encoding=x2]   %\definefontsynonym [cmssdc10] [rxssdc1000] [encoding=x2]    \definefontsynonym [cmssi10]  [rxsi1000]   [encoding=x2]    \definefontsynonym [cmssi12]  [rxsi1200]   [encoding=x2]    \definefontsynonym [cmssi17]  [rxsi1700]   [encoding=x2] -  \definefontsynonym [cmssi8]   [rxsi800]    [encoding=x2] -  \definefontsynonym [cmssi9]   [rxsi900]    [encoding=x2] -  \definefontsynonym [cmssq8]   [rxss800]    [encoding=x2] % ssq->ss -  \definefontsynonym [cmssqi8]  [rxsi800]    [encoding=x2] % ssq->ss +  \definefontsynonym [cmssi8]   [rxsi0800]   [encoding=x2]  +  \definefontsynonym [cmssi9]   [rxsi0900]   [encoding=x2]  +  \definefontsynonym [cmssq8]   [rxss0800]   [encoding=x2]  +  \definefontsynonym [cmssqi8]  [rxsi0800]   [encoding=x2]     \definefontsynonym [cmtcsc10] [rxtc1000]   [encoding=x2]    \definefontsynonym [cmti10]   [rxti1000]   [encoding=x2]    \definefontsynonym [cmti12]   [rxti1200]   [encoding=x2] -  \definefontsynonym [cmti7]    [rxti700]    [encoding=x2] -  \definefontsynonym [cmti8]    [rxti800]    [encoding=x2] -  \definefontsynonym [cmti9]    [rxti900]    [encoding=x2] +  \definefontsynonym [cmti7]    [rxti0700]   [encoding=x2]  +  \definefontsynonym [cmti8]    [rxti0800]   [encoding=x2]  +  \definefontsynonym [cmti9]    [rxti0900]   [encoding=x2]     \definefontsynonym [cmtt10]   [rxtt1000]   [encoding=x2]    \definefontsynonym [cmtt12]   [rxtt1200]   [encoding=x2] -  \definefontsynonym [cmtt8]    [rxtt800]    [encoding=x2] -  \definefontsynonym [cmtt9]    [rxtt900]    [encoding=x2] +  \definefontsynonym [cmtt8]    [rxtt0800]   [encoding=x2]  +  \definefontsynonym [cmtt9]    [rxtt0900]   [encoding=x2]     \definefontsynonym [cmu10]    [rxui1000]   [encoding=x2]    \definefontsynonym [cmvtt10]  [rxvt1000]   [encoding=x2]  \stoptypescript @@ -565,6 +583,65 @@    \definefontsynonym [cmvtt10]  [lhvtt10]  [encoding=lcy]  \stoptypescript +\starttypescript [all] [computer-modern] [ec]   +  \definefontsynonym [cmb10]    [ecrb1000]   [encoding=ec] +  \definefontsynonym [cmbx10]   [ecbx1000]   [encoding=ec] +  \definefontsynonym [cmbx12]   [ecbx1200]   [encoding=ec] +  \definefontsynonym [cmbx5]    [ecbx0500]   [encoding=ec] +  \definefontsynonym [cmbx6]    [ecbx0600]   [encoding=ec] +  \definefontsynonym [cmbx7]    [ecbx0700]   [encoding=ec] +  \definefontsynonym [cmbx8]    [ecbx0800]   [encoding=ec] +  \definefontsynonym [cmbx9]    [ecbx0900]   [encoding=ec] +  \definefontsynonym [cmbxsl10] [ecbl1000]   [encoding=ec] +  \definefontsynonym [cmbxti10] [ecbi1000]   [encoding=ec] +  \definefontsynonym [cmcsc10]  [eccc1000]   [encoding=ec] +  \definefontsynonym [cmdunh10] [ecdh1000]   [encoding=ec] +  \definefontsynonym [cmff10]   [ecff1000]   [encoding=ec] +  \definefontsynonym [cmfi10]   [ecfi1000]   [encoding=ec] +  \definefontsynonym [cmfib8]   [ecfb0800]   [encoding=ec] + %\definefontsynonym [cminch]   [ecinch00]   [encoding=ec] +  \definefontsynonym [cmitt10]  [ecit1000]   [encoding=ec] +  \definefontsynonym [cmr10]    [ecrm1000]   [encoding=ec] +  \definefontsynonym [cmr12]    [ecrm1200]   [encoding=ec] +  \definefontsynonym [cmr17]    [ecrm1700]   [encoding=ec] +  \definefontsynonym [cmr5]     [ecrm0500]   [encoding=ec] +  \definefontsynonym [cmr6]     [ecrm0600]   [encoding=ec] +  \definefontsynonym [cmr7]     [ecrm0700]   [encoding=ec] +  \definefontsynonym [cmr8]     [ecrm0800]   [encoding=ec] +  \definefontsynonym [cmr9]     [ecrm0900]   [encoding=ec] +  \definefontsynonym [cmsl10]   [ecsl1000]   [encoding=ec] +  \definefontsynonym [cmsl12]   [ecsl1200]   [encoding=ec] +  \definefontsynonym [cmsl8]    [ecsl0800]   [encoding=ec] +  \definefontsynonym [cmsl9]    [ecsl0900]   [encoding=ec] +  \definefontsynonym [cmsltt10] [ecst1000]   [encoding=ec] +  \definefontsynonym [cmss10]   [ecss1000]   [encoding=ec] +  \definefontsynonym [cmss12]   [ecss1200]   [encoding=ec] +  \definefontsynonym [cmss17]   [ecss1700]   [encoding=ec] +  \definefontsynonym [cmss8]    [ecss0800]   [encoding=ec] +  \definefontsynonym [cmss9]    [ecss0900]   [encoding=ec] +  \definefontsynonym [cmssbx10] [ecsx1000]   [encoding=ec] + %\definefontsynonym [cmssdc10] [ecssdc1000] [encoding=ec] +  \definefontsynonym [cmssi10]  [ecsi1000]   [encoding=ec] +  \definefontsynonym [cmssi12]  [ecsi1200]   [encoding=ec] +  \definefontsynonym [cmssi17]  [ecsi1700]   [encoding=ec] +  \definefontsynonym [cmssi8]   [ecsi0800]   [encoding=ec] +  \definefontsynonym [cmssi9]   [ecsi0900]   [encoding=ec] +  \definefontsynonym [cmssq8]   [ecss0800]   [encoding=ec] % ssq->ss +  \definefontsynonym [cmssqi8]  [ecsi0800]   [encoding=ec] % ssq->ss +  \definefontsynonym [cmtcsc10] [ectc1000]   [encoding=ec] +  \definefontsynonym [cmti10]   [ecti1000]   [encoding=ec] +  \definefontsynonym [cmti12]   [ecti1200]   [encoding=ec] +  \definefontsynonym [cmti7]    [ecti0700]   [encoding=ec] +  \definefontsynonym [cmti8]    [ecti0800]   [encoding=ec] +  \definefontsynonym [cmti9]    [ecti0900]   [encoding=ec] +  \definefontsynonym [cmtt10]   [ectt1000]   [encoding=ec] +  \definefontsynonym [cmtt12]   [ectt1200]   [encoding=ec] +  \definefontsynonym [cmtt8]    [ectt0800]   [encoding=ec] +  \definefontsynonym [cmtt9]    [ectt0900]   [encoding=ec] +  \definefontsynonym [cmu10]    [ecui1000]   [encoding=ec] +  \definefontsynonym [cmvtt10]  [ecvt1000]   [encoding=ec] +\stoptypescript       +  \starttypescript [serif] [computer-modern] [default]    \definefontsynonym [ComputerModern]             [cmr10]    \definefontsynonym [ComputerModern-Italic]      [cmti10] @@ -597,7 +674,7 @@  \stoptypescript  \starttypescript [math] [computer-modern] [default] -  % watch the space, it prevents remapping  +  % watch the space, it prevents remapping    \definefontsynonym [ComputerModernMath-Roman]     [cmr10 ]    \definefontsynonym [ComputerModernMath-Extension] [cmex10]    \definefontsynonym [ComputerModernMath-Italic]    [cmmi10] diff --git a/tex/context/base/type-ini.tex b/tex/context/base/type-ini.tex index 145463fb0..9de348af5 100644 --- a/tex/context/base/type-ini.tex +++ b/tex/context/base/type-ini.tex @@ -56,8 +56,7 @@     \pushmacro\typescriptthree     \pushmacro\stoptypescript     \typescriptfoundfalse -   \writestatus -     {typescript} +   \writestatus\m!fonts        {[\@@typescriptone] [\@@typescripttwo] [\@@typescriptthree]}%     \processcommacommand[\typescriptfiles]\dododousetypescript     \firsttypescriptpassfalse % testen @@ -77,18 +76,12 @@     \popmacro\currenttypefile     \stopreadingfile} -\def\usetypescriptonce% +\def\usetypescriptonce    {\dotripleempty\dousetypescriptonce} -%\def\dousetypescriptonce[#1][#2][#3]% -%  {\doifdefinedelse{@@tso@@#1:#2:#3}  -%     {\writestatus{typescript}{(#1) (#2) (#3)}} -%     {\setvalue{@@tso@@#1:#2:#3}{0}%  -%      \expanded{\dodousetypescript[#1][#2][#3]}}}       -  \def\dousetypescriptonce[#1][#2][#3]%    {\doifelseflagged{ts:#1:#2:#3}% -     {\writestatus{typescript}{(#1) (#2) (#3)}} +     {\writestatus\m!fonts{once (#1) (#2) (#3)}}       {\setflag{ts:#1:#2:#3}%         \expanded{\dodousetypescript[#1][#2][#3]}}}       @@ -188,23 +181,59 @@  \def\starttypescript    {\dotripleempty\dostarttypescript} +% \long\def\dostarttypescript[#1][#2][#3]% #4\stoptypescript +%   {\iffirstargument +%      \let\typescriptone  \@@typescriptone +%      \let\typescripttwo  \@@typescripttwo +%      \let\typescriptthree\@@typescriptthree +%      \dochecktypescript{#1}\@@typescriptone  \typescriptone +%      \ifdone +%        \dochecktypescript{#2}\@@typescripttwo  \typescripttwo +%        \ifdone +%          \dochecktypescript{#3}\@@typescriptthree\typescriptthree +%          \ifdone +%            %\debuggerinfo +%            %  {typescript} +%            %  {\currenttypefile: use=scr (val) +%            %     [\@@typescriptone  =#1 (\typescriptone)] +%            %     [\@@typescripttwo  =#2 (\typescripttwo)] +%            %     [\@@typescriptthree=#3 (\typescriptthree)]}% +%            \typescriptfoundtrue +%            \let\next\dostarttypescriptA +%          \else +%            \let\next\dostarttypescriptC +%          \fi +%        \else +%          \let\next\dostarttypescriptC +%        \fi +%      \else +%        \let\next\dostarttypescriptC +%      \fi +%    \else\iffirsttypescriptpass +%      \let\next\dostarttypescriptB +%    \else +%      % skip this since it may do unwanted resets, like +%      % setting symbolic font names to unknown, especially +%      % in run time user type scripts +%      \let\next\dostarttypescriptC +%    \fi\fi +%    \next} + +\newif\iftracetypescripts +  \long\def\dostarttypescript[#1][#2][#3]% #4\stoptypescript -  {\iffirstargument +  {\iftracetypescripts\writestatus\m!fonts{enter [#1] [#2] [#3]}\fi% +   \iffirstargument +     \iftracetypescripts\writestatus\m!fonts{check [\@@typescriptone] [\@@typescripttwo] [\@@typescriptthree]}\fi       \let\typescriptone  \@@typescriptone       \let\typescripttwo  \@@typescripttwo       \let\typescriptthree\@@typescriptthree -     \dochecktypescript{#1}\@@typescriptone  \typescriptone +     \dochecktypescript{#1}\@@typescriptone\typescriptone       \ifdone -       \dochecktypescript{#2}\@@typescripttwo  \typescripttwo +       \dochecktypescript{#2}\@@typescripttwo\typescripttwo         \ifdone           \dochecktypescript{#3}\@@typescriptthree\typescriptthree           \ifdone -           %\debuggerinfo -           %  {typescript} -           %  {\currenttypefile: use=scr (val) -           %     [\@@typescriptone  =#1 (\typescriptone)] -           %     [\@@typescripttwo  =#2 (\typescripttwo)] -           %     [\@@typescriptthree=#3 (\typescriptthree)]}%             \typescriptfoundtrue             \let\next\dostarttypescriptA           \else @@ -216,12 +245,17 @@       \else         \let\next\dostarttypescriptC       \fi +     \iftracetypescripts     +       \writestatus\m!fonts{\ifdone match\else pass\fi ed}% +     \fi     \else\iffirsttypescriptpass +     \iftracetypescripts\writestatus\m!fonts{honored}\fi       \let\next\dostarttypescriptB     \else       % skip this since it may do unwanted resets, like       % setting symbolic font names to unknown, especially       % in run time user type scripts +     \iftracetypescripts\writestatus\m!fonts{ignored}\fi       \let\next\dostarttypescriptC     \fi\fi     \next} @@ -354,7 +388,8 @@       \let\typefaceencoding\@@tsencoding       \setcurrentfontclass{#1}       \saverelativefontsize{#2}{\relativefontsize}% fall back  -     \writestatus{typeface}{[#1] [#2] [#3] [#4]} +    %\writestatus{typeface}{[#1] [#2] [#3] [#4]} +     \writestatus\m!fonts{[#1] [#2] [#3] [#4]}       \usetypescript[map][\typefaceencoding]       \usetypescript[#3][#4][name,default,\typefaceencoding,special]       \usetypescript[#3][#5][size] diff --git a/tex/context/base/type-pre.tex b/tex/context/base/type-pre.tex index 21fc3e0d4..76d57b851 100644 --- a/tex/context/base/type-pre.tex +++ b/tex/context/base/type-pre.tex @@ -1,8 +1,8 @@  %D \module  %D   [       file=type-pre, -%D        version=2001.04.12,  +%D        version=2001.04.12,  %D          title=\CONTEXT\ Typescript Macros, -%D       subtitle=Compatibility scripts,  +%D       subtitle=Compatibility scripts,  %D         author=Hans Hagen,  %D           date=\currentdate,  %D      copyright={PRAGMA / Hans Hagen \& Ton Otten}] @@ -15,11 +15,11 @@  %D Times Roman. In this module, that is loaded by default, we  %D define all relevant alternatives. -\starttypescript [cmr]  +\starttypescript [cmr] -\usetypescript [serif,sans,mono,math] [computer-modern] [default,name,size] +  \usetypescript [serif,sans,mono,math] [computer-modern] [default,name,size] -\usemathcollection[default] +  \usemathcollection[default]  \stoptypescript @@ -28,9 +28,9 @@  \starttypescript [aer] -\usetypescript [serif,sans,mono,math] [computer-modern] [default,name,size,ec] +  \usetypescript [serif,sans,mono,math] [computer-modern] [default,name,size,ec] -\usemathcollection[default] +  \usemathcollection[default]  \stoptypescript @@ -39,9 +39,9 @@  \starttypescript [csr] -\usetypescript [serif,sans,mono,math] [computer-modern] [default,name,size,il2] +  \usetypescript [serif,sans,mono,math] [computer-modern] [default,name,size,il2] -\usemathcollection[default] +  \usemathcollection[default]  \stoptypescript @@ -50,36 +50,42 @@  \starttypescript [plr] -\usetypescript [serif,sans,mono,math] [computer-modern] [default,name,size,pl0] +  \usetypescript [serif,sans,mono,math] [computer-modern] [default,name,size,pl0] -\usemathcollection[default] +  \usemathcollection[default]  \stoptypescript -%D Cyrillic alternatives are available under the symbolic  +%D Cyrillic alternatives are available under the symbolic  %D name \type {cyr}.  \starttypescript [cyr] -\usetypescript [serif,sans,mono,math] [computer-modern] [default,name,size,cyr] +  \usetypescript [serif,sans,mono,math] [computer-modern] [default,name,size,cyr] -\usemathcollection[default] +  \usemathcollection[default]  \stoptypescript -\starttypescript [lh-t2a] +\starttypescript [lh-ec]   -\usetypescript [serif,sans,mono,math] [computer-modern] [default,name,size,t2a] +  \usetypescript [serif,sans,mono,math] [computer-modern] [default,name,size,ec] -\usemathcollection[default] +  \usemathcollection[default] -\stoptypescript +\stoptypescript            + +\starttypescript [lh-t2a] + +  \usetypescript [serif,sans,mono,math] [computer-modern] [default,name,size,t2a] + +  \usemathcollection[default]  \starttypescript [lh-t2b] -\usetypescript [serif,sans,mono,math] [computer-modern] [default,name,size,t2b] +  \usetypescript [serif,sans,mono,math] [computer-modern] [default,name,size,t2b] -\usemathcollection[default] +  \usemathcollection[default]  \stoptypescript @@ -93,17 +99,17 @@  \starttypescript [lh-x2] -\usetypescript [serif,sans,mono,math] [computer-modern] [default,name,size,x2] +  \usetypescript [serif,sans,mono,math] [computer-modern] [default,name,size,x2] -\usemathcollection [default] +  \usemathcollection [default]  \stoptypescript  \starttypescript [lh-lcy] -\usetypescript [serif,sans,mono,math] [computer-modern] [default,name,size,lcy] +  \usetypescript [serif,sans,mono,math] [computer-modern] [default,name,size,lcy] -\usemathcollection [default] +  \usemathcollection [default]  \stoptypescript @@ -113,9 +119,9 @@  \starttypescript [ams] -\usetypescript [math] [ams] [all] +  \usetypescript [math] [ams] [all] -\usemathcollection[ams] +  \usemathcollection[ams]  \stoptypescript @@ -124,8 +130,8 @@  \starttypescript [con] -\usetypescript [serif] [concrete] [all] -  +  \usetypescript [serif] [concrete] [all] +  \stoptypescript  %D The Euler Fonts are designed by Herman Zapf and can be @@ -133,9 +139,9 @@  \starttypescript [eul] -\usetypescript [math] [euler] [all] +  \usetypescript [math] [euler] [all] -\usemathcollection[eul] +  \usemathcollection[eul]  \stoptypescript @@ -148,12 +154,12 @@  \starttypescript [lbr] -\usetypescript [serif,sans,mono,math,handwriting] [lucida]  [name,special,\defaultencoding] -\usetypescript [serif,sans,mono,math,handwriting] [default] [size] +  \usetypescript [serif,sans,mono,math,handwriting] [lucida]  [name,special,\defaultencoding] +  \usetypescript [serif,sans,mono,math,handwriting] [default] [size] -\usemathcollection[lbr]  +  \usemathcollection[lbr] -\usetypescript [map] [\defaultencoding] +  \usetypescript [map] [\defaultencoding]  \stoptypescript @@ -164,12 +170,12 @@  \starttypescript [tim] -\usetypescript [math] [times]   [all] -\usetypescript [math] [default] [size] +  \usetypescript [math] [times]   [all] +  \usetypescript [math] [default] [size] -\usemathcollection[tim]  +  \usemathcollection[tim] -\usetypescript [map] [\defaultencoding] +  \usetypescript [map] [\defaultencoding]  \stoptypescript @@ -179,10 +185,10 @@  \starttypescript [ant] -\usetypescript [serif] [antykwa-torunska] [name,\defaultencoding] -\usetypescript [serif] [default]          [size] +  \usetypescript [serif] [antykwa-torunska] [name,\defaultencoding] +  \usetypescript [serif] [default]          [size] -\usetypescript [map] [\defaultencoding] +  \usetypescript [map] [\defaultencoding]  \stoptypescript @@ -190,10 +196,10 @@  \starttypescript [pcr] -\usetypescript [mono] [courier] [name,\defaultencoding] -\usetypescript [mono] [default] [size]  +  \usetypescript [mono] [courier] [name,\defaultencoding] +  \usetypescript [mono] [default] [size] -\usetypescript [map] [\defaultencoding] +  \usetypescript [map] [\defaultencoding]  \stoptypescript @@ -201,10 +207,10 @@  \starttypescript [phv] -\usetypescript [sans] [helvetica] [name,\defaultencoding] -\usetypescript [sans] [default]   [size]  +  \usetypescript [sans] [helvetica] [name,\defaultencoding] +  \usetypescript [sans] [default]   [size] -\usetypescript [map] [\defaultencoding] +  \usetypescript [map] [\defaultencoding]  \stoptypescript @@ -212,10 +218,10 @@  \starttypescript [ptm] -\usetypescript [serif] [times]   [name,\defaultencoding] -\usetypescript [serif] [default] [size]  +  \usetypescript [serif] [times]   [name,\defaultencoding] +  \usetypescript [serif] [default] [size] -\usetypescript [map] [\defaultencoding] +  \usetypescript [map] [\defaultencoding]  \stoptypescript @@ -224,16 +230,16 @@  \starttypescript [pos] -\usetypescript [serif] [times]     [name,\defaultencoding] -\usetypescript [sans]  [helvetica] [name,\defaultencoding]  -\usetypescript [mono]  [courier]   [name,\defaultencoding]  +  \usetypescript [serif] [times]     [name,\defaultencoding] +  \usetypescript [sans]  [helvetica] [name,\defaultencoding] +  \usetypescript [mono]  [courier]   [name,\defaultencoding] -\usetypescript [serif,sans,mono] [default] [size]  +  \usetypescript [serif,sans,mono] [default] [size]  % \usetypescript [math] [times]   [all] -% \usetypescript [math] [default] [size]  +% \usetypescript [math] [default] [size] -\usetypescript [map] [\defaultencoding] +  \usetypescript [map] [\defaultencoding]  \stoptypescript @@ -241,21 +247,21 @@  \starttypescript [ppl] -\usetypescript [serif] [palatino] [name,\defaultencoding] -\usetypescript [serif] [default]  [size] +  \usetypescript [serif] [palatino] [name,\defaultencoding] +  \usetypescript [serif] [default]  [size] -\usetypescript [map] [\defaultencoding] +  \usetypescript [map] [\defaultencoding]  \stoptypescript  %D The following scripts fake the old \type {font-ber} and -%D alike files.  +%D alike files.  \starttypescript[fil]    % fake to prevent loading font-fil.tex and signal 'done'  \stoptypescript -%D But for old time sake we provide:  +%D But for old time sake we provide:  \starttypescript[ber]    \usetypescript [berry] [ec] diff --git a/tex/context/base/unic-ini.tex b/tex/context/base/unic-ini.tex index 3860a7557..68ddd4d48 100644 --- a/tex/context/base/unic-ini.tex +++ b/tex/context/base/unic-ini.tex @@ -484,7 +484,7 @@  \def\unidiv{0} \def\unimod{0} -\chardef\utfunihashmode   =0 % 1 = enabled +\chardef\utfunihashmode=0 % 1 = enabled  \def\utfunifontglyph#1%    {\xdef\unidiv{\number\utfdiv{#1}}% diff --git a/tex/context/base/x-contml.tex b/tex/context/base/x-contml.tex index e9dd9418f..cbe356041 100644 --- a/tex/context/base/x-contml.tex +++ b/tex/context/base/x-contml.tex @@ -459,3 +459,20 @@    \startstandardmakeup \stopstandardmakeup  \protect \endinput + +% TO DO  + +\defineXMLenvironment [combination] [columns=2,rows=1] +  {\scratchtoks\emptytoks +   \expanded{\appendtoks \noexpand \startcombination +     [\XMLop{columns}*\XMLop{rows}]}\to \scratchtoks} +  {\appendtoks \stopcombination \to \scratchtoks +   \the\scratchtoks} + +\defineXMLprocess[combinationentry] + +\defineXMLpickup [combinationitem] +  {\appendtoks\bgroup}{\egroup\to\scratchtoks} + +\defineXMLpickup [combinationcaption] +  {\appendtoks\bgroup}{\egroup\to\scratchtoks} diff --git a/tex/context/base/x-fig-00.tex b/tex/context/base/x-fig-00.tex index 62b40c4ac..0afc6aea3 100644 --- a/tex/context/base/x-fig-00.tex +++ b/tex/context/base/x-fig-00.tex @@ -11,7 +11,7 @@  %C therefore copyrighted by \PRAGMA. See mreadme.pdf for   %C details.  -\readfile{x-res-04} \donothing \donothing \endinput  +% \readfile{x-res-04} \donothing \donothing \endinput   % naast label, ook fig als ref en dan naar fig ref springen  @@ -88,6 +88,8 @@  \unprotect  +\consultutilityfilefalse +  \startXMLmapping [-] [figbase]  \defineXMLprocess     [figurelibrary] diff --git a/tex/context/base/x-fig-01.tex b/tex/context/base/x-fig-01.tex index c43b61367..173139a86 100644 --- a/tex/context/base/x-fig-01.tex +++ b/tex/context/base/x-fig-01.tex @@ -11,7 +11,7 @@  %C therefore copyrighted by \PRAGMA. See mreadme.pdf for  %C details. -\readfile {x-res-01} \donothing \donothing \endinput  +% \readfile {x-res-01} \donothing \donothing \endinput   %D See \type {x-fig-00.tex} for more information on how to use  %D and generate figure databases. This file loads the file diff --git a/tex/context/base/x-fig-02.tex b/tex/context/base/x-fig-02.tex index 2205fc658..0fec27981 100644 --- a/tex/context/base/x-fig-02.tex +++ b/tex/context/base/x-fig-02.tex @@ -11,7 +11,7 @@  %C therefore copyrighted by \PRAGMA. See mreadme.pdf for  %C details. -\readfile {x-res-02} \donothing \donothing \endinput  +% \readfile {x-res-02} \donothing \donothing \endinput   %D This module enables non||\ConTeXt\  users to access the   %D database. For this, you need to run   diff --git a/tex/context/base/x-res-04.tex b/tex/context/base/x-res-04.tex index 58b7771f5..37bb6a5b4 100644 --- a/tex/context/base/x-res-04.tex +++ b/tex/context/base/x-res-04.tex @@ -101,6 +101,8 @@  \unprotect +\consultutilityfilefalse +  % 0 = no loading  % 1 = selective loading  % 2 = full loading @@ -134,9 +136,9 @@          \doglobal\setflag{rl:#1}         \stopnointerference}} -\def\figbase@savedata#1#2% +\def\figbase@savedata#1#2%     {%\writestatus{figbase}{data of #1 loaded}% -   \doglobal\saveXMLdatastructure{rl:#1}{record}{page="#2"}{}{rl:figure}{}} +   \doglobal\saveXMLdatastructure{rl:rl:#1}{record}{page="#2"}{}{rl:figure}{}}  % locating and if needed loading one figure record  @@ -183,8 +185,8 @@         \xdef\figurefilebase{#1}         \doglobal\newcounter\figurefilepage         \def\askedlabel{#2} -       \doifelseXMLelement{rl:\askedlabel} -         {\enableXMLelements\flushXMLelement{rl:\askedlabel}} +       \doifelseXMLelement{rl:rl:\askedlabel} +         {\enableXMLelements\flushXMLelement{rl:rl:\askedlabel}}           {\processcommacommand[\figurepathlist]\dogetfigurefilename}%       \stopXMLmapping     \stopnointerference} diff --git a/tex/context/base/xtag-mmc.tex b/tex/context/base/xtag-mmc.tex index 49c81a804..5dcba788f 100644 --- a/tex/context/base/xtag-mmc.tex +++ b/tex/context/base/xtag-mmc.tex @@ -553,12 +553,26 @@ complex-cartesian=>\let\next\MMLccartesian,  \remapXMLsingular [root] [CPA] \MMLcROOT -\def\MMLcROOT#1#2#3\empty% -  {\doifXMLRchildelse{degree}{#3} -     {\root\processXMLRchild{degree}{#3}\of -        {\let\MMLcDEGREE\ignoreXMLRelement -         \MMLcreset\processXMLRchildren{#3}}} -     {\sqrt{\MMLcreset\processXMLRchildren{#3}}}} +% \def\MMLcROOT#1#2#3\empty +%   {\doifXMLRchildelse{degree}{#3} +%      {\root\processXMLRchild{degree}{#3}\of +%         {\let\MMLcDEGREE\ignoreXMLRelement +%          \MMLcreset\processXMLRchildren{#3}}} +%      {\sqrt{\MMLcreset\processXMLRchildren{#3}}}} + +\setupMMLappearance[root][\c!symbool=\v!ja] + +\def\MMLcROOT#1#2#3\empty +  {\doifXMLRchildelse{degree}{#3}\donetrue\donefalse +   \doif\@@MMLrootsymbool\v!nee\donefalse +   \ifdone   +     \root\processXMLRchild{degree}{#3}\of +       {\let\MMLcDEGREE\ignoreXMLRelement +        \MMLcreset\processXMLRchildren{#3}}% +   \else +     \sqrt +       {\MMLcreset\processXMLRchildren{#3}}% +   \fi}  \remapXMLsingular [gcd] [CPA] \MMLcGCD | 
