summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xBuild/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua27
-rwxr-xr-xBuild/source/texk/texlive/linked_scripts/texlive/tlmgr.pl167
-rw-r--r--Master/texmf-dist/doc/latex/lwarp/README.txt2
-rw-r--r--Master/texmf-dist/doc/latex/lwarp/lwarp.pdfbin2046235 -> 2050883 bytes
-rwxr-xr-xMaster/texmf-dist/scripts/lwarp/lwarpmk.lua27
-rw-r--r--Master/texmf-dist/source/latex/lwarp/lwarp.dtx60
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp.sty29
7 files changed, 249 insertions, 63 deletions
diff --git a/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua b/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua
index 99b5f4949fe..c372f67f629 100755
--- a/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua
+++ b/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua
@@ -4,7 +4,7 @@
-- Print the usage of the lwarpmk command:
-printversion = "v0.52"
+printversion = "v0.53"
function printhelp ()
print ("lwarpmk: Use lwarpmk -h or lwarpmk --help for help.") ;
@@ -25,10 +25,11 @@ lwarpmk again [project]: Touch the source code to trigger recompiles.
lwarpmk limages [project]: Process the "lateximages" created by lwarp.sty.
lwarpmk pdftohtml [project]:
For use with latexmk or a Makefile:
- Convert project_html.pdf to project_html.html and
- individual HTML files.
+ Converts project_html.pdf to project_html.html and individual HTML files.
+ Finishes the HTML conversion even if there was a compile error.
lwarpmk clean [project]: Remove .aux, .toc, .lof/t, .idx, .ind, .log, *_html_inc.*, .gl*
lwarpmk cleanall [project]: Remove auxiliary files and also project.pdf, *.html
+lwarpmk cleanlimages: Removes all images from the "lateximages" directory.
lwarpmk -h: Print this help message.
lwarpmk --help: Print this help message.
@@ -335,6 +336,8 @@ if opsystem=="Windows" then
end -- create lwarp_one_limage.cmd
-- Track the number of parallel processes
numimageprocesses = 0
+-- Track warning to recompile if find a page 0
+pagezerowarning = false
-- Scan lateximages.txt
for line in limagesfile:lines() do
-- lwimgpage is the page number in the PDF which has the image
@@ -344,7 +347,9 @@ i,j,lwimgpage,lwimghash,lwimgname = string.find (line,"|(.*)|(.*)|(.*)|")
-- For each entry:
if ( (i~=nil) ) then
-- Skip if the page number is 0:
-if ( lwimgpage ~= "0" ) then
+if ( lwimgpage == "0" ) then
+ pagezerowarning = true
+else
-- Skip is this image is hashed and already exists:
local lwimgfullname = "lateximages" .. dirslash .. lwimgname .. ".svg"
if (
@@ -425,6 +430,12 @@ end -- not nil
end -- do
io.close(limagesfile)
print ( "lwarpmk limages: done" )
+if ( pagezerowarning == true ) then
+ print ( "lwarpmk limages: WARNING: Images will be incorrect." )
+ print ( "lwarpmk limages: Enter \"lwarpmk cleanlimages\", then" )
+ print ( "lwarpmk limages: recompile the document one more time, then" )
+ print ( "lwarpmk limages: repeat \"lwarpmk images\" again." )
+end -- pagezerowarning
end -- function
-- Use latexmk to compile source and index:
@@ -638,6 +649,14 @@ os.execute ( rmname .. " " ..
)
print ("lwarpmk: Done.")
+-- lwarpmk cleanlimages
+-- Remove images from the lateximages directory.
+
+elseif arg[1] == "cleanlimages" then
+loadconf ()
+os.execute ( rmname .. " lateximages/*" )
+print ("lwarpmk: Done.")
+
-- lwarpmk with no argument :
elseif (arg[1] == nil) then
diff --git a/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl b/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl
index 585ca0b7c2c..2391d944319 100755
--- a/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl
+++ b/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl
@@ -1,12 +1,12 @@
#!/usr/bin/env perl
-# $Id: tlmgr.pl 47132 2018-03-26 17:19:25Z karl $
+# $Id: tlmgr.pl 47220 2018-04-01 03:20:33Z preining $
#
# Copyright 2008-2018 Norbert Preining
# This file is licensed under the GNU General Public License version 2
# or any later version.
-my $svnrev = '$Revision: 47132 $';
-my $datrev = '$Date: 2018-03-26 19:19:25 +0200 (Mon, 26 Mar 2018) $';
+my $svnrev = '$Revision: 47220 $';
+my $datrev = '$Date: 2018-04-01 05:20:33 +0200 (Sun, 01 Apr 2018) $';
my $tlmgrrevision;
my $tlmgrversion;
my $prg;
@@ -28,6 +28,7 @@ our $tlmgr_config_file;
our $pinfile;
our $action; # for the pod2usage -sections call
our %opts;
+our $allowed_verify_args_regex = qr/^(none|main|all)$/i;
END {
if ($opts{"pause"}) {
@@ -362,6 +363,7 @@ my %globaloptions = (
"print-platform-info" => 1,
"usermode|user-mode" => 1,
"usertree|user-tree" => "=s",
+ "verify-repo" => "=s",
"verify-downloads" => "!",
"require-verification" => "!",
"version" => 1,
@@ -479,6 +481,22 @@ sub main {
$action = "remove";
}
+ #
+ # check for correctness of verify-repo argument
+ if (defined($opts{"verify-repo"}) &&
+ ($opts{"verify-repo"} !~ m/$allowed_verify_args_regex/)) {
+ tldie("$prg: unknown value for --verify-repo: $opts{'verify-repo'}\n");
+ }
+ # convert command line crypto options
+ $opts{"verify-repo"} = convert_crypto_options($opts{"verify-downloads"}, $opts{"require-verification"}, $opts{"verify-repo"});
+ if (defined($opts{"verify-downloads"}) || defined($opts{"require-verification"})) {
+ tlwarn("$prg: please use -verify-repo options instead of verify-downloads/require-verification\n" .
+ "$prg: adjusting --verify-repo=$opts{'verify-repo'}\n");
+ }
+ delete $opts{"require-verification"};
+ delete $opts{"verify-downloads"};
+
+
# now $action should be part of %actionoptions, otherwise this is
# an error
if (defined($action) && $action && !exists $action_specification{$action}) {
@@ -1781,7 +1799,8 @@ sub restore_one_package {
return ($F_ERROR);
}
$localtlpdb->remove_package($pkg);
- TeXLive::TLPDB->_install_data($restore_file , 0, [] ,$localtlpdb);
+ # the -1 force the TLUtils::unpack to NOT warn about missing checksum/sizes
+ TeXLive::TLPDB->_install_data($restore_file , 0, [], $localtlpdb, "-1", "-1");
logpackage("restore: $pkg ($rev)");
# now we have to read the .tlpobj file and add it to the DB
my $tlpobj = TeXLive::TLPOBJ->new;
@@ -1978,7 +1997,11 @@ sub action_restore {
}
}
} else {
- print "No backups available in $opts{'backupdir'}\n";
+ if ($opts{'json'}) {
+ print "[]\n";
+ } else {
+ print "No backups available in $opts{'backupdir'}\n";
+ }
}
return ($F_OK | $F_NOPOSTACTION);
}
@@ -3247,8 +3270,9 @@ sub action_update {
$unwind_package = $newname;
}
+ # the -1 force the TLUtils::unpack to NOT warn about missing checksum/sizes
my ($instret, $msg) = TeXLive::TLUtils::unpack("$unwind_package",
- $localtlpdb->root);
+ $localtlpdb->root, checksum => "-1", checksize => "-1");
if ($instret) {
# now we have to include the tlpobj
my $tlpobj = TeXLive::TLPOBJ->new;
@@ -6199,7 +6223,7 @@ sub action_shell {
# keys which can be set/get and are also settable via global cmdline opts
my @valid_bool_keys
= qw/debug-translation machine-readable no-execute-actions
- require-verification verify-downloads json/;
+ verify-repo json/;
my @valid_string_keys = qw/repository prompt/;
my @valid_keys = (@valid_bool_keys, @valid_string_keys);
# set auto flush unconditionally in action shell
@@ -6518,26 +6542,26 @@ sub handle_gpg_config_settings {
# setup gpg if available
# by default we setup gpg
# default value
- my $do_setup_gpg = 1;
+ my $do_setup_gpg = "main";
# the value is set in the config file
- if (defined($config{'verify-downloads'})) {
- $do_setup_gpg = $config{'verify-downloads'};
+ if (defined($config{'verify-repo'})) {
+ $do_setup_gpg = $config{'verify-repo'};
}
# command line
- if (defined($opts{'verify-downloads'})) {
- $do_setup_gpg = $opts{'verify-downloads'};
+ if (defined($opts{'verify-repo'})) {
+ $do_setup_gpg = $opts{'verify-repo'};
}
# now we know whether we setup gpg or not
- if ($do_setup_gpg) {
+ if ($do_setup_gpg ne "none") {
if (TeXLive::TLCrypto::setup_gpg($Master)) {
debug("will verify cryptographic signatures\n")
} else {
my $prefix = "$prg: No gpg found"; # just to shorten the strings
- if ($opts{'verify-downloads'}) {
+ if ($opts{'verify-repo'} eq "all") {
# verification was requested on the command line, but did not succeed, die
tldie("$prefix, verification explicitly requested on command line, quitting.\n");
}
- if ($config{'verify-downloads'}) {
+ if ($config{'verify-repo'} eq "all") {
# verification explicitly requested in config file, but not gpg, die
tldie("$prefix, verification explicitly requested in config file, quitting.\n");
}
@@ -6549,12 +6573,12 @@ sub handle_gpg_config_settings {
} else {
# we do not setup gpg: when explicitly requested, be silent, otherwise info
my $prefix = "$prg: not setting up gpg";
- if (defined($opts{'verify-downloads'})) {
+ if (defined($opts{'verify-repo'})) {
# log normally is *NOT* logged to a file
# tlmgr does by default *NOT* set up a log file (cmd line option)
# user requested it, so don't bother with output
debug("$prefix, requested on command line\n");
- } elsif (defined($config{'verify-downloads'})) {
+ } elsif (defined($config{'verify-repo'})) {
debug("$prefix, requested in config file\n");
} else {
tldie("$prg: how could this happen? gpg setup.\n");
@@ -6976,8 +7000,8 @@ sub load_config_file {
# first set default values
$config{"gui-expertmode"} = 1;
$config{"auto-remove"} = 1;
- $config{"require-verification"} = 0;
$config{"persistent-downloads"} = 1;
+ $config{"verify-repo"} = "main";
# do NOT set this here, we distinguish between explicitly set in the config file
# or implicitly true
# $config{"verify-downloads"} = 1;
@@ -6994,6 +7018,15 @@ sub load_config_file {
$tlmgr_config_file = TeXLive::TLConfFile->new($fn, "#", "=");
load_options_from_config($tlmgr_config_file) if $tlmgr_config_file;
+ $config{"verify-repo"} = convert_crypto_options($config{"verify-downloads"}, $config{"require-verification"}, $config{"verify-repo"});
+ delete $config{"require-verification"};
+ delete $config{"verify-downloads"};
+
+ # TODO TODO
+ # rename old crypto options
+ #
+ # TODO TODO
+ # what should we do with this?
# set $opts{"key"} from $config{"key"} if not passed in on cmd line
if (!defined($opts{"require-verification"})) {
$opts{"require-verification"} = $config{"require-verification"};
@@ -7063,6 +7096,13 @@ sub load_options_from_config {
tlwarn("$prg: $fn: Unknown value for verify-downloads: $val\n");
}
+ } elsif ($key eq "verify-repo") {
+ if ($val =~ m/$allowed_verify_args_regex/) {
+ $config{"verify-repo"} = $val;
+ } else {
+ tlwarn("$prg: $fn: Unknown value for verify-repo: $val\n");
+ }
+
} elsif ($key eq "no-checksums") {
if ($val eq "1") {
$config{"no-checksums"} = 1;
@@ -7110,6 +7150,54 @@ sub write_config_file {
}
}
+sub convert_crypto_options {
+ my ($verify_downloads, $require_verification, $verify_repo) = @_;
+
+ # leave undefined to deal with case that nothing has been passed in
+ my $ret;
+
+ # crypto options rewriting
+ if ((defined($verify_downloads) || defined($require_verification)) &&
+ defined($verify_repo)) {
+ # we cannot have all three, warn and bail out
+ tldie("$prg: The options verify-downloads and require-verification have been\n" .
+ "$prg: superseeded by verify-repo, please use only the later on!\n");
+ }
+ # return immediately if verify_repo is already set
+ return($verify_repo) if (defined($verify_repo));
+
+ if (defined($verify_downloads)) {
+ if ($verify_downloads) {
+ # explicit --verify-downloads was given
+ if ($require_verification) {
+ # --require-verification was given
+ $ret = "all";
+ } else {
+ # either nothing passed or --no-require-verification (default)
+ # use explit setting to main
+ $ret = "main";
+ }
+ } else {
+ # explicit --no-verify-downloads was given
+ if ($require_verification) {
+ # --require-verification was given
+ tldie("You cannot ask for no verification and require it at the same time!\n");
+ } else {
+ $ret = "none";
+ }
+ }
+ } else {
+ # nothing related to verify-download was given, so it is by default
+ # set to true
+ if ($require_verification) {
+ $ret = "all";
+ } else {
+ # dont set anything, as nothing has been passed in
+ }
+ }
+ return($ret);
+}
+
# if the packagelog variable is set then write to PACKAGELOG filehandle
#
sub logpackage {
@@ -7432,16 +7520,6 @@ Change the pinning file location from C<TEXMFLOCAL/tlpkg/pinning.txt>
(see L</Pinning> below). Documented only for completeness, as this is
only useful in debugging.
-=item B<--require-verification>
-
-=item B<--no-require-verification>
-
-Verify that all remote repositories to be correctly signed, or quit.
-With C<--no-require-verification>, all verification is omitted. By
-default, verification is performed (but not required) if GnuPG and the
-relevant keys are available. See L<CRYPTOGRAPHIC VERIFICATION> below for
-details.
-
=item B<--usermode>
Activates user mode for this run of C<tlmgr>; see L<USER MODE> below.
@@ -7450,14 +7528,13 @@ Activates user mode for this run of C<tlmgr>; see L<USER MODE> below.
Uses I<dir> for the tree in user mode; see L<USER MODE> below.
-=item B<--verify-downloads>
+=item B<--verify-repo=[none|main|all]>
-=item B<--no-verify-downloads>
-
-Enables or disables cryptographic verification of all downloaded
-database files. A working GnuPG (C<gpg>) binary needs to be present in
-the path, otherwise this option has no effect. By default, the main
-repository is verified, while any other repositories are not verified.
+Defines the level of verification done: If C<none> is passed, no
+verification whatsoever is done. If C<main> and a working GnuPG (C<gpg>)
+binary is available, all repositories are checked, but only the main
+repository is required to be signed. If C<all> then all repositories
+need to be signed.
See L<CRYPTOGRAPHIC VERIFICATION> below for details.
=back
@@ -9027,13 +9104,17 @@ main repository be signed, but not any additional repositories. If
C<gpg> is not available, signatures are not checked and no verification
is carried out, but C<tlmgr> proceeds normally.
-The attempted verification can be suppressed entirely by specifying
-C<--no-verify-downloads> on the command line, or a line
-C<verify-downloads=0> in a C<tlmgr> config file (see L<CONFIGURATION
-FILE FOR TLMGR>). On the other hand, you can I<require> successful
-verification by specifying C<--require-verification> on the command
-line, or C<require-verification=1> in a C<tlmgr> config file; in this
-case, if verification is not possible, or fails, the program quits.
+The behaviour of the verification can be controlled by the command line
+and config file option C<verify-repo> which takes one of the following
+values: C<none>, C<main>, or C<all>. In case of C<none>, no verification
+whatsoever is attempted, similar to the case when not GnuPG can be found.
+In case of C<main> (the default) verification is required only for
+the main repository, but attempted for all. Missing signatures of
+subsidiary repositories will not result in an error.
+Finally, in the case of C<all>, all repositories need to be signed.
+
+In all cases when a signature is checked and fails to verify, an error
+is raised.
Cryptographic verification requires checksum checking (described just
above) to succeed, and a working GnuPG (C<gpg>) program (see below for
@@ -9620,7 +9701,7 @@ This script and its documentation were written for the TeX Live
distribution (L<http://tug.org/texlive>) and both are licensed under the
GNU General Public License Version 2 or later.
-$Id: tlmgr.pl 47132 2018-03-26 17:19:25Z karl $
+$Id: tlmgr.pl 47220 2018-04-01 03:20:33Z preining $
=cut
# to remake HTML version: pod2html --cachedir=/tmp tlmgr.pl >/tmp/tlmgr.html
diff --git a/Master/texmf-dist/doc/latex/lwarp/README.txt b/Master/texmf-dist/doc/latex/lwarp/README.txt
index 02ab21b59be..f15bfa0aaac 100644
--- a/Master/texmf-dist/doc/latex/lwarp/README.txt
+++ b/Master/texmf-dist/doc/latex/lwarp/README.txt
@@ -1,5 +1,5 @@
-LaTeX lwarp package v0.52 README.txt
+LaTeX lwarp package v0.53 README.txt
Files included are:
diff --git a/Master/texmf-dist/doc/latex/lwarp/lwarp.pdf b/Master/texmf-dist/doc/latex/lwarp/lwarp.pdf
index 4b143b849a8..2274a152c57 100644
--- a/Master/texmf-dist/doc/latex/lwarp/lwarp.pdf
+++ b/Master/texmf-dist/doc/latex/lwarp/lwarp.pdf
Binary files differ
diff --git a/Master/texmf-dist/scripts/lwarp/lwarpmk.lua b/Master/texmf-dist/scripts/lwarp/lwarpmk.lua
index 99b5f4949fe..c372f67f629 100755
--- a/Master/texmf-dist/scripts/lwarp/lwarpmk.lua
+++ b/Master/texmf-dist/scripts/lwarp/lwarpmk.lua
@@ -4,7 +4,7 @@
-- Print the usage of the lwarpmk command:
-printversion = "v0.52"
+printversion = "v0.53"
function printhelp ()
print ("lwarpmk: Use lwarpmk -h or lwarpmk --help for help.") ;
@@ -25,10 +25,11 @@ lwarpmk again [project]: Touch the source code to trigger recompiles.
lwarpmk limages [project]: Process the "lateximages" created by lwarp.sty.
lwarpmk pdftohtml [project]:
For use with latexmk or a Makefile:
- Convert project_html.pdf to project_html.html and
- individual HTML files.
+ Converts project_html.pdf to project_html.html and individual HTML files.
+ Finishes the HTML conversion even if there was a compile error.
lwarpmk clean [project]: Remove .aux, .toc, .lof/t, .idx, .ind, .log, *_html_inc.*, .gl*
lwarpmk cleanall [project]: Remove auxiliary files and also project.pdf, *.html
+lwarpmk cleanlimages: Removes all images from the "lateximages" directory.
lwarpmk -h: Print this help message.
lwarpmk --help: Print this help message.
@@ -335,6 +336,8 @@ if opsystem=="Windows" then
end -- create lwarp_one_limage.cmd
-- Track the number of parallel processes
numimageprocesses = 0
+-- Track warning to recompile if find a page 0
+pagezerowarning = false
-- Scan lateximages.txt
for line in limagesfile:lines() do
-- lwimgpage is the page number in the PDF which has the image
@@ -344,7 +347,9 @@ i,j,lwimgpage,lwimghash,lwimgname = string.find (line,"|(.*)|(.*)|(.*)|")
-- For each entry:
if ( (i~=nil) ) then
-- Skip if the page number is 0:
-if ( lwimgpage ~= "0" ) then
+if ( lwimgpage == "0" ) then
+ pagezerowarning = true
+else
-- Skip is this image is hashed and already exists:
local lwimgfullname = "lateximages" .. dirslash .. lwimgname .. ".svg"
if (
@@ -425,6 +430,12 @@ end -- not nil
end -- do
io.close(limagesfile)
print ( "lwarpmk limages: done" )
+if ( pagezerowarning == true ) then
+ print ( "lwarpmk limages: WARNING: Images will be incorrect." )
+ print ( "lwarpmk limages: Enter \"lwarpmk cleanlimages\", then" )
+ print ( "lwarpmk limages: recompile the document one more time, then" )
+ print ( "lwarpmk limages: repeat \"lwarpmk images\" again." )
+end -- pagezerowarning
end -- function
-- Use latexmk to compile source and index:
@@ -638,6 +649,14 @@ os.execute ( rmname .. " " ..
)
print ("lwarpmk: Done.")
+-- lwarpmk cleanlimages
+-- Remove images from the lateximages directory.
+
+elseif arg[1] == "cleanlimages" then
+loadconf ()
+os.execute ( rmname .. " lateximages/*" )
+print ("lwarpmk: Done.")
+
-- lwarpmk with no argument :
elseif (arg[1] == nil) then
diff --git a/Master/texmf-dist/source/latex/lwarp/lwarp.dtx b/Master/texmf-dist/source/latex/lwarp/lwarp.dtx
index 9e314321fcf..1e3513dbea3 100644
--- a/Master/texmf-dist/source/latex/lwarp/lwarp.dtx
+++ b/Master/texmf-dist/source/latex/lwarp/lwarp.dtx
@@ -16,7 +16,7 @@
% \iffalse
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{lwarp}
-%<package> [2018/04/01 v0.52 Allows LaTeX to directly produce HTML5 output.]
+%<package> [2018/04/01 v0.53 Allows LaTeX to directly produce HTML5 output.]
%
%<*driver>
\documentclass{ltxdoc}
@@ -2062,7 +2062,7 @@ This boolean may be tested by the user for later use.
%<*package>
% \fi
%
-% \CheckSum{23333}
+% \CheckSum{23337}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -2156,6 +2156,7 @@ This boolean may be tested by the user for later use.
% \changes{v0.50}{2018/03/03}{\ 2018/03/03}
% \changes{v0.51}{2018/03/24}{\ 2018/03/24}
% \changes{v0.52}{2018/04/01}{\ 2018/04/01}
+% \changes{v0.53}{2018/04/01}{\ 2018/04/01}
@@ -2349,6 +2350,15 @@ This boolean may be tested by the user for later use.
%
% \begin{description}
% \needspace{2\baselineskip}
+% \item[v0.53:] \
+% \begin{itemize}
+% \item \prog{lwarpmk}: Added a warning about corrupted images due to the
+% \margintag{\prog{lwarpmk}}
+% need to recompile the document one more time.
+% \item \prog{lwarpmk}: Added the \cmds{lwarpmk cleanlimages} command.
+% \item Added documentation for \cmds{lwarpmk cleanlimages} and
+% \cmds{lwarpmk pdftohtml}.
+% \end{itemize}
% \item[v0.52:] \
% \begin{itemize}
% \item Improved install instructions regarding \filenm{lwarp\_baseline\_marker.png}.
@@ -4569,6 +4579,23 @@ This boolean may be tested by the user for later use.
% \userentry{lwarpmk cleanall}
%
%
+% \subsection{Cleaning the images from the \filenm{lateximages} directory}
+% \changes{v0.53}{2018/04/01}{Docs: \cmds{lwarpmk cleanlimages}.}
+%
+% To remove the images from the \filenm{lateximages} directory, including
+% all \SVG\ math images:
+% \userentry{lwarpmk cleanlimages}
+%
+%
+% \subsection{Creating HTML from an incomplete compile}
+% \changes{v0.53}{2018/04/01}{Docs: \cmds{lwarpmk pdftohtml}.}
+%
+% During testing it may be useful to finish the \HTML\ conversion even when
+% the document had errors and did not compile successfully. To attempt an
+% \HTML\ conversion of an incomplete document:
+% \userentry{lwarpmk pdftohtml [project]}
+%
+%
% \subsection{Processing multiple projects in the same directory}
%
% It is possible to have several projects in the same directory.
@@ -11838,6 +11865,8 @@ src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-
% \changes{v0.51}{2018/03/16}{\prog{lwarpmk}: \prog{pdftocairo} \optn{-noshrink} added.}
% \changes{v0.52}{2018/03/31}{\prog{lwarpmk}: Fix: Memory overflow when spawning tasks.}
% \changes{v0.52}{2018/04/01}{\prog{lwarpmk}: Fix: Skip image generation if from page 0.}
+% \changes{v0.53}{2018/04/01}{\prog{lwarpmk}: Adds warning for corrupted images.}
+% \changes{v0.53}{2018/04/01}{\prog{lwarpmk}: Adds \cmds{lwarpmk cleanlimages}.}
%
% The following is only generated if the \optn{lwarpmk} option
% was given to \pkg{lwarp}.
@@ -11854,7 +11883,7 @@ src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-
-- Print the usage of the lwarpmk command:
-printversion = "v0.52"
+printversion = "v0.53"
function printhelp ()
print ("lwarpmk: Use lwarpmk -h or lwarpmk --help for help.") ;
@@ -11875,10 +11904,11 @@ lwarpmk again [project]: Touch the source code to trigger recompiles.
lwarpmk limages [project]: Process the "lateximages" created by lwarp.sty.
lwarpmk pdftohtml [project]:
For use with latexmk or a Makefile:
- Convert project_html.pdf to project_html.html and
- individual HTML files.
+ Converts project_html.pdf to project_html.html and individual HTML files.
+ Finishes the HTML conversion even if there was a compile error.
lwarpmk clean [project]: Remove .aux, .toc, .lof/t, .idx, .ind, .log, *_html_inc.*, .gl*
lwarpmk cleanall [project]: Remove auxiliary files and also project.pdf, *.html
+lwarpmk cleanlimages: Removes all images from the "lateximages" directory.
lwarpmk -h: Print this help message.
lwarpmk --help: Print this help message.
@@ -12192,6 +12222,8 @@ if opsystem=="Windows" then
end -- create lwarp_one_limage.cmd
-- Track the number of parallel processes
numimageprocesses = 0
+-- Track warning to recompile if find a page 0
+pagezerowarning = false
-- Scan lateximages.txt
for line in limagesfile:lines() do
-- lwimgpage is the page number in the PDF which has the image
@@ -12201,7 +12233,9 @@ i,j,lwimgpage,lwimghash,lwimgname = string.find (line,"|(.*)|(.*)|(.*)|")
-- For each entry:
if ( (i~=nil) ) then
-- Skip if the page number is 0:
-if ( lwimgpage ~= "0" ) then
+if ( lwimgpage == "0" ) then
+ pagezerowarning = true
+else
-- Skip is this image is hashed and already exists:
local lwimgfullname = "lateximages" .. dirslash .. lwimgname .. ".svg"
if (
@@ -12282,6 +12316,12 @@ end -- not nil
end -- do
io.close(limagesfile)
print ( "lwarpmk limages: done" )
+if ( pagezerowarning == true ) then
+ print ( "lwarpmk limages: WARNING: Images will be incorrect." )
+ print ( "lwarpmk limages: Enter \"lwarpmk cleanlimages\", then" )
+ print ( "lwarpmk limages: recompile the document one more time, then" )
+ print ( "lwarpmk limages: repeat \"lwarpmk images\" again." )
+end -- pagezerowarning
end -- function
@@ -12498,6 +12538,14 @@ os.execute ( rmname .. " " ..
)
print ("lwarpmk: Done.")
+-- lwarpmk cleanlimages
+-- Remove images from the lateximages directory.
+
+elseif arg[1] == "cleanlimages" then
+loadconf ()
+os.execute ( rmname .. " lateximages/*" )
+print ("lwarpmk: Done.")
+
-- lwarpmk with no argument :
elseif (arg[1] == nil) then
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
index 7651948a52d..7620ac5f591 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
@@ -17,7 +17,7 @@
%% version 2005/12/01 or later.
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{lwarp}
- [2018/04/01 v0.52 Allows LaTeX to directly produce HTML5 output.]
+ [2018/04/01 v0.53 Allows LaTeX to directly produce HTML5 output.]
@@ -3075,7 +3075,7 @@ src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-
-- Print the usage of the lwarpmk command:
-printversion = "v0.52"
+printversion = "v0.53"
function printhelp ()
print ("lwarpmk: Use lwarpmk -h or lwarpmk --help for help.") ;
@@ -3096,10 +3096,11 @@ lwarpmk again [project]: Touch the source code to trigger recompiles.
lwarpmk limages [project]: Process the "lateximages" created by lwarp.sty.
lwarpmk pdftohtml [project]:
For use with latexmk or a Makefile:
- Convert project_html.pdf to project_html.html and
- individual HTML files.
+ Converts project_html.pdf to project_html.html and individual HTML files.
+ Finishes the HTML conversion even if there was a compile error.
lwarpmk clean [project]: Remove .aux, .toc, .lof/t, .idx, .ind, .log, *_html_inc.*, .gl*
lwarpmk cleanall [project]: Remove auxiliary files and also project.pdf, *.html
+lwarpmk cleanlimages: Removes all images from the "lateximages" directory.
lwarpmk -h: Print this help message.
lwarpmk --help: Print this help message.
@@ -3406,6 +3407,8 @@ if opsystem=="Windows" then
end -- create lwarp_one_limage.cmd
-- Track the number of parallel processes
numimageprocesses = 0
+-- Track warning to recompile if find a page 0
+pagezerowarning = false
-- Scan lateximages.txt
for line in limagesfile:lines() do
-- lwimgpage is the page number in the PDF which has the image
@@ -3415,7 +3418,9 @@ i,j,lwimgpage,lwimghash,lwimgname = string.find (line,"|(.*)|(.*)|(.*)|")
-- For each entry:
if ( (i~=nil) ) then
-- Skip if the page number is 0:
-if ( lwimgpage ~= "0" ) then
+if ( lwimgpage == "0" ) then
+ pagezerowarning = true
+else
-- Skip is this image is hashed and already exists:
local lwimgfullname = "lateximages" .. dirslash .. lwimgname .. ".svg"
if (
@@ -3496,6 +3501,12 @@ end -- not nil
end -- do
io.close(limagesfile)
print ( "lwarpmk limages: done" )
+if ( pagezerowarning == true ) then
+ print ( "lwarpmk limages: WARNING: Images will be incorrect." )
+ print ( "lwarpmk limages: Enter \"lwarpmk cleanlimages\", then" )
+ print ( "lwarpmk limages: recompile the document one more time, then" )
+ print ( "lwarpmk limages: repeat \"lwarpmk images\" again." )
+end -- pagezerowarning
end -- function
-- Use latexmk to compile source and index:
@@ -3709,6 +3720,14 @@ os.execute ( rmname .. " " ..
)
print ("lwarpmk: Done.")
+-- lwarpmk cleanlimages
+-- Remove images from the lateximages directory.
+
+elseif arg[1] == "cleanlimages" then
+loadconf ()
+os.execute ( rmname .. " lateximages/*" )
+print ("lwarpmk: Done.")
+
-- lwarpmk with no argument :
elseif (arg[1] == nil) then