diff options
author | Karl Berry <karl@freefriends.org> | 2018-11-22 21:48:45 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-11-22 21:48:45 +0000 |
commit | 84523e2a95dcff4d2436390317f77ff477824569 (patch) | |
tree | 3d5529610271163321b636b2fff4369deb5d7292 | |
parent | 390dbd0215f42f93d33b64df4798cef76f1ca336 (diff) |
knowledge (22nov18)
git-svn-id: svn://tug.org/texlive/trunk@49224 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/texmf-dist/doc/latex/knowledge/README.md | 4 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/knowledge/knowledge.pdf | bin | 677730 -> 679361 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/knowledge/knowledge.tex | 14 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/knowledge/knowledge-code.dtx | 67 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/knowledge/knowledge.sty | 41 |
5 files changed, 64 insertions, 62 deletions
diff --git a/Master/texmf-dist/doc/latex/knowledge/README.md b/Master/texmf-dist/doc/latex/knowledge/README.md index e8cf3eed37a..9b8c2c2c5ec 100644 --- a/Master/texmf-dist/doc/latex/knowledge/README.md +++ b/Master/texmf-dist/doc/latex/knowledge/README.md @@ -3,8 +3,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 diff --git a/Master/texmf-dist/doc/latex/knowledge/knowledge.pdf b/Master/texmf-dist/doc/latex/knowledge/knowledge.pdf Binary files differindex 39c2942e1df..416378b1df5 100644 --- a/Master/texmf-dist/doc/latex/knowledge/knowledge.pdf +++ b/Master/texmf-dist/doc/latex/knowledge/knowledge.pdf diff --git a/Master/texmf-dist/doc/latex/knowledge/knowledge.tex b/Master/texmf-dist/doc/latex/knowledge/knowledge.tex index 9739fd57bc4..256c97f0b11 100644 --- a/Master/texmf-dist/doc/latex/knowledge/knowledge.tex +++ b/Master/texmf-dist/doc/latex/knowledge/knowledge.tex @@ -688,8 +688,9 @@ This is essentially a list for personal referencing of what has to be done. \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 @@ or by loading the \kl(package){makeidx} before the "knowledge@@package" package. 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} 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} } diff --git a/Master/texmf-dist/tex/latex/knowledge/knowledge.sty b/Master/texmf-dist/tex/latex/knowledge/knowledge.sty index 991e6a7dc6e..ea34f9f19a2 100644 --- a/Master/texmf-dist/tex/latex/knowledge/knowledge.sty +++ b/Master/texmf-dist/tex/latex/knowledge/knowledge.sty @@ -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,14 +3044,14 @@ \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} } @@ -3073,14 +3062,14 @@ \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} } |