Discussion:
vertical alignment (center text vertically)
Robert Neumann
2005-08-11 10:22:43 UTC
Permalink
Hello,
I'm looking for a way to center a multiline text horizontally and vertically on a page.
(I'm planing to write something like vocabulary cards). The horizontal
alignment is no problem but how to center the text vertically?
thanks
Robert
Geoffrey Lloyd
2005-08-11 10:31:36 UTC
Permalink
----- Original Message -----
From: "Robert Neumann" <lyx-***@public.gmane.org>
To: <lyx-users-UqbJ+GOpo4+***@public.gmane.org>
Sent: Thursday, August 11, 2005 11:22 AM
Subject: vertical alignment (center text vertically)
Post by Robert Neumann
Hello,
I'm looking for a way to center a multiline text horizontally and vertically on a page.
(I'm planing to write something like vocabulary cards). The horizontal
alignment is no problem but how to center the text vertically?
thanks
Robert
In ERT put

\vspace*{\fill}

before and after you text and it will align it centrally.

Just so you understand the ERT and for future reference. On a page you can
use \vfill to provide a space on a page between objects such that they fill
the page. However if you put \vfill as the first of last thing on a page it
is removed.

However \vspace* is not removed and the \fill command makes it equivalent to
\vfill

Obviously you could also set it to a length if you didn't want it centred.

e.g. \vspace*{2cm}

Hope this helps

Geoff
Juergen Spitzmueller
2005-08-11 11:03:42 UTC
Permalink
Post by Geoffrey Lloyd
Post by Robert Neumann
Hello,
I'm looking for a way to center a multiline text horizontally and vertically on a page.
(I'm planing to write something like vocabulary cards). The horizontal
alignment is no problem but how to center the text vertically?
thanks
Robert
In ERT put
\vspace*{\fill}
before and after you text and it will align it centrally.
No need to use ERT. See attached (use the paragraph dialog to get the
vspace*{\fill}.

Jürgen
Robert Neumann
2005-08-11 15:38:18 UTC
Permalink
Post by Juergen Spitzmueller
No need to use ERT. See attached (use the paragraph dialog to get the
vspace*{\fill}.
When I use the paragraph dialog it provides me only with a vfill and not with a vfill* (I use the "variabel" in the german paragraph dialog)
Robert
Paul A. Rubin
2005-08-11 15:58:21 UTC
Permalink
Post by Robert Neumann
Post by Juergen Spitzmueller
No need to use ERT. See attached (use the paragraph dialog to get the
vspace*{\fill}.
When I use the paragraph dialog it provides me only with a vfill and not with a vfill* (I use the "variabel" in the german paragraph dialog)
Robert
Notice in Juergen's example that he checked the "Keep space" box. That
plus vfill apparently causes LyX to specify \vfill* in the LaTeX output.

Paul
Herbert Voss
2005-08-11 16:11:52 UTC
Permalink
Post by Paul A. Rubin
Post by Robert Neumann
Post by Juergen Spitzmueller
No need to use ERT. See attached (use the paragraph dialog to get the
vspace*{\fill}.
When I use the paragraph dialog it provides me only with a vfill and
not with a vfill* (I use the "variabel" in the german paragraph dialog)
Robert
Notice in Juergen's example that he checked the "Keep space" box. That
plus vfill apparently causes LyX to specify \vfill* in the LaTeX output.
the problem is that nobody really knows the sense of
"Keep space". In 99.999999% of all cases the starred version
will be ok.

Herbert

Continue reading on narkive:
Loading...