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.

This seems to be quite a common question with ordinary tabular environments, but I have not been able to find an answer for this problem, or any like it, using the tabularx environment.

My code is as follows:

\begin{tabularx}{\textwidth}{|p{3cm}|X|}
\hline
\textbf{Symbol (Name)}                              & \textbf{Example of Use}\\
\hline
\multirow{2}{*}{symbol\newline (Full name))}        & $x=\hdots$\\
\hline
                                                    & Description
\end{tabularx}

which produces:

tableoutput

I am trying to make (Full name)) appear on the line below symbol without the horizontal line extending all the way to the left. I only want to third horizontal line to separate the column on the right.

How do I achieve this with the tabularx environment?

With many thanks,

Froskoy.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

\hrule tells LaTeX to produce an horizontal line

Use \cline{2-2} instead (\cline{start column - end column})

Edit: In a \multirow you can use \parbox to get the output you ask

\begin{tabularx}{\textwidth}{|p{3cm}|X|}
\hline
\textbf{Symbol (Name)}                              & \textbf{Example of Use}\\
\hline
\multirow{2}{*}{\parbox{2.9cm}{symbol\newline (Full name)}} & $x=\hdots$\\

\cline{2-2}
                                                    & Description
\end{tabularx}

enter image description here

Edit: Another possibility is just not to use \multirow

\begin{tabularx}{\textwidth}{|p{3cm}|X|}
\hline
\textbf{Symbol (Name)}                              & \textbf{Example of Use}\\
\hline
symbol       & $x=\hdots$\\
\cline{2-2}
(Full name)  & Description
\end{tabularx}
share|improve this answer
    
Thanks! That looks great. –  Froskoy Feb 20 '13 at 9:09
    
I think that you probably do not need to use \multirow here, just \cline... –  Lionel MANSUY Feb 20 '13 at 9:11

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.