As I said, I'm writing math books for school; one of them is about matrices and I have several problems with it.
It's a big code, so I'm trying to summarize it:
Problem with TikZ matrix: When I try to compile it something like
\draw [<->, yl] (A-2-4.north) to [bend left] node [arrow style mul] {$+$} (B-2-4.north);using the
tikzpackage and the followingtikzlibraries:\usepackage{tikz} \usetikzlibrary{decorations.pathmorphing} \usetikzlibrary{decorations.markings} \usetikzlibrary{shapes,snakes,calc,arrows} \usetikzlibrary{intersections,through,backgrounds} \usetikzlibrary{shapes.arrows,chains,positioning} \usetikzlibrary{matrix,decorations.pathmorphing}I get
No shaped name A-2-4 is known. See the pgf package documentation for explanationAnd when I try to compile this (using
\include{filename}):\chapterimage{m2summary.pdf} \chapter{Respostas e soluções} \begin{multicols}{2} \section*{\textcolor{ocre}{1. Matrizes}} \subsection*{Exercícios de fixação} \begin{enumerate}[label=\arabic*.] \tiny{ \item $\ds A=\begin{bmatrix} 0 & -1 & -2 \\ 1 & 0 & -1 \\ 2 & 1 & 0 \end{bmatrix}$ } \end{enumerate} \end{multicols}it shows:
Missing $ inserted. HOW? I tried to compile with no text, actually, with no math text, and it keeps showing that $ is missing. I really don't know what to do!
Sorry for making this long post, I just tried to be as complete as I can. And I use WinEdt 8, MikTeX 2.9 that I installed this week (February 2014).
Code of TIKZ pic:
\begin{tikzpicture}
\matrix(A)[matrix of math nodes, nodes={node style ge}, left delimiter={[}, right delimiter={]}] at (0,0){
a_{11} & a_{12} & \cdots & a_{1n} \\
\node[node style sp] {a_{21}}; & \node[node style sp] {a_{22}}; & \cdots & \node[node style sp] {a_{2n}}; \\
\vdots & \vdots & \ddots & \vdots \\
a_{m1} & a_{m2} & \cdots & a_{mn} \\
};
\node [draw, above=10pt] at (A.north) {matriz $\color{ocre}A$};
\node [right=20pt] at (A.east) {$\color{ocre}+$};
\matrix(B)[matrix of math nodes, nodes={node style ge}, left delimiter={[}, right delimiter={]}] at (6,0){
b_{11} & b_{12} & \cdots & b_{1n} \\
\node[node style sp] {b_{21}}; & \node[node style sp] {b_{22}}; & \cdots & \node[node style sp] {b_{2n}}; \\
\vdots & \vdots & \ddots & \vdots \\
b_{m1} & b_{m2} & \cdots & b_{mn} \\
};
\node [draw, above=10pt] at (B.north) {matriz $\color{ocre}B$};
\matrix(C)[matrix of math nodes, nodes={node style ge}, left delimiter={[}, right delimiter={]}] at (6,-4.5){
c_{11} & c_{12} & \cdots & c_{1n} \\
\node[node style sp, ocre] {c_{21}}; & \node[node style sp, blue] {c_{22}}; & \cdots & \node[node style sp, yl] {c_{2n}}; \\
\vdots & \vdots & \ddots & \vdots \\
c_{m1} & c_{m2} & \cdots & c_{mn} \\
};
\node [draw, below=10pt] at (C.south) {matriz $\color{ocre}C=A+B$};
\node (a) [above=10pt] at (A-2-1.north) {};
\node (b) [above=10pt] at (C-2-1.north) {};
\draw [<->, yl] (A-2-4.north) to [bend left] node [arrow style mul] {$+$} (B-2-4.north);
\draw [->, yl] (B-2-4.south) to (C-2-4.north);
\draw [<->, blue] (A-2-2.north) to [bend left] node [arrow style mul] {$+$} (B-2-2.north);
\draw [->, blue] (B-2-2.south) to (C-2-2.north);
\draw [<->, ocre] (A-2-1.north) to [bend left] node [arrow style mul] {$+$} (B-2-1.north);
\draw [->, ocre] (B-2-1.south) to (C-2-1.north);
\end{tikzpicture}

\documentclass{...}, the required\usepackage's,\begin{document}, and\end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. – jub0bs Mar 02 '14 at 20:12