![如何删除不需要的空白?](https://linux22.com/image/396818/%E5%A6%82%E4%BD%95%E5%88%A0%E9%99%A4%E4%B8%8D%E9%9C%80%E8%A6%81%E7%9A%84%E7%A9%BA%E7%99%BD%EF%BC%9F.png)
\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
。