2
   \documentclass[12pt]{article} 

\usepackage[T1,T2A]{fontenc}
\usepackage[mathletters]{ucs}
\usepackage[utf8]{inputenc}
\usepackage[english,ukrainian]{babel}
\usepackage{ulem}
\usepackage{amsmath}
\usepackage{multirow}
\usepackage{slashbox}

\begin{document}
    \begin{tabular}{| c | c | c | c |}
        \hline
        \multicolumn{4}{|c|}{} \\
        \hline
        \multirow{3}{*}{\slashbox{}{}} & & &\\
        \cline{2-4} & & & \\
        \cline{2-4} & & & \\
        \cline{2-4} & & & \\
        \hline
        \multicolumn{3}{|c|}{} & \\
        \hline
    \end{tabular}
\end{document}

enter image description here this is how the table should turn out, but there are problems with the dash in column 1. It seems to me something with the size, because when I increase this column, the line falls into place

3

2 Answers 2

3

Slashbox is rather old and undocumented. It's not in TeXLive. I use diagbox which has good documentation instead and does the same thing.

\documentclass{article}

\usepackage{multirow}
\usepackage{diagbox}

\begin{document}

  \begin{tabular}{| c | c | c | c |}
    \hline
    \multicolumn{4}{|c|}{}    \\
    \hline
    \multirow{3}{*}{\diagbox[dir=SW,height=4\line]{}{}} &   &  & \\
    \cline{2-4}                                         &   &  & \\
    \cline{2-4}                                         &   &  & \\
    \cline{2-4}                                         &   &  & \\
    \hline
    \multicolumn{3}{|c|}{}                              &        \\
    \hline
  \end{tabular}
\end{document}

diagbox

5

Here is a way using nicematrix. Of course you can make any adjustments you need: column width, color, line thickness, etc.

enter image description here

\documentclass{article}

\usepackage{nicematrix, tikz}

\begin{document}

\begin{NiceTabular}{cccc}[hvlines]
\Block{1-4}{} \\
\Block{4-1}{} & & & \\
 & & & \\
 & & & \\
 & & & \\
\Block{1-3}{} & \\
\CodeAfter
    \tikz
    \draw (6-|1) -- (2-|2);
\end{NiceTabular}

\end{document}
3
  • Thanks for the reply, but I only need it through slashbox and tabular Apr 19, 2022 at 16:52
  • @AndrijMatviiv: I'm not certain, but I believe slashbox was only designed to draw from top-left to bottom-right. You could try the package diagbox, which will draw either way, but I don't know that it's compatible with multirow in the way you need.
    – Sandy G
    Apr 19, 2022 at 16:59
  • I just see that it works in all examples, but for some reason it conflicts with me Apr 19, 2022 at 17:01

You must log in to answer this question.

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