Graphics, Figures & TablesProblem: Backslashbox in Table

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
ohenri100
Posts: 8
Joined: Tue Aug 03, 2010 7:49 am

Problem: Backslashbox in Table

Post by ohenri100 »

Hi all,

I want to draw a backslash line in a box of a table.
I use package: slashbox, but I see this package always have problem.
Please help me. I think, If Latex cannot draw this line, this is a large problem. :(

Code: Select all

\documentclass{article}
\usepackage{slashbox,pict2e}
\pagestyle{empty}
\begin{document}
\noindent
\begin{tabular}{|r||*{7}{c|}}\hline
\backslashbox{$R_{Corner}$}{n}&1& 4 & 16 & 64 & 256 & 1024&4096\\
\hline
DIAMOND model&1& 0.751 &0.639&0.591 &0.571 &0.564&0.558\\ %diamond
\hline
CROSS model&1& 0.999 &0.710&0.614 &0.581 &0.567&0.561\\ %cross
 \hline
\end{tabular}

\end{document}
Thank you.
Last edited by ohenri100 on Sun Feb 20, 2011 3:30 am, edited 1 time in total.
Who I am?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 am

Re: Problem: Backslashbox in Table

Post by Juanjo »

The \backslashbox command has two optional arguments. The first one serves to fix the cell width. In your code, replace \backslashbox by, say, \backslashbox[8em]. This should do the trick.
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.
ohenri100
Posts: 8
Joined: Tue Aug 03, 2010 7:49 am

Re: Problem: Backslashbox in Table

Post by ohenri100 »

Have Solved.

I tested the command "\backslashbox[8em]", It good.
The Problem has solved.

Thank you very much.
Who I am?
Post Reply