Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

ASHes to ASHes, DOS to DOS.


computers / comp.text.tex / tikz' matrix customization and trying to use a repeating macro to define nodes

SubjectAuthor
o tikz' matrix customization and trying to use a repeating macro toDave94705

1
tikz' matrix customization and trying to use a repeating macro to define nodes

<df9fb816-aca7-4f10-a586-0d7368431260n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=3647&group=comp.text.tex#3647

  copy link   Newsgroups: comp.text.tex
X-Received: by 2002:ac8:570a:: with SMTP id 10mr7745247qtw.360.1622297154743;
Sat, 29 May 2021 07:05:54 -0700 (PDT)
X-Received: by 2002:a05:622a:356:: with SMTP id r22mr2087569qtw.363.1622297154544;
Sat, 29 May 2021 07:05:54 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.text.tex
Date: Sat, 29 May 2021 07:05:54 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=45.30.90.187; posting-account=TEWWXwoAAABVTlovvE5oUyiszPAiy7tz
NNTP-Posting-Host: 45.30.90.187
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <df9fb816-aca7-4f10-a586-0d7368431260n@googlegroups.com>
Subject: tikz' matrix customization and trying to use a repeating macro to
define nodes
From: david.jobman.schwartz@gmail.com (Dave94705)
Injection-Date: Sat, 29 May 2021 14:05:54 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Dave94705 - Sat, 29 May 2021 14:05 UTC

There is very likely a much better way to do this, but I sure cannot figure it out.

I want to create a flow diagram and I am using the matrix function. But not all rows have the same width and not all columns have the same height. I set it up as a matrix and then added points around it.

In below example:

1) Is there a way to set up the starting matrix definitions of \node (A1) {A1} ... as a line by line macro so instead of 3 by 3, I have 3 calls to a macro with the first call defining the As, etc? I have tried (basic) looping but if nothing else the & throws things. I want a macro so I can generalize dimension and save typing.
2) The only way I seem to successfully get to points outside the matrix like AA1 and CC3 is using \coordinate for each point I want. \draw using +() at the starting point works but not at the ending point (++ is the same) see \draw[purple] (A1) -- (A3)+(0,0.75cm); which ignores the +(0,0.75cm).
3) \draw[green, yshift=0.25cm] (B1) -- (B3); ignores the yshift. If yshift worked it would solve my problem nicely.
4) \draw's line to a node seems to stop at the node boundary but coordinates made by adding to a node seems to be from the center of the node. Anyway to have \draw go to node's center?

Thanks for any help.

\documentclass{article}
\usepackage{tikz}

\begin{document}
% starting with manual page 332
\normalsize
\begin{tikzpicture}
\matrix[column sep=8mm,row sep=3mm]
{
\node (A1) {A1}; & \node (A2) {A2};& \node (A3) {A3};
\\
\node (B1) {B1}; & \node (B2) {B2};& \node (B3) {B3};
\\
\node (C1) {C1}; & \node (C2) {C2};& \node (C3) {C3};
\\
\node (D1) {}; & \node (D2) {};& \node (D3) {};
\\
};
\coordinate[yshift=1.0cm] (AA1) at (A1);
\coordinate[yshift=1.0cm] (AA3) at (A3);
\coordinate[yshift=-0.35cm] (CC1) at (C1);
\coordinate[yshift=-0.35cm] (CC3) at (C3);
\begin{scope}%[every path/.style=line]
\draw[red] (A1) -- (AA1) -- (AA3) -- (A3);
\draw[dotted] (A1) -- (A3)+(0,0.75cm);
%
\draw[blue, dashed] (B1)+(0,0.25cm)-- (B3);
\draw[green, yshift=0.25cm] (B1) -- (B3);
%
\draw[dotted, purple] (C1) -- (C3)+(0,-0.25cm);
\draw (CC1) -- (CC3);
% \draw[orange] (D1) -- (D3);
\end{scope}
\end{tikzpicture}
\end{document}


computers / comp.text.tex / tikz' matrix customization and trying to use a repeating macro to define nodes

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor