将表格的标题(顶行)设为粗体和斜体

将表格的标题(顶行)设为粗体和斜体

我通过在每个单元格值上放置 \textbf{\textit 来使标题变为粗体和斜体。当然,这不是解决问题的方法。因此,我尝试了另一种方法,但只有行的第一个元素变为粗体,我也很好奇如何同时获得斜体。在图片中你可以看到我实现的效果。这是代码。

\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}

在此处输入图片描述

相关内容