texlive[68756] Master/texmf-dist: highlightx (9nov23)

commits+karl at tug.org commits+karl at tug.org
Thu Nov 9 23:02:31 CET 2023


Revision: 68756
          https://tug.org/svn/texlive?view=revision&revision=68756
Author:   karl
Date:     2023-11-09 23:02:31 +0100 (Thu, 09 Nov 2023)
Log Message:
-----------
highlightx (9nov23)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/highlightx/highlightx-doc.pdf
    trunk/Master/texmf-dist/doc/latex/highlightx/highlightx-doc.tex
    trunk/Master/texmf-dist/tex/latex/highlightx/highlightx.sty

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

Modified: trunk/Master/texmf-dist/doc/latex/highlightx/highlightx-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/highlightx/highlightx-doc.tex	2023-11-09 22:02:19 UTC (rev 68755)
+++ trunk/Master/texmf-dist/doc/latex/highlightx/highlightx-doc.tex	2023-11-09 22:02:31 UTC (rev 68756)
@@ -33,8 +33,8 @@
 \hypersetup{pdfborder=0 0 0}
 \usepackage[margin=1.5cm]{geometry}
 \setlength{\parindent}{0pt}
-\def\TPversion{0.1.2}
-\def\TPdate{3 septembre 2023}
+\def\TPversion{0.1.5}
+\def\TPdate{9 novembre 2023}
 \usepackage{tcolorbox}
 \tcbuselibrary{skins,hooks}
 \sethlcolor{lightgray!25}
