Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am new to Latex and I have tried to create a table but it seems not to work correctly - the vertical line is missed. Here is the code:

\begin{table*}[t]
  \centering
  \begin{center}
   \begin{tabular}{|r|l|c|c|c|}
    \hline &&\multicolumn{3}{c}{\bf Results}\\
    \hline\bf Nr.& \bf Features&\bf Strict &\bf Outer &\bf Inner\\ \hline
    1&Morphological F.&100.00&100.00&100.00\\
    2&1 + Bla &100.00&100.00&100.00\\
    3&2 + Blabla&100.00&100.00&100.00\\
    4&3 + blablabla&100.00&100.00&100.00\\
    5&4 + blablablabla&100.00&100.00&100.00\\
    \hline
   \end{tabular}
  \end{center}
  \caption{\label{font-table} Results. }
  \label{tab:1}
\end{table*}

Here is the output that I become :(

enter image description here

I think that something is wrong with the 5 line, but it seems I have tried everything :(

share|improve this question
    
Have you tried to write your 5th line like this: `\hline &&\multicolumn{3}{|c|}{\bf Results}\` –  hkviktor Jul 31 at 22:12
    
unrelated to the lines you just want \centering not \centering\begin{center} and also \bfseries not \bf –  David Carlisle Jul 31 at 22:14
    
Use `\hline &&\multicolumn{3}{c|}{\bfseries Results}\` –  esdd Jul 31 at 22:16
    
Welcome to TeX.SX! Please make your code compilable (if possible), or at least complete it with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. –  Jubobs Jul 31 at 22:27

2 Answers 2

up vote 3 down vote accepted

You forgot a | in your \multicolumn (first row). Delete the center environment: it only adds spurious vertical spacing:

\begin{table*}[t]
  \centering
   \begin{tabular}{|r|l|c|c|c|}
    \hline &&\multicolumn{3}{c|}{\bf Results}\\
    \hline\bf Nr.& \bf Features&\bf Strict &\bf Outer &\bf Inner\\ \hline
    1&Morphological F.&100.00&100.00&100.00\\
    2&1 + Bla &100.00&100.00&100.00\\
    3&2 + Blabla&100.00&100.00&100.00\\
    4&3 + blablabla&100.00&100.00&100.00\\
    5&4 + blablablabla&100.00&100.00&100.00\\
    \hline
   \end{tabular}
  \caption{\label{font-table} Results. }
  \label{tab:1}
\end{table*}

enter image description here

share|improve this answer

Look, I've add something and worked for me:

\documentclass{article}
\usepackage{amsthm}
\usepackage{enumitem}

\begin{document}

\begin{table*}[t]
  \centering
  \begin{center}
   \begin{tabular}{|r|l|c|c|c|}
    \hline &&\multicolumn{3}{|c|}{\bf Results}\\
    \hline\bf Nr.& \bf Features&\bf Strict &\bf Outer &\bf Inner\\ \hline
    1&Morphological F.&100.00&100.00&100.00\\
    2&1 + Bla &100.00&100.00&100.00\\
    3&2 + Blabla&100.00&100.00&100.00\\
    4&3 + blablabla&100.00&100.00&100.00\\
    5&4 + blablablabla&100.00&100.00&100.00\\
    \hline
   \end{tabular}
  \end{center}
  \caption{\label{font-table} Results. }
  \label{tab:1}
\end{table*}

\end{document}

I changed \hline &&\multicolumn{3}{c}{\bf Results}\\ for \hline &&\multicolumn{3}{|c|}{\bf Results}\\

share|improve this answer
    
\multicolumn{3}{c|} is enough. You were posting your answer while I finished mine. Sorry for the (almost) duplicate. If you want, I withdraw my answer. –  Bernard Jul 31 at 22:26
    
I saw it with your answer, just {c|} is enough. Is mandatory to erase one of the answers? –  hkviktor Jul 31 at 22:37
    
I guess not. It's just they're almost the same (anyway, there weren't many choices to answer…). –  Bernard Jul 31 at 23:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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