I'm using XelaTeX to typeset a table with a vocabulary list in a foreign language, with a structure similar to this one: different columns are typeset in different fonts (and scripts).
It seems that this should be implemented with \newcolumntype
from the array
package.
Below is a MWE of my attempt to typeset one column in Linux Libertine and one in Arial:
%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode
\documentclass[12pt, a4paper]{standalone}
\usepackage{fontspec}
\setmainfont{Linux Libertine O}
\usepackage{array}
\newcolumntype{L}{>{\fontspec{Linux Libertine O}}l}
\newcolumntype{A}{>{\fontspec{Arial}}l}
\begin{document}
\begin{tabular}{LA}
Libertine & Arial\\
\end{tabular}
\end{document}
it defines columns of type L
(to be typeset in Libertine) and A
(Arial).
I get the following error message on compilation:
! Forbidden control sequence found while scanning use of \bool_if:nTF. <inserted text> \par l.16 Libertine & Arial\\
It seems that the syntax for \newcolumntype
has changed recently, so based on the manual I tried to define the column as
\newcolumntype{L}{>{\fontspec{Linux Libertine O}}{l}<{}}
which results in the same error.
Any ideas?