multiple columns - Latex multicolumn problems -


i trying build table in latex 5 columns have common title centered above columns. generated table not appear expected. (the common title left justified instead of centered above columns)

the code looks like

\documentclass{article}  \begin{document}  \begin{table} \centering \begin{tabular}{|l|c|c|c|r|} \multicolumn{5}{c}{hydrotalcite} \\ \hline kalhsdfsa & 1 asdf asf asfa &7as dfas fasdf as0 & 003  \\ kalhsdfsa & 1 asdf asf asfa &7as dfas fasdf as0 & 003  \\ kalhsdfsa & 1 asdf asf asfa &7as dfas fasdf as0 & 003  \end{tabular} \caption{lala} \label{tabtablerefereasdasdnce} \end{table}  \end{document} 

and i'm running miktex 2.8 on windows xp

your multicolumn amount 1 high

change \multicolumn{4}{c}{hydrotalcite} \\\hline

(in stead of \multicolumn{5}{c}{hydrotalcite} \\\hline)

or add fifth column ;-)


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -