Graphics, Figures & Tables ⇒ Table formatting
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...
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...
NEW: TikZ book now 40% off at Amazon.com for a short time.

- Ijon Tichy
- Posts: 640
- Joined: Mon Dec 24, 2018 10:12 am
Table formatting
You can use
Extra spaces between rows can be added by the optional argument of
All the commands used in this answers should be documented in (more or less complete) introductions or beginner guided to LaTeX.
BTW: If you have multiple questions please use multiple topics and always add a suitable
minimal working example to each question.
\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:
Code: Select all
\documentclass{article}
\begin{document}
\begin{table}
\centering
\begin{tabular}{lr}
left & \textbf{right} \\
\end{tabular}
\caption{Example}
\end{table}
\end{document}

Sorry, but I can no longer participate here as the administrator is trampling on my wishes on one of his other platforms. 

Table formatting
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: 640
- Joined: Mon Dec 24, 2018 10:12 am
Table formatting
My examples works on Overleaf too. And
minimal working example.
\textit
(or \emph
) instead of \textbf
also works. So I doubt that anybody can help you, unless you'll show us a 
Sorry, but I can no longer participate here as the administrator is trampling on my wishes on one of his other platforms. 

Table formatting
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}
\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 6956 times
- Ijon Tichy
- Posts: 640
- Joined: Mon Dec 24, 2018 10:12 am
Table formatting
As the name says and the linked page explains, aLusavia wrote:If this is an acceptable minimal working example


Sorry, I cannot help you.
PS: And please mark your code as code.
Sorry, but I can no longer participate here as the administrator is trampling on my wishes on one of his other platforms. 

Table formatting
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.
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.