summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-03-05 22:08:31 +0000
committerKarl Berry <karl@freefriends.org>2020-03-05 22:08:31 +0000
commit7fc1a8940175a7c09ab554dc0ace89158eb3c7f0 (patch)
tree22b8e2aeb521a45f8deeffb3ed33adb183f3d359 /Master/texmf-dist/source/latex
parentd379da24c3c8619aae41ef32e82cd06a72154d86 (diff)
knowledge (5mar20)
git-svn-id: svn://tug.org/texlive/trunk@54113 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex')
-rw-r--r--Master/texmf-dist/source/latex/knowledge/knowledge-code.dtx50
1 files changed, 44 insertions, 6 deletions
diff --git a/Master/texmf-dist/source/latex/knowledge/knowledge-code.dtx b/Master/texmf-dist/source/latex/knowledge/knowledge-code.dtx
index 92725e4d583..73ec799f183 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}{2020/01/26}{1.21}{}
+%<head>\ProvidesExplPackage{knowledge}{2020/03/05}{1.22}{}
%<*driver>
\def\knowledgecode{active}
\input{knowledge.tex}
@@ -54,6 +54,7 @@
% \changes{1.19}{2019/11/19}{bug fix} %
% \changes{1.20}{2019/12/03}{bug fix} %
% \changes{1.21}{2020/01/26}{bug fix} %
+% \changes{1.22}{2020/03/05}{improvements} %
% \GetFileInfo{knowledge.sty} %
% \DoNotIndex{}
%
@@ -73,8 +74,8 @@ This directory contains the package
name: knowledge
license: LaTeX Project Public License version 1.2 or above
- version: v1.21
- date: 2020/01/26
+ version: v1.22
+ date: 2020/03/05
author: Thomas Colcombet
mail: thomas.colcombet@irif.fr
web: https://www.irif.fr/~colcombe/knowledge_en.html
@@ -476,6 +477,29 @@ Content of the file knowledge-sources.zip:
% this one is for compatibility
\KnowledgePackageTrigger{ final }{\tl_set:Nn\knowledge_option_mode_tl{final}}
% \end{macrocode}
+% Modes are stored in \csintro{\knowledge_option_mode_tl}.
+% \begin{macrocode}
+\bool_new:N\knowledge_option_texpatch_bool
+\bool_set_true:N\knowledge_option_texpatch_bool
+\KnowledgePackageTrigger{ no patch }{\bool_set_false:N\knowledge_option_texpatch_bool}
+% \end{macrocode}
+% \begin{macrocode}
+\tl_new:N\knowledge_option_knowledgeAP_command_tl
+\tl_set:Nn\knowledge_option_knowledgeAP_command_tl{}
+\tl_new:N\knowledge_option_complexityAP_command_tl
+\tl_set:Nn\knowledge_option_complexityAP_command_tl{}
+\KnowledgePackageTrigger{ knowledge AP }{
+ \tl_if_single_token:nTF{#1}
+ {\tl_set:Nn\knowledge_option_knowledgeAP_command_tl{#1}}
+ {\knowledge_error:n{Package~option~'knowledge~AP'~must~be~followed~by~a~single~control~sequence.}}
+}
+\KnowledgePackageTrigger{ complexity AP }{
+ \tl_if_single_token:nTF{#1}
+ {\tl_set:Nn\knowledge_option_complexityAP_command_tl{#1}}
+ {\knowledge_error:n{Package~option~'complexity~AP'~must~be~followed~by~a~single~control~sequence.}}
+}
+% \end{macrocode}
+%
%
% \begin{macrocode}
\KnowledgeConfigureTrigger{ fix~hyperref~twocolumn }
@@ -634,7 +658,7 @@ Content of the file knowledge-sources.zip:
%
% \subsubsection{Options post-treatment for the other packages}
% \begin{macrocode}
-\knowledge_option_aci_autoload:nnn{ hyperref }{}{\hypersetup{hidelinks}}
+\knowledge_option_aci_autoload:nnn{ hyperref }{}{}
\knowledge_option_aci_autoload:nn{ xcolor }{}
\knowledge_option_aci_autoload:nn{ makeidx }{}
% \end{macrocode}
@@ -3443,13 +3467,14 @@ Content of the file knowledge-sources.zip:
% The code for the command \cs{\AP} is inspired from a
% \href{http://tex.stackexchange.com/questions/123392/add-a-marker-to-the-left-of-the-text}{\underline{code}} of \kl{egreg} on \kl{stackexchange}.
% \begin{macrocode}
-\NewDocumentCommand\AP{}
+\NewDocumentCommand\knowledge_anchor_point_cs:{}
{\bool_if:NT\knowledge_hyperref_active_bool
{\strut\vadjust{\knowledge_AP_internal:}}}
\NewDocumentCommand\itemAP{o}{
\IfNoValueTF{#1}
- {\item\AP}
+ {\item\knowledge_anchor_point_cs:}
{\item[\knowledge_itemAP: #1]}}
+\let\AP\knowledge_anchor_point_cs:
% \end{macrocode}
% \begin{macrocode}
\int_new:N\kl_hyperref_kl_nesting_count_int
@@ -3823,6 +3848,19 @@ Content of the file knowledge-sources.zip:
%
% \subsection{configuration}
%
+% \subsubsection{Patching}
+%
+% Since v1.22, the package corrects by default some behaviours that are annoying in other packages.
+% This can be avoided using the trigger \kl{no patch} when you load the document.
+% \begin{macrocode}
+\bool_if:NT\knowledge_option_texpatch_bool{
+ \bool_if:NT\knowledge_hyperref_active_bool{
+ \hypersetup{breaklinks}
+ \hypersetup{hidelinks}
+ }
+}
+% \end{macrocode}
+%
% \subsubsection{Accessing the \kl{writing mode}}
%
% The paper can be compiled either in \kl{composition mode}, in \kl{paper mode}, or in \kl{electronic mode}.