From ed106ad4cb2e3cb0269bdc9f721ff75df77532cf Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Tue, 28 Feb 2023 03:02:32 +0000 Subject: CTAN sync 202302280302 --- support/latexpand/README | 2 +- support/latexpand/latexpand | 19 ++++++--- support/latexpand/version.txt | 4 +- support/texdoc/NEWS | 66 +++++++++++++++++------------ support/texdoc/doc/texdoc.1 | 2 +- support/texdoc/doc/texdoc.pdf | Bin 90076 -> 89738 bytes support/texdoc/doc/texdoc.tex | 37 ++++++---------- support/texdoc/script/texdoclib-config.tlu | 6 ++- support/texdoc/script/texdoclib-const.tlu | 4 +- support/texdoc/texdoc.cnf | 1 + 10 files changed, 77 insertions(+), 64 deletions(-) (limited to 'support') diff --git a/support/latexpand/README b/support/latexpand/README index 8933efb074..dbd4647530 100644 --- a/support/latexpand/README +++ b/support/latexpand/README @@ -125,5 +125,5 @@ SEE ALSO https://lacl.fr/~caubert/notes/portabilite-du-tex.html#dependances VERSION - This is latexpand version v1.7. + This is latexpand version v1.7.2. diff --git a/support/latexpand/latexpand b/support/latexpand/latexpand index ee97a46a09..c30e5aacb5 100755 --- a/support/latexpand/latexpand +++ b/support/latexpand/latexpand @@ -86,7 +86,7 @@ sub get_version { # $VERSION's value will be substituted by 'make dist', but the # next line won't (the string has to be broken to avoid it). - my $VERSION = 'v1.7'; + my $VERSION = 'v1.7.2'; if ($VERSION eq '@LATEXPAND' . '_VERSION@') { my($vol,$dir,$file) = File::Spec->splitpath($0); chdir($dir); @@ -248,10 +248,19 @@ sub process_line # Escaping these '%' is not mandatory, but allowed, hence we can # pre-process the line by escaping them, and let latexpand work # as normal afterwards. + # Known limitation: latexpand doesn't do balanced braces + # recognition, and just refuses both { and } within \url{} + # argument for %-detection to work ([^{}%] below). Fix should be + # possible using + # https://stackoverflow.com/questions/15301708/perl-regular-expression-match-nested-brackets + # but is it worth the trouble? (file an issue or send a merge + # request if you think it is) + # While there are \url{URL} with unescaped % in URL ... - while (/^(.*\\url\{)(([^\\]%|[^}%])*)(\}.*)$/) { - my ($before, $url, $after) = ($1, $2, $4); - # escape unescaped % in URL + my $NON_PERCENT = '([^\\}]%|[^{}%])*'; + while (/^(?.*\\url\{)(?$NON_PERCENT[^\\}]%$NON_PERCENT)(?\}.*)$/) { + my ($before, $url, $after) = ($+{before}, $+{url}, $+{after}); + # escape unescaped % in URL, if any $url =~ s/([^\\])%/$1\\%/g; $_ = $before . $url . $after ."\n"; } @@ -701,4 +710,4 @@ https://lacl.fr/~caubert/notes/portabilite-du-tex.html#dependances =head1 VERSION -This is latexpand version v1.7. +This is latexpand version v1.7.2. diff --git a/support/latexpand/version.txt b/support/latexpand/version.txt index 42952ccf83..cc2e97f667 100644 --- a/support/latexpand/version.txt +++ b/support/latexpand/version.txt @@ -1,2 +1,2 @@ -latexpand version v1.7 (6c1d8d9e3b331247ab09bc533a4360ea37deead5). -Committed on Fri Feb 24 10:40:17 2023 +0100. +latexpand version v1.7.2 (4a76237c217a532a77044c0346b1e06648814531). +Committed on Mon Feb 27 09:52:54 2023 +0100. diff --git a/support/texdoc/NEWS b/support/texdoc/NEWS index cfb10ca932..2567cc3764 100644 --- a/support/texdoc/NEWS +++ b/support/texdoc/NEWS @@ -1,15 +1,21 @@ -NEWS for texdoc +NEWS for Texdoc =============== (This file public domain.) -Version 4.0 (TeX Live 2023) -=========================== -Released on 2023-02-20 +Version 4.0.1 (2023-02-27) +-------------------------- +- Minor bug fixes for Windows +- Scoring adjustments +- Documentation tweaks + +Version 4.0 (2023-02-20) +======================== +Release for TeX Live 2023. Major changes -- Online search feature is added: +- Online search feature is added (by Wu Zhenyu): users using TL without documentation will be sent to texdoc.org -- Add new action --print-completion: +- Add new action --print-completion (by Max Chernoff): for the moment, only zsh is supported. Contributions welcome. Minor fixes and tweaks @@ -18,56 +24,62 @@ Minor fixes and tweaks - Scoring adjustments - Documentation tweaks -Version 3.4.1 -------------- +Version 3.4.1 (2022-03-19) +-------------------------- - Bug fix: give locale bonus only if "lang" is set -Version 3.4 (TeX Live 2022) -=========================== -- Make Data.tlpdb.lua reproducible +Version 3.4 (2022-03-03) +======================== +Release for TeX Live 2022. +- Make Data.tlpdb.lua reproducible (by Vincenzo Mantova) - Better locale handling in scoring - Alias adjustments -Version 3.3.1 -------------- -- Support non-ascii username on Windows (patch by A. Kakuto) +Version 3.3.1 (2021-05-20) +-------------------------- +- Support non-ascii username on Windows (by Akira Kakuto) - Better support for multiple doc trees - Alias adjustments - Documentation tweaks -Version 3.3 (TeX Live 2021) -=========================== +Version 3.3 (2021-05-17) +======================== +Release for TeX Live 2021. - Show all possible config files for -vf - Show diagnostic message of DISPLAY only if viewer failed - Alias adjustments - Documentation tweaks -Version 3.2.2 -------------- +Version 3.2.2 (2020-09-16) +-------------------------- - Several aliases are added - Small documentation fixes -Version 3.2.1 -------------- +Version 3.2.1 (2020-02-20) +-------------------------- - Bug fix: suspend a realpath not found error -Version 3.2 (TeX Live 2020) -=========================== +Version 3.2 (2020-02-02) +======================== +Release for TeX Live 2020. - Improved the scoring scheme to prioritize the latex tree than the latex-dev - Support invoking the program with absolute paths - The document was entirely rewritten - Other small improvements and bug fixes -Version 3.1 (TeX Live 2019) -=========================== +Version 3.1 (2019-03-28) +======================== +Release for TeX Live 2019. - New option -c: changing configure temporally - New config item `texlive_tlpdb` to specify a path for texlive.tlpdb - Fixed an issue that texdoc fails to open gzipped file in GNOME/XFCE - Added prefixes to script files not to contaminate kpse search space - Many other small improvements and bug fixes -Version 3.0 (TeX Live 2018) -=========================== +Version 3.0 (2018-06-06) +======================== +Release for TeX Live 2018. + This version has two big features: - Fuzzy search - New option parser @@ -85,7 +97,7 @@ Version 2.0171 - --help and --version override other specified command-line actions. Version 2.017 (TeX Live 2017) -============================ +============================= - Restore user's LC_CTYPE value if possible (with this year's luatex). - Generic system environment variables, such as BROWSER, accept a colon-separated list of programs. diff --git a/support/texdoc/doc/texdoc.1 b/support/texdoc/doc/texdoc.1 index c0a2250cc6..5dbfa0979c 100644 --- a/support/texdoc/doc/texdoc.1 +++ b/support/texdoc/doc/texdoc.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "TEXDOC" "1" "February 2023" "Texdoc 4.0" "Texdoc manual" +.TH "TEXDOC" "1" "February 2023" "Texdoc 4.0.1" "Texdoc manual" . .SH "NAME" \fBtexdoc\fR \- find & view documentation in TeX Live diff --git a/support/texdoc/doc/texdoc.pdf b/support/texdoc/doc/texdoc.pdf index f648933a2e..03cc55b3d8 100644 Binary files a/support/texdoc/doc/texdoc.pdf and b/support/texdoc/doc/texdoc.pdf differ diff --git a/support/texdoc/doc/texdoc.tex b/support/texdoc/doc/texdoc.tex index 0e1a0db3e8..ce01c8e321 100644 --- a/support/texdoc/doc/texdoc.tex +++ b/support/texdoc/doc/texdoc.tex @@ -8,7 +8,7 @@ \subtitle{Find \& view documentation in \TL} \pkgurl{https://tug.org/texdoc/} \author{Manuel Pégourié-Gonnard\and Takuto Asakura} -\date{v4.0\quad \today} +\date{v4.0.1\quad \today} \begin{document} @@ -764,6 +764,14 @@ Sets the \meta{url} to use for online documentation. Texdoc will replace \section{Shell Completion} \label{sec:completion} +Shell completion can be used to receive assistance in entering command-line +options and arguments (typically package names) for the |texdoc| command. +Texdoc can provide shell completion functions via the \lopt{print-completion} +action. Configuring the appropriate per-shell setting described below can +enable this shell completion function. + +%\subsection{Bash} + \subsection{Zsh} To enable completion for zsh, you need to put @@ -772,16 +780,14 @@ To enable completion for zsh, you need to put autoload -Uz compinit && compinit \end{htcode} % -in your zsh configuration file (such as \code{\~/.zshrc}). You can install our -completion function with either of the following two ways: +in your zsh configuration file (such as \code{\$HOME/.zshrc}). You can install +our completion function with either of the following two ways: % \begin{itemize} -\item adding \code{eval \$(texdoc \lopt{print-completion} zsh)} to your +\item adding \code{eval "\$(texdoc \lopt{print-completion} zsh)"} to your zsh configuration file. -\item adding the following file (also provided by - \href{https://github.com/zsh-users/zsh-completions}{zsh-completions}) to \\ - \code{/usr/share/zsh/site-functions/\_texdoc}: +\item adding a file somewhere in \code{\$fpath} with the following contents: % \begin{htcode} #compdef texdoc @@ -790,23 +796,6 @@ completion function with either of the following two ways: \end{htcode} \end{itemize} -You can confirm your installation by checking whether \code{\~/.zcompdump} -contains the following: -% -\begin{htcode} -'texdoc' '_texdoc' -\end{htcode} - -Note: The path \code{/usr/share} is for GNU/Linux. For other platforms, the -path can be: -% -\begin{description} -\item[macOS (homebrew, x86)] \verb|/usr/local/share| -\item[macOS (homebrew, arm)] \verb|/opt/homebrew/share| -\item[Android (Termux)] \verb|/data/data/com.termux/files/usr/share| -\item[Windows (Msys2 Mingw64)] \verb|/mingw64/share| -\end{description} - \section{Licence} \label{sec:licence} diff --git a/support/texdoc/script/texdoclib-config.tlu b/support/texdoc/script/texdoclib-config.tlu index cf756b7b6a..ad9f852ea7 100644 --- a/support/texdoc/script/texdoclib-config.tlu +++ b/support/texdoc/script/texdoclib-config.tlu @@ -48,6 +48,7 @@ function M.get_value(key) return config[key] end -- interpreting 'context' in this section local function context_to_string(context) + local w32_path = import_function('util', 'w32_path') if not context then return '(no context)' end if context.src == 'cl' then return 'from command-line option "' .. context.name .. '"' @@ -56,7 +57,7 @@ local function context_to_string(context) elseif context.src == 'loc' then return 'from operating system locale' elseif context.src == 'file' then - return 'in file "' .. context.file .. '" on line ' .. context.line + return 'in file "' .. w32_path(context.file) .. '" on line ' .. context.line elseif context.src == 'def' then return 'from built-in defaults' else @@ -266,6 +267,7 @@ end -- set config and aliases from a particular config file assumed to exist local function read_config_file(configfile) local err_print = import_function('util', 'err_print') + local w32_path = import_function('util', 'w32_path') local confline_to_alias = import_function('alias', 'confline_to_alias') local confline_to_score = import_function('score', 'confline_to_score') @@ -302,7 +304,7 @@ local function read_config_file(configfile) -- complain if it failed if not ok then err_print('warning', - 'syntax error in %s at line %d.', configfile, lineno) + 'syntax error in %s at line %d.', w32_path(configfile), lineno) end ::continue:: diff --git a/support/texdoc/script/texdoclib-const.tlu b/support/texdoc/script/texdoclib-const.tlu index 16acce71aa..c551bf40ef 100644 --- a/support/texdoc/script/texdoclib-const.tlu +++ b/support/texdoc/script/texdoclib-const.tlu @@ -22,8 +22,8 @@ end -- progname and version fullname = kpse.find_file('texdoc/texdoclib', 'lua') progname = 'Texdoc' -version = '4.0' -release_date = '2023-02-20' +version = '4.0.1' +release_date = '2023-02-27' -- make sure to update setup_config_from_cl() accordingly -- and set a default value in setup_config_from_defaults() if relevant diff --git a/support/texdoc/texdoc.cnf b/support/texdoc/texdoc.cnf index 7ba7d538de..1f93fd3415 100644 --- a/support/texdoc/texdoc.cnf +++ b/support/texdoc/texdoc.cnf @@ -278,6 +278,7 @@ alias tex-live-zh-cn = texlive-zh-cn # a few useful general documents alias latex = latex-doc-ptr +alias plain = gentle # various lshort translations adjscore(lshort) /lshort-english/ = +0.5 # original -- cgit v1.2.3