summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/knowledge/knowledge-code.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/knowledge/knowledge-code.dtx')
-rw-r--r--Master/texmf-dist/source/latex/knowledge/knowledge-code.dtx67
1 files changed, 38 insertions, 29 deletions
diff --git a/Master/texmf-dist/source/latex/knowledge/knowledge-code.dtx b/Master/texmf-dist/source/latex/knowledge/knowledge-code.dtx
index 44378e07573..a14711ff84f 100644
--- a/Master/texmf-dist/source/latex/knowledge/knowledge-code.dtx
+++ b/Master/texmf-dist/source/latex/knowledge/knowledge-code.dtx
@@ -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 @@ This directory contains the package
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@irif.fr
web: https://www.irif.fr/~colcombe/knowledge_en.html
@@ -2986,6 +2988,8 @@ Content of the file knowledge-sources.zip:
\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 @@ Content of the file knowledge-sources.zip:
% \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 @@ Content of the file knowledge-sources.zip:
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 @@ Content of the file knowledge-sources.zip:
\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 @@ Content of the file knowledge-sources.zip:
\knowledgestyle{autoref target}{autoref target}
\knowledgestyle{invisible}{invisible}
-
\knowledgenewvariant\kl{
namespace= default,
default style= {kl,autoref link},
@@ -3535,7 +3544,7 @@ Content of the file knowledge-sources.zip:
\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,14 +3554,14 @@ Content of the file knowledge-sources.zip:
\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}
}{
\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,14 +3572,14 @@ Content of the file knowledge-sources.zip:
\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}
}{
\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}
}