# Define a macro for a tabular environment with separate fonts per column

For my project, I need a macro which has the following properties:

\begin{tabular}{ll}
\texit{abc} & \\
\textsc{abc} & \textit{def} \\
\textsc{abc} & \textit{def}
\end{tabular}


The macro should always have two columns and the first two lines. The font styles should always be as in my example. The table should also be able to vary such that it can have several lines. Could someone help me? Thank you in advance for your help!

Instead of \textit and \textsc you can use the corresponding declarations in the column specification with the help of array.

If you need to override the font choice in a cell, use \multicolumn.

\documentclass{article}
\usepackage{array}

\begin{document}

\begin{tabular}{ >{\scshape}l >{\itshape}l }
\multicolumn{1}{l}{\itshape abc} & \\
abc & def \\
abc & def \\
abc & def \\
abc & def \\
\end{tabular}

\end{document}


• Works like a charm! Thank you very much! Oct 24 at 21:40