texlive[61583] Master/texmf-dist: knowledge (12jan22)
commits+karl at tug.org
commits+karl at tug.org
Wed Jan 12 22:18:33 CET 2022
Revision: 61583
http://tug.org/svn/texlive?view=revision&revision=61583
Author: karl
Date: 2022-01-12 22:18:33 +0100 (Wed, 12 Jan 2022)
Log Message:
-----------
knowledge (12jan22)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/knowledge/README.md
trunk/Master/texmf-dist/doc/latex/knowledge/knowledge-example.tex
trunk/Master/texmf-dist/doc/latex/knowledge/knowledge.pdf
trunk/Master/texmf-dist/doc/latex/knowledge/knowledge.tex
trunk/Master/texmf-dist/source/latex/knowledge/knowledge-code.dtx
trunk/Master/texmf-dist/tex/latex/knowledge/knowledge.sty
Modified: trunk/Master/texmf-dist/doc/latex/knowledge/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/knowledge/README.md 2022-01-12 21:18:16 UTC (rev 61582)
+++ trunk/Master/texmf-dist/doc/latex/knowledge/README.md 2022-01-12 21:18:33 UTC (rev 61583)
@@ -3,11 +3,11 @@
name: knowledge
license: LaTeX Project Public License version 1.2 or above
- version: v1.26
- date: 2021/12/20
+ version: v1.27
+ date: 2022/01/12
author: Thomas Colcombet
mail: thomas.colcombet at irif.fr
- web: https://www.irif.fr/~colcombe/knowledge_en.html
+ web: https://ctan.org/pkg/knowledge
### Purpose:
The knowledge package for LaTeX offers a systematic way to handle
Modified: trunk/Master/texmf-dist/doc/latex/knowledge/knowledge-example.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/knowledge/knowledge-example.tex 2022-01-12 21:18:16 UTC (rev 61582)
+++ trunk/Master/texmf-dist/doc/latex/knowledge/knowledge-example.tex 2022-01-12 21:18:33 UTC (rev 61583)
@@ -1,12 +1,24 @@
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
+% If the output is a PDF (avoids some display problems, in particular in arXiv).
+\pdfoutput = 1
+
%
-% The documentation of the _knowledge package_ can be found at:
+% This is the file
%
-% http://www.irif.fr/~colcombe/knowledge_en.html
+% knowledge-example.tex
%
+% and is part of the LaTeX package _knowledge_.
+% It can be used as a starting point for creating a document using the _knowledge_ package.
%
+% The documentation of the _knowledge_ package can be found:
+% - in your tex distribution, using the command
+% texdoc knowledge
+% - or at the address
+%. https://ctan.org/pkg/knowledge
+%
+%
% Loading other packages before knowledge activates features.
% The most common use of knowledge makes use of hyperref and xcolor:
\usepackage[breaklinks,hidelinks]{hyperref}
@@ -24,7 +36,7 @@
% well as agives other pieces of information. It should always
% be used but when the paper is ready.
%
-\usepackage[scope]{knowledge} % default
+\usepackage{knowledge} % default
%\usepackage[scope,electronic]{knowledge} % final version to be read electronically
%\usepackage[scope,paper]{knowledge} % final version in black and white for printing
%
@@ -40,29 +52,50 @@
% It is convenient now to provide a list of \knowledge in the preamble
% (or in an external file) according to the following syntax:
%
+% \knowledge{directives}
+% | main knowledge
+% | synonym_1
+% | synonym_2
+% | ...
+%
+% or using the older syntax (which should be used in macros)
+%
% \knowledge{knowledge text}[synonym 1|synonym 2|...]{directives}
%
% The most common directive in a science paper is 'notion': knowledges that
% are used in the body with \intro and \kl commands/""...""" and "..." notatation:
-\knowledge{anchor point}[anchor points|Anchor points]{notion}
-\knowledge{diagnose file}{notion}
-\knowledge{knowledge package}{notion,typewriter}
-\knowledge{paper mode}{notion}
-\knowledge{electronic mode}{notion}
-\knowledge{composition mode}{notion}
+\knowledge{notion}
+ | anchor point
+ | anchor points
+ | Anchor points
+\knowledge{notion}
+ | diagnose file
+\knowledge{notion,typewriter}
+ | knowledge package
+\knowledge{notion}
+ | paper mode
+\knowledge{notion}
+ | electronic mode
+\knowledge{notion}
+ | composition mode
% the synonym directive can replace the [...] syntax
-\knowledge{knowledge}{notion}
-\knowledge{knowledges}{synonym}
-\knowledge{Knowledges}{synonym}
+\knowledge{notion}
+ | knowledge
+ | knowledges
+ | Knowledges
% Some other configurations are possible, such as external url's or replacement texts:
-\knowledge{LaTeX}[latex|LATEX|Latex]{url={https://fr.wikipedia.org/wiki/LaTeX}, text=\LaTeX}
-
+\knowledge{url={https://fr.wikipedia.org/wiki/LaTeX}, text=\LaTeX}
+ | LaTeX
+ | latex
+ | LATEX
+ | Latex
% Configurations can also be made contextual. For instance, the
% following knowledge is only accessible directly in the introduction.
% It can nevertheless be used from elsewhere using "pdflatex@@section:introduction",
-\knowledge{pdflatex}{scope={section:example},url={https://en.wikipedia.org/wiki/PdfTeX}, typewriter}
+\knowledge{url={https://en.wikipedia.org/wiki/PdfTeX}, typewriter}
+ | pdflatex at example
% or \kl(section:introduction){pdflatex}. See 'scoping' in the documetation for more details.
% Scoping can be used in the preamble. For instance:
@@ -80,7 +113,7 @@
\begin{document}
\maketitle
\begin{abstract}
-\AP This document provides an elementary example of the "knowledge package" for "latex".
+\AP This document provides an elementary example of the "knowledge package" for "latex" and can be used as a starting point for creating one's own document.
\end{abstract}
\section{Introduction}
@@ -97,7 +130,7 @@
\section{Example running}
\label{section:example}
-Try compiling this document (two compilation phases to have proper links) using "pdflatex", and see how some notions are hyperlinked to their introduction point (some viewers make it more obvious than others by displaying a preview of the target of a link inside a document; since there is only one page in this example, this may be worth zooming in this case).
+Try compiling this document (two compilation phases to have proper links) using "pdflatex@@example", and see how some notions are hyperlinked to their introduction point (some viewers make it more obvious than others by displaying a preview of the target of a link inside a document; since there is only one page in this example, this may be worth zooming in this case).
\AP When the "paper mode" is not active, links are clearly identified in blue. Try then compiling it in ""paper mode"" (an option of the "knowledge package"); it now looks like a regular paper (but the links are still there). In ""electronic mode"",
the links are still colored, but some other hints disappear like "anchor points".
@@ -119,9 +152,13 @@
\knowledgeconfigure{quotation}
\AP These concepts are referred to as ""knowledges"". "Knowledges" are to be defined (in general in the preamble of the document) using a command of the form:
-\begin{quote}
-\verb|\knowledge|\texttt{\{name\}[synonym1|synonym2|...]\{directives\}}
-\end{quote}
+\begin{verbatim}
+ \knowledge{directives}
+ | name
+ | synonym1
+ | synonym2
+ | ...
+\end{verbatim}
However, using undefined "knowledges" will not cause compile time errors, but be displayed as in the following `"unknown knowledge"' (i.e. in non-"paper mode" in brown, but in regular black in "paper mode" or "electronic mode"). \AP The ""diagnose file"" (that ends with a \texttt{.diagnose} extension) contains detailed information about these warnings, and should be read often when finalizing the document.
\AP Small red corners called ""anchor points"" are visible in the margin, and represent the precise location in a pdf document where an internal link jumps. These are introduced
Modified: trunk/Master/texmf-dist/doc/latex/knowledge/knowledge.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/knowledge/knowledge.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/knowledge/knowledge.tex 2022-01-12 21:18:16 UTC (rev 61582)
+++ trunk/Master/texmf-dist/doc/latex/knowledge/knowledge.tex 2022-01-12 21:18:33 UTC (rev 61583)
@@ -85,6 +85,8 @@
\let\subsubsubsection\paragraph
+\knowledge{[...]}{italic,color=gray}
+
\knowledge{notion}
| semigroup at ex1
| semigroups at ex1
@@ -96,7 +98,7 @@
\knowledge{not implemented}{link=to be done}
\knowledge{to be done}{color=DarkRed}
\knowledge{|}{text=\vbar}
-\knowledge{[...]}{italic,color=gray,md}
+\knowledge{"[...]"}{italic,color=gray,md}
% Macros defined by knowledge
\knowledgedirective{kenvironment}{autoref,style=cs,intro style=csintro}
@@ -640,7 +642,7 @@
\texttt{date:}&\texttt{\filedate}
(documentation produced \today)\\
\texttt{license:}&\texttt{LaTeX Project Public License 1.2}\\
-\texttt{web:}&\url{https://www.irif.fr/~colcombe/knowledge_en.html}\\
+\texttt{web:}&\url{https://ctan.org/pkg/knowledge}\\
\texttt{CTAN:}&\url{https://www.ctan.org/pkg/knowledge}
\end{tabular}
\end{quote}
@@ -689,13 +691,13 @@
\item[2017-01-13] The package \kl{scope option} can now be omitted. This in particular avoid clashes with the over-restriction on the structure of the document it entails. It should be improved to stop overloading the \cs{\begin} command.
\item[2017-01-14] The overloading of \cs{\begin} and \cs{\end} was done as protected commands, which should not be the case to be consistent with the behaviour of LaTeX (for instance, this was giving an extra line in the title in the conference mode of the class IEEEtran). Corrected: these commands are not protected anymore.
\item[2017-01-15] A workaround for an incompatibility between the "hyperref@@package" and the two-column mode as been added in the macro
-\cs{\knowledgeFixHyperrefTwocolumn} (thanks to Daniela Petrisan).
+\cs{\knowledgeFixHyperrefTwocolumn} (thanks to Daniela Petri\c san).
\item[2017-01-15] Added the \kl[\knowledge directives]{directive} \kl{synonym}.
\item[2017-01-15] Added the \texttt{noknowledge package} for minimizing the effects of not having "knowledge@@package" activated.
\item[2017-01-17] Changed the way options are handled, decoupling the package options (options of \cs{\usepackage}) from the configuration options (see \cs{\knowledgeconfigure}).
\item[2017-01-17] Proper treatment of `final' option and \kl[composition mode]{composition} options.
\item[2017-01-17] Added \cs{\IfKnowledgeFinalMode}\texttt{[TF]} commands for the user.
-\item[2017-01-17] Added the option \kl{fix hyperref twocolumn} as a shorthand for calling \cs{\knowledgeFixHyperrefTwocolumn} (thanks to Daniela Petrisan and Luca Reggio).
+\item[2017-01-17] Added the option \kl{fix hyperref twocolumn} as a shorthand for calling \cs{\knowledgeFixHyperrefTwocolumn} (thanks to Daniela Petri\c san and Luca Reggio).
\item[2017-01-18] Added the configuration option \kl(option){notion} that offers a basic configuration compatible with \kl(package){xcolor} or not, and \texttt{final} and \kl{composition} modes.
\item[2017-01-19] Added \cs{\phantomintro} and an explanation on how to deal with \kl{align*}.
\item[2017-02-20] Removed the warnings of latex for unknown labels in \kl{autoref}.
@@ -731,7 +733,7 @@
\item [2017-07-01] Corrected a conflict between the "scope@@option" and "makeidx@@option" option.
\item [2017-07-03] Scoping becomes operational.
\item [2017-07-04] The documentation for "notion@@style" and "intro notion@@style" are added (thanks to Fabian Reiter).
-\item [2017-07-09] Added boolean \cs{environment_bool} field to "areas",in order to resolve an incompatibility with the package "standalone@@package" noticed by Fabian Reiter.
+\item [2017-07-09] Added boolean \cs{environment_bool} field to "areas", in order to resolve an incompatibility with the package "standalone@@package" noticed by Fabian Reiter.
\item [2017-07-20] "Scoping" becomes fully operational, with the parenthesis notation of \cs{\kl} and \cs{\intro}. The use of scope has been recoded. Now scope links reuse implicitly the key as a link. Documentation updated.
\item[2017-07-26] File and line numbers added in the "kaux file". Added the option "diagnose line=" to deactivate it.
\item[2017-07-26] Corrections to the documentation. Version 1.03 on CTAN.
@@ -761,7 +763,7 @@
\item[2019-10-27] Bug correction and added the `\textbf{patch label}' configuration directive (thanks to \href{https://becca.ooo/}{Rebecca Turner}). V1.18.
\item[2019-11-19] Now the labels are evaluated before being written to the "kaux file" in a \cs\KAuxNewLinkScopetagInstance\ command (bug fix). V1.19.
\item[2019-11-29] Help added in the "diagnose file". \textbf{bar suggestion} (still working) renamed to "diagnose bar", and activated by default. \textbf{patch label} is renamed into "label scope".
-\item[2019-12-02] The "kaux file" is now checked for completeness befor being used. This should avoid errors when the previous compilation failed.
+\item[2019-12-02] The "kaux file" is now checked for completeness before being used. This should avoid errors when the previous compilation failed.
\item[2019-12-03] Corrected bug in the scope access. V1.20.
\item[2020-01-25] Corrected bug when "knowledge@@package" is used without "hyperref@@package" (thanks to Rémi Nollet).
\item[2020-01-25] Corrected bug that made the kaux file not stabilize (thanks to Rémi Nollet). V1.21 on CTAN.
@@ -774,7 +776,9 @@
\item[2021-05-26] Corrected wrongly used default parameter in \cs\knowledgedirective.
\item[2021-05-27] The explicit text given in a \cs\kl-command now overrides the "text=" directive.
\item[2021-07-18] Adding the "no index" directive.
-\item[2021-12-20] Adding options "anchor point shape", "anchor point color", "anchor point shift" (rom request of Rémi Morvan).
+\item[2021-12-20] Adding options "anchor point shape", "anchor point color", "anchor point shift" (request of Rémi Morvan).
+\item[2021-12-27] Bug correction for corner shape, and doc update (thanks to Rémi Morvan).
+\item[2022-01-12] Minor changes. Removing dead link for the webpage. V1.27
\end{compactdesc}
\normalsize
%\restoregeometry
@@ -955,9 +959,9 @@
\begin{code}[12cm]
\cs\AP{}
A \cs\intro\{semigroup\} is an ordered pair \verb|$(S,\cdot)$| in which \verb|$S$| is a set and \verb|$\cdot$| is an
-associative binary operator over~\verb|$S$|. A \cs\intro\{semigroup morphism\} is \kl{[...]}\\
-\kl{[...]}\\
-Consider a \cs\kl\{semigroup morphism\} between \cs\kl\{semigroups\} \verb|$S$| and \verb|$T$|. \kl{[...]}
+associative binary operator over~\verb|$S$|. A \cs\intro\{semigroup morphism\} is "[...]"\\
+"[...]"\\
+Consider a \cs\kl\{semigroup morphism\} between \cs\kl\{semigroups\} \verb|$S$| and \verb|$T$|. "[...]"
\end{code}
\noindent or when the "quotation notation" is activated:
\begin{code}[12cm]
@@ -965,9 +969,9 @@
A \kl{""}semigroup\kl{""} is an ordered pair \verb|$(S,\cdot)$| in which \verb|$S$| is a set and \verb|$\cdot$| is an
associative binary operator over~\verb|$S$|.
\cs\AP{}
-A \kl{""}semigroup morphism\kl{""} is \kl{[...]}\\
-\kl{[...]}\\
-Consider a \kl"semigroup morphism\kl" between \kl"semigroups\kl" \verb|$S$| and \verb|$T$|. \kl{[...]}
+A \kl{""}semigroup morphism\kl{""} is "[...]"\\
+"[...]"\\
+Consider a \kl"semigroup morphism\kl" between \kl"semigroups\kl" \verb|$S$| and \verb|$T$|. "[...]"
\end{code}
This yields
@@ -976,9 +980,9 @@
\begin{PDFoutput}[11cm]
\AP A \intro[_semigroup]{semigroup} is an ordered pair $(S,\cdot)$ in which~$S$ is a set and $\cdot$ is an
associative binary operator over~$S$.
-\AP A \intro[_semigroup morphism]{semigroup morphism} is \kl{[...]}\\
-\kl{[...]}\\
-Consider a \kl[_semigroup morphism]{semigroup morphism} between \kl[_semigroups]{semigroups} $S$ and $T$. \kl{[...]}
+\AP A \intro[_semigroup morphism]{semigroup morphism} is "[...]"\\
+"[...]"\\
+Consider a \kl[_semigroup morphism]{semigroup morphism} between \kl[_semigroups]{semigroups} $S$ and $T$. "[...]"
\end{PDFoutput}
\knowledgeconfigure{visible anchor points=false}%
\marginpar{"Undefined knowledges" also yield warnings during the compilation. These can be avoided using the "silent" option.}%
@@ -1012,9 +1016,9 @@
\begin{PDFoutput}[11cm]
\AP A \intro(ex1){semigroup} is an ordered pair $(S,\cdot)$ in which~$S$ is a set and $\cdot$ is an
associative binary operator over~$S$.
-\AP A \intro(ex1){semigroup morphism} is \kl{[...]}\\
-\kl{[...]}\\
-Consider a \kl(ex1){semigroup morphism} between \kl(ex1){semigroups} $S$ and $T$. \kl{[...]}
+\AP A \intro(ex1){semigroup morphism} is "[...]"\\
+"[...]"\\
+Consider a \kl(ex1){semigroup morphism} between \kl(ex1){semigroups} $S$ and $T$. "[...]"
\end{PDFoutput}
\knowledgeconfigure{visible anchor points=false}%
%
@@ -1044,11 +1048,11 @@
One can in particular imagine that \smallcode{\kl"morphism@@RG\kl"} would instead represent ring morphisms.
Sometimes, one does not want to expand the knowledge base because the word is not specific. For instance
- \smallcode{These \cs\kl[semigroup]\{algebraic objects\} \kl{[...]}}, or
- \smallcode{These \kl"algebraic objects at semigroup\kl"\} \kl{[...]}},
+ \smallcode{These \cs\kl[semigroup]\{algebraic objects\} "[...]"}, or
+ \smallcode{These \kl"algebraic objects at semigroup\kl"\} "[...]"},
yields
\begin{PDFoutput}[6cm]
-These \kl(ex1)[semigroup]{algebraic objects} \kl{[...]}
+These \kl(ex1)[semigroup]{algebraic objects} "[...]"
\end{PDFoutput}\noindent
The term is properly linked to the definition of semigroups.
@@ -1090,16 +1094,20 @@
\label{subsection:mathematics scenario}
The examples above show various techniques for using \kl{knowledges} for enhancing the information associated to terms. In fact, these techniques are not incompatible with mathematics. Some special syntax is even offered:
-\begin{code}[9cm]
+\begin{code}[12.6cm]
\cs\knowledgenewrobustcmd\cs\closure[1]\{\cs\cmdkl\{\cs\langle\}\#1\cs\cmdkl\{\cs\rangle\}\}\}\\
-{[...]}\\
-The closure of~\$X\$ under product is denoted~\$\cs\intro*\cs\closure\{X\}\$
+"[...]"\\
+The closure of~\$X\$ under product is denoted~\$\cs\intro*\cs\closure\{X\}\$.\\
+"[...]"\\
+ Consider now \$\cs\closure\{\cs\{a,b,c\cs\}\}\$.
\end{code}\noindent
\noindent
would yield:
-\begin{PDFoutput}[4cm]
-\knowledgenewrobustcmd \monoid{\cmdkl{\mathcal M}}
-A monoid is $\monoid$ !
+\begin{PDFoutput}[8cm]
+ \knowledgenewrobustcmd \closure[1]{\cmdkl{\langle}#1\cmdkl{\rangle}}
+ \AP The closure of~$X$ under product is denoted $\intro*\closure X$.\\
+ "[...]"\\
+ Consider now $\closure{\{a,b,c\}}$.
\end{PDFoutput}
\begin{problem}
But I want more. I want to be able to introduce variables.
@@ -1112,14 +1120,14 @@
The following code gives an idea of what is possible using \kl{scoping}:
\begin{code}
\cs\knowledgeconfigureenvironment\{theorem,lemma,proof\}\{\}\par\noindent
-\kl{[...]}\par\noindent
+"[...]"\par\noindent
\cs\begin\{lemma\}\cs\label\{theorem:main\}\par\noindent
~~~~\cs\knowledge\{n\}\{\kl{notion}\}\par\noindent
-~~~~For all number~\$\cs\intro\ n\$, \kl{[...]}\par\noindent
+~~~~For all number~\$\cs\intro\ n\$, "[...]"\par\noindent
\cs\end\{lemma\}\par\noindent
-\kl{[...]}\par\noindent
+"[...]"\par\noindent
Here \$\cs\kl\ n\$ is an undefined knowledge.\par\noindent
-\kl{[...]}\par\noindent
+"[...]"\par\noindent
\cs\begin\{proof\}[Proof of theorem\~\space\{theorem:main\}]\par\noindent
~~~~\cs\knowledgeimport\{theorem:main\}\par\noindent
~~~~Inside the proof, \$\cs\kl\ n\$ is hyperlinked to the theorem...\par\noindent
@@ -1477,12 +1485,12 @@
a default value. For instance:
\begin{code}
\cs\knowledgedirective\{highlight\}[brown]\{\kl{color=}\{\#1\},\kl{emphasize},\kl{md}\}\\{}
-\kl{[...]}\\{}
+"[...]"\\{}
\cs\knowledge\{notion A\}\{highlight\}\\
\cs\knowledge\{notion B\}\{highlight\}\\
\cs\knowledge\{notion C\}\{highlight\}\\
\cs\knowledge\{important notion D\}\{highlight=red\}\\{}
-\cs{[...]}\\
+"[...]"\\
We shall now see \cs\kl\{notion A\}, \cs\kl\{notion B\}, \cs\kl\{notion C\}, as well as the \cs\kl\{important notion D\}.
\end{code}
\noindent
@@ -1935,7 +1943,7 @@
\begin{code}
\textcolor{gray}{\% We declare first in the preamble the environments that use knowledge.}\\
\cs\knowledgeconfigureenvironment\{definition\}\{knowledge=attracts\}\par\indent
-{[...]}\\
+"[...]"\\
\indent
\cs\begin\{definition\}\cs\label\{somewhere\}\\
\indent~~\cs\knowledge\{something\}\{notion\}\\
@@ -1963,14 +1971,14 @@
For instance:
\begin{code}[9cm]
\cs\knowledgeconfigureenvironment\{theorem,proof\}\{\}\par\indent
-{[...]}\par\indent
+"[...]"\par\indent
\cs\begin\{theorem\}\cs\label\{theorem:1\}\par\noindent
~~\cs\knowledge\verb|\alpha|\{\kl{autoref},\kl{color=}red\}\par\noindent
-~~Let \$\cs\intro\verb|\alpha|\$ be an integer [...]\par\noindent
+~~Let \$\cs\intro\verb|\alpha|\$ be an integer "[...]"\par\noindent
\cs\end\{theorem\}\par\noindent
-{[...]}\par\indent
+"[...]"\par\indent
Here \$\cs\kl\verb|\alpha|\$ is unknown.\par\noindent
-{[...]}\par\indent
+"[...]"\par\indent
\cs\begin\{proof\}\par\noindent
~~\cs\knowledgeimport\{theorem:1\}\par\noindent
~~But now \$\cs\kl\verb|\alpha|\$ points to its definition.\par\noindent
@@ -2210,26 +2218,26 @@
\end{hint}}
\begin{code}
\cs\knowledge\{house\}[Houses\vbar houses]\{\kl{autoref}\}\\~
-\kl{[...]}\\
+"[...]"\\
\cs\begin\{document\}\\~
-\kl{[...]}\\
+"[...]"\\
In this document, we will see the very important notion of \kl{"}houses\kl{"}.\\~
-\kl{[...]}\\
+"[...]"\\
\cs\AP\\
Let us define a \kl{""}house\kl{""} to be a building that functions as a home.\\~
-\kl{[...]}\\
+"[...]"\\
\cs\end\{document\}
\end{code}\noindent
yields
\begin{PDFoutput}
\knowledge{house}[Houses| houses]{autoref}%
-\kl{[...]}\\
+"[...]"\\
In this document, we will see the very important notion of \kl{houses}.\\~
-\kl{[...]}\\
+"[...]"\\
\AP
Let us define a \intro{house} to be a building that functions as a home.
\\~
-\kl{[...]}
+"[...]"
\end{PDFoutput}
\AP
@@ -2237,10 +2245,10 @@
\begin{code}
\cs\newcommand\kl[@token]\monoid\{\cs\kl[\kl[@token]\monoid]\{\cs\mathcal M\}\}\\
\cs\knowledge\kl[@token]\monoid\{autoref\}\\~
-\kl{[...]}\\
+"[...]"\\
\cs\AP\\~
Let now \$\cs{\intro*}\kl[@token]\monoid\$ be a monoid.\\~
-\kl{[...]}\\
+"[...]"\\
Remember now who is \$\kl[@token]\monoid\$.
\end{code}
%
@@ -2251,7 +2259,7 @@
\knowledge\moonoid{autoref}
\AP
Let now $\intro*\moonoid$ be a monoid.\\~
-\kl{[...]}\\
+"[...]"\\
Remember now who is $\moonoid$.
\end{PDFoutput}
@@ -2339,7 +2347,7 @@
\cs\AP\\
In order to describe what is a \cs\kl\{monoid\}, let us us first define
a \cs\intro\{product\} to be an associative binary operator,
-and a \cs\intro\{unit\} to be \kl{[...]}
+and a \cs\intro\{unit\} to be "[...]"
\bigskip
\cs\begin\{description\}\\
@@ -2361,7 +2369,7 @@
\AP In order to describe what is a \kl{monoid2}, let us us first define
a \intro{product2} to be an associative binary operator,
and a \intro{unit2} to be
-\kl{[...]}\par
+"[...]"\par
\begin{description}
\itemAP[A \intro{semigroup2}] is a set equipped with a \kl{product2}.
\itemAP[A \intro{monoid2}] is a \kl{semigroup2} that has a \kl{unit2}.
@@ -2590,9 +2598,9 @@
Now, the norm $1$ and the norm $2$ can be defined in different places since "knowledge" is specific to each case.
\begin{code}
\cs\AP\ The norm~\$1\$ of a function~\$f\$ is denoted \$\cs\intro*\cs\norm1f\$.\\
- {}[...]\\
+ "[...]"\\
\cs\AP\ The norm~\$2\$ of a function~\$f\$ is denoted \$\cs\intro*\cs\norm2f\$.\\
- {}[...]\\
+ "[...]"\\
Here, \$\cs\norm 1g\$ and \$\cs\norm2h\$ link to the proper place, while\\\$\cs\norm3g\$ is an undefined knowledge.
\end{code}
@@ -2616,9 +2624,9 @@
\begin{code}
\cs\renewmathcommand\cs\pi\{\cs\kl[\cs\pi]\{\cs\LaTeXpi\}\}\\
\cs\knowledge\cs\pi\{notion\}\\
- {[...]}\\
+ "[...]"\\
\cs\AP\ Let \$\cs{\intro*}\cs\pi=3.1415\$.\\
- {[...]}\\
+ "[...]"\\
Now \$\cs\pi\$ points to the above sentence.
\end{code}
This code works because a different name \cs\LaTeXpi\ stores the original macro. Using~\cs\pi\ instead would yield an infinite loop.
@@ -2656,9 +2664,9 @@
These five points are illustrated in the following code:
\begin{code}
\cs\knowledgenewrobustcmd\cs\comp\{\cs\mathrel\{\cs\cmdkl\{\cs\circ\}\}\}\\
-{[...]}\\
+"[...]"\\
\cs\AP\ Composition is denoted \$\cs{\intro*}\cs\comp\$.\\
-{[...]}\\
+"[...]"\\
Now, each use of \$\cs\comp\$ points to its introduction.
\end{code}
@@ -2681,9 +2689,9 @@
In this case, the "mathcommand@@package" package can also be of some help:
\begin{code}
\cs\knowledgerenewmathcommand\cs\circ\{\cs\mathrel\{\cs\cmdkl\{\cs\LaTeXcirc\}\}\}\\
-{[...]}\\
+"[...]"\\
\cs\AP\ Let \$g\cs{\intro*}\cs\circ\ f\$ denote the composition of functions.\\
-{[...]}\\
+"[...]"\\
Now, each use of \$\cs\circ\$ points to its introduction.
\end{code}
\noindent
@@ -2740,7 +2748,7 @@
\cs\usepackage\{\kl(package){hyperref}\}\\
\cs\usepackage[\kl{electronic}]\{"knowledge@@package"\}\\
\cs\knowledgeconfigure\{"notion@@option"\}\\
-{[...]}\\
+"[...]"\\
\cs\knowledge\{some text\}\{notion\}
\end{code}\noindent
Then the paper is displayed in a colorful way.
@@ -2790,13 +2798,13 @@
\cs\knowledge\{\robustdisplay\Ltwo-space\}[\robustdisplay\Ltwo-spaces]\{autoref\}\\
\cs\knowledge\{\'etale topology\}[\'Etale topology]\par
~~~~~~~\{\kl{url=}\{https://en.wikipedia.org/wiki/\'Etale\_topology\}\}\\
-{[...]}\\
+{"[...]"}\\
\cs\begin\{document\}\\
\cs\tableofcontents\\
\cs\section\{On \cs\kl\{\robustdisplay\Ltwo-spaces\}\\
-{[...]}\\
+{"[...]"}\\
\cs\section\{On the \cs\kl\{\'etale topology\}\}\\
-{[...]}\\
+{"[...]"}\\
\cs\end\{document\}
\end{code}\end{center}\noindent
will result in that both \kl{knowledges} are considered unknown in the table of contents.
@@ -2810,7 +2818,7 @@
\item Using an equivalent text that does not have the problem:
\begin{code}
\cs\knowledge\{$\backslash$'etale topology\}\{\kl{link=}\'etale topology\}\\
- {[...]}\\
+ {"[...]"}\\
\cs\section\{On the \cs\kl\{$\backslash$'etale topology\}\}
\end{code}
\item Both problems can be solved using synonyms/links that have no problem. For instance:
@@ -2817,7 +2825,7 @@
\begin{code}
\cs\knowledge\{Ltwo-space\}\{\kl{link=}\robustdisplay\Ltwo-space\}\\
\cs\knowledge\{etale topology\}\{\kl{link=}\'etale topology\}\\
- {[...]}\\
+ {"[...]"}\\
\cs\section\{On \cs\kl[Ltwo-space]\{\robustdisplay\Ltwo-spaces\}\}\\
\cs\section\{On the \cs\kl[etale topology]\{étale topology\}\}
\end{code}
@@ -2909,11 +2917,11 @@
\cs\usepackage\{\kl(package){complexity}\}\\
\cs\let\cs\compAP\robustdisplay\AP\\
\cs\let\robustdisplay\AP\cs\undefined\\
-\cs\usepackage[...]\{"knowledge@@package"\}
+\cs\usepackage"[...]"\{"knowledge@@package"\}
\end{code}
&&
\begin{code}[5.2cm]
-\cs\usepackage[...]\{"knowledge@@package"\}\\
+\cs\usepackage"[...]"\{"knowledge@@package"\}\\
\cs\let\cs\kAP\robustdisplay\AP\\
\cs\let\robustdisplay\AP\cs\undefined\\
\cs\usepackage\{\kl(package){complexity}\}
@@ -2934,15 +2942,21 @@
The preamble thus looks like:
\begin{code}[9cm]
-\cs\documentclass\{\kl{[...]}\}\par\noindent
+\cs\documentclass\{"[...]"\}\par\noindent
\cs\pdfoutput=1\par\noindent
-\kl{[...]}\par\noindent
+"[...]"\par\noindent
\cs\usepackage[\kl{breaklinks}]\{\kl(package){hyperref}\}\par\noindent
-\kl{[...]}\par\noindent
+"[...]"\par\noindent
\cs\usepackage\{\kl(package){knowledge}\}\par\noindent
-\kl{[...]}\par\noindent
+"[...]"\par\noindent
\end{code}
+\subsection{Display errors in pdf output, in particular "arXiv"}
+Again, try in the preamble:
+\begin{code}[9cm]
+\cs\pdfoutput=1
+\end{code}
+
\subsubsection{Red boxes around links}
This is an annoying feature of the "hyperref@@package" package to surround all links by red boxes (that may appear or not depending on the viewer). This is very heavy in document with many links. By default, this is deactivated when using the "knowledge@@package",
@@ -2980,7 +2994,7 @@
\cs\let\cs\section\cs\SUPERsection\\
\cs\begin\{"thebibliography@@env"\}\\
\cs\bibitem\dots\\
-{}[...]\\
+{}"[...]"\\
\cs\end\{"thebibliography@@env"\}\\
\cs\let\cs\section\cs\NEWsection
\end{code}
Modified: trunk/Master/texmf-dist/source/latex/knowledge/knowledge-code.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/knowledge/knowledge-code.dtx 2022-01-12 21:18:16 UTC (rev 61582)
+++ trunk/Master/texmf-dist/source/latex/knowledge/knowledge-code.dtx 2022-01-12 21:18:33 UTC (rev 61583)
@@ -23,7 +23,7 @@
%
% \iffalse
%<head>\usepackage{expl3}
-%<head>\ProvidesExplPackage{knowledge}{2021/12/20}{1.26}{}
+%<head>\ProvidesExplPackage{knowledge}{2022/01/12}{1.27}{}
%<*driver>
\def\knowledgecode{active}
\input{knowledge.tex}
@@ -59,6 +59,7 @@
% \changes{1.24}{2020/09/22}{silent option} %
% \changes{1.25}{2021/03/31}{bug correction} %
% \changes{1.26}{2021/12/20}{enhanced math+other functionalities+extra options} %
+% \changes{1.27}{2022/01/12}{doc changes} %
% \GetFileInfo{knowledge.sty} %
% \DoNotIndex{}
%
@@ -78,11 +79,11 @@
name: knowledge
license: LaTeX Project Public License version 1.2 or above
- version: v1.26
- date: 2021/12/20
+ version: v1.27
+ date: 2022/01/12
author: Thomas Colcombet
mail: thomas.colcombet at irif.fr
- web: https://www.irif.fr/~colcombe/knowledge_en.html
+ web: https://ctan.org/pkg/knowledge
### Purpose:
The knowledge package for LaTeX offers a systematic way to handle
@@ -575,7 +576,7 @@
\cs_new:Nn \knowledge_set_anchor_point_shape:n{
\tl_set:Nn\l_tmpa_tl{#1}
\tl_case:NnTF\l_tmpa_tl{
- \knowledge_APshape_name_corner_t
+ \knowledge_APshape_name_corner_tl
{\tl_set:Nn\knowledge_option_anchor_point_shape_tl{\knowledge_anchor_point_corner:n{0.5}}}
\knowledge_APshape_name_tinycorner_tl
{\tl_set:Nn\knowledge_option_anchor_point_shape_tl{\knowledge_anchor_point_corner:n{0.1}}}
@@ -3470,6 +3471,7 @@
\bool_if:NT\kl_invisible_bool
{\tl_gclear:N\knowledge_display_code_tl}
}
+\def\ensuretext#1{\ensuremath{\text{#1}}}
% \end{macrocode}
% \begin{macrocode}
\cs_new:Nn\knowledge_kl_compute_code_xcolor:{
Modified: trunk/Master/texmf-dist/tex/latex/knowledge/knowledge.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/knowledge/knowledge.sty 2022-01-12 21:18:16 UTC (rev 61582)
+++ trunk/Master/texmf-dist/tex/latex/knowledge/knowledge.sty 2022-01-12 21:18:33 UTC (rev 61583)
@@ -23,7 +23,7 @@
%% LaTeX version 1999/12/01 or later.
%%
\usepackage{expl3}
-\ProvidesExplPackage{knowledge}{2021/12/20}{1.26}{}
+\ProvidesExplPackage{knowledge}{2022/01/12}{1.27}{}
%%%%%%%%%%
\RequirePackage{l3keys2e}
\RequirePackage{etoolbox}
@@ -1057,7 +1057,7 @@
\cs_new:Nn \knowledge_set_anchor_point_shape:n{
\tl_set:Nn\l_tmpa_tl{#1}
\tl_case:NnTF\l_tmpa_tl{
- \knowledge_APshape_name_corner_t
+ \knowledge_APshape_name_corner_tl
{\tl_set:Nn\knowledge_option_anchor_point_shape_tl{\knowledge_anchor_point_corner:n{0.5}}}
\knowledge_APshape_name_tinycorner_tl
{\tl_set:Nn\knowledge_option_anchor_point_shape_tl{\knowledge_anchor_point_corner:n{0.1}}}
@@ -2975,6 +2975,7 @@
\bool_if:NT\kl_invisible_bool
{\tl_gclear:N\knowledge_display_code_tl}
}
+\def\ensuretext#1{\ensuremath{\text{#1}}}
\cs_new:Nn\knowledge_kl_compute_code_xcolor:{
\tl_if_empty:NF\knowledge_kl_color_tl
{\knowledge_kl_display_generic:x{\exp_not:N\textcolor{\knowledge_kl_color_tl}}}
More information about the tex-live-commits
mailing list.