texlive[72619] Master/texmf-dist: highlightx (22oct24)

commits+karl at tug.org commits+karl at tug.org
Tue Oct 22 22:38:08 CEST 2024


Revision: 72619
          https://tug.org/svn/texlive?view=revision&revision=72619
Author:   karl
Date:     2024-10-22 22:38:07 +0200 (Tue, 22 Oct 2024)
Log Message:
-----------
highlightx (22oct24)

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	2024-10-22 20:37:51 UTC (rev 72618)
+++ trunk/Master/texmf-dist/doc/latex/highlightx/highlightx-doc.tex	2024-10-22 20:38:07 UTC (rev 72619)
@@ -33,8 +33,8 @@
 \hypersetup{pdfborder=0 0 0}
 \usepackage[margin=1.5cm]{geometry}
 \setlength{\parindent}{0pt}
-\def\TPversion{0.1.5}
-\def\TPdate{9 novembre 2023}
+\def\TPversion{0.1.6}
+\def\TPdate{22 octobre 2024}
 \usepackage{tcolorbox}
 \tcbuselibrary{skins,hooks}
 \sethlcolor{lightgray!25}
@@ -258,6 +258,7 @@
 		\item \MontreCode{Fond} pour la couleur de fond (\MontreCode{yellow!35} par défaut) ;
 		\item \MontreCode{Bord} pour une éventuelle bordure, \MontreCode{none} ou \MontreCode{couleur} (\MontreCode{none} par défaut) ;
 		\item \MontreCode{Texte} pour une couleur de texte (\MontreCode{black} par défaut) ;
+		\item \MontreCode{OpaciteTexte} pour l'opacité de la couleur de texte (\MontreCode{1} par défaut) ;
 		\item \MontreCode{Offset} pour \textit{élargir} le surlignage, sous la forme \MontreCode{Offset} ou \MontreCode{OffsetH/OffsetV} (\MontreCode{1pt/2pt} par défaut) ;
 	\end{itemize}
 	\item la formule est insérée dans un groupe \MontreCode{\textbackslash ensuremath} ;
@@ -266,7 +267,7 @@
 
 \begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
 $\SurlignerFormule{f(x)=\displaystyle\frac{1}{1+x}}$.\\
-$\SurlignerFormule*{f(x)=\displaystyle\frac{1}{1+x}}$.\\
+$\SurlignerFormule*[OpaciteTexte=0.75]{f(x)=\displaystyle\frac{1}{1+x}}$.\\
 $\SurlignerFormule[Fond=teal!35]{f(x)=\displaystyle\frac{1}{1+x}}$.\\
 $\SurlignerFormule[Fond=teal!35,Bord=red]{f(x)=\displaystyle\frac{1}{1+x}}<thick>$.\\
 $\SurlignerFormule[Offset=5mm/2mm]{f(x)=\displaystyle\frac{1}{1+x}}$\\
@@ -275,7 +276,7 @@
 
 $\SurlignerFormule{f(x)=\displaystyle\frac{1}{1+x}}$
 \qquad
-$\SurlignerFormule*{f(x)=\displaystyle\frac{1}{1+x}}$
+$\SurlignerFormule*[OpaciteTexte=0.75]{f(x)=\displaystyle\frac{1}{1+x}}$
 \qquad
 $\SurlignerFormule[Fond=teal!35]{f(x)=\displaystyle\frac{1}{1+x}}$
 \qquad
@@ -437,7 +438,7 @@
 
 \begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
 $\HighlightFormula{f(x)=\displaystyle\frac{1}{1+x}}$.\\
-$\HighlightFormula*{f(x)=\displaystyle\frac{1}{1+x}}$.\\
+$\HighlightFormula*[textopacity=0.75]{f(x)=\displaystyle\frac{1}{1+x}}$.\\
 $\HighlightFormula[bg=teal!35]{f(x)=\displaystyle\frac{1}{1+x}}$.\\
 $\HighlightFormula[bg=teal!35,border=red]{f(x)=\displaystyle\frac{1}{1+x}}<thick>$.\\
 $\HighlightFormula[offset=5mm/2mm]{f(x)=\displaystyle\frac{1}{1+x}}$\\
@@ -446,7 +447,7 @@
 
 $\HighlightFormula{f(x)=\displaystyle\frac{1}{1+x}}$
 \qquad
-$\HighlightFormula*{f(x)=\displaystyle\frac{1}{1+x}}$
+$\HighlightFormula*[textopacity=0.75]{f(x)=\displaystyle\frac{1}{1+x}}$
 \qquad
 $\HighlightFormula[bg=teal!35]{f(x)=\displaystyle\frac{1}{1+x}}$
 \qquad

Modified: trunk/Master/texmf-dist/tex/latex/highlightx/highlightx.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/highlightx/highlightx.sty	2024-10-22 20:37:51 UTC (rev 72618)
+++ trunk/Master/texmf-dist/tex/latex/highlightx/highlightx.sty	2024-10-22 20:38:07 UTC (rev 72619)
@@ -3,9 +3,10 @@
 % 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/11/09 0.1.5 Macros pour surligner du texte, meme en mode paragraphe]
+\ProvidesPackage{highlightx}[2024/10/22 0.1.6 Macros pour surligner du texte, meme en mode paragraphe]
 
 %====HISTORIQUE
+% v 0.1.6	Ajout d'une clé pour l'opacité du texte d'une formule
 % 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.)
