Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

How can I align text left in a psTextFrame?

Here's the example:

\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}
share|improve this question

1 Answer 1

up vote 4 down vote accepted

use the ref parameter:

\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}
share|improve this answer
    
set it left but doesn't look great - so I tried framesept but doesn't change anything. Is \space the only solution, moving text to the right? –  PascalTurbo Sep 20 '12 at 13:31
    
ref=lc, ref=rt and so on. What exactly do you want? –  Herbert Sep 20 '12 at 15:45
    
When text is positioned left in the psTextFrame there is absolutely no spacing between the left margin of the frame and the text. –  PascalTurbo Sep 30 '12 at 18:00
    
and where is the problem to write ~foo? –  Herbert Sep 30 '12 at 19:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.