texlive[49224] Master/texmf-dist: knowledge (22nov18)
commits+karl at tug.org
commits+karl at tug.org
Thu Nov 22 22:48:45 CET 2018
Revision: 49224
http://tug.org/svn/texlive?view=revision&revision=49224
Author: karl
Date: 2018-11-22 22:48:45 +0100 (Thu, 22 Nov 2018)
Log Message:
-----------
knowledge (22nov18)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/knowledge/README.md
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 2018-11-22 21:48:30 UTC (rev 49223)
+++ trunk/Master/texmf-dist/doc/latex/knowledge/README.md 2018-11-22 21:48:45 UTC (rev 49224)
@@ -3,8 +3,8 @@
name: knowledge
license: LaTeX Project Public License version 1.2 or above
- version: v1.12
- date: 2018/07/26
+ version: v1.14
+ date: 2018/11/21
author: Thomas Colcombet
mail: thomas.colcombet at irif.fr
web: https://www.irif.fr/~colcombe/knowledge_en.html
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 2018-11-22 21:48:30 UTC (rev 49223)
+++ trunk/Master/texmf-dist/doc/latex/knowledge/knowledge.tex 2018-11-22 21:48:45 UTC (rev 49224)
@@ -688,8 +688,9 @@
\item[2018-02-21] Bug correction concerning the activation of scopes.
\item[2018-02-21] Documentation improvement for "Emacs" (thanks to Michaël Cadilhac).
\item[2018-02-24] Documentation improvement for the environment "thebibliography@@env".
-\item[2018-05-17] Correction to be compatible with the lastest version of "expl3@@package" (thanks to Leo Stefanesco).
+\item[2018-05-17] Correction to be compatible with the latest version of "expl3@@package" (thanks to Leo Stefanesco).
\item[2018-07-26] Compatibility with utf8 symbols in labels (thanks to Yves Guiraud).
+\item[2018-11-21] Corrected the behavior of "makeidx@@package" (thanks to Sylvain Schmitz).
\end{compactdesc}
\normalsize
%\restoregeometry
@@ -2086,10 +2087,13 @@
When activated, it becomes possible to trigger the \cs{\index} command when a \cs{\kl} command is used.
The following \kl[\knowledge directives]{directives} are to be used:
\begin{description}
-\itemAP[\intro{index=}] is the version that uses the standard syntax of the \cs{\index} parameter.
-\itemAP[\intro{index key=}] takes as argument the \kl{index key}: a text that is used for identifying the \kl{index entry} (usually an accent free version of it).
-\itemAP[\intro{index parent key=}] makes the \kl{index entry} be a subentry of the given \kl{main index entry}.
-\itemAP[\intro{index style=}] makes the \kl{index entry} be a subentry of the given \kl{main index entry}.
+\itemAP[\intro{index=}] is the text typeset in the index. It uses the standard syntax of the \cs{\index} command. By default, it is the knowledge name itself. You can use the full syntax of \cs{\index} in it, i.e. using `!' and `@'.
+\itemAP[\intro{index key=}] takes as argument the \kl{index key}: a text that is used for identifying the \kl{index entry} (usually an accent free version of it). You can use `!' in it, as long as it does not clash with "index=" in order to avoid clashes.
+\itemAP[\intro{index parent key=}] makes the \kl{index entry} be a subentry of the given \kl{main index entry} (a replacement of `!'). Once more, it should not clash with "index=" and "index key=".
+\itemAP[\intro{index style=}] is followed by a token (without the scape character) that will be used for displaying the number (e.g. "index style="\texttt{textbf}). Usually, this is to be used in order to typeset in a particular manner the knowledges in the index when introduced. Thus, by default, the \cs{\intro}, \cs{\reintro} and \cs{\phantomintro} command use the command \csintro{\knowledgeIntroIndexStyle}. Hence, you can use for instance:
+\begin{code}[8cm]
+\cs\def\cs\knowledgeIntroIndexStyle\#1\{\cs\fbox\{\#1\}\}
+\end{code}
\end{description}
Modified: trunk/Master/texmf-dist/source/latex/knowledge/knowledge-code.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/knowledge/knowledge-code.dtx 2018-11-22 21:48:30 UTC (rev 49223)
+++ trunk/Master/texmf-dist/source/latex/knowledge/knowledge-code.dtx 2018-11-22 21:48:45 UTC (rev 49224)
@@ -23,7 +23,7 @@
%
% \iffalse
%<head>\usepackage{expl3}
-%<head>\ProvidesExplPackage{knowledge}{2018/07/26}{1.12}{}
+%<head>\ProvidesExplPackage{knowledge}{2018/11/22}{1.14}{}
%<*driver>
\def\knowledgecode{active}
\input{knowledge.tex}
@@ -45,6 +45,8 @@
% \changes{1.10}{2018/02/17}{bug fixes} %
% \changes{1.11}{2018/05/17}{bug fixes} %
% \changes{1.12}{2018/07/26}{bug fixes} %
+% \changes{1.13}{2018/11/21}{bug fixes} %
+% \changes{1.14}{2018/11/22}{bug fix} %
% \GetFileInfo{knowledge.sty} %
% \DoNotIndex{}
%
@@ -64,8 +66,8 @@
name: knowledge
license: LaTeX Project Public License version 1.2 or above
- version: v1.12
- date: 2018/07/26
+ version: v1.14
+ date: 2018/11/21
author: Thomas Colcombet
mail: thomas.colcombet at irif.fr
web: https://www.irif.fr/~colcombe/knowledge_en.html
@@ -2986,6 +2988,8 @@
\tl_if_exist_ne:NTF\knowledge_kl_index_key_tl
{\exp_not:V\knowledge_kl_index_key_tl@}{}
\expandafter\tl_to_str:n\expandafter{\knowledge_kl_index_tl}
+ \tl_if_exist_ne:NTF\knowledge_kl_index_number_style_tl
+ {|\exp_not:V\knowledge_kl_index_number_style_tl}{}
}}{}
}
@@ -3349,23 +3353,23 @@
% \subsubsection{The \kl{makeidx option}}
%
% \begin{macrocode}
-\bool_if:NT\knowledge_makeidx_active_bool{
- \makeindex
-
- \cs_gset:Npn\knowledge_kl_display_code_index:n
- {\knowledge_kl_default_display_code_index:n}
-
- \cs_new:Npn\knowledge_kl_default_display_code_index:n
- {\tl_if_exist_ne:NT\knowledge_kl_index_tl
- {\exp_not:N\index
- {{\tl_if_exist_ne:NTF\kl_index_parent_key_tl
- {\exp_not:V\kl_index_parent_key_tl!}{}
- \tl_if_exist_ne:NTF\knowledge_kl_indexkey_tl
- {\exp_not:V\knowledge_kl_indexkey_tl@}{}
- \expandafter\tl_to_str:n\expandafter{\knowledge_kl_index_tl}
- }}}}
-}
-
+%\bool_if:NT\knowledge_makeidx_active_bool{
+% \makeindex
+%
+% \cs_gset:Npn\knowledge_kl_display_code_index:n
+% {\knowledge_kl_default_display_code_index:n}
+%
+% \cs_new:Npn\knowledge_kl_default_display_code_index:n
+% {\useless\tl_if_exist_ne:NT\knowledge_kl_index_tl
+% {\exp_not:N\index
+% {{\tl_if_exist_ne:NTF\knowledge_kl_index_parent_key_tl
+% {\exp_not:V\knowledge_kl_index_parent_key_tl!}{}
+% \tl_if_exist_ne:NTF\knowledge_kl_index_key_tl
+% {\exp_not:V\knowledge_kl_index_key_tl@}{}
+% \expandafter\tl_to_str:n\expandafter{\knowledge_kl_index_tl}
+% }}}}
+%}
+\def\knowledgeIntroIndexStyle#1{\textbf{#1}}
\NewKnowledgeParamTl{index}
\keys_define:nn { knowledge~directives }
{ index .code:n = {
@@ -3375,9 +3379,9 @@
index .default:n = {}
}
-\NewKnowledgeParamTl*{index~style}
-\NewKnowledgeParamTl*{index~parent~key}
-\NewKnowledgeParamTl*{index~key}
+\NewKnowledgeParamTl*[\knowledge_kl_index_number_style_tl]{index~style}
+\NewKnowledgeParamTl*[\knowledge_kl_index_parent_key_tl]{index~parent~key}
+\NewKnowledgeParamTl*[\knowledge_kl_index_key_tl]{index~key}
% \end{macrocode}
%
% \subsection{Fixes}
@@ -3467,6 +3471,12 @@
\Xcolortrue
\Xcolorfalse
% \end{macrocode}
+% When "xcolor@@package" is loaded, introduced indices are in red.
+% \begin{macrocode}
+\IfXcolorTF
+ {\def\knowledgeIntroIndexStyle#1{\textcolor{red}{#1}}}
+ {}
+% \end{macrocode}
%
%
% \subsubsection{Variants of the \cs{\kl} macro}
@@ -3482,7 +3492,6 @@
\knowledgestyle{autoref target}{autoref target}
\knowledgestyle{invisible}{invisible}
-
\knowledgenewvariant\kl{
namespace= default,
default style= {kl,autoref link},
@@ -3535,7 +3544,7 @@
\knowledgestyle{kl}{}
\knowledgestyle{kl unknown}{}
\knowledgestyle{kl unknown cont}{}
- \knowledgestyle{intro}{emphasize}
+ \knowledgestyle{intro}{emphasize,index style=knowledgeIntroIndexStyle}
\knowledgestyle{intro unknown}{emphasize}
\knowledgestyle{intro unknown cont}{emphasize}
}{}
@@ -3545,7 +3554,7 @@
\knowledgestyle{kl}{color={blue!70!black}}
\knowledgestyle{kl unknown}{color=orange}
\knowledgestyle{kl unknown cont}{color=brown}
- \knowledgestyle{intro}{emphasize,color=blue}
+ \knowledgestyle{intro}{emphasize,color=blue,index style=knowledgeIntroIndexStyle}
\knowledgestyle{intro unknown}{emphasize,color=orange}
\knowledgestyle{intro unknown cont}{emphasize,color=brown}
}{
@@ -3552,7 +3561,7 @@
\knowledgestyle{kl}{}
\knowledgestyle{kl unknown}{underline}
\knowledgestyle{kl unknown cont}{underline}
- \knowledgestyle{intro}{emphasize}
+ \knowledgestyle{intro}{emphasize,index style=introindexstyle}
\knowledgestyle{intro unknown}{emphasize,underline}
\knowledgestyle{intro unknown cont}{emphasize,underline}
}
@@ -3563,7 +3572,7 @@
\knowledgestyle{kl}{color={blue!70!black}}
\knowledgestyle{kl unknown}{}
\knowledgestyle{kl unknown cont}{}
- \knowledgestyle{intro}{emphasize,color=blue}
+ \knowledgestyle{intro}{emphasize,color=blue,index style=introindexstyle}
\knowledgestyle{intro unknown}{emphasize}
\knowledgestyle{intro unknown cont}{emphasize}
}{
@@ -3570,7 +3579,7 @@
\knowledgestyle{kl}{}
\knowledgestyle{kl unknown}{}
\knowledgestyle{kl unknown cont}{}
- \knowledgestyle{intro}{emphasize}
+ \knowledgestyle{intro}{emphasize,index style=introindexstyle}
\knowledgestyle{intro unknown}{emphasize}
\knowledgestyle{intro unknown cont}{emphasize}
}
Modified: trunk/Master/texmf-dist/tex/latex/knowledge/knowledge.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/knowledge/knowledge.sty 2018-11-22 21:48:30 UTC (rev 49223)
+++ trunk/Master/texmf-dist/tex/latex/knowledge/knowledge.sty 2018-11-22 21:48:45 UTC (rev 49224)
@@ -23,7 +23,7 @@
%% LaTeX version 1999/12/01 or later.
%%
\usepackage{expl3}
-\ProvidesExplPackage{knowledge}{2018/07/26}{1.12}{}
+\ProvidesExplPackage{knowledge}{2018/11/22}{1.14}{}
%%%%%%%%%%
\RequirePackage{l3keys2e}
\RequirePackage{etoolbox}
@@ -2659,6 +2659,8 @@
\tl_if_exist_ne:NTF\knowledge_kl_index_key_tl
{\exp_not:V\knowledge_kl_index_key_tl@}{}
\expandafter\tl_to_str:n\expandafter{\knowledge_kl_index_tl}
+ \tl_if_exist_ne:NTF\knowledge_kl_index_number_style_tl
+ {|\exp_not:V\knowledge_kl_index_number_style_tl}{}
}}{}
}
@@ -2899,23 +2901,7 @@
\let\klTKS\knowledge_fake_klTKS
}
}
-\bool_if:NT\knowledge_makeidx_active_bool{
- \makeindex
-
- \cs_gset:Npn\knowledge_kl_display_code_index:n
- {\knowledge_kl_default_display_code_index:n}
-
- \cs_new:Npn\knowledge_kl_default_display_code_index:n
- {\tl_if_exist_ne:NT\knowledge_kl_index_tl
- {\exp_not:N\index
- {{\tl_if_exist_ne:NTF\kl_index_parent_key_tl
- {\exp_not:V\kl_index_parent_key_tl!}{}
- \tl_if_exist_ne:NTF\knowledge_kl_indexkey_tl
- {\exp_not:V\knowledge_kl_indexkey_tl@}{}
- \expandafter\tl_to_str:n\expandafter{\knowledge_kl_index_tl}
- }}}}
-}
-
+\def\knowledgeIntroIndexStyle#1{\textbf{#1}}
\NewKnowledgeParamTl{index}
\keys_define:nn { knowledge~directives }
{ index .code:n = {
@@ -2925,9 +2911,9 @@
index .default:n = {}
}
-\NewKnowledgeParamTl*{index~style}
-\NewKnowledgeParamTl*{index~parent~key}
-\NewKnowledgeParamTl*{index~key}
+\NewKnowledgeParamTl*[\knowledge_kl_index_number_style_tl]{index~style}
+\NewKnowledgeParamTl*[\knowledge_kl_index_parent_key_tl]{index~parent~key}
+\NewKnowledgeParamTl*[\knowledge_kl_index_key_tl]{index~key}
\ExplSyntaxOff\makeatletter
\newcommand\knowledgeFixHyperrefTwocolumn{
\RequirePackage{etoolbox}
@@ -2992,6 +2978,9 @@
\IfXcolorTF
\Xcolortrue
\Xcolorfalse
+\IfXcolorTF
+ {\def\knowledgeIntroIndexStyle#1{\textcolor{red}{#1}}}
+ {}
\tl_new:Nn\knowledge_kl_default_style_tl{kl}
\tl_new:Nn\knowledge_kl_unknown_style_tl{kl~unknown}
\tl_new:Nn\knowledge_kl_unknown_style_cont_tl{kl~unknown~cont}
@@ -3045,7 +3034,7 @@
\knowledgestyle{kl}{}
\knowledgestyle{kl unknown}{}
\knowledgestyle{kl unknown cont}{}
- \knowledgestyle{intro}{emphasize}
+ \knowledgestyle{intro}{emphasize,index style=knowledgeIntroIndexStyle}
\knowledgestyle{intro unknown}{emphasize}
\knowledgestyle{intro unknown cont}{emphasize}
}{}
@@ -3055,7 +3044,7 @@
\knowledgestyle{kl}{color={blue!70!black}}
\knowledgestyle{kl unknown}{color=orange}
\knowledgestyle{kl unknown cont}{color=brown}
- \knowledgestyle{intro}{emphasize,color=blue}
+ \knowledgestyle{intro}{emphasize,color=blue,index style=knowledgeIntroIndexStyle}
\knowledgestyle{intro unknown}{emphasize,color=orange}
\knowledgestyle{intro unknown cont}{emphasize,color=brown}
}{
@@ -3062,7 +3051,7 @@
\knowledgestyle{kl}{}
\knowledgestyle{kl unknown}{underline}
\knowledgestyle{kl unknown cont}{underline}
- \knowledgestyle{intro}{emphasize}
+ \knowledgestyle{intro}{emphasize,index style=introindexstyle}
\knowledgestyle{intro unknown}{emphasize,underline}
\knowledgestyle{intro unknown cont}{emphasize,underline}
}
@@ -3073,7 +3062,7 @@
\knowledgestyle{kl}{color={blue!70!black}}
\knowledgestyle{kl unknown}{}
\knowledgestyle{kl unknown cont}{}
- \knowledgestyle{intro}{emphasize,color=blue}
+ \knowledgestyle{intro}{emphasize,color=blue,index style=introindexstyle}
\knowledgestyle{intro unknown}{emphasize}
\knowledgestyle{intro unknown cont}{emphasize}
}{
@@ -3080,7 +3069,7 @@
\knowledgestyle{kl}{}
\knowledgestyle{kl unknown}{}
\knowledgestyle{kl unknown cont}{}
- \knowledgestyle{intro}{emphasize}
+ \knowledgestyle{intro}{emphasize,index style=introindexstyle}
\knowledgestyle{intro unknown}{emphasize}
\knowledgestyle{intro unknown cont}{emphasize}
}
More information about the tex-live-commits
mailing list