1

Diagbox in table header does not touch corner of cell. Thank you for any help.

Here is the Minimal Working Example (MWE), and at bottom a picture of what that MWE is rendering:

\documentclass[11pt, a4paper, twoside]{article}

\usepackage{makecell}
\usepackage{multirow}
\usepackage{multicol}
\usepackage{diagbox}

\begin{document}
\begin{table}
    \begin{center}
    \noindent\makebox[\textwidth]
    {
        \begin{tabular}{|p{0.18\textwidth}|p{0.16\textwidth}|p{0.13\textwidth}|p{0.20\textwidth}|p{0.09\textwidth}|p{0.09\textwidth}|p{0.12\textwidth}|p{0.16\textwidth}|}
        \hline
        \diagbox[width=7em, height=3em]{\thead{\textbf{Auteurs}}}
        {\thead{\textbf{Critères}}} & \thead{Environnement \\technologique} & \thead{Scénarisation \\pédagogique} & \thead{Interactions \\entre acteurs tiers} & \thead{Mode de \\livraison} & \thead{Analyse \\logicielle} & \thead{Conception \\logicielle} & \thead{Développement \\logiciel}\\
        \hline
        & \footnotesize{} & \footnotesize{} & \footnotesize{} & \footnotesize{} & \footnotesize{} & \footnotesize{} & \footnotesize{}\\
        \hline
        \footnotesize{} & \footnotesize{Oui} & \footnotesize{Oui} & \footnotesize{Oui} & \footnotesize{Non} & \footnotesize{Non} & \footnotesize{Non} & \footnotesize{Non}\\
        \hline
    \end{tabular}
    }
    \caption{Comparaison.}
    \label{tab:comparaisonPatrons_3}
    \end{center}
\end{table}

\end{document}

enter image description here

2

Here is a solution, setting the fontsize to \footnotesize, and replacing thep{some width} column qualifier with a plain c. I also loaded fontenc with option T1, to get accented letters:

\documentclass[11pt, a4paper, twoside]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{makecell}
\usepackage{multirow}
\usepackage{multicol}
\usepackage{diagbox}
\usepackage[showframe]{geometry}

\begin{document}

\begin{table}\centering\footnotesize\setlength\tabcolsep{3.5pt}\renewcommand\arraystretch{1.5}
  \noindent\makebox[\textwidth]{%
    \begin{tabular}{|*{8}{c|}}
      \hline
      \bfseries\diagbox[width=\dimexpr 0.15\textwidth+2\tabcolsep\relax, height=0.98cm]{Auteurs}{\raisebox{0.5ex}{Critères}}
                      & \thead{Environnement\\technologique} & \thead{Scénarisation \\pédagogique} & \thead{Interactions \\entre acteurs tiers} & \thead{Mode de \\livraison} & \thead{Analyse \\logicielle} & \thead{Conception \\logicielle} & \thead{Développement \\logiciel}\\
      \hline
                      & \footnotesize{} & \footnotesize{} & \footnotesize{} & \footnotesize{} & \footnotesize{} & \footnotesize{} & \footnotesize{} \\
      \hline
      \footnotesize{} & \footnotesize{Oui} & \footnotesize{Oui} & \footnotesize{Oui} & \footnotesize{Non} & \footnotesize{Non} & \footnotesize{Non} & \footnotesize{Non} \\
      \hline
    \end{tabular}
  }%
  \caption{Comparaison.}
  \label{tab:comparaisonPatrons_3}
\end{table}

\end{document} 

enter image description here

2
  • The ampersands in \thead{Environnement & & & & & & \\technologique} should not be there, They cause error in compiling. – Zarko Dec 29 '15 at 22:06
  • Thanks for pointing it. It's an old trick from my editor. Corrected. – Bernard Dec 29 '15 at 22:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.