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
NEW: TikZ book now 40% off at Amazon.com for a short time.

Using boolean Values
If it looks too cramped you can adjust that, for example this way:
The
Regards
Code: Select all
\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}
\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
Re: Using boolean Values
I need a little more space between the top row compounds and the horizontal line also set by the same amount of row separation
Using boolean Values
Well, as you hopefully know you can specify an additional vertical skip in the optional argument ofghostanime2001 wrote:I need a little more space between the top row compounds and the horizontal line
\\
:
Code: Select all
\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}
I don't understand what you mean by that...ghostanime2001 wrote:also set by the same amount of row separation
Regards
site moderator & package author
-
- Posts: 402
- Joined: Fri May 20, 2011 9:41 am
Re: Using boolean Values
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.