Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How \rput text with linebreaks (PSTricks)

923 views
Skip to first unread message

Malte Persike

unread,
Nov 6, 2001, 11:01:01 AM11/6/01
to
A nice hello to everybody!

This is a kind of Newbie problem, for I am using PSTricks the first
time.
I have the following simple LaTeX code:

\documentclass{article}
\usepackage{pstricks}

\begin{document}
\pspicture(0,0)(1,1)
\rput(0.5,0.5){This is a\\linebreak test}
\endpspicture
\end{document}

The \rput command in PSTricks ignores the \\ (as well as \linebreak)
and prints out "This is alinebreak test".
Can someone help me on that?

Many thanks in advance,
Malte

Olivier Crouzet

unread,
Nov 6, 2001, 10:45:23 AM11/6/01
to
Hi,

On 6 Nov 2001 08:01:01 -0800, Malte Persike wrote:

> The \rput command in PSTricks ignores the \\ (as well as \linebreak)
> and prints out "This is alinebreak test".
> Can someone help me on that?

You must put a parbox inside the rput command.
Olivier.


--

Olivier Crouzet
Human and Machine Perception Research Centre
Keele University

Dan Luecking

unread,
Nov 6, 2001, 2:55:31 PM11/6/01
to
Ma...@t-online.de (Malte Persike) wrote in message news:<6209cfcc.01110...@posting.google.com>...

You don't have \linebreak, you have \\ followed by the word
"linebreak". I don't believe \linebreak would work anyway.
Try this:
\rput(0.5,0.5){\shortstack[l]{this is a\\test}}

(That's an ell in the optional parameter.) \shortstack works
in the latex picture environment; it ought to work here, too.
\shortstack takes an optional argument of c, r, or l, determining
which way to align the lines.

Dan Luecking

0 new messages