1

How could I draw lines (like those in a tabular environment drawn by \hline and |c|c|c| in the following code?

\resizebox{\textwidth}{!}{
    \xymatrix{
        x_0 \ar[dr]    & x_1 \ar[d] \ar[dr] & x_2 \ar[d]   \\
        % 
        \sum(x_0..x_0) & \sum(x_0..x_1)     & \sum(x_1..x_2)\\
    }
}

For some reason, I can't compile the document if I use *F{argument} in order to draw a box around each element.

To make more clear who ideally the output would be:

\begin{tabular}{| c| c| c|}
    \hline
    x_0& x_1& x_2\\ \hline
\end{tabular}

followed by the arrows.

1 Answer 1

3

Please provide a minimal example. You have to use the syntax: *+[F]{<argument>}

\documentclass{article}
\usepackage{graphicx}
\usepackage{xypic,xypdf}
\begin{document}
\noindent\resizebox{\textwidth}{!}{
    \xymatrix{
        *+[F]{x_0} \ar[dr]    & x_1 \ar[d] \ar[dr] & x_2 \ar[d]   \\
        % 
        \sum(x_0..x_0) & \sum(x_0..x_1)     & \sum(x_1..x_2)\\
    }
}
\end{document}

You can set the frame global:

\documentclass{article}
\usepackage{graphicx}
\usepackage{xypic,xypdf}
\begin{document}
\noindent\resizebox{\textwidth}{!}{
\entrymodifiers={++[F]}
    \xymatrix{
        x_0 \ar[dr]    & x_1 \ar[d] \ar[dr] & x_2 \ar[d]   \\
        % 
        \sum(x_0..x_0) & \sum(x_0..x_1)     & \sum(x_1..x_2)\\
    }
}
\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .