如何在 psTextFrame 中将文本左对齐?
以下是示例:
\documentclass[letterpaper,dvips]{article}
\usepackage[utf8]{inputenc}
\usepackage{textcomp}
\usepackage{pst-all}
\usepackage{pst-eps}
\begin{document}
\pagestyle{empty}
\begin{TeXtoEPS}
\fontfamily{phv}\selectfont
\psset{xunit=1cm,yunit=1cm,runit=1cm}
\begin{pspicture}(0,0)(5,2)
\psset{linewidth=1pt}
\psframe[fillstyle=solid, linewidth=1pt](0,0)(5,2)
\psTextFrame(0.5,0.5)(4.5,1.5){\large\textbf{Left}}
\end{pspicture}
\end{TeXtoEPS}
\end{document}
答案1
使用ref
参数:
\documentclass[letterpaper]{article}
\usepackage[utf8]{inputenc}
\usepackage{pst-all}
\begin{document}
\begin{pspicture}(0,0)(5,2)
\psset{linewidth=1pt}
\psframe[fillstyle=solid, linewidth=1pt](0,0)(5,2)
\psTextFrame[ref=lb](0.5,0.5)(4.5,1.5){\large\textbf{Left}}
\end{pspicture}
\end{document}