1

I got the header bold and italic by putting \textbf{\textit at every cell value. Of course, this in not the way to go about it. So, I tried another approach but only the first element of the row became bold and I am also curious how the get the italics at the same time. In the picture you can see what I achieved. Here is the code.

\documentclass[10pt, a4paper] {report}
\renewcommand{\baselinestretch}{1.2} 
\usepackage[dutch]{babel}
\usepackage[T1]{fontenc}
\usepackage{palatino}
\usepackage{array}
\usepackage[utf8]{inputenc}
\usepackage{titlesec}
\usepackage{ctable} % for \specialrule command  % this didn't help

\usepackage{geometry}
\geometry{left=5cm, right=2.5cm, top=1.8cm, bottom=2.5cm, textheight=18cm}
\setlength{\parindent}{0pt}
\setlength{\emergencystretch}{10pt}
\usepackage[document]{ragged2e}

\newcommand\setrow[1]{\gdef\rowmac{#1}#1\ignorespaces}  % this didn't help
\newcommand\clearrow{\global\let\rowmac\relax}
\clearrow

\begin{document}
In deze bijlage staan de verslagen van de interviews die in januari 2008 uitgevoerd zijn. In de volgende tabel staat welke personen geïnterviewd zijn.
\vspace{13pt}

\setlength{\tabcolsep}{0pt}
\fontsize{8.5pt}{10pt}
\sffamily
\noindent\begin{tabular}{ m{3cm} m{0.4cm} m{2.5cm} m{0.4cm} m{4cm} m{0.4cm} m{2cm} } 
\textbf{\textit {naam}} &  & \textbf{\textit {afdeling}} &  & \textbf{\textit{functie}} & &  \textbf{\textit{datum}} \\ \cline{1-1} \cline{3-3} \cline{5-5} \cline{7-7}
Jan de Vries & &  Verkoop & &  manager & &  09-01-2008 \\
\setrow{\bfseries} Peter Jansen & & Inkoop & & senior inkoper & & 10-01-2008 \\
Ingrid Holtrup && Public relations && teamleider && 14-01-2008 \\
Patrick Faber && Personeelszaken && administratief medewerker && 15-01-2008
\end{tabular}
\setlength{\tabcolsep}{6pt}
\normalfont
\end{document}

enter image description here

  • 1
    Welcome to tex.sx. When "stacking" bold and italic, it's more usual to input the material as \textbf{\itshape ...}. – barbara beeton Mar 11 '20 at 19:20
  • 1
    What about \usepackage{makecell} \renewcommand{\theadfont}{\normalsize\bfseries\itshape} in the preamble and \thead[l]{naam} in the table? However, I doubt that making the header bold and italic at the same time is really necessary. – leandriis Mar 11 '20 at 19:27
  • Thank you but I am hoping for a way the make the row bold and italic with only one command before the row. – Jack Schilder Mar 11 '20 at 19:34
  • Since your \setrow command seems to be taken from here, you will also have to add >{\rowmac} and <{\clearrow} to your column specifiers as shown in the example in the before mentioned answer. Adding these will apply the font change to all cells in that row. – leandriis Mar 11 '20 at 19:43
  • This works - and how can I get italics at the same time? – Jack Schilder Mar 11 '20 at 19:50
  • The suggestion of Barbara was enough. Thank you all. – Jack Schilder Mar 11 '20 at 19:55
  • 1
    @JackSchilder \bfseries\itshape will probably also work. You can define a shortcut macro \newcommand{\bfit}{\bfseries\itshape} and insert \bfit Text in the heading cell. – Sveinung Mar 11 '20 at 20:00

0 Answers0