[OS X TeX] diagonal in entry in array

delanoy at math.univ-lyon1.fr delanoy at math.univ-lyon1.fr
Fri May 12 18:30:03 CEST 2006


   Hello all,

 consider the following input :

\documentclass{article}
\usepackage{amssymb}
\begin{document}
Here are the values of the function $f$ :

\setlength{\unitlength}{1cm}
\center{\begin{picture}(3,3)
 \multiput(0,0)(0,1){4}{\line(1,0){3}}
  \multiput(0,0)(1,0){4}{\line(0,1){3}}
  \put(0,3){\line(1,-1){1}}
  \put(0.3,2.3){$x$}
  \put(0.6,2.6){$y$}
                                  \put(1.4,2.4){$1$}       
\put(2.4,2.4){$2$}
\put(0.4,1.4){$1$}  \put(1.0,1.4){$f(1,1)$}  \put(2.0,1.4){$f(1,2)$}
\put(0.4,0.4){$2$}  \put(1.0,0.4){$f(2,1)$}  \put(2.0,0.4){$f(2,2)$}
\end{picture}}
\end{document}

 it produces exactly the output I'm looking for, but I'm not quite
satisfied. Is there a way
to do it with the array environment or a related package ?

 Something like

\begin{displaymath}
\begin{array}{|c|c|c|}
\hline
x \diagdown y & 1 & 2 \\
\hline
1  & f(1,1) & f(1,2) \\
\hline
2  & f(2,1) & f(2,2) \\
\hline
\end{array}
\end{displaymath}
\end{document}

 is close enough, but the ``diagdown" should be replaced by something else...

                                                              Ewan



------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
          & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/




More information about the macostex-archives mailing list