Skip to content

Commit

Permalink
Merge pull request #7 from Qrrbrbirlbel/UntippedArrows
Browse files Browse the repository at this point in the history
Untipped, Centered and two new arrows
  • Loading branch information
Qrrbrbirlbel authored Apr 1, 2023
2 parents 7ca7df0 + d98d65d commit a277c35
Show file tree
Hide file tree
Showing 15 changed files with 742 additions and 51 deletions.
10 changes: 6 additions & 4 deletions doc/tikz-ext-manual-en-library-calendar-plus.tex
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,12 @@ \subsection{Week numbering (ISO~8601)}
%
\begin{codeexample}[preamble={\usetikzlibrary{ext.calendar-plus}}]
\tikz
\calendar [week list, month label above centered,
dates=2022-07-01 to 2022-07-31,
week label left,
every week/.append style={gray!50!black,font=\sffamily}];
\calendar[
week list, month label above centered,
dates=2022-07-01 to 2022-07-31,
week label left,
every week/.append style={
gray!50!black, font=\sffamily}];
\end{codeexample}
%
\end{stylekey}
Expand Down
2 changes: 1 addition & 1 deletion doc/tikz-ext-manual-en-library-misc.tex
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ \subsection{\tikzname}
\begin{multicols}{2}
\begin{key}{/tikz/reverse clip=\meta{direction} (default counter clockwise)}
This key installs a very big rectangle which is either constructed
|counter clockwise| (like the \referencePathOperationandIndexO{circle}
\texttt{counter clockwise} (like the \referencePathOperationandIndexO{circle}
path operation) or |clockwise|.
\end{key}
\begin{key}{/tikz/clip rule=\meta{direction} (default even odd)}
Expand Down
15 changes: 8 additions & 7 deletions doc/tikz-ext-manual-en-library-nodes.tex
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@ \subsection{Pic as a node}
for example as a label.
\begin{codeexample}[preamble=\usetikzlibrary{ext.nodes, ext.misc}]
\begin{tikzpicture}[
slsl/.pic={\draw (-2pt, 1.5pt) -- (2pt, .5pt)
(2pt, -1.5pt) -- (-2pt, -.5pt);}]
\node[draw, minimum width=3cm, minimum height=1cm,
label={[pic ] east:slsl},
label={[pic, rotate=90] north:slsl},
label={[pic ] west:slsl},
label={[pic, rotate=-90]south:slsl}]{};
slsl/.pic={\draw(-2pt, 1.5pt)--( 2pt, .5pt)
( 2pt,-1.5pt)--(-2pt,-.5pt);}]
\node[
draw, minimum width=3cm, minimum height=1cm,
label={[pic ] east:slsl},
label={[pic, rotate= 90]north:slsl},
label={[pic ] west:slsl},
label={[pic, rotate=-90]south:slsl}]{};
\end{tikzpicture}
\end{codeexample}
\end{key}
Expand Down
4 changes: 2 additions & 2 deletions doc/tikz-ext-manual-en-library-positioning-plus.tex
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,12 @@ \subsection{Useful placement keys for vertical and horizontal alignment}
\end{stylekey}
\begin{stylekey}{/tikz/span vertical=\meta{list of coordinates}}
Creates a rectangular node with the name |fit bounding box| that encompasses
the \meta{list of coordinates} \emph{and} sets the \referenceKeyandIndexO[/pgf]{minimum height} to
the \meta{list of coordinates} \emph{and} sets the \referenceKeyandIndexO[/pgf/]{minimum height} to
the height of this bounding box.
\end{stylekey}
\begin{stylekey}{/tikz/span horizontal=\meta{list of coordinates}}
Creates a rectangular node with the name |fit bounding box| that encompasses
the \meta{list of coordinates} \emph{and} sets the \referenceKeyandIndexO[/pgf]{minimum width} to
the \meta{list of coordinates} \emph{and} sets the \referenceKeyandIndexO[/pgf/]{minimum width} to
the width of this bounding box.
\end{stylekey}
\begin{stylekey}{/tikz/span=\meta{list of coordinates}}
Expand Down
13 changes: 10 additions & 3 deletions doc/tikz-ext-manual-en-main-body.tex
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@
% 2. under the GNU Free Documentation License.
%
\newcommand*\tikzextname{Ti\textit kZ-Extensions}
\newcommand*\tikzextversion{0.5}
\newcommand*\tikzextversion{0.5.1}
%\includeonly{
% tikz-ext-manual-en-library-misc,
% tikz-ext-manual-en-library-nodes,
%% tikz-ext-manual-en-library-misc,
%% tikz-ext-manual-en-library-nodes,
% tikz-ext-manual-en-pgf-arrows,
%}
\begin{document}
{\colorlet{blue}{black}% links shall be black
Expand Down Expand Up @@ -126,6 +127,7 @@ \part{\pgfname\space Libraries}
\end{codeexample}
\end{center}

\tikzsetfigurename{PGF.arrows}\include{tikz-ext-manual-en-pgf-arrows}
\tikzsetfigurename{PGF.trans}\include{tikz-ext-manual-en-pgf-trans}
\tikzsetfigurename{PGF.shapes}%
\include{tikz-ext-manual-en-pgf-shapes-circlearrow}
Expand Down Expand Up @@ -180,6 +182,11 @@ \part{Changelog, Index \& References}
\section*{Changelog}\addcontentsline{toc}{section}{Changelog}
\begin{multicols}{2}\raggedright
\noindent
Version 0.5.1
\begin{itemize}
\item \addPGF{arrows}
\item Bugfix to |ext.pgfkeys-plus|. \cite{GH6}
\end{itemize}
Version 0.5
\begin{itemize}
\item \addPackage{pgffor}
Expand Down
65 changes: 48 additions & 17 deletions doc/tikz-ext-manual-en-main-preamble.tex
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,6 @@
\tracinglostchars=3

\input{pgfmanual-en-macros}
\newenvironment{pgfkeyslibrary}[1]{% from pgfmanual-en-macros
\begin{pgfmanualentry}%
\pgfmanualentryheadline{%
\pgfmanualpdflabel{#1}{}%
\textbf{pgfkeys Library} \texttt{\declare{#1}}}%
\index{#1@\protect\texttt{#1} pgfkeys library}%
\index{pgfkeys Libraries!#1@\protect\texttt{#1}}%
\vskip.25em
{{\ttfamily\char`\\usepgfkeyslibrary\char`\{\declare{#1}\char`\}\space\space \char`\%\space\space \LaTeX\space and plain \TeX}}\\
{{\ttfamily\char`\\usepgfkeyslibrary[\declare{#1}]\space \char`\%\space\space Con\TeX t}}\\[.5em]%
\pgfmanualbody
}%
{%
\end{pgfmanualentry}%
}

\usepackage{unicode-math}
\setmathfont[Scale=MatchUppercase]{libertinusmath-regular.otf}
Expand Down Expand Up @@ -104,8 +89,9 @@
\@tempswatrue
\fi}
\makeatother

\usepgfkeyslibrary{ext.pgfkeys-plus}
\usetikzlibrary{
ext.arrows,
ext.calendar-plus,
ext.misc,
ext.node-families,
Expand Down Expand Up @@ -408,6 +394,12 @@
\index{#1@\originalprefix\protect\texttt{\original{#1}} environment\originalsuffix}%
\index{Environments!#1@\originalprefix\protect\texttt{\original{#1}}\originalsuffix}%
}

\newcommand*{\indexArrowtipO}[1]{%
\index{#1@\originalprefix\protect\texttt{\original{#1}} arrow tip\originalsuffix}%
\index{Arrow tips!#1@\originalprefix\protect\texttt{\original{#1}}\originalsuffix}%
}
\newcommand*{\referenceArrowtipandIndexO}[1]{\texttt{#1}\indexArrowtipO{#1}}
\newcommand*{\referenceEnvironmentandIndexO}[1]{\texttt{#1}\indexEnvironmentO{#1}}
\newcommand*{\referenceDecorationandIndexO}[1]{\texttt{#1}\indexDecorationO{#1}}
\newcommand*{\referenceKeyandIndexO}[2][/tikz/]{\texttt{#1#2}\indexKeyO[#1]{#2}}
Expand Down Expand Up @@ -500,4 +492,43 @@
}
{
\end{pgfmanualentry}
}
}

\usepackage{booktabs}

\renewenvironment{arrowtip}[4]{
\begin{pgfmanualentry}
\pgfmanualentryheadline{\textbf{Arrow Tip Kind} {\ttfamily#1}}
\index{#1@\protect\texttt{#1} arrow tip}%
\index{Arrow tips!#1@\protect\texttt{#1}}%
\pgfmanualbody
\def\currentarrowtype{#1}
\begin{minipage}[t]{\dimexpr\linewidth-5cm\relax}
#2
\end{minipage}\hskip5mm\begin{minipage}[t]{4.75cm}
\leavevmode\vskip-2em
\tikz{
\draw [black!50,line width=5mm,-{#1[#3,color=black]}] (-4,0) -- (0,0);
\foreach \action in {#4}
{ \expandafter\processaction\action\relax }
}
\end{minipage}\par\smallskip
}
{
\end{pgfmanualentry}
}
\makeatletter
\def\arrowexample@#1[#2]{%
{\sfcode`\.1000\scriptsize\texttt{#1[#2]}} \>
\tikz [baseline,>={#1[#2]}] \draw [line
width=0.4pt,->] (0,.5ex) -- (2em,.5ex); thin \>
\tikz [baseline,>={#1[#2]}] \draw [line
width=0.8pt,->] (0,.5ex) -- (2em,.5ex); \textbf{thick} \>
\tikz [baseline,>={#1[#2]}] \draw [line
width=1.6pt,->] (0,.5ex) -- (3em,.5ex); \\
}
\def\manual@action@radius#1/#2/#3\relax{%
\draw [red,|<->|,semithick] ([xshift=-#1,yshift=#1]current bounding
box.north east) -- node [above, overlay] {\texttt{radius}} ++(-#1,0);
}
\makeatother
Loading

0 comments on commit a277c35

Please sign in to comment.