• API
• FAQ
• Tools
• Archive
SHARE
TWEET

# 沙路法最小工作示例

a guest Mar 18th, 2019 48 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
1. \documentclass{minimal}
2.
3. \usepackage{pgf}
4. \usepackage{tikz}
5.
6. \usetikzlibrary{matrix}
7. % \usetikzlibrary{arrows}
8. % \usetikzlibrary{shapes}
9. % \usetikzlibrary{patterns}
10. % \usetikzlibrary{decorations.pathmorphing}
11. % \usetikzlibrary{positioning}
12. % \usetikzlibrary{fit}
13. % \usetikzlibrary{snakes}
14.
15.
16. \newcommand{\red}{\textcolor{red}}
17.
18.
19. \begin{document}
20.
21.  \begin{figure}[htbp]
22.    \centering
23.    \begin{tikzpicture}
24.      \matrix(A) [matrix of math nodes,nodes in empty cells,ampersand replacement=\&,row sep=15pt,column sep=15pt] {
25.        \&  a_{11} \& a_{12} \& a_{13}  \& \red{a_{11}} \& \red{a_{12}} \&\\
26.        \&  a_{21} \& a_{22} \& a_{23}  \& \red{a_{21}} \& \red{a_{22}} \&\\
27.        \&  a_{31} \& a_{32} \& a_{33}  \& \red{a_{31}} \& \red{a_{32}} \&\\
28.        -   \&    -        \&   -        \&               \&   +         \&   +        \& +\\
29.      };
30.      \draw[blue,thick] (A-1-2.center) -- (A-4-5.center);
31.      \draw[blue,thick] (A-1-3.center)  -- (A-4-6.center);
32.      \draw[blue,thick] (A-1-4.center) -- (A-4-7.center);
33.      \draw[red,thick,->] (A-1-6.center) -- (A-4-3.center);
34.      \draw[red,thick,->] (A-1-5.center) -- (A-4-2.center);
35.      \draw[red,thick,->] (A-1-4.center) -- (A-4-1.center);
36.    \end{tikzpicture}
37.    \caption{沙路法}
38.  \end{figure}
39.
40. \end{document}
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.

Top