[texhax] how to typeset a matrix
Reinhard Kotucha
reinhard.kotucha at web.de
Thu Mar 15 22:40:13 CET 2007
>>>>> "kyanh" == kyanh <kyanh at o2.pl> writes:
> Hello, I have searched through google but I could typeset the
> following matrix:
> http://img401.imageshack.us/img401/437/matrixxbr6.jpg
> [...]
> How can we typeset that matrix ?
I did not use LaTeX's picture environment for many years and I did not
use TikZ/pgf before, hence the following code is very ugly:
__________________________________________________________________
\documentclass{article}
\usepackage{tikz}
\begin{document}
\unitlength=1mm
\newcommand{\southeastarrow}{\begin{picture}(0,0)(0,0)
\put(0,-10){\tikz\draw[->] (0mm,0mm) -- (14mm,-12mm);}
\end{picture}}
\begin{displaymath}
\left(\begin{array}{ccc}
\southeastarrow a & \southeastarrow b & c \\
d & e & f \\
g & h & i \\
\end{array}\right)
\end{displaymath}
\end{document}
__________________________________________________________________
You will certainly find a better solution if you read the manuals more
carefully than I did. The TikZ/pgf manual is called pgfmanual.pgf.
http://ctan.org/tex-archive/graphics/pgf/doc/generic/pgf/version-for-pdftex/en/pgfmanual.pdf
Instead of TikZ/pgf you can also try \vector from LaTeX's picture
environment, but you should \usepackage{pict2e} which allows lines and
vectors to have arbitrary slopes.
You can also look into the XY-pic documentation, though I did not see
anything in the examples which is close to your problem and XY-pic
makes heavy use of special fonts while TikZ/pgf and pict2e can draw
straight lines with arbitrary slopes.
Even if you don't decide to use TikZ/pgf it doesn't hurt to browse the
manual. It makes as much fun as reading Hans' MataFun documentation.
Regards,
Reinhard
--
----------------------------------------------------------------------------
Reinhard Kotucha Phone: +49-511-4592165
Marschnerstr. 25
D-30167 Hannover mailto:reinhard.kotucha at web.de
----------------------------------------------------------------------------
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.
----------------------------------------------------------------------------
More information about the texhax
mailing list