texlive[65353] Master: gradient-text (24dec22)
commits+karl at tug.org
commits+karl at tug.org
Sat Dec 24 22:31:32 CET 2022
Revision: 65353
http://tug.org/svn/texlive?view=revision&revision=65353
Author: karl
Date: 2022-12-24 22:31:32 +0100 (Sat, 24 Dec 2022)
Log Message:
-----------
gradient-text (24dec22)
Modified Paths:
--------------
trunk/Master/tlpkg/bin/tlpkg-ctan-check
trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
Added Paths:
-----------
trunk/Master/texmf-dist/doc/latex/gradient-text/
trunk/Master/texmf-dist/doc/latex/gradient-text/README.md
trunk/Master/texmf-dist/doc/latex/gradient-text/gradient-text.pdf
trunk/Master/texmf-dist/doc/latex/gradient-text/gradient-text.tex
trunk/Master/texmf-dist/tex/latex/gradient-text/
trunk/Master/texmf-dist/tex/latex/gradient-text/gradient-text.sty
trunk/Master/tlpkg/tlpsrc/gradient-text.tlpsrc
Added: trunk/Master/texmf-dist/doc/latex/gradient-text/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/gradient-text/README.md (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/gradient-text/README.md 2022-12-24 21:31:32 UTC (rev 65353)
@@ -0,0 +1,38 @@
+gradient-text
+=========
+
+The 'gradient-text' package enables writers to conveniently decorate text with linear
+gradient colors.
+
+Basic Usage
+-----------
+The package only provides a user command.
+
+ \gradientRGB {⟨text⟩}{⟨first RGB⟩}{⟨last RGB⟩}
+
+You can read the package manual for some explanations.
+
+Copyright and License
+---------------------
+
+ Copyright (C) 2022 by Sicheng Du <siddsc at foxmail.com>
+ -----------------------------------------------------------------
+
+ This work may be distributed and/or modified under the
+ conditions of the LaTeX Project Public License, either
+ version 1.3c of this license or (at your option) any later
+ version. This version of this license is in
+ http://www.latex-project.org/lppl/lppl-1-3c.txt
+ and the latest version of this license is in
+ http://www.latex-project.org/lppl.txt
+ and version 1.3 or later is part of all distributions of
+ LaTeX version 2005/12/01 or later.
+
+ This work has the LPPL maintenance status "maintained".
+
+ The Current Maintainer of this work is Sicheng Du.
+
+ This package consists of the files gradient-text.tex,
+ gradient-text.pdf,
+ gradient-text.sty and
+ README.md (this file).
\ No newline at end of file
Property changes on: trunk/Master/texmf-dist/doc/latex/gradient-text/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/gradient-text/gradient-text.pdf
===================================================================
(Binary files differ)
Index: trunk/Master/texmf-dist/doc/latex/gradient-text/gradient-text.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/gradient-text/gradient-text.pdf 2022-12-24 21:29:56 UTC (rev 65352)
+++ trunk/Master/texmf-dist/doc/latex/gradient-text/gradient-text.pdf 2022-12-24 21:31:32 UTC (rev 65353)
Property changes on: trunk/Master/texmf-dist/doc/latex/gradient-text/gradient-text.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/gradient-text/gradient-text.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/gradient-text/gradient-text.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/gradient-text/gradient-text.tex 2022-12-24 21:31:32 UTC (rev 65353)
@@ -0,0 +1,50 @@
+\documentclass{ltxdoc}
+\title{The \textsf{\gradientRGB{gradient-text}{{255,63,63}}{{6,60,255}}} package\footnote{This project is under the \LaTeX~Project Public License.}}
+\usepackage{fontspec}
+\usepackage{tcolorbox}
+\usepackage[misc,geometry]{ifsym}
+\author{Sicheng Du\thanks{\Letter~~\href{mailto:siddsc at foxmail.com}{\gradientRGB{siddsc at foxmail.com}{{0,224,238}}{{173,0,254}}}}}
+\date{2022/12/24~~~~v1.1}
+\setmainfont{Times New Roman}
+\usepackage[colorlinks,linkcolor=purple]{hyperref}
+\usepackage{gradient-text}
+\begin{document}
+\maketitle
+The \textsf{gradient-text} package enables writers to conveniently decorate text with linear gradient colors. It's effect can be seen from the title.
+
+%\DescribeMacro{\xxx}xxxx
+\begin{macro}{\gradientRGB}
+\marg{text}\marg{first RGB}\marg{last RGB}
+This is the syntax of the command for putting gradient color on text . It takes three mandatory arguments.
+\end{macro}
+\begin{description}
+\item[\marg{text}] is the text you desire to have gradient color. Be aware that this command most likely wouldn't output content as expected if this parameter is filled with tokens that cannot expand into pure text. Below are two examples.
+\begin{tcolorbox}[sidebyside,coltitle=black,colbacktitle=white,lower separated=false,title=A correct usage,oversize,boxrule=0.5pt]
+\begin{verbatim}
+\newcommand{\hello}{Hello!}
+\gradientRGB{\hello}{{0,255,0}}{{255,0,0}}
+\end{verbatim}
+\tcblower
+\hfill\gradientRGB{Hello!}{{0,255,0}}
+{{255,0,0}}
+\end{tcolorbox}
+\begin{tcolorbox}[sidebyside,coltitle=orange,colbacktitle=white,lower separated=false,title=\SmallCross~An incorrect usage,oversize,boxrule=0.5pt]
+\begin{verbatim}
+\newcommand{\hello}{\textit{Hello!}}
+\gradientRGB{\hello}{{0,255,0}}{{255,0,0}}
+\end{verbatim}
+\tcblower
+\hfill\gradientRGB{\textit{Hello!}}{{0,255,0}}{{255,0,0}}
+\end{tcolorbox}
+In addition, for any space characters in \marg{text}, they will not be take a unique color, although they will still show up in their original position.
+\begin{tcolorbox}[coltitle=black,colbacktitle=white,lower separated=false,title=Example of space characters,oversize,boxrule=0.5pt]
+\verb|\gradientRGB{Hello World}{{0,255,0}}{{255,0,0}}|\hfill\gradientRGB{Hello World}{{0,255,0}}{{255,0,0}}
+\tcblower
+\verb|\gradientRGB{HelloWorld}{{0,255,0}}{{255,0,0}}|\hfill\gradientRGB{HelloWorld}{{0,255,0}}{{255,0,0}}
+\end{tcolorbox}
+\item[\marg{first RGB}] specifies the RGB value given to the first character of the \marg{text}. It should be formatted as a three-item comma list in brackets \verb|{}|, of which each item is a natural number not exceeding 255.
+
+All of \verb|{{13,28,176}}|, \verb|{{0,59,2}}| and \verb|{{255,34,5}}| are correct examples.
+\item[\marg{last RGB}] is similar to \marg{first RGB} except that it controls the RGB color of the last character in the \marg{text}.
+\end{description}
+\end{document}
\ No newline at end of file
Property changes on: trunk/Master/texmf-dist/doc/latex/gradient-text/gradient-text.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/gradient-text/gradient-text.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/gradient-text/gradient-text.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/gradient-text/gradient-text.sty 2022-12-24 21:31:32 UTC (rev 65353)
@@ -0,0 +1,31 @@
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{gradient-text}[2022/12/24]
+\ExplSyntaxOn
+\clist_new:N\l_FirstRGB_int \clist_new:N\l_LastRGB_int
+\int_new:N\l_MaxIndex\int_new:N\l_Ratio
+\newcommand{\@radientR at B}[7]{
+ \int_set:Nn\l_MaxIndex{\int_eval:n{\str_count:n{#1}}}
+ \int_step_inline:nnn{1}{\l_MaxIndex}{
+ \exp_args:Ne\str_if_eq:nnTF{\str_item:Nn{#1}{##1}}{~}{}{
+ \int_set:Nn\l_Ratio{\int_eval:n{\l_Ratio+1}}
+ }
+ \color_select:nn{RGB}{
+ \int_eval:n{(\int_use:N\l_Ratio*#5+(\l_MaxIndex-##1)*#2)/\l_MaxIndex},
+ \int_eval:n{(\int_use:N\l_Ratio*#6+(\l_MaxIndex-##1)*#3)/\l_MaxIndex},
+ \int_eval:n{(\int_use:N\l_Ratio*#7+(\l_MaxIndex-##1)*#4)/\l_MaxIndex}
+ }\str_item:Nn{#1}{##1}
+ }
+}
+
+\NewDocumentCommand\gradientRGB{mmm}{{
+ \clist_set:Nn\l_FirstRGB_int #2
+ \clist_set:Nn\l_LastRGB_int #3
+ \@radientR at B{#1}
+ {\clist_item:Nn\l_FirstRGB_int{1}}
+ {\clist_item:Nn\l_FirstRGB_int{2}}
+ {\clist_item:Nn\l_FirstRGB_int{3}}
+ {\clist_item:Nn\l_LastRGB_int{1}}
+ {\clist_item:Nn\l_LastRGB_int{2}}
+ {\clist_item:Nn\l_LastRGB_int{3}}
+}}
+\ExplSyntaxOff
\ No newline at end of file
Property changes on: trunk/Master/texmf-dist/tex/latex/gradient-text/gradient-text.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check 2022-12-24 21:29:56 UTC (rev 65352)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check 2022-12-24 21:31:32 UTC (rev 65353)
@@ -376,7 +376,8 @@
gmdoc gmdoc-enhance
gmiflink gmp gmutils gmverb gmverse gnuplottex
go gobble gofonts gost gothic gotoh
- grabbox gradientframe grading-scheme gradstudentresume grafcet grant
+ grabbox gradient-text gradientframe grading-scheme gradstudentresume
+ grafcet grant
graph35 graphbox graphics
graphics-cfg graphics-def graphics-pln
graphicx-psmin graphicscache graphicxbox graphicxpsd
Modified: trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc 2022-12-24 21:29:56 UTC (rev 65352)
+++ trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc 2022-12-24 21:31:32 UTC (rev 65353)
@@ -608,6 +608,7 @@
depend gmutils
depend gmverb
depend grabbox
+depend gradient-text
depend grading-scheme
depend graphbox
depend graphicscache
Added: trunk/Master/tlpkg/tlpsrc/gradient-text.tlpsrc
===================================================================
More information about the tex-live-commits
mailing list.