@@ -75,6 +75,8 @@
 	\texttt{\url{https://github.com/cpierquet/highlightx}} \\
 	\\
 	\texttt{Merci à Antal Spector-Zabusky pour le code dédié aux paragraphes !}
+	\\
+	\texttt{Merci à Denis Bitouzé pour ses retours !}
 \end{tabular}
 \end{center}
 
@@ -168,18 +170,6 @@
 
 {\small\faBomb}~Compte tenu du code utilisé pour le surlignage des paragraphes, il se peut que des dysfonctionnements apparaissent, notamment liés à \MontreCode{babel} et à l'utilisation de caractères \textit{actifs}.
 
-%{\small\faBomb}~En ce qui concerne les paragraphes, le package \MontreCode{soul} est performant dans le cas où la police courante est en \MontreCode{\textbackslash normalsize}, dans le cas contraire, il se peut que le rendu ne soit pas optimal. Il se peut également que le surlignage ne donne pas un résultat optimal avec certains caractères, comme par exemple \MontreCode{;}.
-
-%{\small\faBomb}~Pour le moment le surlignement avec effet en mode paragraphe n'est pas compatible avec des environnements (comme \MontreCode{tcolorbox}), donc dans ce cas il n'y aura pas d'effet possible.
-%
-%\medskip
-%
-%{\small\faAngellist}~Le code permettant de surligner un paragraphe avec effet vient d'une solution proposée par l'internaute \MontreCode{gusbrs}, dans un fil de discussion du site \MontreCode{tex.stackexchange}, et sous licence CC BY-SA :
-%
-%\smallskip
-%
-%\hfill\url{https://tex.stackexchange.com/questions/5959/cool-text-highlighting-in-latex}\hfill~
-
 \subsection{Chargement}
 
 Le package se charge dans le préambule, via \MontreCode{\textbackslash usepackage\{highlightx\}}.
@@ -189,9 +179,6 @@
 \begin{itemize}
 	\item \MontreCode{soul}, \MontreCode{xstring} et \MontreCode{simplekv}.
 	\item \MontreCode{tikz} avec les librairies \MontreCode{tikzmark,calc,decorations.pathmorphing,nbabel}.
-	%\item \MontreCode{soul}, \MontreCode{atbegshi}, \MontreCode{etoolbox} ;
-	%\item \MontreCode{tikz} avec les librairies \MontreCode{tikzmark,calc,decorations.pathmorphing} ;
-	%\item \MontreCode{xstring} et \MontreCode{simplekv}.
 \end{itemize}
 
 Si l'utilisateur ne souhaite pas charger la librairie \MontreCode{babel} de \TikZ, il suffit de charger le package avec l'option \MontreCode{[nobabel]}.
@@ -304,22 +291,28 @@
 
 \begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
 %Style main levée
-\tikzstyle{encadreformule}=[%
-    decorate,decoration={random steps,amplitude=0.5pt,segment length=1em}]
+\tikzset{encadreformule/.style={%
+    decorate,decoration={random steps,amplitude=0.5pt,segment length=1em}}%
+}
 \end{codehigh}
 
 \begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
-\tikzstyle{encadreformule}=[%
-    decorate,decoration={random steps,amplitude=4mm,segment length=10mm}]
+\tikzset{encadreformule/.style={%
+    decorate,decoration={random steps,amplitude=4mm,segment length=10mm}}%
+}
 
 $\SurlignerFormule{f(x)=\displaystyle\frac{1}{1+x}}$
 \end{codehigh}
 
-\tikzstyle{encadreformule}=[decorate,decoration={random steps,amplitude=4mm,segment length=10mm}]
+\tikzset{encadreformule/.style={%
+		decorate,decoration={random steps,amplitude=4mm,segment length=10mm}}%
+}
 
 $\SurlignerFormule{f(x)=\displaystyle\frac{1}{1+x}}$
 
-\tikzstyle{encadreformule}=[decorate,decoration={random steps,amplitude=0.5pt,segment length=1em}]
+\tikzset{encadreformule/.style={%
+		decorate,decoration={random steps,amplitude=0.5pt,segment length=1em}}%
+}
 
 \pagebreak
 
@@ -400,13 +393,15 @@
 
 \begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
 %Style main levée
-\tikzstyle{encadreformule}=[%
-    decorate,decoration={random steps,amplitude=0.5pt,segment length=1em}]
+\tikzset{encadreformule/.style={%
+    decorate,decoration={random steps,amplitude=0.5pt,segment length=1em}}%
+}
 \end{codehigh}
 
 \begin{demohigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
-\tikzstyle{encadreformule}=[%
-    decorate,decoration={random steps,amplitude=2mm,segment length=10mm}]
+\tikzset{encadreformule/.style={
+    decorate,decoration={random steps,amplitude=2mm,segment length=10mm}}%
+}
 
 Un paragraphe : \og \SurlignerTexte{Quand Julien aperçut les ruines pittoresques de 
 l’ancienne église de Vergy, il remarqua que depuis l’avant-veille il n’avait pas pensé 
@@ -414,7 +409,9 @@
 distance infinie qui nous sépare, elle m’a traité comme le fils d’un ouvrier.} \fg
 \end{demohigh}
 
-\tikzstyle{encadreformule}=[decorate,decoration={random steps,amplitude=0.5pt,segment length=1em}]
+\tikzset{encadreformule/.style={%
+		decorate,decoration={random steps,amplitude=0.5pt,segment length=1em}}%
+}
 
 \pagebreak
 
@@ -428,7 +425,7 @@
 %Hightlight formula (math mode), with or without effect
 \HighlightFormula
 %Basic highlight text, with or without effect
-\TextHighlight
+\HighlightText
 \end{codehigh}
 
 \subsection{Highlight formula}
@@ -461,22 +458,28 @@
 
 \begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
 %handwriting style
-\tikzstyle{borderformula}=[%
-    decorate,decoration={random steps,amplitude=0.5pt,segment length=1em}]
+\tikzset{borderformula/.style={%
+    decorate,decoration={random steps,amplitude=0.5pt,segment length=1em}}%
+}
 \end{codehigh}
 
 \begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
-\tikzstyle{borderformula}=[%
-    decorate,decoration={random steps,amplitude=4mm,segment length=10mm}]
+\tikzset{borderformula/.style={%
+    decorate,decoration={random steps,amplitude=4mm,segment length=10mm}}%
+}
 
 $\HighlightFormula{f(x)=\displaystyle\frac{1}{1+x}}$
 \end{codehigh}
 
-\tikzstyle{borderformula}=[decorate,decoration={random steps,amplitude=4mm,segment length=10mm}]
+\tikzset{borderformula/.style={%
+		decorate,decoration={random steps,amplitude=4mm,segment length=10mm}}%
+}
 
 $\HighlightFormula{f(x)=\displaystyle\frac{1}{1+x}}$
 
-\tikzstyle{borderformula}=[decorate,decoration={random steps,amplitude=0.5pt,segment length=1em}]
+\tikzset{borderformula/.style={%
+		decorate,decoration={random steps,amplitude=0.5pt,segment length=1em}}%
+}
 
 \subsection{Highlight text or paragraphs, with or without effect}
 

Modified: trunk/Master/texmf-dist/tex/latex/highlightx/highlightx.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/highlightx/highlightx.sty	2023-11-09 22:02:19 UTC (rev 68755)
+++ trunk/Master/texmf-dist/tex/latex/highlightx/highlightx.sty	2023-11-09 22:02:31 UTC (rev 68756)
@@ -3,9 +3,12 @@
 % licence    : Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txtf
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{highlightx}[2023/09/03 0.1.2 Macros pour surligner du texte, meme en mode paragraphe]
+\ProvidesPackage{highlightx}[2023/11/09 0.1.5 Macros pour surligner du texte, meme en mode paragraphe]
 
 %====HISTORIQUE
+% v 0.1.5	Mise à jour de la doc
+% v 0.1.4	Passage \tikzstyle vers \tikzset (merci à Sam C.)
+% v 0.1.3	Correction d'un bug avec le caractère ; (merci à Denis B.)
 % v 0.1.2	Version étoilée pour \genhighlightpar afin d'activer \NoAutoSpacing + retour du code paragraphe main levée
 % v 0.1.1	Suppression code paragraphe avec effet
 % v 0.1.0	Version initiale [fr] et [en]
@@ -28,8 +31,8 @@
 \colorlet{hlcolback}{yellow!35}
 
 %====COMMANDES POUR FORMULES
-\tikzstyle{encadreformule}=[decorate,decoration={random steps,amplitude=0.5pt,segment length=1em}]
-\tikzstyle{borderformula}=[decorate,decoration={random steps,amplitude=0.5pt,segment length=1em}]
+\tikzset{encadreformule/.style={decorate,decoration={random steps,amplitude=0.5pt,segment length=1em}}}
+\tikzset{borderformula/.style={decorate,decoration={random steps,amplitude=0.5pt,segment length=1em}}}
 
 \defKV[surlignformule]{%
 	Fond=\def\surlignformulefond{#1},%
@@ -145,15 +148,15 @@
 }
 
 \newcommand{\highlight at DoHighlight}{
-	\fill[hlparhw] ($(begin highlight)+(-\surlignparoffsetH,1.05*\tmp at hauteur@char+\surlignparoffsetV)$) rectangle ($(end highlight)+(\surlignparoffsetH,-1.05*\tmp at profondeur@char-\surlignparoffsetV)$) ;
+	\fill[hlparhw] ($(begin highlight)+(-\surlignparoffsetH,1.05*\tmp at hauteur@char+\surlignparoffsetV)$) rectangle ($(end highlight)+(\surlignparoffsetH,-1.05*\tmp at profondeur@char-\surlignparoffsetV)$)
 }
 
 \newcommand{\highlight at BeginHighlight}{
-	\coordinate (begin highlight) at (0,0) ;
+	\coordinate (begin highlight) at (0,0) 
 }
 
 \newcommand{\highlight at EndHighlight}{
-	\coordinate (end highlight) at (0,0) ;
+	\coordinate (end highlight) at (0,0) 
 }
 
 \NewDocumentCommand\SurlignerTexte{ s O{} D<>{} }{%
@@ -184,15 +187,15 @@
 	%
 	\def\SOUL at preamble{%
 		\begin{tikzpicture}[overlay, remember picture]
-			\highlight at BeginHighlight
-			\highlight at EndHighlight
+			\highlight at BeginHighlight ;
+			\highlight at EndHighlight ;
 		\end{tikzpicture}%
 	}%
 	%
 	\def\SOUL at postamble{%
 		\begin{tikzpicture}[overlay, remember picture]
-			\highlight at EndHighlight
-			\highlight at DoHighlight
+			\highlight at EndHighlight ;
+			\highlight at DoHighlight ;
 		\end{tikzpicture}%
 	}%
 	%
@@ -200,7 +203,7 @@
 		\discretionary{%
 			\SOUL at setkern\SOUL at hyphkern
 			\SOUL at sethyphenchar
-			\tikz[overlay, remember picture] \highlight at EndHighlight ;%
+			{\tikz[overlay, remember picture] \highlight at EndHighlight ;}%
 		}{%
 		}{%
 			\SOUL at setkern\SOUL at charkern
@@ -211,7 +214,7 @@
 		\SOUL at setkern\SOUL at hyphkern
 		\hbox{##1}%
 		\discretionary{%
-			\tikz[overlay, remember picture] \highlight at EndHighlight ;%
+			{\tikz[overlay, remember picture] \highlight at EndHighlight ;}%
 		}{%
 		}{%
 			\SOUL at setkern\SOUL at charkern
@@ -225,12 +228,12 @@
 			\global\highlight at current =\y1
 			\endpgfextra (0,0) ;
 			\ifdim\highlight at current < \highlight at previous
-			\highlight at DoHighlight
-			\highlight at BeginHighlight
+			\highlight at DoHighlight ; 
+			\highlight at BeginHighlight ;
 			\fi
 		\end{tikzpicture}%
 		\the\SOUL at syllable
-		\tikz[overlay, remember picture] \highlight at EndHighlight ;%
+		{\tikz[overlay, remember picture] \highlight at EndHighlight ;}%
 	}%
 	\SOUL@
 }
@@ -263,15 +266,15 @@
 	%
 	\def\SOUL at preamble{%
 		\begin{tikzpicture}[overlay, remember picture]
-			\highlight at BeginHighlight
-			\highlight at EndHighlight
+			\highlight at BeginHighlight ;
+			\highlight at EndHighlight ;
 		\end{tikzpicture}%
 	}%
 	%
 	\def\SOUL at postamble{%
 		\begin{tikzpicture}[overlay, remember picture]
-			\highlight at EndHighlight
-			\highlight at DoHighlight
+			\highlight at EndHighlight ;
+			\highlight at DoHighlight ;
 		\end{tikzpicture}%
 	}%
 	%
@@ -279,7 +282,7 @@
 		\discretionary{%
 			\SOUL at setkern\SOUL at hyphkern
 			\SOUL at sethyphenchar
-			\tikz[overlay, remember picture] \highlight at EndHighlight ;%
+			{\tikz[overlay, remember picture] \highlight at EndHighlight ;}%
 		}{%
 		}{%
 			\SOUL at setkern\SOUL at charkern
@@ -290,7 +293,7 @@
 		\SOUL at setkern\SOUL at hyphkern
 		\hbox{##1}%
 		\discretionary{%
-			\tikz[overlay, remember picture] \highlight at EndHighlight ;%
+			{\tikz[overlay, remember picture] \highlight at EndHighlight ;}%
 		}{%
 		}{%
 			\SOUL at setkern\SOUL at charkern
@@ -304,12 +307,12 @@
 			\global\highlight at current =\y1
 			\endpgfextra (0,0) ;
 			\ifdim\highlight at current < \highlight at previous
-			\highlight at DoHighlight
-			\highlight at BeginHighlight
+			\highlight at DoHighlight ;
+			\highlight at BeginHighlight ;
 			\fi
 		\end{tikzpicture}%
 		\the\SOUL at syllable
-		\tikz[overlay, remember picture] \highlight at EndHighlight ;%
+		{\tikz[overlay, remember picture] \highlight at EndHighlight ;}%
 	}%
 	\SOUL@
 }



More information about the tex-live-commits mailing list.