![使用控件而不影响图像大小](https://linux22.com/image/298959/%E4%BD%BF%E7%94%A8%E6%8E%A7%E4%BB%B6%E8%80%8C%E4%B8%8D%E5%BD%B1%E5%93%8D%E5%9B%BE%E5%83%8F%E5%A4%A7%E5%B0%8F.png)
我有以下树forest
:
\documentclass{article}
\usepackage{forest}
\usetikzlibrary{arrows}
\tikzset{
%Define standard arrow tip
>=stealth'}
\begin{document}
\begin{figure}
\begin{forest}
for tree={parent anchor=south, child anchor=north,align=center,base=bottom}
[AgrP
[Spec-AgrP,name=specagr]
[Agr$'$
[Agr
[\textit{-ait},name=ait]]
[NegP
[Spec-NegP
[\textit{pas},name=pas]]
[Neg$'$
[Neg
[\textit{ne},name=ne]]
[TP
[Spec-TP]
[T$'$
[T
[\textit{-er-},name=er]]
[VP
[Spec-VP
[\textit{Marie},name=marie]]
[V$'$
[V
[\textit{parl-},name=parl]]]]]]]]]]
\draw[->,dotted] (parl.south west) .. controls +(225:1cm) and +(south:0.4cm) .. (er.south);
\draw[->,dotted] (er.south west) .. controls +(left:1cm) and +(south:0.4cm) .. (ne.south);
\draw[->,dotted] (ne.south west) .. controls +(left:1cm) and +(south:0.4cm) .. (ait.south);
\draw[->,dotted] (marie.-90) .. controls +(225:6cm) and +(250:3cm) .. (specagr.-90);
\end{forest}
\caption{\label{abb-Pollock} Pollock's Analysis of \emph{Marie ne parlerait pas}}
\end{figure}
\end{document}
当我编译它时,标题离图片很远。原因是控制点的规格为 6cm。因此,tikz
在确定图像大小时似乎要考虑控制点。我能做些什么呢?我缩短了 6cm,但这给出了其他曲线。
答案1
您可以将\draw
命令放置在pgfinterruptboundingbox
环境中。
\documentclass{article}
\usepackage{forest}
\usetikzlibrary{arrows}
\tikzset{
%Define standard arrow tip
>=stealth'}
\begin{document}
\begin{figure}
\centering
\begin{forest}
for tree={parent anchor=south, child anchor=north,align=center,base=bottom}
[AgrP
[Spec-AgrP,name=specagr]
[Agr$'$
[Agr
[\textit{-ait},name=ait]]
[NegP
[Spec-NegP
[\textit{pas},name=pas]]
[Neg$'$
[Neg
[\textit{ne},name=ne]]
[TP
[Spec-TP]
[T$'$
[T
[\textit{-er-},name=er]]
[VP
[Spec-VP
[\textit{Marie},name=marie]]
[V$'$
[V
[\textit{parl-},name=parl]]]]]]]]]]
\begin{pgfinterruptboundingbox}
\draw[->,dotted] (parl.south west) .. controls +(225:1cm) and +(south:0.4cm) .. (er.south);
\draw[->,dotted] (er.south west) .. controls +(left:1cm) and +(south:0.4cm) .. (ne.south);
\draw[->,dotted] (ne.south west) .. controls +(left:1cm) and +(south:0.4cm) .. (ait.south);
\draw[->,dotted] (marie.-90) .. controls +(225:6cm) and +(250:3cm) .. (specagr.-90);
\end{pgfinterruptboundingbox}
\end{forest}
\caption{\label{abb-Pollock} Pollock's Analysis of \emph{Marie ne parlerait pas}}
\end{figure}
\end{document}