texlive[44310] trunk: context (May 10 10:50)

commits+karl at tug.org commits+karl at tug.org
Sat May 13 00:38:39 CEST 2017


Revision: 44310
          http://tug.org/svn/texlive?view=revision&revision=44310
Author:   karl
Date:     2017-05-13 00:38:39 +0200 (Sat, 13 May 2017)
Log Message:
-----------
context (May 10 10:50)

Modified Paths:
--------------
    trunk/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl
    trunk/Master/texmf-dist/doc/context/documents/general/qrcs/setup-cs.pdf
    trunk/Master/texmf-dist/doc/context/documents/general/qrcs/setup-de.pdf
    trunk/Master/texmf-dist/doc/context/documents/general/qrcs/setup-en.pdf
    trunk/Master/texmf-dist/doc/context/documents/general/qrcs/setup-fr.pdf
    trunk/Master/texmf-dist/doc/context/documents/general/qrcs/setup-it.pdf
    trunk/Master/texmf-dist/doc/context/documents/general/qrcs/setup-nl.pdf
    trunk/Master/texmf-dist/doc/context/documents/general/qrcs/setup-ro.pdf
    trunk/Master/texmf-dist/tex/context/base/mkii/cont-new.mkii
    trunk/Master/texmf-dist/tex/context/base/mkii/context.mkii
    trunk/Master/texmf-dist/tex/context/base/mkiv/cont-new.mkiv
    trunk/Master/texmf-dist/tex/context/base/mkiv/context.mkiv
    trunk/Master/texmf-dist/tex/context/base/mkiv/font-otj.lua
    trunk/Master/texmf-dist/tex/context/base/mkiv/font-sel.lua
    trunk/Master/texmf-dist/tex/context/base/mkiv/grph-con.lua
    trunk/Master/texmf-dist/tex/context/base/mkiv/math-act.lua
    trunk/Master/texmf-dist/tex/context/base/mkiv/math-noa.lua
    trunk/Master/texmf-dist/tex/context/base/mkiv/node-syn.lua
    trunk/Master/texmf-dist/tex/context/base/mkiv/status-files.pdf
    trunk/Master/texmf-dist/tex/context/base/mkiv/status-lua.pdf
    trunk/Master/texmf-dist/tex/context/interface/mkiv/i-context.pdf
    trunk/Master/texmf-dist/tex/context/interface/mkiv/i-readme.pdf
    trunk/Master/texmf-dist/tex/generic/context/luatex/luatex-fonts-merged.lua

Modified: trunk/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl
===================================================================
--- trunk/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl	2017-05-12 22:31:50 UTC (rev 44309)
+++ trunk/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl	2017-05-12 22:38:39 UTC (rev 44310)
@@ -1,5 +1,5 @@
 #!/usr/bin/env perl
-# $Id: tlmgr.pl 44249 2017-05-08 17:26:47Z karl $
+# $Id: tlmgr.pl 44289 2017-05-11 02:41:34Z preining $
 #
 # Copyright 2008-2017 Norbert Preining
 # This file is licensed under the GNU General Public License version 2
@@ -6,8 +6,8 @@
 # or any later version.
 #
 
