diff options
author | Karl Berry <karl@freefriends.org> | 2023-10-12 20:26:03 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-10-12 20:26:03 +0000 |
commit | d534eb4ed11898bfab600b750cea1981577863d8 (patch) | |
tree | b8971c2020cc23fa34820ca69f8c24272b4f211e /Master/texmf-dist/doc | |
parent | 0cdedcb767ac4e40d1a3339198bebf747b7841b8 (diff) |
pixelarttikz (12oct23)
git-svn-id: svn://tug.org/texlive/trunk@68520 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc')
-rw-r--r-- | Master/texmf-dist/doc/latex/pixelarttikz/PixelArtTikz-doc-en.pdf | bin | 468164 -> 537723 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/pixelarttikz/PixelArtTikz-doc-en.tex | 158 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/pixelarttikz/PixelArtTikz-doc-fr.pdf | bin | 503873 -> 546242 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/pixelarttikz/PixelArtTikz-doc-fr.tex | 69 |
4 files changed, 179 insertions, 48 deletions
diff --git a/Master/texmf-dist/doc/latex/pixelarttikz/PixelArtTikz-doc-en.pdf b/Master/texmf-dist/doc/latex/pixelarttikz/PixelArtTikz-doc-en.pdf Binary files differindex ecfa1dad49e..9f57e4ebb8d 100644 --- a/Master/texmf-dist/doc/latex/pixelarttikz/PixelArtTikz-doc-en.pdf +++ b/Master/texmf-dist/doc/latex/pixelarttikz/PixelArtTikz-doc-en.pdf diff --git a/Master/texmf-dist/doc/latex/pixelarttikz/PixelArtTikz-doc-en.tex b/Master/texmf-dist/doc/latex/pixelarttikz/PixelArtTikz-doc-en.tex index 6558ad9b6a9..e1b74bae3b7 100644 --- a/Master/texmf-dist/doc/latex/pixelarttikz/PixelArtTikz-doc-en.tex +++ b/Master/texmf-dist/doc/latex/pixelarttikz/PixelArtTikz-doc-en.tex @@ -44,8 +44,8 @@ \usepackage[margin=1.5cm]{geometry} \setlength{\parindent}{0pt} -\def\TPversion{0.1.1} -\def\TPdate{19/04/2023} +\def\TPversion{0.1.2} +\def\TPdate{12/10/2023} \usepackage[most]{tcolorbox} \tcbuselibrary{minted} @@ -186,15 +186,15 @@ The idea is to \textit{propose}, within a Ti\textit{k}Z environment, a macro to generate PixelArt. -Datas are \textit{red} by a \textsf{csv} file, already created and placed into the folder of the \textsf{tex} file, or directly created by \textsf{filecontents}. +The data is \textit{read} from a \textsf{csv} file, already existing in the folder of the \textsf{tex} file, or created on-the-fly by \textsf{filecontents}. \medskip Some advices about the \textsf{cvs} file : \begin{itemize} - \item the \textsf{csv} file must use "," as separator ; - \item empty cases are coded by "\texttt{-}". + \item the \textsf{csv} file must use "," as separator; + \item empty cells are coded by "\texttt{-}". \end{itemize} \begin{PresentationCode}{listing only} @@ -206,17 +206,17 @@ Some advices about the \textsf{cvs} file : \end{filecontents*} \end{PresentationCode} -While compiling, the file \textsf{filename.csv} will be created, and the option \Cle{[overwrite]} will propagate the modifications ! +While compiling, the file \textsf{filename.csv} will be created, and the option \Cle{[overwrite]} will propagate the modifications! \subsection{Loading of the package, and option} -The \textit{needed} package is here \textsf{csvsimple}, in order to read the \textsf{csv} file. +The package \textsf{csvsimple} is necessary in order to read the \textsf{csv} file. -It's available for \hologo{LaTeX2e} or for \hologo{LaTeX3}. By default, \textsf{PixelArtTikz} loads it for \hologo{LaTeX3}, but an \textit{option} is available to work with \hologo{LaTeX2e}. +The package is available in two versions, one written in \hologo{LaTeX2e} and the other in \hologo{LaTeX3}. By default, \textsf{PixelArtTikz} loads the \hologo{LaTeX3} version, but an \textit{option} is available to work with the \hologo{LaTeX2e} version. \smallskip -The option \Cle{[csvii]} forces the usage of \hologo{LaTeX2e}. +The option \Cle{[csvii]} forces the usage of the \hologo{LaTeX2e} version. \begin{PresentationCode}{listing only} \usepackage{PixelArtTikz} %package latex3 @@ -231,11 +231,11 @@ The option \Cle{[csvii]} forces the usage of \hologo{LaTeX2e}. \subsection{Used packages} -It's fully copatible with usuals compilations, such as \textsf{latex}, \textsf{pdflatex}, \textsf{lualatex} or \textsf{xelatex}. +It's fully compatible with usual \hologo{LaTeX} engines, such as \textsf{latex}, \textsf{pdflatex}, \textsf{lualatex} or \textsf{xelatex}. \medskip -It loads the packages and libraries : +It loads the following packages and libraries: \begin{itemize} \item \texttt{tikz}, \texttt{xintexpr} et \texttt{xinttools}; @@ -246,11 +246,11 @@ It loads the packages and libraries : \subsection{Macros and environment} -There's two ways to create PixelArt : +There are two ways to create PixelArt: \begin{itemize} - \item by an independent macro ; - \item by a Ti\textit{k}Z environment in order to put code after. + \item with an independent macro; + \item with a Ti\textit{k}Z environment in order to add code afterwards. \end{itemize} \begin{PresentationCode}{listing only} @@ -268,11 +268,11 @@ There's two ways to create PixelArt : \section{Colors} -Concerning colors, the user can use the colors loaded by the loaded packages ! +Concerning colors: the user can use all colors provided by loaded packages! \smallskip -Without extra package, avalaibles colors are : +Without extra packages, the available colors are: \smallskip @@ -309,9 +309,9 @@ Without extra package, avalaibles colors are : The macro \texttt{\textbackslash PixlArtTikz} needs : \begin{itemize} - \item the file \textsf{csv} ; - \item the list (by a string) of codes used in the file \textsf{csv} (eg \texttt{234679} or \texttt{ABCDJK}\ldots); - \item the list of symbols (if needed) to print in the cases, eg \texttt{25,44,12} or \texttt{AA,AB,AC} ; + \item the file \textsf{csv}; + \item the list (by a string) of codes used in the file \textsf{csv} (e.g.\ \texttt{234679} or \texttt{ABCDJK}\ldots); + \item the list of symbols (if needed) to print in the cells, e.g.\ \texttt{25,44,12} or \texttt{AA,AB,AC}; \item the list of colors (for the correction), same order as the codes. \end{itemize} @@ -349,25 +349,25 @@ We can begin by creating the file \textsf{csv}, directly within the \textsf{tex} \pagebreak -\subsection{Options an keys} +\subsection{Options and keys} \begin{PresentationCode}{listing only} \PixlArtTikz[keys]<options tikz>{file.csv} \end{PresentationCode} -The first argument, \textit{optional} and between \texttt{[...]} proposes the \textsf{keys} : +The first argument, \textit{optional} and between \texttt{[...]} proposes the \textsf{keys}: \begin{itemize} - \item the key \Cle{Codes} with the \textit{string} of \textit{simple} codes of the \textsf{csv} file ; - \item the key \Cle{Colors} with the \textit{list} of colors ; - \item the key \Cle{Symbols} with the \textit{optional list} of alt. symbols for the cases ; - \item the boolean \Cle{Correction} to color the PixelArt ;\hfill{}default \textsf{false} - \item the boolean \Cle{Symb} to print the symbols ;\hfill{}default \textsf{false} - \item the boolean \Cle{Border} to print borders of the cases ;\hfill{}default \textsf{true} + \item the key \Cle{Codes} with the \textit{string} of \textit{simple} codes of the \textsf{csv} file; + \item the key \Cle{Colors} with the \textit{list} of colors; + \item the key \Cle{Symbols} with the \textit{optional list} of alt.\ symbols for the cells; + \item the boolean \Cle{Correction} to color the PixelArt;\hfill{}default \textsf{false} + \item the boolean \Cle{Symb} to print the symbols;\hfill{}default \textsf{false} + \item the boolean \Cle{Border} to print borders of the cells;\hfill{}default \textsf{true} \item the key \Cle{Style} to specifythe style of the text. \hfill{}default \textsf{\textbackslash scriptsize} \end{itemize} -The second argument, \textit{optional} and between \texttt{<...>} are options -- in Ti\textit{k}Z -- to parse to the environment which create the PixelArt. +The second argument, \textit{optional} and between \texttt{<...>}, are Ti\textit{k}Z options to pass on to the environment which creates the PixelArt. \medskip @@ -415,7 +415,7 @@ The third argument, \textit{mandatory}, is the filename of the \textsf{csv}. \pagebreak -In the following example, les \textit{symbols} to print can't be used for the \textit{codes}, so we can use the keys \Cle{Symbols} and \Cle{Symb} to bypass this limitation. +In the following example, the \textit{symbols} to print can't be used for the \textit{codes}, so we can use the keys \Cle{Symbols} and \Cle{Symb} to bypass this limitation. \begin{PresentationCode}{} %symbols associated to codes @@ -454,15 +454,15 @@ In the following example, les \textit{symbols} to print can't be used for the \t \subsection{Starred macro} -The starred \textit{étoilée} macro \texttt{\textbackslash PixlArtTikz*} is to be integrated within an environment already created. It cas be usefull to add code after the PixelArt. +The starred macro \texttt{\textbackslash PixlArtTikz*} is to be used within an already created environment. It can be useful for adding code after the PixelArt. \smallskip -In this case : +In this case: \begin{itemize} - \item the \textit{optional} between \texttt{<...>} is useless ; - \item the key \Cle{Unit} is useless too (uints can be configured in the environment !) + \item the \textit{optional} argument between \texttt{<...>} is discarded; + \item the key \Cle{Unit} is discarded too (units can be configured in the environment!) \end{itemize} \begin{PresentationCode}{} @@ -491,11 +491,11 @@ In this case : \subsection{Usage} -The package \textsf{PixelArtTikz} proposes an environment to create a PixelArt, and to add code after. +The package \textsf{PixelArtTikz} provides an environment to create a PixelArt and add code afterwards. \begin{itemize} - \item The environment is created within Ti\textit{k}Z and added code is to give in Ti\textit{k}Z ! - \item The added code will be print "above" the PixelArt ! + \item The environment is created within Ti\textit{k}Z and additional code is passed on to the Ti\textit{k}Z environment! + \item The additional code will be printed on top of the PixelArt! \end{itemize} \begin{PresentationCode}{listing only} @@ -504,25 +504,25 @@ The package \textsf{PixelArtTikz} proposes an environment to create a PixelArt, \end{EnvPixlArtTikz} \end{PresentationCode} -The first argument, \textit{optional} and between \texttt{[...]} proposes the \textsf{keys} : +The first argument, \textit{optional} and between \texttt{[...]}, proposes the \textsf{keys}: \begin{itemize} - \item the key \Cle{Codes} with the \textit{string} of \textit{simple} codes of the \textsf{csv} file ; - \item the key \Cle{Colors} with the \textit{list} of colors ; - \item the key \Cle{Symbols} with the \textit{optional list} of alt. symbols for the cases ; - \item the boolean \Cle{Correction} to color the PixelArt ;\hfill{}default \textsf{false} - \item the boolean \Cle{Symb} to print the symbols ;\hfill{}default \textsf{false} - \item the boolean \Cle{Border} to print borders of the cases ;\hfill{}default \textsf{true} + \item the key \Cle{Codes} with the \textit{string} of \textit{simple} codes of the \textsf{csv} file; + \item the key \Cle{Colors} with the \textit{list} of colors; + \item the key \Cle{Symbols} with the \textit{optional list} of alt.\ symbols for the cells; + \item the boolean \Cle{Correction} to color the PixelArt;\hfill{}default \textsf{false} + \item the boolean \Cle{Symb} to print the symbols;\hfill{}default \textsf{false} + \item the boolean \Cle{Border} to print borders of the cells;\hfill{}default \textsf{true} \item the key \Cle{Style} to specifythe style of the text. \hfill{}default \textsf{\textbackslash scriptsize} \end{itemize} -The second argument, \textit{optional} and between \texttt{<...>} are options -- in Ti\textit{k}Z -- to parse to the environment which create the PixelArt. +The second argument, \textit{optional} and between \texttt{<...>}, is for Ti\textit{k}Z options to be passed on to the environment which creates the PixelArt. \medskip The third argument, \textit{mandatory}, is the filename of the \textsf{csv}. -\subsection{Exemple} +\subsection{Example} The symbols are at the nodes $(c\,;\,-l)$ where $l$ and $c$ are the row and column of the data in the \textsf{csv} file. @@ -541,7 +541,73 @@ The symbols are at the nodes $(c\,;\,-l)$ where $l$ and $c$ are the row and colu \newpage -\part{Historique} +\section{Macro for \textit{mini-}PixelArt} + +\subsection{Idea} + +The idea is tu propose a macro to insert, without \textsf{csv} file, a small PixelArt with small colors list. + +\begin{PresentationCode}{listing only} + \MiniPixlArt[keys]{list of colors} +\end{PresentationCode} + +The first argument, \textit{optional} and between \texttt{[...]} proposes the \textsf{keys }: + +\begin{itemize} + \item the key \Cle{Unit} for dimension of the cells ;\hfill{}default \textsf{0.25em}, + \item the boolean \Cle{Border} to print a small border for the cells.\hfill{}default \textsf{false} +\end{itemize} + +The second argument, \textit{mandatory} and between \texttt{\{...\}}, is the colors of the cells : + +\begin{itemize} + \item each color is \textit{coded} by a letter : + \begin{multicols}{5} + \begin{itemize} + \item \texttt{R : \textcolor{red}{red}} + \item \texttt{G : \textcolor{green}{green}} + \item \texttt{C : \textcolor{cyan}{blue}} + \item \texttt{Y : \textcolor{yellow}{yellow}} + \item \texttt{B : \textcolor{black}{black}} + \item \texttt{L : \textcolor{lightgray}{gray}} + \item \texttt{. : \colorbox{lightgray}{\textcolor{white}{white}}} + \item \texttt{M : \textcolor{brown}{maroon}} + \item \texttt{O : \textcolor{orange}{orange}} + \item \texttt{P : \textcolor{violet}{purple}} + \end{itemize} + \end{multicols} + \item each linebreak is done by \texttt{,} ; + \item the thickness of the borders are 10\,\% of the unit. +\end{itemize} + +The last argument, \textit{optional} and between \texttt{<...>}, proposes options for the \textsf{tikz} environment. + +\subsection{Examples} + +\begin{PresentationCode}{} +\MiniPixlArt{% + ..RR..RR.., + .RRRRRRRR., + RRRRRRRRRR, + RRRRRRRRRR, + RRRRRRRRRR, + .RRRRRRRR., + ..RRRRRR.., + ...RRRR..., + ....RR.... +} +\end{PresentationCode} + +\begin{PresentationCode}{} +Inline, we can give \MiniPixlArt[Unit=5mm,Border]{BCGOYG,YLP.BR}<baseline=(current bounding box.center)> +this miniPA. +\end{PresentationCode} + +\pagebreak + +\part{History} + +\verb|v0.1.2|~:~~~~\textit{mini-}PixelArts \verb|v0.1.1|~:~~~~Bugfix with color diff --git a/Master/texmf-dist/doc/latex/pixelarttikz/PixelArtTikz-doc-fr.pdf b/Master/texmf-dist/doc/latex/pixelarttikz/PixelArtTikz-doc-fr.pdf Binary files differindex b70f4602650..51ae5d72dc1 100644 --- a/Master/texmf-dist/doc/latex/pixelarttikz/PixelArtTikz-doc-fr.pdf +++ b/Master/texmf-dist/doc/latex/pixelarttikz/PixelArtTikz-doc-fr.pdf diff --git a/Master/texmf-dist/doc/latex/pixelarttikz/PixelArtTikz-doc-fr.tex b/Master/texmf-dist/doc/latex/pixelarttikz/PixelArtTikz-doc-fr.tex index b65adfa8e5b..54f690e890c 100644 --- a/Master/texmf-dist/doc/latex/pixelarttikz/PixelArtTikz-doc-fr.tex +++ b/Master/texmf-dist/doc/latex/pixelarttikz/PixelArtTikz-doc-fr.tex @@ -43,8 +43,8 @@ \usepackage[margin=1.5cm]{geometry} \setlength{\parindent}{0pt} -\def\TPversion{0.1.1} -\def\TPdate{19 avril 2023} +\def\TPversion{0.1.2} +\def\TPdate{12 octobre 2023} \usepackage[most]{tcolorbox} \tcbuselibrary{minted} @@ -566,8 +566,73 @@ Les symboles affichés dans les cases sont situés aux nœuds de coordonnées $( \newpage +\section{La commande pour un \textit{mini-}PixelArt} + +\subsection{Idée} + +L'idée est de proposer une commande pour insérer, sans passer par un fichier \textsf{csv}, un petit PixelArt avec une liste de couleurs réduite. + +\begin{PresentationCode}{listing only} +\MiniPixelArt[clés]{liste des couleurs} +\end{PresentationCode} + +Le premier argument, \textit{optionnel} et entre \texttt{[...]} propose des \textsf{Clés} nécessaires au bon fonctionnement de la commande : + +\begin{itemize} + \item la clé \Cle{Unite} pour spécifier l'unité des cases ;\hfill{}défaut \textsf{0.25em} + \item le booléen \Cle{Bord} pour afficher une bordure aux cases.\hfill{}défaut \textsf{false} +\end{itemize} + +Le deuxième argument, obligatoire et entre \texttt{\{...\}} permet de donner les couleurs des cases : + +\begin{itemize} + \item chaque couleur est codée par une lettre : + \begin{multicols}{5} + \begin{itemize} + \item \texttt{R : \textcolor{red}{rouge}} + \item \texttt{V : \textcolor{green}{vert}} + \item \texttt{B : \textcolor{blue}{bleu}} + \item \texttt{J : \textcolor{yellow}{jaune}} + \item \texttt{N : \textcolor{black}{noir}} + \item \texttt{G : \textcolor{gray}{gris}} + \item \texttt{. : \colorbox{lightgray}{\textcolor{white}{blanc}}} + \item \texttt{M : \textcolor{brown}{marron}} + \item \texttt{O : \textcolor{orange}{orange}} + \item \texttt{P : \textcolor{violet}{violet}} + \end{itemize} + \end{multicols} + \item chaque \textit{passage à la ligne} est spécifié par \texttt{,} ; + \item les bords éventuels ont une épaisseur égale à 10\,\% de l'unité des carreaux. +\end{itemize} + +Le dernier argument, optionnel et entre \texttt{<...>}, permet quant à lui de passer des options à l'environnement \textsf{tikz} créé. + +\subsection{Exemples} + +\begin{PresentationCode}{} +\MiniPixelArt{% + ..RR..RR.., + .RRRRRRRR., + RRRRRRRRRR, + RRRRRRRRRR, + RRRRRRRRRR, + .RRRRRRRR., + ..RRRRRR.., + ...RRRR..., + ....RR.... +} +\end{PresentationCode} + +\begin{PresentationCode}{} +En ligne, on a \MiniPixelArt[Unite=5mm,Bord]{NBVOJV,JGP.NR}<baseline=(current bounding box.center)> ce miniPA. +\end{PresentationCode} + +\pagebreak + \part{Historique} +\verb|v0.1.2|~:~~~~Possibilité de créer des \textit{mini-}PixelArts + \verb|v0.1.1|~:~~~~Correction d'un bug avec les couleurs \verb|v0.1.0|~:~~~~Version initiale |