@@ -38,16 +39,18 @@
 	Fond=\def\surlignformulefond{#1},%
 	Bord=\def\surlignformulebord{#1},%
 	Texte=\def\surlignformuletexte{#1},%
-	Offset=\def\surlignformuleoffset{#1}
+	Offset=\def\surlignformuleoffset{#1},%
+	OpaciteTexte=\def\surlignformuleopac{#1}
 }
 \setKVdefault[surlignformule]{%
 	Fond=hlcolback,%
 	Bord=none,%
 	Texte=black,%
-	Offset=1pt/2pt
+	Offset=1pt/2pt,%
+	OpaciteTexte=1
 }
 
-\NewDocumentCommand\SurlignerFormule{ s O{\surlignformulefond} m D<>{} }{%
+\NewDocumentCommand\SurlignerFormule{ s O{} m D<>{} }{%
 	\useKVdefault[surlignformule]%
 	\setKV[surlignformule]{#2}%
 	\IfSubStr{\surlignformuleoffset}{/}%
@@ -61,11 +64,11 @@
 	\begin{tikzpicture}[remember picture,overlay]
 		\IfBooleanTF{#1}%
 			{%
-				\fill[\surlignformulefond,draw=\surlignformulebord,#4] ([xshift=-\surlignformuleoffsetH,yshift=-\surlignformuleoffsetV]formule.south west) rectangle ([xshift=\surlignformuleoffsetH,yshift=\surlignformuleoffsetV]formule.north east) node[text=\surlignformuletexte,midway] {\ensuremath{#3}} ;
+				\fill[\surlignformulefond,draw=\surlignformulebord,#4] ([xshift=-\surlignformuleoffsetH,yshift=-\surlignformuleoffsetV]formule.south west) rectangle ([xshift=\surlignformuleoffsetH,yshift=\surlignformuleoffsetV]formule.north east) node[text=\surlignformuletexte,midway,text opacity=\surlignformuleopac] {\ensuremath{#3}} ;
 			}%
 			{%
-				\fill[\surlignformulefond,draw=\surlignformulebord,encadreformule,#4] ([xshift=-\surlignformuleoffsetH,yshift=-\surlignformuleoffsetV]formule.south west) rectangle ([xshift=\surlignformuleoffsetH,yshift=\surlignformuleoffsetV]formule.north east) node[text=\surlignformuletexte,midway] {\ensuremath{#3}} ;
-			}
+				\fill[\surlignformulefond,draw=\surlignformulebord,encadreformule,#4] ([xshift=-\surlignformuleoffsetH,yshift=-\surlignformuleoffsetV]formule.south west) rectangle ([xshift=\surlignformuleoffsetH,yshift=\surlignformuleoffsetV]formule.north east) node[text=\surlignformuletexte,midway,text opacity=\surlignformuleopac] {\ensuremath{#3}} ;
+			}%
 	\end{tikzpicture}%
 }
 
@@ -73,13 +76,15 @@
 	bg=\def\hlformulabg{#1},%
 	border=\def\hlformulaborder{#1},%
 	text=\def\surlignformulatext{#1},%
-	offset=\def\hlformulaoffset{#1}
+	offset=\def\hlformulaoffset{#1},%
+	textopacity=\def\hlformulaopac{#1}
 }
 \setKVdefault[hlformula]{%
 	bg=hlcolback,%
 	border=none,%
 	text=black,%
-	offset=1pt/2pt
+	offset=1pt/2pt,%
+	textopacity=1
 }
 
 \NewDocumentCommand\HighlightFormula{ s O{\surlignformulefond} m D<>{} }{%
@@ -96,10 +101,10 @@
 	\begin{tikzpicture}[remember picture,overlay]
 		\IfBooleanTF{#1}%
 			{%
-				\fill[\hlformulabg,draw=\hlformulaborder,#4] ([xshift=-\hlformulaoffsetH,yshift=-\hlformulaoffsetV]formula.south west) rectangle ([xshift=\hlformulaoffsetH,yshift=\hlformulaoffsetV]formula.north east) node[text=\surlignformulatext,midway] {\ensuremath{#3}} ;
+				\fill[\hlformulabg,draw=\hlformulaborder,#4] ([xshift=-\hlformulaoffsetH,yshift=-\hlformulaoffsetV]formula.south west) rectangle ([xshift=\hlformulaoffsetH,yshift=\hlformulaoffsetV]formula.north east) node[text=\surlignformulatext,midway,text opacity=\hlformulaopac] {\ensuremath{#3}} ;
 			}%
 			{%
-				\fill[\hlformulabg,draw=\hlformulaborder,borderformula,#4] ([xshift=-\hlformulaoffsetH,yshift=-\hlformulaoffsetV]formula.south west) rectangle ([xshift=\hlformulaoffsetH,yshift=\hlformulaoffsetV]formula.north east) node[text=\surlignformulatext,midway] {\ensuremath{#3}} ;
+				\fill[\hlformulabg,draw=\hlformulaborder,borderformula,#4] ([xshift=-\hlformulaoffsetH,yshift=-\hlformulaoffsetV]formula.south west) rectangle ([xshift=\hlformulaoffsetH,yshift=\hlformulaoffsetV]formula.north east) node[text=\surlignformulatext,midway,text opacity=\hlformulaopac] {\ensuremath{#3}} ;
 			}
 	\end{tikzpicture}%
 }



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