0

Wondering how to make all tables italic globally?

\documentclass{article}
\usepackage{multirow}
\begin{document}
\itshape
\begin{tabular}{ |p{3cm}||p{3cm}|p{3cm}|p{3cm}|  }
 \hline
 \multicolumn{4}{|c|}{Country List} \\
 \hline
 Country Name or Area Name& ISO ALPHA 2 Code &ISO ALPHA 3 Code&ISO numeric Code\\
 \hline
 Afghanistan   & AF    &AFG&   004\\
 Aland Islands&   AX  & ALA   &248\\
 Albania &AL & ALB&  008\\
 Algeria    &DZ & DZA&  012\\
 American Samoa&   AS  & ASM&016\\
 Andorra& AD  & AND   &020\\
 Angola& AO  & AGO&024\\
 \hline
\end{tabular}
\end{document}
MYaseen208
  • 8,587
  • 3
    Are you interested exclusively in tabular environments, or in all table-like environments embedded in table environments? Please advise. – Mico Dec 16 '22 at 22:08

1 Answers1

2
\documentclass{article}
\usepackage{multirow}

\AddToHook{env/tabular/begin}{\itshape}

\begin{document}

Some normal text

\begin{tabular}{ |p{3cm}||p{3cm}|p{3cm}|p{3cm}|  }
 \hline
 \multicolumn{4}{|c|}{Country List} \\
 \hline
 Country Name or Area Name& ISO ALPHA 2 Code &ISO ALPHA 3 Code&ISO numeric Code\\
 \hline
 Afghanistan   & AF    &AFG&   004\\
 Aland Islands&   AX  & ALA   &248\\
 Albania &AL & ALB&  008\\
 Algeria    &DZ & DZA&  012\\
 American Samoa&   AS  & ASM&016\\
 Andorra& AD  & AND   &020\\
 Angola& AO  & AGO&024\\
 \hline
\end{tabular}

More normal text

\end{document}

If you want also to include tabular*, just add

\AddToHook{env/tabular*/begin}{\itshape}

enter image description here