这是我的代码的 MWE:
\documentclass[a4paper,10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows}
\tikzset{
myarrow/.style={
draw,
fill=black,
single arrow,
minimum height=2.5ex,
line width=1pt,
single arrow head extend=0.1ex
}
}
\newcommand{\arrowup}{%
\tikz [baseline=-0.5ex]{\node [myarrow,rotate=90] {};}
}
\newcommand{\arrowdown}{%
\tikz [baseline=-1ex]{\node [myarrow,rotate=-90] {};}
}
\begin{document}
\begin{center}
This is some text.\\
\arrowdown\\
And some more.\\
\arrowup\\
And even more.
\end{center}
\end{document}
这给了我这个:
这只line width
会将箭头的宽度减小到一定程度,但不会再减小了。我希望箭头看起来更细一点。我正在使用PDFLaTeX
Ubuntu 12.10 进行编译。谢谢。
答案1
对于调整箭头节点,TiKz 手册列出了以下选项:single arrow head extend
、inner sep=
和single arrow head indent
。我想添加yscale
或xscale
选项。使用这些值,您可能会得到所需的外观。
\documentclass[a4paper,10pt]{article}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows}
\tikzset{
myarrow/.style={
draw,
fill=black,
single arrow,
minimum height=2.5ex,
line width=1pt,
single arrow head extend=0.1ex
}
}
\newcommand{\arrowup}{%
\tikz [baseline=-0.5ex]{\node [myarrow,rotate=90, single arrow head extend=2mm,inner sep=.1mm] {};}% or: single arrow head indent=⟨length⟩
}
\newcommand{\arrowdown}{%
\tikz [baseline=-1ex]{\node [myarrow,rotate=-90, yscale=.5, single arrow head extend=1mm] {};}
}
\begin{document}
\begin{center}
This is some text.\\
\arrowdown\\
And some more.\\
\arrowup\\
And even more.
\end{center}
\end{document}
在这个例子中,我特别喜欢第二个(向下)箭头。