答案1
答案2
这些东西很容易让人联想到杨的画作,那么为什么不在这里使用它们呢?
\documentclass{article}
\usepackage{young}
\usepackage{tikz}
\usetikzlibrary{calc}
\newcommand{\tikznode}[2]{\tikz[remember picture,baseline=(#1.base),inner
sep=0pt]{\node(#1)[inner sep=0pt]{#2};}}
\begin{document}
\[
\begin{tabular}{l}
\begin{Young}
& & & & \cr
& & & \cr
~& ~& \tikznode{13}{~} \cr
~& \tikznode{12}{~}\cr
\tikznode{11}{~} \cr
\end{Young}\\[1cm]
\begin{Young}
\tikznode{21}{~} & \tikznode{22}{~}& \tikznode{23}{~} \cr
& & \cr
\tikznode{24}{~} & \tikznode{25}{~}\cr
\end{Young}\\[1cm]
\begin{Young}
\tikznode{31}{~} & \tikznode{32}{~}\cr
\tikznode{33}{~}\cr
\end{Young}\\[1cm]
\begin{Young}
\tikznode{41}{~}\cr
\end{Young}
\end{tabular}
\]
\begin{tikzpicture}[overlay,remember picture]
\foreach \X/\Y in {11/21,12/22,13/23,24/31,25/32,33/41}
\draw[thick,-latex] ($(\X.south)-(0,2pt)$)--($(\Y.north)+(0,8pt)$);
\end{tikzpicture}
\end{document}
答案3
忘记tikz
。 堆叠它! 这里,\sq
为正方形,\vl
为垂直线段,\ah
为向下指向的箭头。
\documentclass{article}
\usepackage{graphicx,amssymb}
\usepackage[usestackEOL]{stackengine}
\newcommand\sq{\framebox(10,10){}\kern\fboxrule}
\newcommand\vl{\rule{0pt}{10pt}\makebox[\dimexpr10pt+\fboxrule]{%
\smash{\rule[0\fboxrule]{\fboxrule}{\dimexpr10pt+\fboxrule}}}}
\newcommand\ah{\smash{\makebox[\dimexpr10pt+\fboxrule]{\raisebox{3pt}{%
\scalebox{.5}[-.5]{$\blacktriangle$}}}}}
\def\stackalignment{l}
\setstackgap{S}{\fboxrule}
\begin{document}
\Shortunderstack{\sq\sq\sq\sq\sq\\\sq\sq\sq\sq\\\sq\sq\sq\\\sq\sq\vl\\%
\sq\vl\vl\\\vl\vl\vl\\\ah\ah\ah\\\sq\sq\sq\\\sq\sq\sq\\\sq\sq\\\vl\vl\\%
\vl\vl\\\ah\ah\\\sq\sq\\\sq\\\vl\\\ah\\\sq}
\end{document}
如果想要一个可以方便地更改网格大小和箭头大小的版本,请参阅\gs
下面\as
的 MWE 中的定义。
\documentclass{article}
\usepackage{graphicx,amssymb}
\usepackage[usestackEOL]{stackengine}
\newcommand\gs{10}% GRID SIZE (pts)
\newcommand\as{.5}% ARROW SCALE
\newcommand\sq{\framebox(\gs,\gs){}\kern\fboxrule}
\newcommand\vl{\rule{0pt}{\gs pt}\makebox[\dimexpr\gs pt+\fboxrule]{%
\smash{\rule[0\fboxrule]{\fboxrule}{\dimexpr\gs pt+\fboxrule}}}}
\newcommand\ah{\smash{\makebox[\dimexpr\gs pt+\fboxrule]{%
\scalebox{\as}[-\as]{\raisebox{-1.3ex}{$\blacktriangle$}}}}}
\def\stackalignment{l}
\setstackgap{S}{\fboxrule}
\begin{document}
\Shortunderstack{\sq\sq\sq\sq\sq\\\sq\sq\sq\sq\\\sq\sq\sq\\\sq\sq\vl\\%
\sq\vl\vl\\\vl\vl\vl\\\ah\ah\ah\\\sq\sq\sq\\\sq\sq\sq\\\sq\sq\\\vl\vl\\%
\vl\vl\\\ah\ah\\\sq\sq\\\sq\\\vl\\\ah\\\sq}
\end{document}