“图片”环境生成的裁剪图

“图片”环境生成的裁剪图

我有这个 MWE 作品:

\documentclass[11pt]{article}
\usepackage{amsmath}

\begin{document}
My equation
\begin{equation*}
  \setlength{\unitlength}{1cm}
  \fbox{\begin{picture}(17,5)(-1.5,0)
      \thicklines
      \put(3.2,3){$x_5$}
      \put(3.2,1){$x_6$}
      \put(4,3){\line(1,-1){1}}
      \put(4,1){\line(1,1){1}}
      \put(5,2){\circle*{0.15}}
      \put(5,2){\line(1,0){2}}
      \put(5.9,1.5){$x_9$}
      \put(7,2){\circle*{0.15}}
      \put(7,2){\line(1,1){1}}
      \put(7.6,2.2){$x_8$}
      \put(8,3){\line(2,1){1}}
      \put(8,3){\line(2,-1){1}}
      \put(8,3){\circle*{0.15}}
      \put(9.3,3.5){$x_9$}
      \put(9.3,2.3){$x_7$}
      \put(7,2){\line(2,-1){2}}
      \put(9.3,0.9){$x_7$}
  \end{picture}}
\end{equation*}

\end{document}

产生以下布局(垂直红线来自 xdvi 查看器): 在此处输入图片描述

我的问题是:如何裁剪图形(删除其周围的多余空间)?

答案1

在此处输入图片描述

图片的大小是在环境选项中指定的,你的 17 使其过大

\documentclass[11pt]{article}
\usepackage{amsmath}

\begin{document}
My equation
\begin{equation*}
  \setlength{\unitlength}{1cm}
  \fbox{\begin{picture}(7,3.5)(3,0.5)
      \thicklines
      \put(3.2,3){$x_5$}
      \put(3.2,1){$x_6$}
      \put(4,3){\line(1,-1){1}}
      \put(4,1){\line(1,1){1}}
      \put(5,2){\circle*{0.15}}
      \put(5,2){\line(1,0){2}}
      \put(5.9,1.5){$x_9$}
      \put(7,2){\circle*{0.15}}
      \put(7,2){\line(1,1){1}}
      \put(7.6,2.2){$x_8$}
      \put(8,3){\line(2,1){1}}
      \put(8,3){\line(2,-1){1}}
      \put(8,3){\circle*{0.15}}
      \put(9.3,3.5){$x_9$}
      \put(9.3,2.3){$x_7$}
      \put(7,2){\line(2,-1){2}}
      \put(9.3,0.9){$x_7$}
  \end{picture}}
\end{equation*}

\end{document} 

相关内容