General ⇒ Using boolean Values
-
- Posts: 402
- Joined: Fri May 20, 2011 9:41 am
Re: Using boolean Values
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
Using boolean Values
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
-
- Posts: 402
- Joined: Fri May 20, 2011 9:41 am
Re: Using boolean Values
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
-
- Posts: 402
- Joined: Fri May 20, 2011 9:41 am