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 working on a table.

My problem is that the text in the column "Type" for instance is not vertical justified. In addition I have an extra line segment at the bottom of the very first cell.

\documentclass{article}
\usepackage{multirow}
\begin{document}

\begin{table}[htb]
\begin{center}
  \begin{tabular}{|l|p{3cm}|p{5cm}|}
      \cline{2-3}
        \multicolumn{1}{c|}{} &Type & Criteria \\ \cline{2-3}
        \hline
        \hline
        \multirow{3}{*}{Objective}
            & {Shortest path (global, local) }&   exits in sight range, signs, experience,  \ldots \\ \cline{2-3}
            & {Quickest path}&   jam in sight range, experience,\ldots \\ \cline{2-3}
            &Given path &   directives from signs, personal,\ldots \\ \hline
        \multirow{3}{*}{Subjective}
    &Pleasant path &   design, clarity, lighting, experience, emotional state, \\ \cline{2-3}
    &Safest path &   experience, overview, walking in group\ldots \\ \cline{2-3}
    &Known path &  experience, overview, (re) identification of signs,\ldots\\ \hline
  \ldots &\ldots &\ldots \\ \hline
  \end{tabular}
\end{center}
\caption{Examples of path types inside a facility and possible influencing criteria.}
\label{tab:path_types}
\end{table}
\end{document}
share|improve this question
    
Welcome to TeX.SE. Please edit your question to clarify what the issue is as I don't see it form the output and the title. Also, while code snippets are useful in explanations, it is always best to compose a fully compilable MWE that illustrates the problem including the \documentclass and the appropriate packages (As @DavidCarlisle has already done for you in this case). –  Peter Grill Apr 10 '12 at 15:42
1  
Welcome to tex.sx, I have made your example into a complete "MWE" example, loading multirow, but could you edit the question to add a question? Just posting some code that runs without error does not give us much of a clue as to the problem. –  David Carlisle Apr 10 '12 at 15:44
    
Thank you for editing the post (Apologies for not even clarify my problem). My problem is that the text in the column "Type" for instance is not vertical justified. In addition I have an extra line segment at the bottom of the very first cell. Thanks in advance ! –  Kemloh Apr 10 '12 at 16:17
add comment

1 Answer

up vote 2 down vote accepted

For varied single/double horizontal and intersecting/split vertical lines in a tabular (or array) environment, use the hhline package. Here's your example, with the modified \hline\hline:

enter image description here

\documentclass{article}
\usepackage{multirow}% http://ctan.org/pkg/multirow
\usepackage{hhline}% http://ctan.org/pkg/hhline
\begin{document}

\begin{table}[htb]
  \centering
  \begin{tabular}{|l|p{3cm}|p{5cm}|}
    \cline{2-3}
    \multicolumn{1}{c|}{} & Type & Criteria \\ 
    %\hline
    %\hline
    \hhline{-:=:=}
    \multirow{3}{*}{Objective}
      & Shortest path (global, local) & exits in sight range, signs, experience,  \ldots \\ \cline{2-3}
      & Quickest path & jam in sight range, experience, \ldots \\ \cline{2-3}
      & Given path & directives from signs, personal, \ldots \\ \hline
    \multirow{3}{*}{Subjective}
      & Pleasant path & design, clarity, lighting, experience, emotional state, \\ \cline{2-3}
      & Safest path & experience, overview, walking in group \ldots \\ \cline{2-3}
      & Known path &experience, overview, (re) identification of signs, \ldots\\ \hline
    \ldots & \ldots & \ldots \\ \hline
  \end{tabular}
  \caption{Examples of path types inside a facility and possible influencing criteria.}
  \label{tab:path_types}
\end{table}
\end{document}​

The hhline documentation contains more information on specifying the arguments to \hhline.

Note that code-only questions provide little context, even if you feel that the question is posed in the header/title.

share|improve this answer
    
Thank you very much. Is there any way to vertically center teh values in the column Type for instance? –  Kemloh Apr 10 '12 at 17:16
    
@Kemloh: You can prepend any of Type or Criteria with \rule{0pt}{.9\baselineskip}. This will insert a zero-width rule that stretches above/higher than those entries, pushing the first \cline up a little, and making it more centred. For more on horizontal/vertical padding of tabular or array elements, see Column padding in tables. –  Werner Apr 10 '12 at 17:53
    
Thank you for that hint. It worked great! –  Kemloh May 3 '12 at 16:13
add comment

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.