如何删除不需要的空白?

如何删除不需要的空白?
\documentclass[border=10pt]{standalone}
\usepackage{pstricks-add,amsmath,amssymb}
\begin{document}
\begin{pspicture}[showgrid,arrowinset=0](0,-1)(4,2)
\begin{psmatrix}[colsep=.5cm,rowsep=1.2cm]
& [name=A]\,\,\,\,\,\,\,\,\,\,\,\,$M_{0,4} \times \mathbb{P}^1 $\\
[name=B]$B$ & [name=C]\,\,\,\,\,\,$M_{0,4}$
\end{psmatrix}
\pcline[nodesep=.3]{->}(B)(C)       \nbput{$\kappa$}
\pcline[nodesep=.3]{->}(A)(C)       \nbput[labelsep=.1]{$\pi$}
\naput{\foreach \i in {0.1,0.25,0.4,0.55}{%
    \pcline{->}(\i,-.4)(\i,.45)} \nbput[labelsep=.1]{$\sigma_i$}}
\end{pspicture}
\end{document}

在此处输入图片描述

看完所有答案后,完成:)

\documentclass[border=10pt]{standalone}
\usepackage{pstricks-add,amsmath,amssymb}
\begin{document}
\begin{psmatrix}[colsep=.5cm,rowsep=1.2cm]
& [name=A]\qquad $M_{0,4} \times \mathbb{P}^1 $\\
[name=B]$B$ & [name=C] \quad $M_{0,4}$
\end{psmatrix}
\psset{arrowinset=0}
\pcline[nodesep=.3]{->}(B)(C)       \nbput{$\kappa$}
\pcline[nodesep=.3]{->}(A)(C)       \nbput[labelsep=.1]{$\pi$}
\naput{\foreach \i in {0.1,0.25,0.4,0.55}{%
    \pcline{->}(\i,-.4)(\i,.45)} \nbput[labelsep=.1]{$\sigma_i$}}
\end{document}

答案1

您需要将矩阵放在某处,例如使用\rput。这是嵌套 s 的方法pspicture

\documentclass[border=10pt]{standalone}
\usepackage{pstricks-add,amsmath,amssymb}
\begin{document}
\begin{pspicture}[showgrid,arrowinset=0](-.5,-1)(4,2)
\rput[bl](0,0){\begin{psmatrix}[colsep=.5cm,rowsep=1.2cm]
& [name=A]\,\,\,\,\,\,\,\,\,\,\,\,$M_{0,4} \times \mathbb{P}^1 $\\
[name=B]$B$ & [name=C]\,\,\,\,\,\,$M_{0,4}$
\end{psmatrix}}
\pcline[nodesep=.3]{->}(B)(C)       \nbput{$\kappa$}
\pcline[nodesep=.3]{->}(A)(C)       \nbput[labelsep=.1]{$\pi$}
\naput{\foreach \i in {0.1,0.25,0.4,0.55}{%
    \pcline{->}(\i,-.4)(\i,.45)} \nbput[labelsep=.1]{$\sigma_i$}}
\end{pspicture}
\end{document}

在此处输入图片描述

如果你把图片缩小,它就会变得更小。

  \begin{pspicture}[showgrid,arrowinset=0](-.5,-0.3)(3,2)

在此处输入图片描述

答案2

pspicture在这种情况下使用环境是没有意义的:

\documentclass[border=10pt]{standalone}
\usepackage{pst-node,amsmath,amssymb}
\begin{document}

\begin{psmatrix}[colsep=.5cm,rowsep=1.2cm]
& [name=A]\qquad$M_{0,4} \times \mathbb{P}^1 $\\
[name=B]$B$ & [name=C]\quad$M_{0,4}$
\end{psmatrix}
\pcline[nodesep=.3]{->}(B)(C)       \nbput{$\kappa$}
\pcline[nodesep=.3]{->}(A)(C)       \nbput[labelsep=.1]{$\pi$}
\naput{\foreach \i in {0.1,0.25,0.4,0.55}{%
    \pcline{->}(\i,-.4)(\i,.45)} \nbput[labelsep=.1]{$\sigma_i$}}

\end{document}

在此处输入图片描述

如果您确实需要网格,那么请将\psmatrix(其内部只不过是一个array)写入零宽度的框中:

\documentclass[border=10pt]{standalone}
\usepackage{pst-node,amsmath,amssymb}
\begin{document}

\begin{pspicture}[showgrid,arrowinset=0](0,-1)(4,2) 
\makebox[0pt][l]{%
\begin{psmatrix}[colsep=.5cm,rowsep=1.2cm]
    & [name=A]\qquad$M_{0,4} \times \mathbb{P}^1 $\\
    [name=B]$B$ & [name=C]\quad$M_{0,4}$
\end{psmatrix}}
\pcline[nodesep=.3]{->}(B)(C)       \nbput{$\kappa$}
\pcline[nodesep=.3]{->}(A)(C)       \nbput[labelsep=.1]{$\pi$}
\naput{\foreach \i in {0.1,0.25,0.4,0.55}{%
    \pcline{->}(\i,-.4)(\i,.45)} \nbput[labelsep=.1]{$\sigma_i$}}
\end{pspicture}

\end{document}

在此处输入图片描述

\makebox和 一样\rput。这与你的问题中提到的行为相同为什么在 pspicture 中直接插入的标签会取代其他后续对象? ( array)\psmatrix有宽度,这就是旧坐标系向右移动并得到空白的原因。真正的 PSTricks 对象有宽度。但是,\psmatrix 不应在里面pspicture

相关内容