summaryrefslogtreecommitdiff
path: root/graphics/pgf/contrib/tikzdotncross/doc/tikzdotncross.tex
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/pgf/contrib/tikzdotncross/doc/tikzdotncross.tex')
-rw-r--r--graphics/pgf/contrib/tikzdotncross/doc/tikzdotncross.tex65
1 files changed, 34 insertions, 31 deletions
diff --git a/graphics/pgf/contrib/tikzdotncross/doc/tikzdotncross.tex b/graphics/pgf/contrib/tikzdotncross/doc/tikzdotncross.tex
index 4e51d2daf3..0719876146 100644
--- a/graphics/pgf/contrib/tikzdotncross/doc/tikzdotncross.tex
+++ b/graphics/pgf/contrib/tikzdotncross/doc/tikzdotncross.tex
@@ -15,7 +15,7 @@
%%
%% The Current Maintainer of this work is Alceu Frigeri
%%
-%% This is version {1.0} {2024/01/03}
+%% This is version {1.1} {2024/01/11}
%%
%% The list of files that compose this work can be found in the README.md file at
%% https://ctan.org/pkg/tikzdotncross
@@ -30,18 +30,18 @@
\usepackage[american,siunitx,cuteinductors,smartlabels,arrowmos,EFvoltages,betterproportions]{circuitikz}
\usetikzlibrary{math}
\usepackage{tikzdotncross}
-
\RequirePackage[hidelinks,hypertexnames=false]{hyperref}
\begin{document}
\tstitle{
author={Alceu Frigeri\footnote{\tsverb{https://github.com/alceu-frigeri/tikzdotncross}}},
date={\tsdate},
- title={Marking Coordinates and Crossing Paths\break Version \PkgInfo{tikzdotncross}{version}}
+ title={The tikzdotncross Package\break Marking Coordinates and Crossing Paths\break Version \PkgInfo{tikzdotncross}{version}}
}
-\begin{typesetabstract}
-This is a small package that offers a few alternative ways for declaring and marking coordinates and drawing a line with ``jumps'' over an already given path, which is a quite common issue when drawing, for instace, Electronics Circuits (like with \tsobj[pkg]{CircuiTikZ}).
+\begin{typesetabstract}
+
+This package offers a few alternative ways for declaring and marking coordinates and drawing a line with ``jumps over'' an already given path, which is a quite common issue when drawing, for instance, Electronics Circuits, e.g. \tsobj[pkg]{CircuiTikZ}.
\end{typesetabstract}
%\tableofcontents
@@ -60,7 +60,7 @@ Those are based on some ideas from Redaelli et al. (\tsobj[pkg]{CircuiTikZ}). Ma
\tsmacro{\showcoordstrue}{}
\tsmacro{\showcoordsfalse}{}
\end{codesyntax}
-These will affect how \tsobj{\ncoord,\dotcoord,\odotcoord} will behave, with \tsobj{\showcoordstrue} a red pin will also be added to the newly defined coordinate/node.
+These will affect how \tsobj{\ncoord,\dotcoord,\odotcoord} will behave, with \tsobj{\showcoordstrue} a red pin will also be added to the newly defined coordinate/node. The initial state is \tsobj{\showcoordsfalse}. It can be turned on/off as needed.
\end{codedescribe}
\begin{codedescribe}{\ncoord,\pincoord}
@@ -73,7 +73,7 @@ These will affect how \tsobj{\ncoord,\dotcoord,\odotcoord} will behave, with \ts
\end{codesyntax}
The \tsobj{\ncoord} always expects a single parameter \tsobj[parg]{coord}. A coordinate named \tsobj[marg]{coord} and node named n\tsobj[marg]{coord} (a ``n'' is added as a prefix) will be created for later use/reference. If \tsobj{\showcoordstrue} is en force, it will also add a pin.
-The \tsobj{\pincoord} expects one to 4 parameters, as listed. If omitted, the default value for distance is 4 (unit: pt), the default value for the angle is -45 (degrees), the default value for color is blue.
+The \tsobj{\pincoord} always draws a pin, besides declaring a coordinate and node as \tsobj{\ncoord}. It expects one to 4 parameters, as listed. If omitted, the default value for distance is 4 (unit: pt), the default value for the angle is -45 (degrees), the default value for color is blue.
In fact, the \tsobj{\coord(name)} is just a short cut for \tsverb{\pincoord(name,red,45)}, if \tsobj{\showcoordstrue}.
\end{codedescribe}
@@ -119,7 +119,10 @@ The star version flips the semi-circles.
The default \tsobj[oarg]{cross-name} is ``cross''. It may contain only characters, as any valid \TeX\ macro name. The default \tsobj[oarg]{width} of the semi-circle is 7pt.
\end{tsremark}
\begin{tsremark}
- This is based on the \tsobj[pkg]{tikz} library \tsobj[pkg]{intersetions}, inheriting it's limitations. The main one: It only detects crossings over ``soft paths'', this means, if the line defined by \tsobj[marg]{coordA} and \tsobj[marg]{coordB} crosses over a node, it won't detect it.
+ This is based on the \tsobj[pkg]{tikz} library \tsobj[pkg]{intersetions}, inheriting it's limitations. The main one: It only detects crossings over ``soft paths'', this means, if the line defined by \tsobj[marg]{coordA} and \tsobj[marg]{coordB} crosses over a node, it will, in most cases, miss it (depends on how the node is draw and interacts with the soft path system).
+\end{tsremark}
+\begin{tsremark}
+ When using the crossing coordinates, like (\tsobj[oarg]{cross-name}-i), be aware that in some ill-defined cases, \tsobj[pkg]{intersections} might detect a crossing either at the starting and/or ending points. \tsobj{\pathcross} accounts for that, but you will be left with some extra reference coordinates, either the first one, last one or both.
\end{tsremark}
\end{codedescribe}
@@ -137,26 +140,26 @@ A first example with \tsobj{\showcoordstrue} (showing all coordinates defined wi
\draw[name path=base circ]
(0,0) \dotcoord(A) to[V,invert,l=$v_i(t)$] ++(0,2) -- ++(0,1) \ncoord(Y)
to[R=$R_i$] ++(2,0)
- to[C] ++(1,0) \pincoord(B1) ++(1,0) \ncoord(B)
+ to[C] ++(1,0) \pincoord(A1) ++(1,0) \ncoord(B)
++(1,0) node[pnp,anchor=B] (T1){}
(A) -- (A -| B) to[R=$R_{b_2}$] ++(0,2) \ncoord(Bb) (B) ++(0,1) \ncoord(Cb) to[R=$R_{b_1}$] ++(0,2) \ncoord(C)
- (T1.C) to[R,l=$R_c$] (T1.C |- A) -- (A)
- (T1.E) to[R,l_=$R_e$] (T1.E |- C) -- (C -| A) -- ++(-2,0) \ncoord(X) to[V,l=$V_{cc}$] (X |- A) -- (A)
+ (T1.C) to[R,l_=$R_c$] (T1.C |- A) -- (A)
+ (T1.E) to[R,l=$R_e$] (T1.E |- C) -- (C -| A) -- ++(-2,0) \ncoord(X) to[V,l=$V_{cc}$] (X |- A) -- (A)
(T1.C) -- ++(1,0) node[ocirc]{} \ncoord(k) to[open,v=$v_o(t)$] (k |- A) node[ocirc]{} -- (A)
- (Bb) -- (Cb);
+ (Bb) -- (Cb)
;
%% These are just a few, marked, coords (they could be part of the previous path
%%
- \path (T1.E) ++(1,0) \pincoord(X1) ++(-10,2) \pincoord(X2)
- (X1) ++(0,-1) \pincoord(X1b) (X2) ++(0,-1) \pincoord(X2b)
- (T1.C) ++(0.5,-0.5) \pincoord(X1a) (T1.C) ++(-9,0) \pincoord(X2a)
- (T1.B) \pincoord(B2,blue,225)
+ \path (T1.E) ++(1,0) \pincoord(B1) ++(-10,2) \pincoord(B2)
+ (B1) ++(0,-1) \pincoord(D1) (B2) ++(0,-1) \pincoord(D2)
+ (T1.C) ++(0.5,-0.5) \pincoord(C1) (T1.C) ++(-9,0) \pincoord(C2)
+ (T1.B) \odotpincoord(A2,blue,225)
;
%% And that's all, a few crossing lines
%%
- \pathcross{B1}{T1.B}{base circ}[4pt] \draw (Y) +(0,1.7) node(){N.cross A:\crossT};
- \pathcross*{X1}{X2}{base circ}[3pt] \draw (Y) +(0,1.3) node(){N.cross B:\crossT};
- \pathcross[sec]{X2a}{X1a}{base circ}[6pt] \draw (Y) +(0,0.9) node(){N.cross C:\secT};
+ \pathcross{A1}{A2}{base circ}[4pt] \draw (Y) +(0,1.7) node(){N.cross A:\crossT};
+ \pathcross*{B1}{B2}{base circ}[3pt] \draw (Y) +(0,1.3) node(){N.cross B:\crossT};
+ \pathcross*[sec]{C1}{C2}{base circ}[6pt] \draw (Y) +(0,0.9) node(){N.cross C:\secT};
\end{tikzpicture}
}
@@ -170,7 +173,7 @@ And the same with \tsobj{\showcoordsfalse}
\tsresult*[emph={draw,node,ncoord,pincoord,dotcoord,odotcoord},emph2={pathcross},emph3={name,path},basicstyle={\scriptsize\ttfamily},numbers=left]{crossdemoA}
\newpage
-As said, the main limitation (derived from how \tsobj[pkg]{intersections} works) is that crossings between the line and nodes aren't detected at all. So if someone tries to connect the nodes \tsobj[key]{X1b,X2b}, it will result:
+As said, the main limitation (derived from how \tsobj[pkg]{intersections} works) is that crossings between the line and nodes might not be detected at all. For example, if someone tries to connect the nodes \tsobj[key]{D1,D2}, it will, unfortunately, fail detecting the node (pnp transistor) entirely:
\begin{codestore}[crossdemoC]
\resizebox{0.5\textwidth}{!}{
@@ -178,27 +181,27 @@ As said, the main limitation (derived from how \tsobj[pkg]{intersections} works)
%% This is the reference, named path
%%
\draw[name path=base circ]
- (0,0) \ncoord(A) to[V,invert,l=$v_i(t)$] ++(0,2) -- ++(0,1) \ncoord(Y)
+ (0,0) \dotcoord(A) to[V,invert,l=$v_i(t)$] ++(0,2) -- ++(0,1) \ncoord(Y)
to[R=$R_i$] ++(2,0)
- to[C] ++(1,0) \pincoord(B1) ++(1,0) \ncoord(B)
+ to[C] ++(1,0) \pincoord(A1) ++(1,0) \ncoord(B)
++(1,0) node[pnp,anchor=B] (T1){}
(A) -- (A -| B) to[R=$R_{b_2}$] ++(0,2) \ncoord(Bb) (B) ++(0,1) \ncoord(Cb) to[R=$R_{b_1}$] ++(0,2) \ncoord(C)
- (T1.C) to[R,l=$R_c$] (T1.C |- A) -- (A)
- (T1.E) to[R,l_=$R_e$] (T1.E |- C) -- (C -| A) -- ++(-2,0) \ncoord(X) to[V,l=$V_{cc}$] (X |- A) -- (A)
+ (T1.C) to[R,l_=$R_c$] (T1.C |- A) -- (A)
+ (T1.E) to[R,l=$R_e$] (T1.E |- C) -- (C -| A) -- ++(-2,0) \ncoord(X) to[V,l=$V_{cc}$] (X |- A) -- (A)
(T1.C) -- ++(1,0) node[ocirc]{} \ncoord(k) to[open,v=$v_o(t)$] (k |- A) node[ocirc]{} -- (A)
- (Bb) -- (B) -- (Cb);
+ (Bb) -- (Cb)
;
%% These are just a few, marked, coords (they could be part of the previous path
%%
- \path (T1.E) ++(1,0) \pincoord(X1) ++(-10,2) \pincoord(X2)
- (X1) ++(0,-1) \pincoord(X1b) (X2) ++(0,-1) \pincoord(X2b)
- (T1.C) ++(0.5,-0.5) \pincoord(X1a) (T1.C) ++(-9,0) \pincoord(X2a)
- (T1.B) \pincoord(B2,blue,225)
+ \path (T1.E) ++(1,0) \pincoord(B1) ++(-10,2) \pincoord(B2)
+ (B1) ++(0,-1) \pincoord(D1) (B2) ++(0,-1) \pincoord(D2)
+ (T1.C) ++(0.5,-0.5) \pincoord(C1) (T1.C) ++(-9,0) \pincoord(C2)
+ (T1.B) \pincoord(A2,blue,225)
;
%% And that's all, a few crossing lines
%%
- \pathcross{B1}{T1.B}{base circ}[4pt] \draw (Y) +(0,2) node(){N.cross A:\crossT};
- \pathcross[sec]{X2b}{X1b}{base circ}[6pt] \draw (Y) +(0,1.6) node(){N.cross B:\secT};
+ \pathcross{A1}{A2}{base circ}[4pt] \draw (Y) +(0,2) node(){N.cross A:\crossT};
+ \pathcross[sec]{D2}{D1}{base circ}[6pt] \draw (Y) +(0,1.6) node(){N.cross D:\secT};
\end{tikzpicture}
}
\end{codestore}