texlive[45548] Master: knowledge (16oct17)

commits+karl at tug.org commits+karl at tug.org
Mon Oct 16 22:17:19 CEST 2017


Revision: 45548
          http://tug.org/svn/texlive?view=revision&revision=45548
Author:   karl
Date:     2017-10-16 22:17:19 +0200 (Mon, 16 Oct 2017)
Log Message:
-----------
knowledge (16oct17)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/knowledge/README.txt
    trunk/Master/texmf-dist/doc/latex/knowledge/knowledge-example.tex
    trunk/Master/texmf-dist/source/latex/knowledge/knowledge-utils.dtx
    trunk/Master/texmf-dist/source/latex/knowledge/knowledge.dtx
    trunk/Master/texmf-dist/tex/latex/knowledge/knowledge.sty
    trunk/Master/tlpkg/libexec/ctan2tds

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/knowledge/knowledge.pdf

Removed Paths:
-------------
    trunk/Master/texmf-dist/doc/latex/knowledge/README.TEXLIVE

Deleted: trunk/Master/texmf-dist/doc/latex/knowledge/README.TEXLIVE
===================================================================
--- trunk/Master/texmf-dist/doc/latex/knowledge/README.TEXLIVE	2017-10-16 16:40:54 UTC (rev 45547)
+++ trunk/Master/texmf-dist/doc/latex/knowledge/README.TEXLIVE	2017-10-16 20:17:19 UTC (rev 45548)
@@ -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 at tug.org.
-
-	knowledge.pdf

Modified: trunk/Master/texmf-dist/doc/latex/knowledge/README.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/knowledge/README.txt	2017-10-16 16:40:54 UTC (rev 45547)
+++ trunk/Master/texmf-dist/doc/latex/knowledge/README.txt	2017-10-16 20:17:19 UTC (rev 45548)
@@ -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
+ 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 at 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 
 
-  author: Thomas Colcombet
-  mail: thomas.colcombet at irif.fr
-  web: https://www.irif.fr/~colcombe/knowledge_en.html
+ Note: this file is created when compiling knowledge.dtx 
 
-
-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
-
-

Modified: trunk/Master/texmf-dist/doc/latex/knowledge/knowledge-example.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/knowledge/knowledge-example.tex	2017-10-16 16:40:54 UTC (rev 45547)
+++ trunk/Master/texmf-dist/doc/latex/knowledge/knowledge-example.tex	2017-10-16 20:17:19 UTC (rev 45548)
@@ -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 @@
 \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 at paper mode" or "electronic mode".
 \end{document}
\ No newline at end of file

Added: trunk/Master/texmf-dist/doc/latex/knowledge/knowledge.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/knowledge/knowledge.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/knowledge/knowledge.pdf	2017-10-16 16:40:54 UTC (rev 45547)
+++ trunk/Master/texmf-dist/doc/latex/knowledge/knowledge.pdf	2017-10-16 20:17:19 UTC (rev 45548)

Property changes on: trunk/Master/texmf-dist/doc/latex/knowledge/knowledge.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Modified: trunk/Master/texmf-dist/source/latex/knowledge/knowledge-utils.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/knowledge/knowledge-utils.dtx	2017-10-16 16:40:54 UTC (rev 45547)
+++ trunk/Master/texmf-dist/source/latex/knowledge/knowledge-utils.dtx	2017-10-16 20:17:19 UTC (rev 45548)
@@ -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 

Modified: trunk/Master/texmf-dist/source/latex/knowledge/knowledge.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/knowledge/knowledge.dtx	2017-10-16 16:40:54 UTC (rev 45547)
+++ trunk/Master/texmf-dist/source/latex/knowledge/knowledge.dtx	2017-10-16 20:17:19 UTC (rev 45548)
@@ -23,11 +23,61 @@
 %
 % \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 at 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}
 \usepackage[utf8]{inputenc}
 \usepackage[T1]{fontenc}
@@ -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 at irif.fr}}
 \maketitle
 
@@ -592,7 +642,9 @@
 \begin{quote}
 \begin{tabular}{ll}
 \texttt{contact:}&\texttt{thomas.colcombet at 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 @@
 \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 @@
 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 @@
 % \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 @@
 \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 @@
 % 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 @@
 % \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 @@
 % 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 @@
 %
 % \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 @@
 %
 % \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 @@
      %
      \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 @@
   {\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 @@
     {{#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 @@
    \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: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:nNnTF\kl_countuse_int=0
-        {\int_gincr:N\kl_digest_autorefunused_int}
+     {\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 @@
         {\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 @@
    \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 @@
 % 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

Modified: trunk/Master/texmf-dist/tex/latex/knowledge/knowledge.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/knowledge/knowledge.sty	2017-10-16 16:40:54 UTC (rev 45547)
+++ trunk/Master/texmf-dist/tex/latex/knowledge/knowledge.sty	2017-10-16 20:17:19 UTC (rev 45548)
@@ -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 at 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: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:nNnTF\kl_countuse_int=0
-        {\int_gincr:N\kl_digest_autorefunused_int}
+     {\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

Modified: trunk/Master/tlpkg/libexec/ctan2tds
===================================================================
--- trunk/Master/tlpkg/libexec/ctan2tds	2017-10-16 16:40:54 UTC (rev 45547)
+++ trunk/Master/tlpkg/libexec/ctan2tds	2017-10-16 20:17:19 UTC (rev 45548)
@@ -3025,7 +3025,6 @@
  '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



More information about the tex-live-commits mailing list