diff options
author | Norbert Preining <norbert@preining.info> | 2023-02-20 03:04:50 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2023-02-20 03:04:50 +0000 |
commit | 5eb36ac321647ea1d7118566b9520a0e8a622203 (patch) | |
tree | 529a3c9c5b42ea2f8b9cede99b3b0c61bfd79162 /support/texdoc/doc | |
parent | 9fb4a5e992bb10daf1cb0ad8f298a452e50caea8 (diff) |
CTAN sync 202302200304
Diffstat (limited to 'support/texdoc/doc')
-rw-r--r-- | support/texdoc/doc/texdoc-doc.cls | 12 | ||||
-rw-r--r-- | support/texdoc/doc/texdoc.1 | 12 | ||||
-rw-r--r-- | support/texdoc/doc/texdoc.pdf | bin | 84314 -> 90076 bytes | |||
-rw-r--r-- | support/texdoc/doc/texdoc.tex | 94 |
4 files changed, 104 insertions, 14 deletions
diff --git a/support/texdoc/doc/texdoc-doc.cls b/support/texdoc/doc/texdoc-doc.cls index a9d229b6a7..5e960588ba 100644 --- a/support/texdoc/doc/texdoc-doc.cls +++ b/support/texdoc/doc/texdoc-doc.cls @@ -1,9 +1,9 @@ % Document style for Texdoc user manual -% Copyright 2008-2020 Manuel Pégourié-Gonnard and Takuto Asakura +% Copyright 2008-2023 Manuel Pégourié-Gonnard and Takuto Asakura % distributed under the terms of GPL v3 or later \NeedsTeXFormat{LaTeX2e} \ProvidesClass{texdoc-doc} - [2020/02/02 Document class for Texdoc user manual] + [2023-02-17 Document class for Texdoc user manual] % class options \DeclareOption{draft}{\setlength\overfullrule{5pt}} @@ -163,7 +163,7 @@ \@for\@item:=#1\do{\@delim\@item}% \egroup} \newcommand*{\code}[1]{\bgroup - \chardef\_=`\_\code@font #1\egroup} + \chardef\_=`\_\chardef\~=`\~\code@font #1\egroup} \newcommand*{\sopt}[1]{\hyperlink{cl:#1}{\code{\hyph#1}}} \newcommand*{\lopt}[1]{\hyperlink{cl:#1}{\code{\hyph{}\hyph#1}}} \newcommand*{\ci}[1]{\bgroup @@ -219,6 +219,12 @@ \hypertarget{\@tmp@hyname}{\code{#1 = #2}}% \IfNoValueF{#3}{\hfill (#3)}% \begin{manual@entry}% + \bgroup% + \def\meta##1{##1}% + \def\_{\string_}% + \edef\conf@title{#1}% + \belowpdfbookmark{\conf@title}{\conf@title}% + \egroup% } {\ifvmode\else\unskip\fi\end{manual@entry}} diff --git a/support/texdoc/doc/texdoc.1 b/support/texdoc/doc/texdoc.1 index e614721b83..c0a2250cc6 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" "March 2022" "Texdoc 3.4.1" "Texdoc manual" +.TH "TEXDOC" "1" "February 2023" "Texdoc 4.0" "Texdoc manual" . .SH "NAME" \fBtexdoc\fR \- find & view documentation in TeX Live @@ -86,6 +86,10 @@ Print the list of configuration files used\. \fB\-\-just\-view\fR FILE Display FILE, given with full path (no searching)\. . +.TP +\fB\-\-print\-completion\fR SHELL +Print SHELL completion\. +. .SH "ENVIRONMENT" The following environment variables can be split by colon and used to set viewers: . @@ -117,8 +121,8 @@ Set the command to be used for PS documents\. The following environment variables are also used: . .TP -\fBLANG\fR, \fBLC_ALL\fR and so on -Set the locale (which will influence on the search results)\. +\fBLANG\fR, \fBLC_ALL\fR, \fBLANGUAGE\fR, \fBLANGUAGE_texdoc\fR +Set the locale, which will influence on the search results\. . .TP \fBTEXDOCS\fR @@ -156,7 +160,7 @@ Texdoc home page: \fIhttp://tug\.org/texdoc/\fR Source: \fIhttps://github\.com/TeX\-Live/texdoc\fR . .SH "COPYRIGHT" -Copyright 2008\-2022 Manuel Pe\'gourie\'\-Gonnard, Takuto Asakura, the TeX Live Team\. +Copyright 2008\-2023 Manuel Pe\'gourie\'\-Gonnard, Takuto Asakura, the TeX Live Team\. . .br License: GNU GPL version 3 or later \fIhttp://gnu\.org/licenses/gpl\.html\fR\. diff --git a/support/texdoc/doc/texdoc.pdf b/support/texdoc/doc/texdoc.pdf Binary files differindex 5619830b78..f648933a2e 100644 --- a/support/texdoc/doc/texdoc.pdf +++ b/support/texdoc/doc/texdoc.pdf diff --git a/support/texdoc/doc/texdoc.tex b/support/texdoc/doc/texdoc.tex index 689e696877..0e1a0db3e8 100644 --- a/support/texdoc/doc/texdoc.tex +++ b/support/texdoc/doc/texdoc.tex @@ -1,6 +1,6 @@ -%#!xelatex +%#!texfot xelatex % Texdoc user manual -% Copyright 2008-2022 Manuel Pégourié-Gonnard and Takuto Asakura +% Copyright 2008-2023 Manuel Pégourié-Gonnard and Takuto Asakura % distributed under the terms of GPL v3 or later \documentclass{texdoc-doc} @@ -8,7 +8,7 @@ \subtitle{Find \& view documentation in \TL} \pkgurl{https://tug.org/texdoc/} \author{Manuel Pégourié-Gonnard\and Takuto Asakura} -\date{v3.4.1\quad \today} +\date{v4.0\quad \today} \begin{document} @@ -151,6 +151,12 @@ but rather intended to be used from another program, like a GUI front-end to Texdoc. \end{clopt} +\begin{clopt}{\code{\lopt{print-completion} \meta{shell}}} +Print |«shell»| completion. For the time being, it only supports +zsh\footnote{Your contributions are welcome!}. See +Section~\ref{sec:completion} for the details. +\end{clopt} + Some normal options such as \sopt{v} are effective for some actions but note that you have to specify such options \emph{before} the action option. Options after an action option will be ignored. @@ -257,8 +263,8 @@ Variable & Use for & Configuration item \\ \hline \end{tabular} \end{center} -Third, on Unix systems, locale-related variables such as |LANG| and |LC_ALL| -are used for the default value of \ci{lang}. +Third, locale-related variables |LANGUAGE_texdoc|, |LANGUAGE|, |LC_ALL|, and +|LANG| are used to set \ci{lang}. \subsection{Precedence of configuration sources} \label{sec:prec} @@ -504,6 +510,25 @@ allowance by using the configuration item \ci{fuzzy\_level}. Results of fuzzy search could be different among executions if multiple package names have the same Levenshtein distance to the input. +\subsection{Online Search} +\label{sec:online} + +If Texdoc cannot find any good matches for a document, it may sometimes prompt +you to search online. + +If you use the |view| option, there are no ``good'' matches (|score|${}\ge{}$0), +but you have some local documentation installed, Texdoc will show you the three +best locally-installed documents while also prompting you to search online. + +If you use the |view| option when you have no local documentation installed, +Texdoc will skip showing any fuzzy matches, and will instead prompt you to +search online immediately. + +Texdoc checks to see if the |kpathsea| documentation as a heuristic for if +\emph{any} documentation is installed. If the documentation for Texdoc is +installed, but no other documentation is installed, the online search prompt +may produce unexpected results. + \section{Configuration items} \label{sec:conf} @@ -511,7 +536,7 @@ Configuration files are line-oriented text files. Comments begin with a |#| and run to the end of line. Lines containing only space are ignored. Space at the beginning or end of a line, as well as around an |=| sign, is ignored. Apart from comments and empty lines, each line must be of one of the following -forms. +forms: % \begin{htcode} «configuration item» = «value» @@ -521,6 +546,9 @@ stopalias «original keyword» adjscore «pattern» = «score adjustment» adjscore(«keyword») «pattern» = «score adjustment» \end{htcode} +% +You can put a backslash (\code{\char`\\}) at the end of a line to indicate that +the line is continued on the following line. We will concentrate on the |«configuration item»| part here, since other directives have already been presented (Section~\ref{sec:alias} and @@ -727,11 +755,63 @@ Texdoc within a {\TL}-based {\TeX} distribution which does not ship |texlive.tlpdb|. \end{confitem} +\begin{confitem}{online\_url}{\meta{url}} + [default: \code{https://texdoc.org/serve/PKGNAME/0}] +Sets the \meta{url} to use for online documentation. Texdoc will replace +|PKGNAME| with the name of the package to search for. +\end{confitem} + +\section{Shell Completion} +\label{sec:completion} + +\subsection{Zsh} + +To enable completion for zsh, you need to put +% +\begin{htcode} +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: +% +\begin{itemize} +\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}: +% +\begin{htcode} +#compdef texdoc +(( $+functions[__texdoc] )) || eval "$(texdoc \textbackslash + --print-completion zsh)" && __texdoc +\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} The current version of Texdoc program and its documentation are copyright -2008--2022 Manuel Pégourié-Gonnard, Takuto Asakura, the {\TL} Team. +2008--2023 Manuel Pégourié-Gonnard, Takuto Asakura, the {\TL} Team. They are free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software |