diff options
author | Karl Berry <karl@freefriends.org> | 2019-11-05 21:37:02 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-11-05 21:37:02 +0000 |
commit | 0a7ba561a6b1ec34d9437d414674052d3aee5ef5 (patch) | |
tree | 0746bc1e90dd17f383fa13e819ba63bab380f9ee | |
parent | 9e63b55e701a371d05992e63c3bb88c3b574ad76 (diff) |
chklref (5nov19)
git-svn-id: svn://tug.org/texlive/trunk@52649 c570f23f-e606-0410-a88d-b1316a301751
-rwxr-xr-x | Build/source/texk/texlive/linked_scripts/chklref/chklref.pl | 63 | ||||
-rw-r--r-- | Master/texmf-dist/doc/man/man1/chklref.1 | 56 | ||||
-rw-r--r-- | Master/texmf-dist/doc/man/man1/chklref.man1.pdf | bin | 0 -> 20077 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/support/chklref/Makefile.doc | 5 | ||||
-rw-r--r-- | Master/texmf-dist/doc/support/chklref/README.md | 27 | ||||
-rw-r--r-- | Master/texmf-dist/doc/support/chklref/VERSION | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/support/chklref/chklref.pdf | bin | 298764 -> 299035 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/support/chklref/chklref.tex | 3 | ||||
-rwxr-xr-x | Master/texmf-dist/doc/support/chklref/release.sh | 21 | ||||
-rwxr-xr-x | Master/texmf-dist/scripts/chklref/chklref.pl | 63 | ||||
-rwxr-xr-x | Master/tlpkg/libexec/ctan2tds | 1 |
11 files changed, 169 insertions, 72 deletions
diff --git a/Build/source/texk/texlive/linked_scripts/chklref/chklref.pl b/Build/source/texk/texlive/linked_scripts/chklref/chklref.pl index 9360708e413..6e8ba38e27f 100755 --- a/Build/source/texk/texlive/linked_scripts/chklref/chklref.pl +++ b/Build/source/texk/texlive/linked_scripts/chklref/chklref.pl @@ -34,9 +34,6 @@ my $USERTEXOPTIONS = ''; my $RUNQUIET = 0; my $RUNDEBUG = 0; my $PARSEONLY = 0; -my $PRINTVERSION = 0; -my $HELP = 0; -my $VERSION = 'Version 3.0.1'; # Create a hash with three keys "str", "line", "file" and returns a # reference to it @@ -259,25 +256,41 @@ sub parse { } sub usage { -print << 'EOT'; -chklref -- Check unused labels and bibitems + print << 'EOT'; +Usage: chklref [options] texfile -Copyright (C) 2005-2019 Jérôme Lelong <jerome.lelong@gmail.com> -This program comes with ABSOLUTELY NO WARRANTY; -This is free software, and you are welcome to redistribute it under certain conditions; - -Usage: - chklref [options] texfile +Check unused labels and bibitems in a LaTeX file Options: - --tex <compiler>, -t : Specify the TeX compiler to be used. Default = pdflatex. - --tex-options : List of options to pass to the TeX compiler. - --debug, -d : Run in debug mode. Do not clean the generated `.chk` file. - --quiet, -q : Run in quiet mode. Do not print the output of the TeX compiler. - --parse-only : Do not run the LaTeX compiler but use the already existing `.chk` file. When this option is passed, the following other options are meaningless: `--tex`, `--tex-options`, `--quiet`, `--debug`. - --version, -v : Print the version of this scirpt. - --help,h : Print this help. + --tex <compiler>, -t Specify the TeX compiler to be used. Default is `pdflatex`. + --tex-options List of options to pass to the TeX compiler. It should be a quoted + string of white space delimited options. Note that we always add + `-interaction nonstopmode` on top of these options. + --debug, -d Run in debug mode. Do not clean the generated `.chk` file. + --quiet, -q Run in quiet mode. Do not print the output of the TeX compiler. + --parse-only Do not run the LaTeX compiler but use the already existing `.chk` file. + When this option is passed, the following other options are meaningless: + `--tex`, `--tex-options`, `--quiet`, `--debug`. + --version, -v Print the version of this script. + --help,h Print this help. + + +Report bugs to https://github.com/jlelong/chklref. `chklref` is known not to work with `cleveref`. If you would like to contribute to `chklref`, feel free to open a PR on https://github.com/jlelong/chklref. +EOT + exit(0) +} + +sub version { + print << 'EOT'; +chklref 3.1.2 + +Copyright 2005-2019 Jerome Lelong <jerome.lelong@gmail.com>. +This program comes with ABSOLUTELY NO WARRANTY. +This is free software, and you are welcome to redistribute it under GPLv3. + +Written by Jerome Lelong <jerome.lelong@gmail.com> EOT + exit(0) } sub texcompile { @@ -292,25 +305,15 @@ sub texcompile { Getopt::Long::Configure ("bundling"); GetOptions ( - 'version|v!' => \$PRINTVERSION, + 'version|v!' => \&version, 'quiet|q!' => \$RUNQUIET, 'debug|d!' => \$RUNDEBUG, 'tex|t=s' => \$TEX, 'texoptions=s' => \$USERTEXOPTIONS, 'parse-only' => \$PARSEONLY, - 'help|h' => \$HELP + 'help|h' => \&usage ) || usage(); -if ($HELP) { - usage(); - exit(0); -} - -if ($PRINTVERSION) { - print "chklref $VERSION\n"; - exit(0) -} - if (@ARGV != 1) { usage(); exit 0; diff --git a/Master/texmf-dist/doc/man/man1/chklref.1 b/Master/texmf-dist/doc/man/man1/chklref.1 new file mode 100644 index 00000000000..8dc3b874edb --- /dev/null +++ b/Master/texmf-dist/doc/man/man1/chklref.1 @@ -0,0 +1,56 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.11. +.TH CHKLREF "1" "November 2019" "chklref 3.1.2" "User Commands" +.SH NAME +chklref \- manual page for chklref 3.1.2 +.SH SYNOPSIS +.B chklref +[\fI\,options\/\fR] \fI\,texfile\/\fR +.SH DESCRIPTION +Check unused labels and bibitems in a LaTeX file +.SH OPTIONS +.TP +\fB\-\-tex\fR <compiler>, \fB\-t\fR +Specify the TeX compiler to be used. Default is `pdflatex`. +.TP +\fB\-\-tex\-options\fR +List of options to pass to the TeX compiler. It should be a quoted +string of white space delimited options. Note that we always add +`\-interaction nonstopmode` on top of these options. +.TP +\fB\-\-debug\fR, \fB\-d\fR +Run in debug mode. Do not clean the generated `.chk` file. +.TP +\fB\-\-quiet\fR, \fB\-q\fR +Run in quiet mode. Do not print the output of the TeX compiler. +.TP +\fB\-\-parse\-only\fR +Do not run the LaTeX compiler but use the already existing `.chk` file. +When this option is passed, the following other options are meaningless: +`\-\-tex`, `\-\-tex\-options`, `\-\-quiet`, `\-\-debug`. +.TP +\fB\-\-version\fR, \fB\-v\fR +Print the version of this script. +.TP +\fB\-\-help\fR,h +Print this help. +.SH AUTHOR +Written by Jerome Lelong <jerome.lelong@gmail.com> +.SH "REPORTING BUGS" +Report bugs to https://github.com/jlelong/chklref. `chklref` is known not to work with `cleveref`. If you would like to contribute to `chklref`, feel free to open a PR on https://github.com/jlelong/chklref. +.SH COPYRIGHT +Copyright 2005\-2019 Jerome Lelong <jerome.lelong@gmail.com>. +This program comes with ABSOLUTELY NO WARRANTY. +.br +This is free software, and you are welcome to redistribute it under GPLv3. +.SH "SEE ALSO" +The full documentation for +.B chklref +is maintained as a Texinfo manual. If the +.B info +and +.B chklref +programs are properly installed at your site, the command +.IP +.B info chklref +.PP +should give you access to the complete manual. diff --git a/Master/texmf-dist/doc/man/man1/chklref.man1.pdf b/Master/texmf-dist/doc/man/man1/chklref.man1.pdf Binary files differnew file mode 100644 index 00000000000..97ef1ea8670 --- /dev/null +++ b/Master/texmf-dist/doc/man/man1/chklref.man1.pdf diff --git a/Master/texmf-dist/doc/support/chklref/Makefile.doc b/Master/texmf-dist/doc/support/chklref/Makefile.doc index 4faf33d8917..a12ad3b6291 100644 --- a/Master/texmf-dist/doc/support/chklref/Makefile.doc +++ b/Master/texmf-dist/doc/support/chklref/Makefile.doc @@ -1,11 +1,14 @@ .PHONY: all clean cleanall -all: chklref.pdf clean +all: chklref.1 chklref.pdf clean chklref.pdf: chklref.tex pdflatex chklref.tex pdflatex chklref.tex +chklref.1: ../chklref.pl + help2man --output=$@ ../chklref.pl + clean: rm -f chklref.log chklref.aux chklref.out chklref.fls chklref.fdb_latexmk chklref.synctex.gz diff --git a/Master/texmf-dist/doc/support/chklref/README.md b/Master/texmf-dist/doc/support/chklref/README.md index a39c0948f15..528b9845f57 100644 --- a/Master/texmf-dist/doc/support/chklref/README.md +++ b/Master/texmf-dist/doc/support/chklref/README.md @@ -1,13 +1,18 @@ -# Installation +# chklref -## System wide installation +Written by Jerome Lelong <jerome.lelong@gmail.com> and distributed under the terms of GNU GPLv3. -### Installation into the TeX structure +## Installation + +### System wide installation + +#### Installation into the TeX structure This package follows the TDS[1] - put the TeX package `chklref.sty` into `$(texmf_prefix)/tex/latex/chklref` -- put the manual `chklref.pdf` into `$(texmf_prefix)/doc/latex/chklref` +- put the documentation `doc/chklref.pdf` into `$(texmf_prefix)/doc/latex/chklref` +- put the man page `doc/chklref.1` into `$(texmf_prefix)/doc/man/man1` - put the Perl parser `chklref.pl` into `$(texmf_prefix)/scripts/chklref` Note that you will also need to make a link or copy `chklref.pl` to a location in your `PATH`. On Unix systems, you may need to set the script as executable. @@ -41,11 +46,23 @@ You typically just run: `perl chklref.pl file.tex` The full calling syntax is `perl chklref.pl [options] file.tex`, where `options` can be - `--tex <compiler>`, `-t`: Specify the TeX compiler to be used. Default is `pdflatex`. -- `--tex-options`: List of options to pass to the TeX compiler. Note that we always add `-interaction nonstopmode` on top of these options. +- `--tex-options`: List of options to pass to the TeX compiler. It should be a quoted string of white space delimited options. Note that we always add `-interaction nonstopmode` on top of these options. - `--debug`, `-d`: Run in debug mode. Do not clean the generated `.chk` file. - `--quiet`, `-q`: Run in quiet mode. Do not print the output of the TeX compiler. - `--parse-only`: Do not run the LaTeX compiler but use the already existing `.chk` file. When this option is passed, the following other options are meaningless: `--tex`, `--tex-options`, `--quiet`, `--debug`. - `--version`, `-v`: Print the version of this script. - `--help,h`: Print this help. +Alternatively, you can directly add `\usepackage{chklref}` to your main LaTeX file and compile it normally. This will create a file with extension `.chk`, which can then be parsed by the Perl script: + + perl chklref.pl --parse-only file.tex + +Note that you need to pass the \verb!.tex! file to the parser not the `.chk` file. + +## Bugs + +Report bugs to https://github.com/jlelong/chklref. + +`chklref` is known not to work with `cleveref`. If you would like to contribute to `chklref`, feel free to open a PR on https://github.com/jlelong/chklref. + [1] : TeX Directory Structure http://www.tug.org/twg/tds/ diff --git a/Master/texmf-dist/doc/support/chklref/VERSION b/Master/texmf-dist/doc/support/chklref/VERSION index cb2b00e4f7a..ef538c28109 100644 --- a/Master/texmf-dist/doc/support/chklref/VERSION +++ b/Master/texmf-dist/doc/support/chklref/VERSION @@ -1 +1 @@ -3.0.1 +3.1.2 diff --git a/Master/texmf-dist/doc/support/chklref/chklref.pdf b/Master/texmf-dist/doc/support/chklref/chklref.pdf Binary files differindex df3d7637c11..5a644297327 100644 --- a/Master/texmf-dist/doc/support/chklref/chklref.pdf +++ b/Master/texmf-dist/doc/support/chklref/chklref.pdf diff --git a/Master/texmf-dist/doc/support/chklref/chklref.tex b/Master/texmf-dist/doc/support/chklref/chklref.tex index 4a9b0baf8d6..3f443ed8b47 100644 --- a/Master/texmf-dist/doc/support/chklref/chklref.tex +++ b/Master/texmf-dist/doc/support/chklref/chklref.tex @@ -98,7 +98,8 @@ This package follows the TDS\footnote{TeX Directory Structure \url{http://www.tug.org/twg/tds/}}: \begin{itemize} \item put the \TeX\ package \verb!chklref.sty! into \verb!$(texmf_prefix)/tex/latex/chklref! - \item put the manual \verb!chklref.pdf! into \verb!$(texmf_prefix)/doc/latex/chklref! + \item put the documentation \verb!doc/chklref.pdf! into \verb!$(texmf_prefix)/doc/latex/chklref! + \item put the man page \verb!doc/chklref.1! into \verb!$(texmf_prefix)/doc/man/man1! \item put the Perl parser \verb!chklref.pl! into \verb!$(texmf_prefix)/scripts/chklref! \end{itemize} Note that you will also need to make a link or copy \verb!chklref.pl! to a location in your \texttt{PATH}. On Unix systems, you may need to set the script executable. \\ diff --git a/Master/texmf-dist/doc/support/chklref/release.sh b/Master/texmf-dist/doc/support/chklref/release.sh index 3455541c971..69572944232 100755 --- a/Master/texmf-dist/doc/support/chklref/release.sh +++ b/Master/texmf-dist/doc/support/chklref/release.sh @@ -10,6 +10,7 @@ CHKLREF_DIR="$LOCAL_TMPDIR/chklref" # Perform git archive git_archive() { + echo '-- Creating an archive from the git repository' cwd=$(pwd) [[ -d "$LOCAL_TMPDIR" ]] && rm -rf "$LOCAL_TMPDIR" mkdir -p "$CHKLREF_DIR" @@ -19,6 +20,7 @@ git_archive() { } compile_doc() { + echo '-- Compiling the documentation' cwd=$(pwd) cd "$CHKLREF_DIR/doc" make @@ -26,23 +28,34 @@ compile_doc() { } create_tds() { + echo '-- Creating chklref.tds.zip' cwd=$(pwd) mkdir -p "$CHKLREF_DIR/chklref.tds" cd "$CHKLREF_DIR/chklref.tds" mkdir -p tex/latex/chklref mkdir -p doc/latex/chklref + mkdir -p doc/man/man1 mkdir -p scripts/chklref cp ../chklref.sty tex/latex/chklref cp ../doc/chklref.{tex,pdf} doc/latex/chklref + cp ../doc/chklref.1 doc/man/man1 cp ../README.md doc/latex/chklref cp ../chklref.pl scripts/chklref - cd .. - zip -r chklref.tds.zip chklref.tds - rm -rf chklref.tds + zip -r ../../chklref.tds.zip * + rm -rf "$CHKLREF_DIR/chklref.tds" + cd "$cwd" +} + +create_zip() { + echo '-- Creating chklref.zip' + cwd=$(pwd) + cd "$CHKLREF_DIR/.." + zip -r chklref.zip chklref chklref.tds.zip cd "$cwd" } git_archive compile_doc create_tds -zip -r "$CHKLREF_DIR.zip" "$CHKLREF_DIR"
\ No newline at end of file +create_zip +echo "-- $CHKLREF_DIR" diff --git a/Master/texmf-dist/scripts/chklref/chklref.pl b/Master/texmf-dist/scripts/chklref/chklref.pl index 9360708e413..6e8ba38e27f 100755 --- a/Master/texmf-dist/scripts/chklref/chklref.pl +++ b/Master/texmf-dist/scripts/chklref/chklref.pl @@ -34,9 +34,6 @@ my $USERTEXOPTIONS = ''; my $RUNQUIET = 0; my $RUNDEBUG = 0; my $PARSEONLY = 0; -my $PRINTVERSION = 0; -my $HELP = 0; -my $VERSION = 'Version 3.0.1'; # Create a hash with three keys "str", "line", "file" and returns a # reference to it @@ -259,25 +256,41 @@ sub parse { } sub usage { -print << 'EOT'; -chklref -- Check unused labels and bibitems + print << 'EOT'; +Usage: chklref [options] texfile -Copyright (C) 2005-2019 Jérôme Lelong <jerome.lelong@gmail.com> -This program comes with ABSOLUTELY NO WARRANTY; -This is free software, and you are welcome to redistribute it under certain conditions; - -Usage: - chklref [options] texfile +Check unused labels and bibitems in a LaTeX file Options: - --tex <compiler>, -t : Specify the TeX compiler to be used. Default = pdflatex. - --tex-options : List of options to pass to the TeX compiler. - --debug, -d : Run in debug mode. Do not clean the generated `.chk` file. - --quiet, -q : Run in quiet mode. Do not print the output of the TeX compiler. - --parse-only : Do not run the LaTeX compiler but use the already existing `.chk` file. When this option is passed, the following other options are meaningless: `--tex`, `--tex-options`, `--quiet`, `--debug`. - --version, -v : Print the version of this scirpt. - --help,h : Print this help. + --tex <compiler>, -t Specify the TeX compiler to be used. Default is `pdflatex`. + --tex-options List of options to pass to the TeX compiler. It should be a quoted + string of white space delimited options. Note that we always add + `-interaction nonstopmode` on top of these options. + --debug, -d Run in debug mode. Do not clean the generated `.chk` file. + --quiet, -q Run in quiet mode. Do not print the output of the TeX compiler. + --parse-only Do not run the LaTeX compiler but use the already existing `.chk` file. + When this option is passed, the following other options are meaningless: + `--tex`, `--tex-options`, `--quiet`, `--debug`. + --version, -v Print the version of this script. + --help,h Print this help. + + +Report bugs to https://github.com/jlelong/chklref. `chklref` is known not to work with `cleveref`. If you would like to contribute to `chklref`, feel free to open a PR on https://github.com/jlelong/chklref. +EOT + exit(0) +} + +sub version { + print << 'EOT'; +chklref 3.1.2 + +Copyright 2005-2019 Jerome Lelong <jerome.lelong@gmail.com>. +This program comes with ABSOLUTELY NO WARRANTY. +This is free software, and you are welcome to redistribute it under GPLv3. + +Written by Jerome Lelong <jerome.lelong@gmail.com> EOT + exit(0) } sub texcompile { @@ -292,25 +305,15 @@ sub texcompile { Getopt::Long::Configure ("bundling"); GetOptions ( - 'version|v!' => \$PRINTVERSION, + 'version|v!' => \&version, 'quiet|q!' => \$RUNQUIET, 'debug|d!' => \$RUNDEBUG, 'tex|t=s' => \$TEX, 'texoptions=s' => \$USERTEXOPTIONS, 'parse-only' => \$PARSEONLY, - 'help|h' => \$HELP + 'help|h' => \&usage ) || usage(); -if ($HELP) { - usage(); - exit(0); -} - -if ($PRINTVERSION) { - print "chklref $VERSION\n"; - exit(0) -} - if (@ARGV != 1) { usage(); exit 0; diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds index faf2969c4e6..62e3228eec4 100755 --- a/Master/tlpkg/libexec/ctan2tds +++ b/Master/tlpkg/libexec/ctan2tds @@ -3184,6 +3184,7 @@ $standardttf = '\.ttf|\.TTC'; 'a2ping' => '\.1$', 'axodraw2' => '\.1$', 'bundledoc' => '\.1$', + 'chklref' => '\.1$', 'crossrefware' => '\.1$', 'ctanbib' => '\.1$', 'ctan-o-mat' => '\.1$', |