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

XY-Pic diagram in the center of the page

856 views
Skip to first unread message

Veerle

unread,
Jan 8, 2002, 4:25:11 AM1/8/02
to
Hi,

I use MikTeX 2.1.
I tried to center my XY-Pic diagram:

\begin{center}
\xymatrix{...}
\end{center}

But this doesn't work!
Has anyone got an idea how I can solve this problem?

Veerle

Veerle

unread,
Jan 8, 2002, 4:25:10 AM1/8/02
to

wald

unread,
Jan 8, 2002, 5:07:12 AM1/8/02
to

\begin{center}
\hfil
\xymatrix{...}
\hfil
\end{center}

Kind regards,
Wald

"Veerle" <veerl...@hotmail.com> wrote in message
news:16c55915.02010...@posting.google.com...

Robin Fairbairns

unread,
Jan 8, 2002, 5:29:44 AM1/8/02
to
Veerle <veerl...@hotmail.com> wrote:
>I tried to center my XY-Pic diagram:
>
>\begin{center}
> \xymatrix{...}
>\end{center}
>
>But this doesn't work!
>Has anyone got an idea how I can solve this problem?

probably

\begin{center}
\leavevmode
\xymatrix{...}
\end{center}

(xy-pic isn't just a latex package, and it would appear it doesn't
create "latex-style" objects. another way around this would be to put
the matrix in an \mbox or something.)
--
Robin Fairbairns, Cambridge -- rf10 at cam dot ac dot uk

R. B. Mahoney

unread,
Jan 8, 2002, 5:51:03 AM1/8/02
to

On 8 Jan 2002 10:29:44 GMT, Robin Fairbairns <r...@pallas.cl.cam.ac.uk> wrote:
> Veerle <veerl...@hotmail.com> wrote:
>>I tried to center my XY-Pic diagram:
>>
>>\begin{center}
>> \xymatrix{...}
>>\end{center}
>>
>>But this doesn't work!
>>Has anyone got an idea how I can solve this problem?
>
> probably
>
> \begin{center}
> \leavevmode
> \xymatrix{...}
> \end{center}
>
> (xy-pic isn't just a latex package, and it would appear it doesn't
> create "latex-style" objects. another way around this would be to put
> the matrix in an \mbox or something.)

I've just picked one at random. Believe me, its centered!

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{figure}[htbp]
\par\bigskip\footnotesize
\centering
\enskip
\UseTwocells
\xymatrixcolsep{5pc}
\diagram
\relax\skt{vyaayaama}\rtwocell<10>
_{\hbox{\tiny\skt{bodhisattvamaarga}}}
^{\hbox{\tiny\skt{bodhisattvamaarga}}}
{'{\skt{viirya}}}
&\relax\skt{pradhaana}\\
\enddiagram
\caption{\sl{Viirya}\index[skt]{viirya@\textsl{viirya\/}},
\skt{vyaayaama}, \& \skt{pradhaana}.}
\label{fig:viiryaandcomp}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


Many regards,

Richard Mahoney

--
r b m 4 9 @ i t . c a n t e r b u r y . n z

Johan Bengtsson

unread,
Jan 8, 2002, 6:52:37 AM1/8/02
to

I recently ran into this problem myself. I ended up putting the XY-Pic
diagram in a one column tabular and centered this. Something like this
worked for me:

\begin{center}
\begin{tabular}{c}
\xymatrix{...}
\end{tabular}
\end{center}

Lars Madsen

unread,
Jan 8, 2002, 8:40:35 AM1/8/02
to
Veerle wrote:

\usepackage[all]{xy}
\CompileMatrices
.
.
.

\[
\xymatrix{....}
\]

works fine for me (on my system the diagram is now centered)

--

/daleif
F2.10 - Institut for Matematiske Fag, Matematisk Afdeling
Århus Universitet

Dan Luecking

unread,
Jan 8, 2002, 2:13:47 PM1/8/02
to
{$news}$@rbm49.tacacs.canterbury.ac.nz (R. B. Mahoney) wrote in message news:<slrna3ljtm.2lle.{$news}$@localhost.tacacs.canterbury.ac.nz>...

> On 8 Jan 2002 10:29:44 GMT, Robin Fairbairns <r...@pallas.cl.cam.ac.uk> wrote:
> > Veerle <veerl...@hotmail.com> wrote:
> >>I tried to center my XY-Pic diagram:
> >>
> >>\begin{center}
> >> \xymatrix{...}
> >>\end{center}
> >>
> >>But this doesn't work!
> >>Has anyone got an idea how I can solve this problem?
> >
> > probably
> >
> > \begin{center}
> > \leavevmode
> > \xymatrix{...}
> > \end{center}
> >
> > (xy-pic isn't just a latex package, and it would appear it doesn't
> > create "latex-style" objects. another way around this would be to put
> > the matrix in an \mbox or something.)
>
> I've just picked one at random. Believe me, its centered!
>
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> \begin{figure}[htbp]
> \par\bigskip\footnotesize
> \centering
> \enskip

The center environment and the \centering commands work on paragraphs.
Robin's suggestion to add \leavevmode causes a paragraph to start.
(In fact, the previous thread with this same title listed a number
of solutions, most of which worked because the object used started a
paragraph.)

Your example is centered because the (plain) TeX command \enskip starts
a paragraph. But your centering will be slightly off (by half the width
of \enskip).

Dan Luecking

0 new messages