texlive[73140] Master/texmf-dist: tikzbricks (16dec24)
commits+karl at tug.org
commits+karl at tug.org
Mon Dec 16 21:50:11 CET 2024
Revision: 73140
https://tug.org/svn/texlive?view=revision&revision=73140
Author: karl
Date: 2024-12-16 21:50:10 +0100 (Mon, 16 Dec 2024)
Log Message:
-----------
tikzbricks (16dec24)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/tikzbricks/README.md
trunk/Master/texmf-dist/doc/latex/tikzbricks/tikzbricks-doc-settings.sty
trunk/Master/texmf-dist/doc/latex/tikzbricks/tikzbricks-doc.pdf
trunk/Master/texmf-dist/doc/latex/tikzbricks/tikzbricks-doc.tex
trunk/Master/texmf-dist/tex/latex/tikzbricks/tikzbricks.sty
Modified: trunk/Master/texmf-dist/doc/latex/tikzbricks/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tikzbricks/README.md 2024-12-16 20:49:59 UTC (rev 73139)
+++ trunk/Master/texmf-dist/doc/latex/tikzbricks/README.md 2024-12-16 20:50:10 UTC (rev 73140)
@@ -2,13 +2,13 @@
# TikZbricks
-[](http://www.latex-project.org/lppl.txt)
-[](https://github.com/samcarter/tikzbricks/releases/latest)
-[](https://ctan.org/pkg/tikzbricks)
+[](https://www.latex-project.org/lppl.txt)
+[](https://github.com/samcarter/tikzbricks/releases/latest)
+[](https://ctan.org/pkg/tikzbricks)
A small LaTeX package to draw bricks with TikZ. The user can modify the colour, shape and viewpoint.
-This project is licensed under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt .
+This project is licensed under the LaTeX Project Public License v1.3c or later, see https://www.latex-project.org/lppl.txt .
The project repository, including a bug tracker, can be found at https://github.com/samcarter/tikzbricks .
Modified: trunk/Master/texmf-dist/doc/latex/tikzbricks/tikzbricks-doc-settings.sty
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tikzbricks/tikzbricks-doc-settings.sty 2024-12-16 20:49:59 UTC (rev 73139)
+++ trunk/Master/texmf-dist/doc/latex/tikzbricks/tikzbricks-doc-settings.sty 2024-12-16 20:50:10 UTC (rev 73140)
@@ -21,7 +21,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage{xcolor}
\definecolor{samyellow}{RGB}{246,193,65}
-\definecolor{samorange}{RGB}{241,147,45}
+\definecolor{samorange}{RGB}{241,147,45}% pgfplotsthemebeamer
\definecolor{samred}{RGB}{191,26,46}% TikZbricks
\definecolor{sammagenta}{RGB}{170,42,104}% TikZmarmots
\definecolor{samviolet}{RGB}{136,46,114}% TikZlings
@@ -68,7 +68,7 @@
\RequirePackage{inconsolata}% mono font with bold, but italic is missing
% \RequirePackage[scale=0.85]{cascadia-code}
% \AddToHook{cmd/ttfamily/before}{\fontseries{sl}}
-\RequirePackage{iexec}
+\usepackage{synthslant}% to fake slented comments in inconsolata
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
@@ -75,60 +75,20 @@
% Listings
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\RequirePackage[
- cachedir=$TMPDIR/minted/
-]{minted}
+\RequirePackage[cachedir=./.minted]{minted}
-% smuggling custom pygmentize style in cache folder
-% (a real pygmentise style would need installtion in some python folder)
-\begin{filecontents*}[noheader]{./sam.pygstyle}
-\makeatletter
-\def\PYG at reset{\let\PYG at it=\relax \let\PYG at bf=\relax%
- \let\PYG at ul=\relax \let\PYG at tc=\relax%
- \let\PYG at bc=\relax \let\PYG at ff=\relax}
-\def\PYG at tok#1{\csname PYG at tok@#1\endcsname}
-\def\PYG at toks#1+{\ifx\relax#1\empty\else%
- \PYG at tok{#1}\expandafter\PYG at toks\fi}
-\def\PYG at do#1{\PYG at bc{\PYG at tc{\PYG at ul{%
- \PYG at it{\PYG at bf{\PYG at ff{#1}}}}}}}
-\def\PYG#1#2{\PYG at reset\PYG at toks#1+\relax+\PYG at do{#2}}
+\AddToHook{env/MintedVerbatim/before}{%
+ % optional arguments
+ \@namedef{PYG at tok@na}{\def\PYG at tc##1{\textcolor{black}{##1}}}%
+ % macros
+ \@namedef{PYG at tok@k}{\def\PYG at tc##1{\textcolor{listingcolor}{\bfseries ##1}}}%
+ % curly brakets
+ \@namedef{PYG at tok@nb}{\def\PYG at tc##1{\textcolor{listingcolor}{\bfseries ##1}}}%
+ % comments (italics won't work with the inconsolata font)
+ \@namedef{PYG at tok@c}{\def\PYG at tc##1{\textcolor{gray}{\textsynthslant{##1}}}}%
+}
-% optional arguments
-\expandafter\def\csname PYG at tok@na\endcsname{\def\PYG at tc##1{\textcolor{black}{##1}}}
-
-% macros
-\expandafter\def\csname PYG at tok@k\endcsname{\def\PYG at tc##1{\textcolor{listingcolor}{\bfseries ##1}}}
-% curly brakets
-\expandafter\def\csname PYG at tok@nb\endcsname{\def\PYG at tc##1{\textcolor{listingcolor}{\bfseries ##1}}}
-
-% comments (italics won't work with the inconsolata font)
-\expandafter\def\csname PYG at tok@c\endcsname{\def\PYG at tc##1{\textcolor{gray}{##1}}}
-
-\def\PYGZbs{\char`\\}
-\def\PYGZus{\char`\_}
-\def\PYGZob{\char`\{}
-\def\PYGZcb{\char`\}}
-\def\PYGZca{\char`\^}
-\def\PYGZam{\char`\&}
-\def\PYGZlt{\char`\<}
-\def\PYGZgt{\char`\>}
-\def\PYGZsh{\char`\#}
-\def\PYGZpc{\char`\%}
-\def\PYGZdl{\char`\$}
-\def\PYGZhy{\char`\-}
-\def\PYGZsq{\char`\'}
-\def\PYGZdq{\char`\"}
-\def\PYGZti{\char`\~}
-% for compatibility with earlier versions
-\def\PYGZat{@}
-\def\PYGZlb{[}
-\def\PYGZrb{]}
-\makeatother
-\end{filecontents*}
-
-\iexec{mkdir -p $TMPDIR/minted && mv sam.pygstyle $TMPDIR/minted/.}
-
-\usemintedstyle{sam}
+\usemintedstyle{default}
\setminted{
breaksymbolleft={},
tabsize=2,
Modified: trunk/Master/texmf-dist/doc/latex/tikzbricks/tikzbricks-doc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/tikzbricks/tikzbricks-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tikzbricks/tikzbricks-doc.tex 2024-12-16 20:49:59 UTC (rev 73139)
+++ trunk/Master/texmf-dist/doc/latex/tikzbricks/tikzbricks-doc.tex 2024-12-16 20:50:10 UTC (rev 73140)
@@ -8,18 +8,10 @@
% https://github.com/samcarter/TikZbricks
%
% Released under the LaTeX Project Public License v1.3c or later
-% See http://www.latex-project.org/lppl.txt
+% See https://www.latex-project.org/lppl.txt
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% !TeX program = txs:///arara
-% arara: latexmk: {
-% arara: --> engine: pdflatex,
-% arara: --> options: [
-% arara: --> '-shell-escape',
-% arara: --> '-synctex=1',
-% arara: --> '-interaction=nonstopmode',
-% arara: --> ]
-% arara: --> }
+% arara: latexmk
\documentclass{scrartcl}
% meta %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -34,7 +26,7 @@
\url{https://github.com/samcarter/TikZbricks}\\
\url{https://www.ctan.org/pkg/tikzbricks}
}{samcarter}}
-\date{Version v0.5 \textendash{} 2024/04/26}
+\date{Version v0.6 \textendash{} 2024/12/16}
\usepackage[
themecolor=samred
@@ -75,7 +67,7 @@
The package is included in both \texlive and \miktex and available from \CTAN (\url{https://ctan.org/pkg/tikzbricks}).
The development version of this package is located on github at \url{https://github.com/samcarter/TikZbricks}. If you have any problems, ideas or other feedback, please make constructive use of its bug tracker.
-Copyright \raisebox{0.2em}{\tiny\fontfamily{cmr}\selectfont\textcopyright} \texttt{samcarter}. Permission is granted to copy, distribute and\slash or modify this software under the terms of the \href{http://www.latex-project.org/lppl.txt}{LaTeX project public licence, version 1.3c or later}.
+Copyright \raisebox{0.2em}{\tiny\fontfamily{cmr}\selectfont\textcopyright} \texttt{samcarter}. Permission is granted to copy, distribute and\slash or modify this software under the terms of the \href{https://www.latex-project.org/lppl.txt}{LaTeX project public licence, version 1.3c or later}.
\section{Basic usage}
@@ -143,6 +135,11 @@
\brick[studtext={TikZ}]{2}{3}
\end{tikzpicture}
\end{tcblisting}
+\begin{tcblisting}{title={Brick text ()}}
+\begin{tikzpicture}
+ \brick[bricktext={TikZ}]{2}{3}
+\end{tikzpicture}
+\end{tcblisting}
All the above options are also available as package options to change the value for the whole document. The default colour can for example be specified like this:
\begin{tcolorbox}[title={Package options ()}]
Modified: trunk/Master/texmf-dist/tex/latex/tikzbricks/tikzbricks.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tikzbricks/tikzbricks.sty 2024-12-16 20:49:59 UTC (rev 73139)
+++ trunk/Master/texmf-dist/tex/latex/tikzbricks/tikzbricks.sty 2024-12-16 20:50:10 UTC (rev 73140)
@@ -9,10 +9,10 @@
% https://github.com/samcarter/TikZbricks
%
% Released under the LaTeX Project Public License v1.3c or later
-% See http://www.latex-project.org/lppl.txt
+% See https://www.latex-project.org/lppl.txt
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesPackage{tikzbricks}[2024/04/26 version v0.5 Drawing bricks with TikZ]
+\ProvidesPackage{tikzbricks}[2024/12/16 version v0.6 Drawing bricks with TikZ]
\RequirePackage{tikz}
\RequirePackage{tikz-3dplot}
@@ -29,13 +29,15 @@
\DeclareOptionX{studcolor}[\brick at color]{\def\brick at default@studcolor{#1}}
\DeclareOptionX{brickheight}[1.3]{\def\brick at default@height{#1}}
\DeclareOptionX{bricklength}[1.0]{\def\brick at default@length{#1}}
+\DeclareOptionX{bricktext}[]{\def\brick at default@facetext{#1}}
\DeclareOptionX{brickwidth}[1.0]{\def\brick at default@width{#1}}
\DeclareOptionX{studradius}[0.35]{\def\brick at default@radius{#1}}
\DeclareOptionX{studheight}[0.3]{\def\brick at default@studheight{#1}}
\DeclareOptionX{studtext}[]{\def\brick at default@text{#1}}
-\ExecuteOptionsX{color,frontcolor,topcolor,sidecolor,studcolor,brickheight,bricklength,brickwidth,studradius,studheight,studtext}
+\ExecuteOptionsX{color,frontcolor,topcolor,sidecolor,studcolor,brickheight,bricklength,bricktext,brickwidth,studradius,studheight,studtext}
+
\ProcessOptionsX
% counter to dermine the position of a brick in a wall
@@ -104,15 +106,17 @@
topcolor/.code = \def\brick at topcolor{#1},
topcolor = \brick at default@topcolor,
sidecolor/.code = \def\brick at sidecolor{#1},
- sidecolor = \brick at default@sidecolor,
+ sidecolor = \brick at default@sidecolor,
studcolor/.code = \def\brick at studcolor{#1},
- studcolor = \brick at default@studcolor,
+ studcolor = \brick at default@studcolor,
brickheight/.code = \def\brick at height{#1},
brickheight = \brick at default@height,
bricklength/.code = \def\brick at length{#1},
bricklength = \brick at default@length,
+ bricktext/.code = \def\brick at facetext{#1},
+ bricktext = \brick at default@facetext,
brickwidth/.code = \def\brick at width{#1},
- brickwidth = \brick at default@width,
+ brickwidth = \brick at default@width,
studradius/.code = \def\brick at radius{#1},
studradius = \brick at default@radius,
studheight/.code = \def\brick at studheight{#1},
@@ -134,42 +138,42 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Drawing the brick
- %
+ %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{scope}[tdplot_main_coords]
-
+
% Drawing faces
\pgfmathparse{sign(sin(\tdplotmainphi))}
\let\brick at sin\pgfmathresult
\pgfmathparse{sign(cos(\tdplotmainphi))}
- \let\brick at cos\pgfmathresult
-
+ \let\brick at cos\pgfmathresult
+
\ifnum\brick at sin<0
% Right
- \fill[\brick at sidecolor,thick]
+ \fill[\brick at sidecolor,thick]
(
\brick at length*\value{brickx},
\brick at width*\value{bricky},
\brick at height*\value{brickz}
- )
- -- ++(0,0,\brick at height)
- -- ++(0,\brick at width*#2,0)
- -- ++(0,0,-\brick at height)
+ )
+ -- ++(0,0,\brick at height)
+ -- ++(0,\brick at width*#2,0)
+ -- ++(0,0,-\brick at height)
-- cycle;
\else
% Left
- \fill[\brick at sidecolor,thick]
+ \fill[\brick at sidecolor,thick]
(
{\brick at length*(#1+\value{brickx})},
\brick at width*\value{bricky},
\brick at height*\value{brickz}
- )
- -- ++(0,0,\brick at height)
- -- ++(0,\brick at width*#2,0)
- -- ++(0,0,-\brick at height)
- -- cycle;
+ )
+ -- ++(0,0,\brick at height)
+ -- ++(0,\brick at width*#2,0)
+ -- ++(0,0,-\brick at height)
+ -- cycle;
\fi
-
+
\ifnum\brick at cos<0
% Front
\fill[\brick at frontcolor,thick]
@@ -178,12 +182,19 @@
{\brick at width*(#2+\value{bricky})},
\brick at height*\value{brickz}
)
- -- ++(\brick at length*#1,0,0)
- -- ++(0,0,\brick at height)
- -- ++(-\brick at length*#1,0,0)
+ -- ++(\brick at length*#1,0,0)
+ -- ++(0,0,\brick at height)
+ -- ++(-\brick at length*#1,0,0)
-- cycle;
+
+ \node[align=center, transform shape, canvas is zx plane at y=0, rotate=-90] at (
+ \brick at length*\value{brickx} + 0.5*\brick at length*#1,
+ {\brick at width*(#2+\value{bricky})},
+ \brick at height*\value{brickz} + 0.5*\brick at height
+ ) {\brick at facetext};
+
\else
- % Back
+ % Back
\fill[\brick at frontcolor,thick]
(
\brick at length*\value{brickx},
@@ -190,65 +201,65 @@
\brick at width*\value{bricky},
\brick at height*\value{brickz}
)
- -- ++(\brick at length*#1,0,0)
- -- ++(0,0,\brick at height)
- -- ++(-\brick at length*#1,0,0)
+ -- ++(\brick at length*#1,0,0)
+ -- ++(0,0,\brick at height)
+ -- ++(-\brick at length*#1,0,0)
-- cycle;
\fi
- % Top
- \fill[\brick at topcolor,thick]
+ % Top
+ \fill[\brick at topcolor,thick]
(
\brick at length*\value{brickx},
\brick at width*\value{bricky},
{\brick at height*(1+\value{brickz})}
)
- -- ++(0,\brick at width*#2,0)
- -- ++(\brick at length*#1,0,0)
- -- +(0,-\brick at width*#2,0)
+ -- ++(0,\brick at width*#2,0)
+ -- ++(\brick at length*#1,0,0)
+ -- +(0,-\brick at width*#2,0)
-- cycle;
-
-
+
+
% Drawing studs
\foreach \x in {1,...,#1}{
\foreach \y in {1,...,#2}{
-
+
% Bottom circle
- \fill[\brick at studcolor]
+ \fill[\brick at studcolor]
(
{\brick at length*(\x-0.5+\value{brickx})},
{\brick at width*(\y-0.5+\value{bricky})},
{\brick at height*(1+\value{brickz})}
- )
- circle [radius=\brick at radius];
-
+ )
+ circle [radius=\brick at radius];
+
% Rectangular stem
- \fill[\brick at studcolor]
+ \fill[\brick at studcolor]
(
{\brick at length*(\x-0.5+\value{brickx})},
{\brick at width*(\y-0.5+\value{bricky})},
{\brick at height*(1+\value{brickz})}
- )
- ++(canvas cs:x=-\brick at radius/0.35*10)
- -- ++(canvas cs:y=\brick at studheight*17.8)
- -- ++(canvas cs:x=\brick at radius/0.35*20)
+ )
+ ++(canvas cs:x=-\brick at radius/0.35*10)
+ -- ++(canvas cs:y=\brick at studheight*17.8)
+ -- ++(canvas cs:x=\brick at radius/0.35*20)
-- ++(canvas cs:y=-\brick at studheight*17.8);
-
+
% Top circle with text
- \fill[\brick at topcolor]
+ \fill[\brick at topcolor]
(
{\brick at length*(\x-0.5+\value{brickx})},
{\brick at width*(\y-0.5+\value{bricky})},
{\brick at height*(1+\value{brickz})}
- )
- ++(canvas cs:y=\brick at studheight*17.8)
- circle [radius=\brick at radius]
+ )
+ ++(canvas cs:y=\brick at studheight*17.8)
+ circle [radius=\brick at radius]
node[\brick at color,scale=\scalingfactor*0.5, font=\sffamily] {\brick at text};
}
}
-
+
\end{scope}
}
More information about the tex-live-commits
mailing list.