Math & ScienceConnected Nodes in Matrices

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
ghostanime2001
Posts: 402
Joined: Fri May 20, 2011 9:41 am

Connected Nodes in Matrices

Post by ghostanime2001 »

How do you use \Rnode, \rnode, \rput etc... inside matrices? I want to be able to connect one element to another element in different rows or columns. Also I want to set different styles for those elements. How do I use node connections with matrices? I receive an error.

Code: Select all

Code, edit and compile here:
\documentclass{article}
\usepackage{pst-node}
\begin{document}
$
\bordermatrix{%
& a & b & c \cr
A & \Rnode{a}{aA} & 0 & 0 \cr
B & 0 & \Rnode{b}{bB} & 0 \cr
C & 0 & 0 & \Rnode{c}{cC} \cr
}
$
\ncline{a}{b}
\end{document}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Last edited by ghostanime2001 on Thu Jul 25, 2013 2:12 am, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

tommytex
Posts: 39
Joined: Wed Jan 23, 2013 10:04 pm

Re: Connected Nodes in Matrices

Post by tommytex »

Hi,

i think you have to let latex create the matrix first, then "overpaint" with tikz nodes, something like Alain Matthes' example:

http://www.texample.net/tikz/examples/m ... terminant/
(therefore use tikz matrix environment)

greez tommytex :geek:
ghostanime2001
Posts: 402
Joined: Fri May 20, 2011 9:41 am

Re: Connected Nodes in Matrices

Post by ghostanime2001 »

I cannot use pstricks nodes ?
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Connected Nodes in Matrices

Post by localghost »

The provided code example works fine for me when compiled via LaTeX→DVI→PS→PDF.
Attachments
qtmp.png
qtmp.png (2.1 KiB) Viewed 8666 times
ghostanime2001
Posts: 402
Joined: Fri May 20, 2011 9:41 am

Re: Connected Nodes in Matrices

Post by ghostanime2001 »

can you post the code ?
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Re: Connected Nodes in Matrices

Post by cgnieder »

I think Thorsten means the code you posted. I tried it, too, and it worked for me as well, both compiled the way Thorsten mentioned and compilation vie XeLaTeX.

Regards
site moderator & package author
ghostanime2001
Posts: 402
Joined: Fri May 20, 2011 9:41 am

Re: Connected Nodes in Matrices

Post by ghostanime2001 »

oh I see, I was compiling with pdflatex instead of xelatex. I re-compiled my code with xelatex and I produced the same result.
Post Reply