summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/knowledge/knowledge.tex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/knowledge/knowledge.tex')
-rw-r--r--macros/latex/contrib/knowledge/knowledge.tex79
1 files changed, 47 insertions, 32 deletions
diff --git a/macros/latex/contrib/knowledge/knowledge.tex b/macros/latex/contrib/knowledge/knowledge.tex
index d567aa3604..d65b26a459 100644
--- a/macros/latex/contrib/knowledge/knowledge.tex
+++ b/macros/latex/contrib/knowledge/knowledge.tex
@@ -188,7 +188,10 @@
\knowledgeconfigure{quotation=false}
-\knowledge{LaTeX}[latex|LATEX|Latex]{text=\LaTeX, color=black}
+\knowledge{LaTeX}[latex|LATEX|Latex]{text=\LaTeX}
+\knowledge{tex}[TeX|TEX]{text=\TeX}
+\knowledge{pdflatex}{typewriter}
+
\knowledge"{text=\quotesymbol}
\knowledge{""}{text=\quotesymbol\quotesymbol}
\knowledgeconfigure{quotation=true}
@@ -220,7 +223,6 @@
\knowledge{{@}}{kcommand,text=\arobas}
-\knowledge{tex}{text=\TeX}
\knowledgedirective{people}{emphasize,color=DarkGray}
\knowledge{stackexchange}{people}
@@ -317,8 +319,7 @@
\knowledge{index key=}{directive}
\knowledge{index parent key=}{directive}
\knowledge{index style=}{directive}
-\knowledge{bar suggestion=}{directive}
-\knowledge{patch label}[patch label=]{option}
+\knowledge{label scope}[label scope=]{option}
\knowledge{color=}{directive}
\knowledge{cyclic color}{directive}
\knowledge{colorbox=}{directive}
@@ -357,8 +358,9 @@
\knowledge{unprotect link co}{option,text=unprotect link}
\knowledge{hyperlinks=}{option}
\knowledge{fix hyperref twocolumn}{option}
+\knowledge{diagnose help=}[diagnose help]{option}
\knowledge{diagnose line=}[diagnose line]{option}
-\knowledge{bar suggestion=}[bar suggestion]{option}
+\knowledge{diagnose bar=}[diagnose bar]{option}
\knowledge{active}{option}
@@ -470,10 +472,6 @@
| scopes
| Scopes
\knowledge{doc notion}
- | explicit scope
- | Explicit scopes
- | explicit scopes
-\knowledge{doc notion}
| scopetag
| scopetags
\knowledge{namespace}[namespaces|Namespaces]{doc notion}
@@ -521,9 +519,6 @@
\knowledge {scope.sty}{link=scope option}
-\knowledge{latex}{text=\LaTeX}
-\knowledge{tex}{}
-\knowledge{pdflatex}{}
\knowledgedefault{}
@@ -741,9 +736,12 @@ This involves testing the counter |beamer@coveringdepth| which if higher than o
"Explicit scopes" are introduced. Updating of the documentation. "up" directive in math mode now silently does nothing, and \cs{\knowledgedirective} now forbids redefinitions by default (thanks to Léo Stefanesco).
\item[2019-07-02] Removing the `\texttt{kl}' and `\texttt{intro}' styles that prevented a proper configuration of "intro notion@@style" (thanks to Léo Stefanesco).
\item[2019-10-03] Update of the documentation, and V1.17.
-\item[2019-10-27] Bug correction and added the `\kl{patch label}' configuration directive (thanks to \href{https://becca.ooo/}{Rebecca Turner}). V1.18.
+\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.
- \end{compactdesc}
+\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 befre being used. This should avoid errors when the previous compilation failed.
+\item[2019-12-03] Corrected bug in the scope access. V1.20
+\end{compactdesc}
\normalsize
%\restoregeometry
@@ -1229,8 +1227,11 @@ be used in the optional parameter of \cs{\usepackage} when loading the "knowledg
""Configuration directives"" consists of a comma separated list of elements that can take the following values:
\begin{description}
-\itemAP["diagnose line="] can be set to true or false. It activates or deactivates the line numbering in the "diagnose file". False is the default.
+\itemAP["diagnose bar="] (de)activates the "`\vbar'-notation" in the "diagnose file". True by default.
+\itemAP["diagnose help="] can be set to true or false. It activates or deactivates the help in the "diagnose file". True by default.
+\itemAP["diagnose line="] can be set to true or false. It activates or deactivates the line numbering in the "diagnose file". False by default.
\itemAP[\kl{fix hyperref twocolumn}] triggers a hack that solves a known problem that may occur when "hyperref@@package" is used in two-columns mode.
+\itemAP[\kl{label scope}] enables or disables the redefined \cs{\label} command, which helps automatically define scopes (default is~\textmd{true}).
\itemAP["notion@@option"] configures the "notion" "directive" which is a refined version of "autoref".
\itemAP["protect quotation="] is followed by a comma separated list of environments in which the "quotation notation" will be automatically deactivated (surrounded by braces if more than one item in the list).
\itemAP[\intro{protect link co} and \intro{unprotect link co}] starts and ends respectively a zone in which the "knowledge@@package" package do not create hyperlinks. These can be nested.
@@ -1879,13 +1880,27 @@ The following code (that requires the "scope option" for being functional) shoul
It is often the case in a text, that one has to locally break the nesting structure of a document, and refer to a object local in an environment. For instance, a comment may refer to a variables/concept that has been locally used in the proof. The "knowledge@@package" provides suitable mechanisms for complex referencing of scopes. Let us explain this through an example:
\begin{code}
-\cs\begin{definition}\cs\label{}
-\indent~~\cs\knowledge{}
-\cs\end{definition}
+\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\}\\
+\indent~~Here, \cs\intro\{something\} is a notion internal to the definition.
+\cs\end\{definition\}
\end{code}
+Note here that what is important is the location of the \cs\knowledge\ command, irrespective of the location ofthe \cs\intro\ command.
+\AP The \cs\label\ command is used to name the "scope". In fact, the real command is
+\begin{center}
+ \smallcode{\csintro\knowledgescope\{scope name\}}
+\end{center}\noindent
+which associates a scope name to the surrounding environment (providing it has been declared possible to do it using
+\cs\knowledgeconfigureenvironment).
+\AP
+The standard \LaTeX\ command \cs\label\ is overloaded and performs implicitly a call to \cs\knowledgescope\ (this behavior can be deactivated/reactivated using the ""label scope=""\texttt{\{true,false\}} directive). The result is that the same string of characters can be used in order to name the scope, and at the same time is used as a standard \LaTeX\ label.
-Something important is missing so far: one rapidly wants to access to \kl{knowledges} that do not exist in the current \kl{scope}. For instance, a notion is used in a section of a document, and one would like to refer to it in the introduction. Another case is that of a notion or a mathematic variable that is introduced in the statement of a theorem, and should be accessible inside the proof. There are essentially two ways to access such distance \kl{knowledges}: either use the \smallcode{\cs\kl(label)\{text\}} command (or the equivalent \smallcode{\kl{"...@...@..."}} notation), or use the \cs{\knowledgeimport} command. We describe the second possibility now. The syntax is:
+\AP Something important is missing so far: one rapidly wants to access to \kl{knowledges} that do not exist in the current \kl{scope}. For instance, a notion is used in a section of a document, and one would like to refer to it in the introduction. Another case is that of a notion or a mathematic variable that is introduced in the statement of a theorem, and should be accessible inside the proof. There are essentially two ways to access such distant \kl{knowledges}: either use the \smallcode{\cs\kl(label)\{text\}} command (or the equivalent \smallcode{\kl{"...@...@..."}} notation), or use the \cs{\knowledgeimport} command. We describe the second possibility now. The syntax is:
\begin{center}
\smallcode{\csintro\knowledgeimport\{label\}}
\end{center}
@@ -1967,18 +1982,19 @@ The detail of the problems are then gathered in the \kl{diagnose file}.
\label{subsection:diagnose file}
The \intro{diagnose file} is a file that is created when the "knowledge@@package" package is used
-(note that another file, ""jobname.kaux"" is also created by the "knowledge@@package" package, for internal use). It enormously eases the use of the package, and it is a good habit to sometimes check it. It gathers a certain number of informations, that can be warning, code to be used, or simply information. This file has the name of the tex document with the extension \kl{.diagnose}. Its content is divided into clearly identified parts. Depending on the used options, some of these parts may appear or disappear.
+(note that another file, ""jobname.kaux"" is also created by the "knowledge@@package" package, for internal use). It enormously eases the use of the package, and it is important to look into it when finalizing a document. It gathers a certain number of informations, that can be warning, code to be used, or simply information. This file has the name of the tex document with the extension \kl{.diagnose}. Its content is divided into clearly identified parts. Depending on the used options, some of these parts may appear or disappear.
\begin{description}
\itemAP[\intro{Undefined knowledges}] in this section are listed all the knowledges that have been unsuccessfully searched for. These are given in lines either of the form
- \begin{quote}
- \texttt{\cs{\knowledge}\{undefined knowledge\}\{\textit{suggested directives}\}}
- \end{quote}
- or of the form
\begin{quote}
\texttt{\cs{\knowledge}\{\textit{suggested directives}\}\\
- \indent~~~\klbn|~~undefined knowledge}\textit{[\klbn@scope]}
+ \indent~~~\klbn|~~undefined knowledge}\textit{[\klbn@scope]}\\
+ \indent~~~~~~~~~~~~~~\vdots
\end{quote}
- \AP Switching from one mode to another is obtained using the "configuration directive" ""bar suggestion=""\{true,false\} (default is true).
+ or of the form
+ \begin{quote}
+ \texttt{\cs{\knowledge}\{undefined knowledge\}\{\textit{suggested directives}\}}
+ \end{quote}
+ \AP Switching from one mode to another is obtained using the "configuration directive" "diagnose bar="\{true,false\} (default is true).
The intent is that copying the content of this section to the document itself will solve all problems of \kl{undefined knowledges}. It is an efficient way,
when one has written a document without caring so much about knowledges to copy the content of this section, and then modify it/reorganize it, in order to suit ones purposes. By default, no suggestion is offered, or "notion" is suggested if the "notion@@option" directive has been used. Suggestion can be automatically configured using the "suggestion=@@variant" "directive@@variant" of the macros \cs{\knowledgenewvariant} and \cs{\knowledgesetvariant}.
@@ -2001,9 +2017,8 @@ This can be activated using the "diagnose line" boolean option:
\end{center}
\AP By default, the "diagnose file" gives suggestions to be used with the normal \cs\knowledge\ syntax.
A "`\vbar'-notation" suggestion can be activated using:
-This can be activated using the "diagnose line" boolean option:
\begin{center}
-\smallcode{\cs\knowledgeconfigure\{""bar suggestion=""true\}}
+\smallcode{\cs\knowledgeconfigure\{""diagnose bar=""true\}}
\end{center}
\iffalse
@@ -2369,9 +2384,9 @@ I do not know to which extend it is compatible with various classes...
\subsubsection{The "notion@@option" directive}
-The configuration option~\intro(option){notion} is activated using:
+\AP The configuration option~\intro(option){notion} is activated using:
\begin{center}
-\smallcode{\cs\knowledgeconfigure\{\intro(option){notion}\}}
+\smallcode{\cs\knowledgeconfigure\{\kl(option){notion}\}}
\end{center}\noindent
\AP It automatically configures a \kl[\knowledge directives]{directive} \intro{notion}
which is an \kl{autoref} displayed properly:
@@ -2710,7 +2725,7 @@ If other kind of problems occur, report them to \texttt{thomas.colcombet@irif.fr
\label{subsection:configuration directive list}
\begin{compactdesc}
-\item["bar suggestion="\textmd{\{true,false\}}] activates the \kl{`\vbar'-notation} in the "diagnose file" (default is false)
+\item["diagnose bar="\textmd{\{true,false\}}] activates the \kl{`\vbar'-notation} in the "diagnose file" (default is false)
\item["composition"] switches to "composition mode",
\item["cyclic colors=@@option"] fixes the cyclic list of colors used by the "directive" "cyclic color".
\item["diagnose line="\textmd{\{true,false\}}] activates or deactivates the line numbering in the "diagnose file".
@@ -2720,7 +2735,7 @@ If other kind of problems occur, report them to \texttt{thomas.colcombet@irif.fr
\item[\kl{hyperlinks=}\textmd{\{true,false\}}] activates or deactivates the hyperlinks.
\item[{{\kl(option){notion}}}] activates the "notion" directive
\item["paper"] switches to "paper mode",
-\itemAP[\kl{patch label}] enables or disables the redefined \cs{\label} command, which helps automatically define scopes (default is~\textmd{true}).
+\itemAP[\kl{label scope=}\textmd{\{true,false\}}] enables or disables the redefined \cs{\label} command, which helps automatically define scopes (default is~\textmd{true}).
\item[\kl{protect link co} and \kl{unprotect link co}] starts and ends respectively a zone in which the "knowledge@@package" package does not create hyperlinks.
\item[\kl{protect quotation=}\textmd{\{environment list\}}] declares a list of environment in which the "quotation notation" should be deactivated
\item[{{\kl(option)[quotation]{quotation=}\textmd{\{true,false\}}}}] activates or deactivates the "quotation notation".