LaTeX forum ⇒ General ⇒ Using boolean Values
-
- Posts: 402
- Joined: Fri May 20, 2011 9:41 am
Re: Using boolean Values
The third tabular table seems too cramped but I like the first table, the horizontal line seems just a little bent
If it looks too cramped you can adjust that, for example this way:
The
Regards
\documentclass{article} \usepackage[T1]{fontenc} \usepackage{array} \usepackage[version=3]{mhchem} \begin{document} \begingroup \setlength\extrarowheight{1ex} \begin{tabular}{>{$}c<{$}*{3}{|>{$}c<{$}}} & \ce{CH3COOH <=>} & \ce{CH3COO- +} & \ce{H+} \\\hline \ce{I} & 0 & 1 & 0.48 \\ \ce{C} & +x & -x & -x \\ \ce{E} & x & 1-x & 0.48-x \end{tabular} \endgroup \end{document}
The
\begingroup ... \endgroup
is only to keep the setting of \extrarowheight
local. It is unnecessary if the whole table is inside of an environment.Regards
site moderator & package author
-
- Posts: 402
- Joined: Fri May 20, 2011 9:41 am
I need a little more space between the top row compounds and the horizontal line also set by the same amount of row separation
ghostanime2001 wrote:I need a little more space between the top row compounds and the horizontal line
Well, as you hopefully know you can specify an additional vertical skip in the optional argument of
\\
:
\documentclass{article} \usepackage[T1]{fontenc} \usepackage{array} \usepackage[version=3]{mhchem} \begin{document} \begingroup \setlength\extrarowheight{1ex} \begin{tabular}{>{$}c<{$}*{3}{|>{$}c<{$}}} & \ce{CH3COOH <=>} & \ce{CH3COO- +} & \ce{H+} \\[.5ex] \hline \ce{I} & 0 & 1 & 0.48 \\ \ce{C} & +x & -x & -x \\ \ce{E} & x & 1-x & 0.48-x \end{tabular} \endgroup \end{document}
ghostanime2001 wrote:also set by the same amount of row separation
I don't understand what you mean by that...
Regards
site moderator & package author
-
- Posts: 402
- Joined: Fri May 20, 2011 9:41 am
What I meant to say was I wanted the same amount of whitespace between rows as between the first line of compounds and horizontal rule.
Who is online
Users browsing this forum: No registered users and 10 guests