-my $svnrev = '$Revision: 44249 $';
-my $datrev = '$Date: 2017-05-08 19:26:47 +0200 (Mon, 08 May 2017) $';
+my $svnrev = '$Revision: 44289 $';
+my $datrev = '$Date: 2017-05-11 04:41:34 +0200 (Thu, 11 May 2017) $';
 my $tlmgrrevision;
 my $prg;
 if ($svnrev =~ m/: ([0-9]+) /) {
@@ -274,6 +274,8 @@
   },
   "remove" => { 
     "options"  => {
+      "backup" => 1,
+      "backupdir" => "=s",
       "dry-run|n" => 1,
       "force" => 1,
       "no-depends"        => 1,
@@ -1011,8 +1013,28 @@
 #   will absolutely only install foo bar baz not even taking .ARCH into
 #   account
 #
+
+sub backup_and_remove_package {
+  my ($pkg, $autobackup) = @_;
+  my $tlp = $localtlpdb->get_package($pkg);
+  if (!defined($tlp)) {
+    info("$pkg: package not present, cannot remove\n");
+    return($F_WARNING);
+  }
+  if ($opts{"backup"}) {
+    $tlp->make_container("xz", $localtlpdb->root,
+                         $opts{"backupdir"}, 
+                         "${pkg}.r" . $tlp->revision,
+                         $tlp->relocated);
+    if ($autobackup) {
+      # in case we do auto backups we remove older backups
+      clear_old_backups($pkg, $opts{"backupdir"}, $autobackup);
+    }
+  }
+  return($localtlpdb->remove_package($pkg));
+}
+
 sub action_remove {
-  my $ret = $F_OK;
   # we do the following:
   # - (not implemented) order collections such that those depending on
   #   other collections are first removed, and then those which only
@@ -1034,6 +1056,10 @@
   init_local_db();
   return($F_ERROR) if !check_on_writable();
   info("$prg remove: dry run, no changes will be made\n") if $opts{"dry-run"};
+
+  my ($ret, $autobackup) = setup_backup_directory();
+  return ($ret) if ($ret != $F_OK);
+
   my @packs = @ARGV;
   #
   # we have to be careful not to remove too many packages. The idea is
@@ -1099,7 +1125,7 @@
         my $foo = 0;
         info ("$prg: removing $pkg\n");
         if (!$opts{"dry-run"}) {
-          $foo = $localtlpdb->remove_package($pkg);
+          $foo = backup_and_remove_package($pkg, $autobackup);
           logpackage("remove: $pkg");
         }
         if ($foo) {
@@ -1120,7 +1146,7 @@
     if (!defined($already_removed{$pkg})) {
       info ("$prg: removing package $pkg\n");
       if (!$opts{"dry-run"}) {
-        if ($localtlpdb->remove_package($pkg)) {
+        if (backup_and_remove_package($pkg, $autobackup)) {
           # removal was successful
           logpackage("remove: $pkg");
           $already_removed{$pkg} = 1;
@@ -1503,46 +1529,56 @@
     print "longdesc:    ", $tlp->longdesc, "\n" if ($tlp->longdesc);
     print "installed:   ", ($installed ? "Yes" : "No"), "\n";
     print "revision:    ", $tlp->revision, "\n" if ($installed);
-    # print out sizes
+    #
+    # size computation: for normal packages give src/run/doc/bin sizes
+    # for scheme/collection accumulated (including deps) sizes
     my $sizestr = "";
-    my $srcsize = $tlp->srcsize * $TeXLive::TLConfig::BlockSize;
-    $sizestr = sprintf("%ssrc: %dk", $sizestr, int($srcsize / 1024) + 1) 
-      if ($srcsize > 0);
-    my $docsize = $tlp->docsize * $TeXLive::TLConfig::BlockSize;
-    $sizestr .= sprintf("%sdoc: %dk", 
-      ($sizestr ? ", " : ""), int($docsize / 1024) + 1)
-        if ($docsize > 0);
-    my $runsize = $tlp->runsize * $TeXLive::TLConfig::BlockSize;
-    $sizestr .= sprintf("%srun: %dk", 
-      ($sizestr ? ", " : ""), int($runsize / 1024) + 1)
-        if ($runsize > 0);
-    # check for .ARCH expansions
-    my $do_archs = 0;
-    for my $d ($tlp->depends) {
-      if ($d =~ m/^(.*)\.ARCH$/) {
-        $do_archs = 1;
-        last;
+    if ($tlp->category ne "Collection" && $tlp->category ne "Scheme") {
+      my $srcsize = $tlp->srcsize * $TeXLive::TLConfig::BlockSize;
+      $sizestr = sprintf("%ssrc: %dk", $sizestr, int($srcsize / 1024) + 1) 
+        if ($srcsize > 0);
+      my $docsize = $tlp->docsize * $TeXLive::TLConfig::BlockSize;
+      $sizestr .= sprintf("%sdoc: %dk", 
+        ($sizestr ? ", " : ""), int($docsize / 1024) + 1)
+          if ($docsize > 0);
+      my $runsize = $tlp->runsize * $TeXLive::TLConfig::BlockSize;
+      $sizestr .= sprintf("%srun: %dk", 
+        ($sizestr ? ", " : ""), int($runsize / 1024) + 1)
+          if ($runsize > 0);
+      # check for .ARCH expansions
+      my $do_archs = 0;
+      for my $d ($tlp->depends) {
+        if ($d =~ m/^(.*)\.ARCH$/) {
+          $do_archs = 1;
+          last;
+        }
       }
-    }
-    if ($do_archs) {
-      my @a = $localtlpdb->available_architectures;
-      my %binsz = %{$tlp->binsize};
-      my $binsize = 0;
-      for my $a (@a) {
-        $binsize += $binsz{$a} if defined($binsz{$a});
-        my $atlp = $tlpdb->get_package($tlp->name . ".$a");
-        if (!$atlp) {
-          tlwarn("$prg: cannot find depending package" . $tlp->name . ".$a\n");
-          $ret |= $F_WARNING;
-          next;
+      if ($do_archs) {
+        my @a = $localtlpdb->available_architectures;
+        my %binsz = %{$tlp->binsize};
+        my $binsize = 0;
+        for my $a (@a) {
+          $binsize += $binsz{$a} if defined($binsz{$a});
+          my $atlp = $tlpdb->get_package($tlp->name . ".$a");
+          if (!$atlp) {
+            tlwarn("$prg: cannot find depending package" . $tlp->name . ".$a\n");
+            $ret |= $F_WARNING;
+            next;
+          }
+          my %abinsz = %{$atlp->binsize};
+          $binsize += $abinsz{$a} if defined($abinsz{$a});
         }
-        my %abinsz = %{$atlp->binsize};
-        $binsize += $abinsz{$a} if defined($abinsz{$a});
+        $binsize *= $TeXLive::TLConfig::BlockSize;
+        $sizestr .= sprintf("%sbin: %dk",
+          ($sizestr ? ", " : ""), int($binsize / 1024) + 1)
+            if ($binsize > 0);
       }
-      $binsize *= $TeXLive::TLConfig::BlockSize;
-      $sizestr .= sprintf("%sbin: %dk",
-        ($sizestr ? ", " : ""), int($binsize / 1024) + 1)
-          if ($binsize > 0);
+    } else {
+      # case of collection or scheme
+      my $foo = $tlpdb->sizes_of_packages_with_deps ( 1, 1, undef, $pkg);
+      if (defined($foo->{$pkg})) {
+        $sizestr = sprintf("%dk", int($foo->{$pkg} / 1024) + 1);
+      }
     }
     print "sizes:       ", $sizestr, "\n";
     print "relocatable: ", ($tlp->relocated ? "Yes" : "No"), "\n";
@@ -1783,6 +1819,53 @@
   return ($F_OK);
 }
 
+sub setup_backup_directory {
+  my $ret = $F_OK;
+  my $autobackup = 0;
+  # check for the tlpdb option autobackup, and if present and true (!= 0)
+  # assume we are doing backups
+  if (!$opts{"backup"}) {
+    $autobackup = $localtlpdb->option("autobackup");
+    if ($autobackup) {
+      # check the format, we currently allow only natural numbers, and -1
+      if ($autobackup eq "-1") {
+        debug ("Automatic backups activated, keeping all backups.\n");
+        $opts{"backup"} = 1;
+      } elsif ($autobackup eq "0") {
+        debug ("Automatic backups disabled.\n");
+      } elsif ($autobackup =~ m/^[0-9]+$/) {
+        debug ("Automatic backups activated, keeping $autobackup backups.\n");
+        $opts{"backup"} = 1;
+      } else {
+        tlwarn ("$prg: Option autobackup can only be an integer >= -1.\n");
+        tlwarn ("$prg: Disabling auto backups.\n");
+        $localtlpdb->option("autobackup", 0);
+        $autobackup = 0;
+        $ret |= $F_WARNING;
+      }
+    }
+  }
+
+  # cmd line --backup, we check for --backupdir, and if that is not given
+  # we try to get the default from the tlpdb. If that doesn't work, exit.
+  if ($opts{"backup"}) {
+    my ($a, $b) = check_backupdir_selection();
+    if ($a & $F_ERROR) {
+      # in all these cases we want to terminate in the non-gui mode
+      tlwarn($b);
+      return ($F_ERROR, $autobackup);
+    }
+  }
+
+  # finally, if we have --backupdir, but no --backup, just enable it
+  $opts{"backup"} = 1 if $opts{"backupdir"};
+
+  info("$prg: saving backups to $opts{'backupdir'}\n")
+    if $opts{"backup"} && !$::machinereadable;
+  
+  return ($ret, $autobackup);
+}
+
 sub check_backupdir_selection {
   my $warntext = "";
   if ($opts{"backupdir"}) {
@@ -2466,8 +2549,6 @@
 }
 
 sub action_update {
-  my $ret = $F_OK;
-
   init_local_db(1);
   $opts{"no-depends"} = 1 if $opts{"no-depends-at-all"};
 
@@ -2512,48 +2593,9 @@
     }
   }
 
-  my $autobackup = 0;
-  # check for the tlpdb option autobackup, and if present and true (!= 0)
-  # assume we are doing backups
-  if (!$opts{"backup"}) {
-    $autobackup = $localtlpdb->option("autobackup");
-    if ($autobackup) {
-      # check the format, we currently allow only natural numbers, and -1
-      if ($autobackup eq "-1") {
-        debug ("Automatic backups activated, keeping all backups.\n");
-        $opts{"backup"} = 1;
-      } elsif ($autobackup eq "0") {
-        debug ("Automatic backups disabled.\n");
-      } elsif ($autobackup =~ m/^[0-9]+$/) {
-        debug ("Automatic backups activated, keeping $autobackup backups.\n");
-        $opts{"backup"} = 1;
-      } else {
-        tlwarn ("$prg: Option autobackup can only be an integer >= -1.\n");
-        tlwarn ("$prg: Disabling auto backups.\n");
-        $localtlpdb->option("autobackup", 0);
-        $autobackup = 0;
-        $ret |= $F_WARNING;
-      }
-    }
-  }
+  my ($ret, $autobackup) = setup_backup_directory();
+  return ($ret) if ($ret != $F_OK);
 
-  # cmd line --backup, we check for --backupdir, and if that is not given
-  # we try to get the default from the tlpdb. If that doesn't work, exit.
-  if ($opts{"backup"}) {
-    my ($a, $b) = check_backupdir_selection();
-    if ($a & $F_ERROR) {
-      # in all these cases we want to terminate in the non-gui mode
-      tlwarn($b);
-      return ($F_ERROR);
-    }
-  }
-
-  # finally, if we have --backupdir, but no --backup, just enable it
-  $opts{"backup"} = 1 if $opts{"backupdir"};
-
-  info("$prg: saving backups to $opts{'backupdir'}\n")
-    if $opts{"backup"} && !$::machinereadable;
-
   # these two variables are used throughout this function
   my $root = $localtlpdb->root;
   my $temp = TeXLive::TLUtils::tl_tmpdir();
@@ -2920,17 +2962,8 @@
             debug("$prg: warn, relocated bit set for $p, but that is wrong!\n");
             $pkg->relocated(0);
           }
-          if ($opts{"backup"}) {
-            $pkg->make_container("xz", $root,
-                                 $opts{"backupdir"}, 
-                                 "${p}.r" . $pkg->revision,
-                                 $pkg->relocated);
-            if ($autobackup) {
-              # in case we do auto backups we remove older backups
-              clear_old_backups($p, $opts{"backupdir"}, $autobackup);
-            }
-          }
-          $localtlpdb->remove_package($p);
+          # TODO we do not check return value here!
+          backup_and_remove_package($p, $autobackup);
           logpackage("remove: $p");
         }
         info("done\n") unless $::machinereadable;
@@ -7344,10 +7377,14 @@
 the request type instead of all packages.
 
 With any other arguments, display information about I<pkg>: the name,
-category, short and long description, installation status, and TeX Live
+category, short and long description, sizes, installation status, and TeX Live
 revision number.  If I<pkg> is not locally installed, searches in the
 remote installation source.
 
+For normal packages (not collections or schemes), the sizes of the
+four groups of files (run/src/doc/bin files) are shown. For collections
+and schemes the B<accumulated> size including depending packages.
+
 If I<pkg> is not found locally or remotely, the search action is used
 and lists matching packages and files.
 
@@ -7727,6 +7764,23 @@
 
 =over 4
 
+=item B<--backup> and B<--backupdir> I<directory>
+
+These two options control the creation of backups of packages I<before>
+removal; that is, backup of packages as currently installed.  If
+neither of these options are given, no backup package will be saved. If
+C<--backupdir> is given and specifies a writable directory then a backup
+will be made in that location. If only C<--backup> is given, then a
+backup will be made to the directory previously set via the C<option>
+action (see below). If both are given then a backup will be made to the
+specified I<directory>.
+
+You can set options via the C<option> action to automatically create
+backups for all packages, and/or keep only a certain number of
+backups.  Please see the C<option> action for details.
+
+The C<restore> action explains how to restore from a backup.
+
 =item B<--no-depends>
 
 Do not remove dependent packages.
@@ -8810,7 +8864,7 @@
 distribution (L<http://tug.org/texlive>) and both are licensed under the
 GNU General Public License Version 2 or later.
 
-$Id: tlmgr.pl 44249 2017-05-08 17:26:47Z karl $
+$Id: tlmgr.pl 44289 2017-05-11 02:41:34Z preining $
 =cut
 
 # to remake HTML version: pod2html --cachedir=/tmp tlmgr.pl >/tmp/tlmgr.html

Modified: trunk/Master/texmf-dist/doc/context/documents/general/qrcs/setup-cs.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/context/documents/general/qrcs/setup-de.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/context/documents/general/qrcs/setup-en.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/context/documents/general/qrcs/setup-fr.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/context/documents/general/qrcs/setup-it.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/context/documents/general/qrcs/setup-nl.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/context/documents/general/qrcs/setup-ro.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/tex/context/base/mkii/cont-new.mkii
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkii/cont-new.mkii	2017-05-12 22:31:50 UTC (rev 44309)
+++ trunk/Master/texmf-dist/tex/context/base/mkii/cont-new.mkii	2017-05-12 22:38:39 UTC (rev 44310)
@@ -11,7 +11,7 @@
 %C therefore copyrighted by \PRAGMA. See mreadme.pdf for
 %C details.
 
-\newcontextversion{2017.05.09 10:14}
+\newcontextversion{2017.05.10 10:41}
 
 %D This file is loaded at runtime, thereby providing an
 %D excellent place for hacks, patches, extensions and new

Modified: trunk/Master/texmf-dist/tex/context/base/mkii/context.mkii
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkii/context.mkii	2017-05-12 22:31:50 UTC (rev 44309)
+++ trunk/Master/texmf-dist/tex/context/base/mkii/context.mkii	2017-05-12 22:38:39 UTC (rev 44310)
@@ -20,7 +20,7 @@
 %D your styles an modules.
 
 \edef\contextformat {\jobname}
-\edef\contextversion{2017.05.09 10:14}
+\edef\contextversion{2017.05.10 10:41}
 
 %D For those who want to use this:
 

Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/cont-new.mkiv
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/cont-new.mkiv	2017-05-12 22:31:50 UTC (rev 44309)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/cont-new.mkiv	2017-05-12 22:38:39 UTC (rev 44310)
@@ -11,7 +11,7 @@
 %C therefore copyrighted by \PRAGMA. See mreadme.pdf for
 %C details.
 
-\newcontextversion{2017.05.09 10:14}
+\newcontextversion{2017.05.10 10:41}
 
 %D This file is loaded at runtime, thereby providing an excellent place for
 %D hacks, patches, extensions and new features.

Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/context.mkiv
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/context.mkiv	2017-05-12 22:31:50 UTC (rev 44309)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/context.mkiv	2017-05-12 22:38:39 UTC (rev 44310)
@@ -39,7 +39,7 @@
 %D up and the dependencies are more consistent.
 
 \edef\contextformat {\jobname}
-\edef\contextversion{2017.05.09 10:14}
+\edef\contextversion{2017.05.10 10:41}
 \edef\contextkind   {beta}
 
 %D For those who want to use this:

Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/font-otj.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/font-otj.lua	2017-05-12 22:31:50 UTC (rev 44309)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/font-otj.lua	2017-05-12 22:38:39 UTC (rev 44310)
@@ -1021,7 +1021,7 @@
          -- end
             if pn.checkmark then
                 local wn = getwidth(n) -- in arial marks have widths
-                if wn ~= 0 then
+                if wn and wn ~= 0 then
                     wn = wn/2
                     if trace_injections then
                         report_injections("correcting non zero width mark %C",getchar(n))
@@ -1228,7 +1228,7 @@
                             if hasmarks then
                                 local pm = i.markbasenode
                                 if pm then
-                                    processmark(pm,current,i)
+                                    processmark(pm,n,i)
                                 end
                             end
                         end
@@ -1260,7 +1260,7 @@
                             if hasmarks then
                                 local pm = i.markbasenode
                                 if pm then
-                                    processmark(pm,current,i)
+                                    processmark(pm,n,i)
                                 end
                             end
                         end
@@ -1292,7 +1292,7 @@
                             if hasmarks then
                                 local pm = i.markbasenode
                                 if pm then
-                                    processmark(pm,current,i)
+                                    processmark(pm,n,i)
                                 end
                             end
                         end

Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/font-sel.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/font-sel.lua	2017-05-12 22:31:50 UTC (rev 44309)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/font-sel.lua	2017-05-12 22:38:39 UTC (rev 44310)
@@ -562,7 +562,7 @@
 end
 
 function selectfont.registerfallback(index)
-    local data     = data[index]
+    local data      = data[index]
     local fontclass = data.metadata.typeface
     local fontstyle = data.metadata.style
     local fallback  = fallbacks[fontclass]

Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/grph-con.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/grph-con.lua	2017-05-12 22:31:50 UTC (rev 44309)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/grph-con.lua	2017-05-12 22:38:39 UTC (rev 44310)
@@ -53,7 +53,10 @@
 
     local runner = sandbox.registerrunner {
         name     = "eps to pdf",
-        program  = { windows = "gswin64c", unix = "gs" },
+        program  = {
+            windows = os.platform == "win64" and "gswin64c" or "gswin32c",
+            unix    = "gs",
+        },
         template = longtostring [[
             -q
             -sDEVICE=pdfwrite

Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/math-act.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/math-act.lua	2017-05-12 22:31:50 UTC (rev 44309)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/math-act.lua	2017-05-12 22:38:39 UTC (rev 44310)
@@ -9,7 +9,7 @@
 -- Here we tweak some font properties (if needed).
 
 local type, next = type, next
-local fastcopy = table.fastcopy
+local fastcopy, insert, remove = table.fastcopy, table.insert, table.remove
 local formatters = string.formatters
 
 local trace_defining   = false  trackers.register("math.defining",   function(v) trace_defining   = v end)
@@ -674,6 +674,9 @@
 function mathematics.injectfallbacks(target,original)
     if #stack > 0 then
         -- for now
+        if trace_collecting then
+            report_math("stack overflow in math fallbacks")
+        end
         return
     end
     local properties = original.properties
@@ -684,7 +687,7 @@
             if fallbacks then
                 local definitions = fonts.collections.definitions[fallbacks]
                 if definitions then
-                    table.insert(stack, {
+                    insert(stack, {
                         target   = target,
                         original = original,
                         list     = { },
@@ -710,7 +713,7 @@
 end
 
 function mathematics.finishfallbacks()
-    local top      = table.remove(stack)
+    local top = remove(stack)
     if not top then
         report_math("finish error in math fallbacks")
         return
@@ -725,7 +728,7 @@
             local fallbacks = specification.fallbacks
             if fallbacks then
                 local definitions = fonts.collections.definitions[fallbacks]
-                if definitions then
+                if definitions and #definitions > 0 then
                     if trace_collecting then
                         report_math("adding fallback characters to font %a",specification.hash)
                     end
@@ -770,6 +773,7 @@
                                     end
                                     characters[unic] = copiedglyph(target,characters,chars,unicode,index)
                                     done[unic] = true
+                                else
                                 end
                             end
                             for unicode = start, stop do
@@ -786,6 +790,8 @@
                     xlist     = nil
                     xtarget   = nil
                     xoriginal = nil
+                elseif trace_collecting then
+                    report_math("no fallback characters added to font %a",specification.hash)
                 end
             end
         end

Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/math-noa.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/math-noa.lua	2017-05-12 22:31:50 UTC (rev 44309)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/math-noa.lua	2017-05-12 22:38:39 UTC (rev 44310)
@@ -23,6 +23,7 @@
 
 -- nota bene: uunderdelimiter uoverdelimiter etc are radicals (we have 5 types)
 
+local next, tonumber = next, tonumber
 local utfchar, utfbyte = utf.char, utf.byte
 local formatters, gmatch = string.formatters, string.gmatch
 local sortedhash = table.sortedhash
@@ -378,7 +379,6 @@
 noads.processnested = processnested
 noads.processouter  = process
 
-
 -- experiment (when not present fall back to fam 0) -- needs documentation
 
 local unknowns = { }
@@ -541,7 +541,8 @@
     processors.relocate = { }
 
     local function report_remap(tag,id,old,new,extra)
-        report_remapping("remapping %s in font %s from %C to %C%s",tag,id,old,new,extra)
+        report_remapping("remapping %s in font (%s,%s) from %C to %C%s",
+            tag,id,fontdata[id].properties.fontname or "",old,new,extra)
     end
 
     local remapalphabets    = mathematics.remapalphabets

Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/node-syn.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/node-syn.lua	2017-05-12 22:31:50 UTC (rev 44309)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/node-syn.lua	2017-05-12 22:38:39 UTC (rev 44310)
@@ -67,6 +67,9 @@
 local set_synctex_fields = nuts.set_synctex_fields
 local set_syntex_tag     = nodes.set_synctex_tag
 
+local getcount           = tex.getcount
+local setcount           = tex.setcount
+
 local getpos             = function()
                                getpos = backends.codeinjections.getpos
                                return getpos()
@@ -480,11 +483,11 @@
 directives.register("system.synctex", function(v)
     if v == "context" then
         luatex.synctex.enable()
-        tex.normalsynctex = 0
+        setcount("normalsynctex",0)
         synctex = true
     else
         v = tonumber(v) or (toboolean(v,true) and 1) or (v == "zipped" and 1) or (v == "unzipped" and -1) or 0
-        tex.normalsynctex = v
+        setcount("normalsynctex",v)
         synctex = v ~= 0
     end
     if synctex then
@@ -495,7 +498,7 @@
 end)
 
 statistics.register("synctex tracing",function()
-    if synctex or tex.normalsynctex ~= 0 then
+    if synctex or getcount("normalsynctex") ~= 0 then
         return "synctex has been enabled (extra log file generated)"
     end
 end)

Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/status-files.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/status-lua.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/tex/context/interface/mkiv/i-context.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/tex/context/interface/mkiv/i-readme.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/tex/generic/context/luatex/luatex-fonts-merged.lua
===================================================================
--- trunk/Master/texmf-dist/tex/generic/context/luatex/luatex-fonts-merged.lua	2017-05-12 22:31:50 UTC (rev 44309)
+++ trunk/Master/texmf-dist/tex/generic/context/luatex/luatex-fonts-merged.lua	2017-05-12 22:38:39 UTC (rev 44310)
@@ -1,6 +1,6 @@
 -- merged file : c:/data/develop/context/sources/luatex-fonts-merged.lua
 -- parent file : c:/data/develop/context/sources/luatex-fonts.lua
--- merge date  : 05/09/17 10:14:12
+-- merge date  : 05/10/17 10:41:46
 
 do -- begin closure to overcome local limits and interference
 
@@ -19827,7 +19827,7 @@
         ox=px-pn.markx
       if pn.checkmark then
         local wn=getwidth(n) 
-        if wn~=0 then
+        if wn and wn~=0 then
           wn=wn/2
           if trace_injections then
             report_injections("correcting non zero width mark %C",getchar(n))
@@ -20014,7 +20014,7 @@
               if hasmarks then
                 local pm=i.markbasenode
                 if pm then
-                  processmark(pm,current,i)
+                  processmark(pm,n,i)
                 end
               end
             end
@@ -20044,7 +20044,7 @@
               if hasmarks then
                 local pm=i.markbasenode
                 if pm then
-                  processmark(pm,current,i)
+                  processmark(pm,n,i)
                 end
               end
             end
@@ -20074,7 +20074,7 @@
               if hasmarks then
                 local pm=i.markbasenode
                 if pm then
-                  processmark(pm,current,i)
+                  processmark(pm,n,i)
                 end
               end
             end



More information about the tex-live-commits mailing list