## LaTeX forum ⇒ Graphics, Figures & Tables ⇒ Table formatting

Information and discussion about graphics, figures & tables in LaTeX documents.
Lusavia
Posts: 6
Joined: Mon May 11, 2020 1:44 am

### Table formatting

Hello. I'm just learning tables and have two questions I can't find answers to searching the forum:

1) Is there a vertical equivalent to the partial horizontal line command (\cline{ })? I only need vertical borders on certain cells in my table but setting them with "|" affects all rows in a column (also merged cells lose the right border, another reason I have to do borders by cell).

2. Can I specify row height for individual rows instead of \renewcommand{\arraystretch}{ } which affects all rows?

Thanks.

Whoops, third question - why doesn't \textbf { } work in tables? I can underline no problem but bolding doesn't work...

Ijon Tichy
Posts: 332
Joined: Mon Dec 24, 2018 10:12 am
You can use \multicolumn to change the column specification inclusive the following vertical line specification of a certain column, e.g., \multicolumn{1}{c|}{…} to add a vertical rule or \multicolumn{1}{c}{…} to remove it. Package hhline provides extra features for lines between columns, rows and cells. See the package manual for more information and examples.

Extra spaces between rows can be added by the optional argument of \\, e.g., \\[5cm] or with package booktabs (which is not recommended to be used with vertical lines). Or you can add an invisible rule, e.g., \rule[-\baselineskip]{0pt}{3\baselineskip}.

All the commands used in this answers should be documented in (more or less complete) introductions or beginner guided to LaTeX.

\textbf does work in tabulars:
\documentclass{article}\begin{document}\begin{table}\centering\begin{tabular}{lr}left & \textbf{right} \\\end{tabular}\caption{Example}\end{table}\end{document}

BTW: If you have multiple questions please use multiple topics and always add a suitable minimal working example to each question.

Lusavia
Posts: 6
Joined: Mon May 11, 2020 1:44 am
Great, thanks very much. I'll get to work on both. Re \textbf in tables, that and italics still aren't working, so probably something to do with Overleaf which I'm using.

Ijon Tichy
Posts: 332
Joined: Mon Dec 24, 2018 10:12 am
My examples works on Overleaf too. And \textit (or \emph) instead of \textbf also works. So I doubt that anybody can help you, unless you'll show us a minimal working example.

Lusavia
Posts: 6
Joined: Mon May 11, 2020 1:44 am
If this is an acceptable minimal working example, the words "Canonical Verbs:" should be bold and "remember" in italics; neither comes through correctly in Overleaf's compilation (image attached).

\begin{tabular}{ r c | r r | r r | m{.5cm} | l l | l l | }
\textbf{Canonical Verbs:} & \multicolumn {1} {c}\ & \multicolumn{4} {c} {stem - \textit{remember}} & \multicolumn {1} {c}\ & \multicolumn{4} {c} {lɛv-} \\
& \multicolumn {1} {c}\ & & \multicolumn {1} {c}\ & & \multicolumn {1} {c}\ & \multicolumn {1} {c}\ & & \multicolumn {1} {c}\ & & \multicolumn {1} {c}\ \\
\cline{3-6} \cline{8-11}
Attachments
Capture.JPG (28.61 KiB) Viewed 187 times

Ijon Tichy
Posts: 332
Joined: Mon Dec 24, 2018 10:12 am
Lusavia wrote:If this is an acceptable minimal working example

As the name says and the linked page explains, a minimal working example is working (without changing or adding anything). This is not the case for your code. So no. From your screenshot I can see, that you've changed the font. But you've not shown how. So, because this again is not a minimal working example, I do not know, whether changing the font is part of your problem.

PS: And please mark your code as code.

Lusavia
Posts: 6
Joined: Mon May 11, 2020 1:44 am
I identified myself as a beginner in the first post. So if my questions or the format of my questions frustrate you, how about recommending a forum that helps beginners? What we don't need is the same link on minimal examples repeated four times, no one in our office can make heads or tails of what you actually want in a post, wordy as it was.

In fact we've spent a good deal of time going thru help guides and other online resources to see if latex could be a good option in some of our work. So when a simple thing like specifying row height in a table isn't mentioned or doesn't seem possible in latex, it's natural to pose the question to the forum that "loves good questions". Getting smarmy comments back pretty much tells us not to waste our time.