summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/latex/knowledge/README.TEXLIVE7
-rw-r--r--Master/texmf-dist/doc/latex/knowledge/README.txt68
-rw-r--r--Master/texmf-dist/doc/latex/knowledge/knowledge-example.tex6
-rw-r--r--Master/texmf-dist/doc/latex/knowledge/knowledge.pdfbin0 -> 669574 bytes
-rw-r--r--Master/texmf-dist/source/latex/knowledge/knowledge-utils.dtx5
-rw-r--r--Master/texmf-dist/source/latex/knowledge/knowledge.dtx127
-rw-r--r--Master/texmf-dist/tex/latex/knowledge/knowledge.sty66
-rwxr-xr-xMaster/tlpkg/libexec/ctan2tds1
8 files changed, 200 insertions, 80 deletions
diff --git a/Master/texmf-dist/doc/latex/knowledge/README.TEXLIVE b/Master/texmf-dist/doc/latex/knowledge/README.TEXLIVE
deleted file mode 100644
index bea3d266f88..00000000000
--- a/Master/texmf-dist/doc/latex/knowledge/README.TEXLIVE
+++ /dev/null
@@ -1,7 +0,0 @@
-The following files have been removed in the TeX Live installation of
-the current package, typically due to duplication, lack of space, or
-missing source code. You can find these files on CTAN at
- http://mirror.ctan.org/macros/latex/contrib/knowledge
-If questions or concerns, email tex-live@tug.org.
-
- knowledge.pdf
diff --git a/Master/texmf-dist/doc/latex/knowledge/README.txt b/Master/texmf-dist/doc/latex/knowledge/README.txt
index 6b9d214967d..a02aace7770 100644
--- a/Master/texmf-dist/doc/latex/knowledge/README.txt
+++ b/Master/texmf-dist/doc/latex/knowledge/README.txt
@@ -1,36 +1,38 @@
This directory contains the package
- name: knowledge.sty
- version: 1.05
- date: 2017-09-26
- license: LaTeX Project Public License version 1.2 or above
-
- author: Thomas Colcombet
- mail: thomas.colcombet@irif.fr
- web: https://www.irif.fr/~colcombe/knowledge_en.html
-
-
-Purpose:
-The knowledge package for LaTeX offers a systematic way to handle
-notions/concepts/terms throughout a document. It helps building an
-index. In combination with hyperref it makes it easy to have every
-references of a concept linked to its introduction. It also offers
-simple notations.
-
-
-Content of the file knowledge-sources.zip:
- - README.txt: this file
- - knowledge.sty: the package file (generated)
- - knowledge.pdf: the user documentation (generated)
- - makefile: the makefile. Use 'make all'
- to generate knowledge.sty and knowledge.pdf
- - knowledge.dtx: the main file
- (compiling it directly yields a developper version of the
- documentation that contains the code. Use 'make all'
- for the regular version)
- - all.ins: file generating knowledge.sty when compiled (docstrip)
- - knowledge-configuration.dtx: file containing part of the configuration
- - knowledge-utils.dtx: file containing several pieces of code not really related specifically to knowledge
- - knowledge-example.tex: an example file
-
+ name: knowledge.sty
+ version: v1.07
+ date: 2017/10/13
+ license: LaTeX Project Public License version 1.2 or above
+
+ author: Thomas Colcombet
+ mail: thomas.colcombet@irif.fr
+ web: https://www.irif.fr/~colcombe/knowledge_en.html
+
+
+ Purpose:
+ The knowledge package for LaTeX offers a systematic way to handle
+ notions/concepts/terms throughout a document. It helps building an
+ index. In combination with hyperref it makes it easy to have every
+ references of a concept linked to its introduction. It also offers
+ simple notations.
+
+
+Content of the file knowledge-sources.zip:
+ - README.txt: this file, generated while compiling knowledge.dtx
+ - knowledge.sty: the package file (generated)
+ - knowledge.pdf: the user documentation (generated)
+ - makefile: the makefile. Use 'make all'
+ to generate knowledge.sty and knowledge.pdf
+ - knowledge.dtx: the main file
+ (compiling it directly yields a developper version of the
+ documentation that contains the code. Use 'make all'
+ for the regular version. It also produces README.txt)
+ - all.ins: file generating knowledge.sty when compiled (docstrip)
+ - knowledge-configuration.dtx: file containing part of the configuration
+ - knowledge-utils.dtx: file containing several pieces of code not really
+ related specifically to knowledge
+ - knowledge-example.tex: an example file
+
+ Note: this file is created when compiling knowledge.dtx
diff --git a/Master/texmf-dist/doc/latex/knowledge/knowledge-example.tex b/Master/texmf-dist/doc/latex/knowledge/knowledge-example.tex
index 842d6fbd0e2..3c050812be9 100644
--- a/Master/texmf-dist/doc/latex/knowledge/knowledge-example.tex
+++ b/Master/texmf-dist/doc/latex/knowledge/knowledge-example.tex
@@ -56,12 +56,12 @@
\knowledge{knowledges}{synonym}
\knowledge{Knowledges}{synonym}
-% Some other configurations are possible, such as:
+% 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}
% Configurations can also be made contextual. For instance, the
% following knowledge is only accessible directly in the introduction.
-% It can nevertheless be used from elswhere using "pdflatex@@section: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}
% or \kl(section:introduction){pdflatex}. See 'scoping' in the documetation for more details.
@@ -124,6 +124,6 @@ The `@' symbol allows some flexibility by having a displayed text different from
\end{quote}
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 are visible in the margin. These are called ""anchor points"" and are introduced
+\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
using the \texttt{\detokenize{\AP}}command, commonly at the beginning of each paragraph that introduce some concept, or even in the middle of the paragraph. The "anchor points" become invisible in "paper@paper mode" or "electronic mode".
\end{document} \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/knowledge/knowledge.pdf b/Master/texmf-dist/doc/latex/knowledge/knowledge.pdf
new file mode 100644
index 00000000000..4d716105a1c
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/knowledge/knowledge.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/knowledge/knowledge-utils.dtx b/Master/texmf-dist/source/latex/knowledge/knowledge-utils.dtx
index 93d265542c7..eb50a561027 100644
--- a/Master/texmf-dist/source/latex/knowledge/knowledge-utils.dtx
+++ b/Master/texmf-dist/source/latex/knowledge/knowledge-utils.dtx
@@ -377,7 +377,10 @@
\tl_gput_right:Nn\kaux_command_list_tl{#1}
}
\NewDocumentCommand\KAuxCommand{mmm}
- {\ProvideDocumentCommand#1{#2}{}}
+ { \cs_if_exist:NTF #1
+ {}
+ {\ProvideDocumentCommand#1{#2}}
+ }
% \end{macrocode}
%
% |\ActivateKAuxPhase{phase1,phase2,...}| sets the KAux commands to use
diff --git a/Master/texmf-dist/source/latex/knowledge/knowledge.dtx b/Master/texmf-dist/source/latex/knowledge/knowledge.dtx
index d76b1cab9ba..0732f7d91dd 100644
--- a/Master/texmf-dist/source/latex/knowledge/knowledge.dtx
+++ b/Master/texmf-dist/source/latex/knowledge/knowledge.dtx
@@ -23,9 +23,59 @@
%
% \iffalse
%<head>\usepackage{expl3}
-%<head>\ProvidesExplPackage{knowledge}{2017/10/10}{v1.06}{}
+%<head>\ProvidesExplPackage{knowledge}{2017/10/10}{v1.07}{}
%<*driver>
-\def\knowledgeversion{2017/10/10 v1.06}
+\def\knowledgeversion{v1.07}
+\def\knowledgedate{2017/10/13}
+\def\knowledgeversiondate{\knowledgeversion\ \knowledgedate}
+
+{
+\newwrite\tempfile
+\def\TXT#1{\expandafter\immediate\expandafter\write\expandafter\tempfile\expandafter{\detokenize{#1}}}
+\def\TXTx#1{\edef\tmp{\noexpand\TXT{#1}}\tmp}
+\immediate\openout\tempfile=README.txt
+\TXT{This directory contains the package}
+\TXT{}
+\TXT{ name: knowledge.sty }
+\TXTx{ version: \knowledgeversion }
+\TXTx{ date: \knowledgedate }
+\TXT{ license: LaTeX Project Public License version 1.2 or above }
+\TXT{ }
+\TXT{ author: Thomas Colcombet }
+\TXT{ mail: thomas.colcombet@irif.fr }
+\TXT{ web: https://www.irif.fr/~colcombe/knowledge_en.html }
+\TXT{ }
+\TXT{ }
+\TXT{ Purpose: }
+\TXT{ The knowledge package for LaTeX offers a systematic way to handle }
+\TXT{ notions/concepts/terms throughout a document. It helps building an }
+\TXT{ index. In combination with hyperref it makes it easy to have every }
+\TXT{ references of a concept linked to its introduction. It also offers }
+\TXT{ simple notations. }
+\TXT{ }
+\TXT{ }
+\TXT{Content of the file knowledge-sources.zip: }
+\TXT{ - README.txt: this file, generated while compiling knowledge.dtx }
+\TXT{ - knowledge.sty: the package file (generated) }
+\TXT{ - knowledge.pdf: the user documentation (generated) }
+\TXT{ - makefile: the makefile. Use 'make all' }
+\TXT{ to generate knowledge.sty and knowledge.pdf }
+\TXT{ - knowledge.dtx: the main file }
+\TXT{ (compiling it directly yields a developper version of the }
+\TXT{ documentation that contains the code. Use 'make all' }
+\TXT{ for the regular version. It also produces README.txt) }
+\TXT{ - all.ins: file generating knowledge.sty when compiled (docstrip) }
+\TXT{ - knowledge-configuration.dtx: file containing part of the configuration }
+\TXT{ - knowledge-utils.dtx: file containing several pieces of code not really }
+\TXT{ related specifically to knowledge }
+\TXT{ - knowledge-example.tex: an example file }
+\TXT{}
+\TXT{ Note: this file is created when compiling knowledge.dtx }
+\TXT{}
+\immediate\closeout\tempfile
+}
+
+
\documentclass{ltxdoc}
@@ -574,7 +624,7 @@
\begin{document}
\label{paper:top}
-\title{The \texttt{knowledge} package\\\small[\knowledgeversion]}
+\title{The \texttt{knowledge} package\\\small[\knowledgeversion{} --- \knowledgedate]}
\author{Thomas Colcombet \\ \texttt{thomas.colcombet@irif.fr}}
\maketitle
@@ -592,7 +642,9 @@ Eventually, it is intended to use the package for producing scientific semantic
\begin{quote}
\begin{tabular}{ll}
\texttt{contact:}&\texttt{thomas.colcombet@irif.fr}\\
-\texttt{version:}&\texttt{\knowledgeversion} (produced \today)\\
+\texttt{version:}&\texttt{\knowledgeversion}\\
+\texttt{date:}&\texttt{\knowledgedate}
+(produced \today)\\
\texttt{license:}&\texttt{LaTeX Project Public License 1.2}\\
\texttt{web:}&\url{https://www.irif.fr/~colcombe/knowledge_en.html}\\
\texttt{CTAN:}&\url{https://www.ctan.org/pkg/knowledge}
@@ -703,6 +755,7 @@ This is essentially a list for personal referencing of what has to be done.
\item[2017-09-26] Version 1.05 on CTAN.
\item[2017-10-10] Bug in the implementation of \cs{\knowledgenewvariant} (that was invisible). Found and corrected (thanks to Marc Zeitoun).
\item[2017-10-10] Version 1.06 on CTAN.
+\item[2017-10-15] Diagnose extended. Minor corrections. Version 1.07 on CTAN.
\end{compactdesc}
\normalsize
%\restoregeometry
@@ -1772,10 +1825,10 @@ more than once are listed. When a document reaches its final states, this secti
Note that this may be caused by an \cs{\intro} used in some title (and repeated in the table of contents).
\end{description}
-\AP By default, the "diagnose file" does give the file and the line as a comment before every error or warning it lists.
-This can be cancelled using the "diagnose line" boolean option:
+\AP By default, the "diagnose file" does not give the file and the line of the messages.
+This can be activated using the "diagnose line" boolean option:
\begin{center}
-\smallcode{\cs\knowledgeconfigure\{""diagnose line=""false\}}
+\smallcode{\cs\knowledgeconfigure\{""diagnose line=""true\}}
\end{center}
\iffalse
@@ -2457,6 +2510,7 @@ If other kind of problems occur, report them to \texttt{thomas.colcombet@irif.fr
% \changes{v1.04}{2017/07/28}{minor changes,bug fixes} %
% \changes{v1.05}{2017/09/26}{minor changes,bug fixes} %
% \changes{v1.06}{2017/10/10}{bug correction} %
+% \changes{v1.07}{2017/10/13}{minor improvements} %
% \GetFileInfo{knowledge.sty} %
% \DoNotIndex{}
%
@@ -2474,6 +2528,7 @@ If other kind of problems occur, report them to \texttt{thomas.colcombet@irif.fr
\RequirePackage{l3keys2e}
\RequirePackage{etoolbox}
\RequirePackage{xparse}
+\RequirePackage{etoolbox}
\bool_if_exist:NTF\knowledge_package_loaded_bool
{\endinput}
{\bool_new:N\knowledge_package_loaded_bool
@@ -2624,7 +2679,7 @@ If other kind of problems occur, report them to \texttt{thomas.colcombet@irif.fr
% At the same time, it sets at package loading these options to be `posponed' (these will be executed)
% when the package loading is completed.
% \begin{macrocode}
-\NewDocumentCommand\knowledgeconfigure{m}{
+\newrobustcmd\knowledgeconfigure[1]{
\keys_set:nn{ knowledge~configuration~options }{#1}
}
% \end{macrocode}
@@ -2693,7 +2748,7 @@ If other kind of problems occur, report them to \texttt{thomas.colcombet@irif.fr
% \end{quote}
% is similar to \cs{\KnowledgeConfigureTrigger} but only valid at package loading and not in \cs{\knowledgeconfigure}.
% \begin{macrocode}
-\NewDocumentCommand\KnowledgePackageTrigger{mm}
+\newrobustcmd\KnowledgePackageTrigger[2]
{ \keys_define:nn{ knowledge~package~options }{ #1 .code:n = {#2} }
\keys_define:nn{ knowledge~configuration~options }{
#1 .code:n = {\knowledge_error:n
@@ -2849,11 +2904,14 @@ If other kind of problems occur, report them to \texttt{thomas.colcombet@irif.fr
% is called for each package after the options have been processed.
% It loads the package if required, possibly with options.
% \begin{macrocode}
-\cs_new:Nn\knowledge_option_aci_autoload:nn{
+\cs_new:Nn\knowledge_option_aci_autoload:nnn{
\bool_if:cTF{knowledge_#1_active_bool}
{\package_if_loaded:nTF{#1}{}
- {\RequirePackage[#2]{#1}}}{}
+ {\RequirePackage[#2]{#1}{#3}}}
+ {}
}
+\cs_new:Nn\knowledge_option_aci_autoload:nn
+ {\knowledge_option_aci_autoload:nnn{#1}{#2}{}}
% \end{macrocode}
%
% \paragraph{The real options}
@@ -2931,7 +2989,7 @@ If other kind of problems occur, report them to \texttt{thomas.colcombet@irif.fr
%
% \subsubsection{Options post-treatment for the other packages}
% \begin{macrocode}
-\knowledge_option_aci_autoload:nn{ hyperref }{}
+\knowledge_option_aci_autoload:nnn{ hyperref }{}{\hypersetup{hidelinks}}
\knowledge_option_aci_autoload:nn{ xcolor }{}
\knowledge_option_aci_autoload:nn{ makeidx }{}
% \end{macrocode}
@@ -3117,7 +3175,7 @@ If other kind of problems occur, report them to \texttt{thomas.colcombet@irif.fr
%
% \AP The base command for configuring a scope is \csintro{\ScopeConfigure}\{area~list\}\{directives\}.
% \begin{macrocode}
-\NewDocumentCommand\ScopeConfigure{mm}
+\newrobustcmd\ScopeConfigure[2]
{\scope_area_set:nn{#1}{#2}}
% \end{macrocode}
% \begin{macrocode}
@@ -3811,7 +3869,20 @@ If other kind of problems occur, report them to \texttt{thomas.colcombet@irif.fr
%
\msg_warning:nn{knowledge}{recap~autoref~not~introduced}
}
- %
+ \int_compare:nNnT\kl_digest_autorefunused_int>0{
+ \knowledge_diagnose:n{***********************************}
+ \knowledge_diagnose:n{*~Autoref~introduced~but~not~used~*}
+ \knowledge_diagnose:n{***********************************}
+ \knowledge_diagnose:n{}
+ %
+ \knowledge_diagnose_reset_line:
+ \KAuxProcess{autoref-introduced-not-used}
+ %
+ \knowledge_diagnose:n{}
+ \knowledge_diagnose:n{}
+ %
+ }
+ %
\iffalse
\knowledge_diagnose:n{***********************}
\knowledge_diagnose:n{*~Exported~knowledges~*}
@@ -4161,7 +4232,7 @@ If other kind of problems occur, report them to \texttt{thomas.colcombet@irif.fr
{\knowledge_set_now:nnnn{#1}{#2}{#3}{#4}}
% \end{macrocode}
% \begin{macrocode}
-\NewKAuxCommand\KAuxExport{mmmm}
+\newrobustcmd\KAuxExport[4]
{Package~knowledge:~undefined~so~far.}
% \end{macrocode}
%
@@ -4573,6 +4644,7 @@ If other kind of problems occur, report them to \texttt{thomas.colcombet@irif.fr
{{#1}{#2}{\exp_not:n{#3}}}
\exp_args:NNc\tl_set:Nn\knowledge_kl_resourcetoken_tl
{\knowledge_id:nnn{#1}{#2}{#3}}
+ \expandafter\ktuple_countuse_gincr:N\knowledge_kl_resourcetoken_tl
%
\tl_clear:N\knowledge_kl_link_tl
\tl_clear:N\knowledge_kl_linkscope_tl
@@ -5118,10 +5190,14 @@ If other kind of problems occur, report them to \texttt{thomas.colcombet@irif.fr
\knowledge_at:N\ktuple_countuse_get_int:NN\kl_countuse_int
\knowledge_at:N\ktuple_countintro_get_int:NN\kl_countintro_int
\int_compare:nNnT\kl_countintro_int=1
- {\int_gincr:N\kl_digest_autorefused_int}
- \int_compare:nNnT\kl_countintro_int=0
- {\int_compare:nNnTF\kl_countuse_int=0
+ {
+ \int_compare:nNnTF\kl_countuse_int=1
{\int_gincr:N\kl_digest_autorefunused_int}
+ {\int_gincr:N\kl_digest_autorefused_int}
+ }
+ \int_compare:nNnT\kl_countintro_int=0
+ {\int_compare:nNnF\kl_countuse_int=0
+ %{\int_gincr:N\kl_digest_autorefunused_int}
{\int_gincr:N\kl_digest_autorefnointro_int}}
\int_compare:nNnT\kl_countintro_int>1
{\int_gincr:N\kl_digest_autoreftwiceintro_int}
@@ -5137,6 +5213,17 @@ If other kind of problems occur, report them to \texttt{thomas.colcombet@irif.fr
{\knowledge_diagnose_line:
\knowledge_diagnose:n{\nointro{#1}{#2}{#3}}}}
\group_end:}
+\DeclareKAuxPhaseCommand\KAuxAutoref{autoref-introduced-not-used}
+ {\group_begin:
+ \knowledge_sets_to:nnn{#1}{#2}{#3}
+ \knowledge_at:N\ktuple_countuse_get_int:NN\kl_countuse_int
+ \knowledge_at:N\ktuple_countintro_get_int:NN\kl_countintro_int
+ \int_compare:nNnT\kl_countuse_int=1
+ {\int_compare:nNnT\kl_countintro_int=1
+ {\knowledge_diagnose_line:
+ \knowledge_diagnose:x{\kaux_current_location:\space
+ \exp_not:n{{#3}{#1}{#2}}}}}
+ \group_end:}
\DeclareKAuxPhaseCommand\KAuxAutorefTarget{autoref-introduced-twice}
{\group_begin:
\knowledge_sets_to:nnn{#1}{#2}{#3}
@@ -5144,7 +5231,8 @@ If other kind of problems occur, report them to \texttt{thomas.colcombet@irif.fr
\knowledge_at:N\ktuple_countintro_get_int:NN\kl_countintro_int
\int_compare:nNnT\kl_countintro_int>1
{\knowledge_diagnose_line:
- \knowledge_diagnose:x{\kaux_current_location:\space\exp_not:n{knowledge={#3},namespace=#1,scope=#2}}}
+ \knowledge_diagnose:x{\kaux_current_location:\space
+ \exp_not:n{{#3}{#1}{#2}}}}
\group_end:}
% \end{macrocode}
% \begin{macrocode}
@@ -5598,7 +5686,6 @@ If other kind of problems occur, report them to \texttt{thomas.colcombet@irif.fr
% creating the pdf names of sections (for avoiding warnings of the "hyperref@@package").
% \begin{macrocode}
\bool_if:NT\knowledge_hyperref_active_bool{
- \hypersetup{hidelinks}
\DeclareExpandableDocumentCommand\knowledge_fake_klTKS{mmm}{#1}
\pdfstringdefDisableCommands{%
\let\klTKS\knowledge_fake_klTKS
diff --git a/Master/texmf-dist/tex/latex/knowledge/knowledge.sty b/Master/texmf-dist/tex/latex/knowledge/knowledge.sty
index b4990b54358..5bdb9ba13bc 100644
--- a/Master/texmf-dist/tex/latex/knowledge/knowledge.sty
+++ b/Master/texmf-dist/tex/latex/knowledge/knowledge.sty
@@ -23,11 +23,12 @@
%% LaTeX version 1999/12/01 or later.
%%
\usepackage{expl3}
-\ProvidesExplPackage{knowledge}{2017/10/10}{v1.06}{}
+\ProvidesExplPackage{knowledge}{2017/10/10}{v1.07}{}
%%%%%%%%%%
\RequirePackage{l3keys2e}
\RequirePackage{etoolbox}
\RequirePackage{xparse}
+\RequirePackage{etoolbox}
\bool_if_exist:NTF\knowledge_package_loaded_bool
{\endinput}
{\bool_new:N\knowledge_package_loaded_bool
@@ -192,7 +193,10 @@
\tl_gput_right:Nn\kaux_command_list_tl{#1}
}
\NewDocumentCommand\KAuxCommand{mmm}
- {\ProvideDocumentCommand#1{#2}{}}
+ { \cs_if_exist:NTF #1
+ {}
+ {\ProvideDocumentCommand#1{#2}}
+ }
\NewDocumentCommand\ActivateKAuxPhase{m}{
\tl_map_inline:Nn\kaux_command_list_tl
{\kaux_activate_command_phase:Nn##1{#1}}
@@ -818,7 +822,7 @@
\msg_new:nnn{knowledge}{recap~autoref~not~introduced}
{Some~knowledge~is~used~but~not~introduced.~See~the~'.diagnose'~file~for~more~information.}
\tl_clear_new:N\knowledge_configuration_pending_tl
-\NewDocumentCommand\knowledgeconfigure{m}{
+\newrobustcmd\knowledgeconfigure[1]{
\keys_set:nn{ knowledge~configuration~options }{#1}
}
\NewDocumentCommand\KnowledgeConfigureBooleanOption{om}
@@ -857,7 +861,7 @@
{ #1 .code:n = {\tl_put_right:Nn\knowledge_configuration_pending_tl{,#2={##1}} }}
}
}
-\NewDocumentCommand\KnowledgePackageTrigger{mm}
+\newrobustcmd\KnowledgePackageTrigger[2]
{ \keys_define:nn{ knowledge~package~options }{ #1 .code:n = {#2} }
\keys_define:nn{ knowledge~configuration~options }{
#1 .code:n = {\knowledge_error:n
@@ -945,11 +949,14 @@
\bool_set_false:c{knowledge_#1_syntax_bool}},
#1 .default:n = {active}
}}
-\cs_new:Nn\knowledge_option_aci_autoload:nn{
+\cs_new:Nn\knowledge_option_aci_autoload:nnn{
\bool_if:cTF{knowledge_#1_active_bool}
{\package_if_loaded:nTF{#1}{}
- {\RequirePackage[#2]{#1}}}{}
+ {\RequirePackage[#2]{#1}{#3}}}
+ {}
}
+\cs_new:Nn\knowledge_option_aci_autoload:nn
+ {\knowledge_option_aci_autoload:nnn{#1}{#2}{}}
\knowledge_option_bool_new:n{scope}
\knowledge_option_aci_define:n{hyperref}
\knowledge_option_aci_define:n{xcolor}
@@ -998,7 +1005,7 @@
\keys_set:nV{ knowledge~package~modes }{ composition }}
}
\keys_set:nV{ knowledge~package~modes }\knowledge_option_mode_tl
-\knowledge_option_aci_autoload:nn{ hyperref }{}
+\knowledge_option_aci_autoload:nnn{ hyperref }{}{\hypersetup{hidelinks}}
\knowledge_option_aci_autoload:nn{ xcolor }{}
\knowledge_option_aci_autoload:nn{ makeidx }{}
\tl_const:Nn\scope_tl{SC@PE}
@@ -1079,7 +1086,7 @@
\cs_new:Npn\scope_area_if_in_scope:nTF#1
{\int_compare:nNnTF
{\use:c{\scope_tl.area[#1].nesting_int}}>0}
-\NewDocumentCommand\ScopeConfigure{mm}
+\newrobustcmd\ScopeConfigure[2]
{\scope_area_set:nn{#1}{#2}}
\cs_new:Nn\scope_area_set:nn
{\clist_map_inline:nn{#1}
@@ -1591,7 +1598,20 @@
%
\msg_warning:nn{knowledge}{recap~autoref~not~introduced}
}
- %
+ \int_compare:nNnT\kl_digest_autorefunused_int>0{
+ \knowledge_diagnose:n{***********************************}
+ \knowledge_diagnose:n{*~Autoref~introduced~but~not~used~*}
+ \knowledge_diagnose:n{***********************************}
+ \knowledge_diagnose:n{}
+ %
+ \knowledge_diagnose_reset_line:
+ \KAuxProcess{autoref-introduced-not-used}
+ %
+ \knowledge_diagnose:n{}
+ \knowledge_diagnose:n{}
+ %
+ }
+ %
\iffalse
\knowledge_diagnose:n{***********************}
\knowledge_diagnose:n{*~Exported~knowledges~*}
@@ -1757,7 +1777,7 @@
Takes~the~{namespace}{instance}{knowledge}{directives}.}
\DeclareKAuxPhaseCommand\KAuxKnowledge{init}
{\knowledge_set_now:nnnn{#1}{#2}{#3}{#4}}
-\NewKAuxCommand\KAuxExport{mmmm}
+\newrobustcmd\KAuxExport[4]
{Package~knowledge:~undefined~so~far.}
\cs_new:Nn\knowledge_new_now:nnnn
{\knowledge_sets_to:nnn{#1}{#2}{#3}
@@ -2045,6 +2065,7 @@
{{#1}{#2}{\exp_not:n{#3}}}
\exp_args:NNc\tl_set:Nn\knowledge_kl_resourcetoken_tl
{\knowledge_id:nnn{#1}{#2}{#3}}
+ \expandafter\ktuple_countuse_gincr:N\knowledge_kl_resourcetoken_tl
%
\tl_clear:N\knowledge_kl_link_tl
\tl_clear:N\knowledge_kl_linkscope_tl
@@ -2439,10 +2460,14 @@
\knowledge_at:N\ktuple_countuse_get_int:NN\kl_countuse_int
\knowledge_at:N\ktuple_countintro_get_int:NN\kl_countintro_int
\int_compare:nNnT\kl_countintro_int=1
- {\int_gincr:N\kl_digest_autorefused_int}
- \int_compare:nNnT\kl_countintro_int=0
- {\int_compare:nNnTF\kl_countuse_int=0
+ {
+ \int_compare:nNnTF\kl_countuse_int=1
{\int_gincr:N\kl_digest_autorefunused_int}
+ {\int_gincr:N\kl_digest_autorefused_int}
+ }
+ \int_compare:nNnT\kl_countintro_int=0
+ {\int_compare:nNnF\kl_countuse_int=0
+ %{\int_gincr:N\kl_digest_autorefunused_int}
{\int_gincr:N\kl_digest_autorefnointro_int}}
\int_compare:nNnT\kl_countintro_int>1
{\int_gincr:N\kl_digest_autoreftwiceintro_int}
@@ -2458,6 +2483,17 @@
{\knowledge_diagnose_line:
\knowledge_diagnose:n{\nointro{#1}{#2}{#3}}}}
\group_end:}
+\DeclareKAuxPhaseCommand\KAuxAutoref{autoref-introduced-not-used}
+ {\group_begin:
+ \knowledge_sets_to:nnn{#1}{#2}{#3}
+ \knowledge_at:N\ktuple_countuse_get_int:NN\kl_countuse_int
+ \knowledge_at:N\ktuple_countintro_get_int:NN\kl_countintro_int
+ \int_compare:nNnT\kl_countuse_int=1
+ {\int_compare:nNnT\kl_countintro_int=1
+ {\knowledge_diagnose_line:
+ \knowledge_diagnose:x{\kaux_current_location:\space
+ \exp_not:n{{#3}{#1}{#2}}}}}
+ \group_end:}
\DeclareKAuxPhaseCommand\KAuxAutorefTarget{autoref-introduced-twice}
{\group_begin:
\knowledge_sets_to:nnn{#1}{#2}{#3}
@@ -2465,7 +2501,8 @@
\knowledge_at:N\ktuple_countintro_get_int:NN\kl_countintro_int
\int_compare:nNnT\kl_countintro_int>1
{\knowledge_diagnose_line:
- \knowledge_diagnose:x{\kaux_current_location:\space\exp_not:n{knowledge={#3},namespace=#1,scope=#2}}}
+ \knowledge_diagnose:x{\kaux_current_location:\space
+ \exp_not:n{{#3}{#1}{#2}}}}
\group_end:}
\NewKAuxCommand\KAuxUseKnowledge{mmm}
{Package~knowledge:~Identifies~the~use~of~some~knowledge.~
@@ -2797,7 +2834,6 @@
\knowledge_directives_require_aci_package:nn
{url,ref,autoref}{hyperref}
\bool_if:NT\knowledge_hyperref_active_bool{
- \hypersetup{hidelinks}
\DeclareExpandableDocumentCommand\knowledge_fake_klTKS{mmm}{#1}
\pdfstringdefDisableCommands{%
\let\klTKS\knowledge_fake_klTKS
diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds
index 524f09a9950..e5667e8518b 100755
--- a/Master/tlpkg/libexec/ctan2tds
+++ b/Master/tlpkg/libexec/ctan2tds
@@ -3025,7 +3025,6 @@ $standardclean = '\.head|\.tmp|\.dvi|\.log|\.out|\.aux|\.toc|\.lof|\.lot'
'gfsdidot' => '.pdf', # no source
'gfsneohellenic'=> '.pdf', # no source
'jknapltx' => 'ubbold.fd', # clash bbold's Ubbold.fd; sauter bbold fails
- 'knowledge' => 'knowledge.pdf', # no source
'latexmk' => '(sweave_|tex4ht-)latexmkrc', # case-folding clash
'maker' => 'maker_manual.pdf', # no source
'math-into-latex-4' => 'video.*zip|S.*\.pdf', # nonfree