Vertical line only in one part of a table
I would just place the respective items in a \multicolumn{1}{|c|}{...}
:
\documentclass{article}
\usepackage{tabularx}% http://ctan.org/pkg/tabularx
\begin{document}
\begin{tabularx}{\linewidth}{|XX|}
\hline
\multicolumn{2}{|c|}{\textbf{title name}}\\
\hline
something: & else \\
something: & else \\
something: & else \\
\hline
\multicolumn{2}{|c|}{bla bla blah}\\
\hline
\multicolumn{1}{|l|}{title text:} & description 1 \\
\multicolumn{1}{|l|}{title text:} & description 1 \\
\hline
\end{tabularx}
\end{document}
For an improved visual layout of tables, I would suggest using the booktabs
package. It provides different horizontal lines (of varying thickness) that neatly separates the table headers and contents. However, due to this, spacing with vertical lines (down a column) is considered problematic. In fact, the booktabs
documentation stipulates two main points to consider when making publication-style tables:
- Never, ever use vertical rules.
- Never use double rules.
The reason for the first restriction is because table inherently have some horizontal alignment with their columnar structure. As such, adding a vertical line would emphasize the obvious. Here's a mock-up of your original MWE that shows the table using a standard booktabs
representation: