0

I do understand where the error is about the missing number: Missing number, treated as zero. \end{tabulary}

\documentclass[a4paper,11pt]{article}
\usepackage{hyperref}
\usepackage{fontspec}
\usepackage[english, ngerman]{babel}
\usepackage{soul} % for strikethrought
\usepackage{xcolor} % for highlighting
\usepackage{booktabs} % for rules within a table
\usepackage{tabulary} % for tables with long lines
\begin{document}
\subsection{Basic HTML Table}
\begin{table}[ht]
\centering
\begin{tabulary}{\linewidth}{ C  C  C }
\toprule
\textbf{Firstname} & \textbf{Lastname} & \textbf{Age} \\
\midrule
Jill & Smith & 50 \\
\midrule
Eve & Jackson & 94 \\
\midrule
John & Doe & 80 \\
\midrule
\bottomrule
\end{tabulary}
\end{table}

%second table
Table with mulitple cols \hl{in the header}: 
\begin{table}[ht]
\centering
\begin{tabulary}{\linewidth}{ C  C  C }
\toprule
\textbf{Name} & \multicolumn{2}{ C }{\textbf{Telephone}} \\
\midrule
Bill Gates & 55577854 & 55577855 \\
\midrule
\bottomrule
\end{tabulary}
\end{table}
\end{document}

Any idea? And if I drop the first table the whole thing gets even worse cause it reports Undefined control sequence. \end{tabulary}

  • 1
    I'm not sure what's the reason for tabulary. Anyway, you need c in the argument to \multicolumn and not C. – egreg Jan 11 at 13:09
3

In the second table, just change \multicolumn{2}{ C }{...} into \multicolumn{2}{c}{...}.

Which would give you:

enter image description here

  • 1
    Thx for spoting the mistake. – LeO Jan 14 at 8:25

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.