GeneralMany Errors Compiling Latex

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
cabellicar123
Posts: 1
Joined: Thu Jul 30, 2015 11:54 pm

Many Errors Compiling Latex

Post by cabellicar123 »

Hi. I am pretty new to LaTeX. I am getting errors compiling this code, but I cannot figure out why it is generating so many errors: http://pastebin.com/gcU8MxPv. The following is produced:

Code: Select all

This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian) (format=pdflatex 2015.7.9)  30 JUL 2015 23:43
entering extended mode
 restricted \write18 enabled.
 %&-line parsing enabled.
**electrolysis_of_water_and_aqueous_solutions.tex
(./electrolysis_of_water_and_aqueous_solutions.tex
LaTeX2e <2011/06/27>
Babel <3.9h> and hyphenation patterns for 2 languages loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size12.clo
File: size12.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
(/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty
Package: geometry 2010/09/12 v5.6 Page Geometry

(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 1999/03/16 v1.13 key=value parser (DPC)
\KV@toks@=\toks14
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty
Package: ifpdf 2011/01/30 v2.3 Provides the ifpdf switch (HO)
Package ifpdf Info: pdfTeX in PDF mode is detected.
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifvtex.sty
Package: ifvtex 2010/03/01 v1.5 Detect VTeX and its facilities (HO)
Package ifvtex Info: VTeX not detected.
)
(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty
Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional
)
\Gm@cnth=\count87
\Gm@cntv=\count88
\c@Gm@tempcnt=\count89
\Gm@bindingoffset=\dimen103
\Gm@wd@mp=\dimen104
\Gm@odd@mp=\dimen105
\Gm@even@mp=\dimen106
\Gm@layoutwidth=\dimen107
\Gm@layoutheight=\dimen108
\Gm@layouthoffset=\dimen109
\Gm@layoutvoffset=\dimen110
\Gm@dimlist=\toks15
)
(./electrolysis_of_water_and_aqueous_solutions.aux)
\openout1 = `electrolysis_of_water_and_aqueous_solutions.aux'.

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 8.
LaTeX Font Info:    ... okay on input line 8.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 8.
LaTeX Font Info:    ... okay on input line 8.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 8.
LaTeX Font Info:    ... okay on input line 8.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 8.
LaTeX Font Info:    ... okay on input line 8.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 8.
LaTeX Font Info:    ... okay on input line 8.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 8.
LaTeX Font Info:    ... okay on input line 8.

*geometry* driver: auto-detecting
*geometry* detected driver: pdftex
*geometry* verbose mode - [ preamble ] result:
* driver: pdftex
* paper: <default>
* layout: <same size as paper>
* layoutoffset:(h,v)=(0.0pt,0.0pt)
* modes: 
* h-part:(L,W,R)=(72.26999pt, 469.75502pt, 72.26999pt)
* v-part:(T,H,B)=(72.26999pt, 650.43001pt, 72.26999pt)
* \paperwidth=614.295pt
* \paperheight=794.96999pt
* \textwidth=469.75502pt
* \textheight=650.43001pt
* \oddsidemargin=0.0pt
* \evensidemargin=0.0pt
* \topmargin=-37.0pt
* \headheight=12.0pt
* \headsep=25.0pt
* \topskip=12.0pt
* \footskip=30.0pt
* \marginparwidth=44.0pt
* \marginparsep=10.0pt
* \columnsep=10.0pt
* \skip\footins=10.8pt plus 4.0pt minus 2.0pt
* \hoffset=0.0pt
* \voffset=0.0pt
* \mag=1000
* \@twocolumnfalse
* \@twosidefalse
* \@mparswitchfalse
* \@reversemarginfalse
* (1in=72.27pt=25.4mm, 1cm=28.453pt)

LaTeX Font Info:    External font `cmex10' loaded for size
(Font)              <14.4> on input line 10.
LaTeX Font Info:    External font `cmex10' loaded for size
(Font)              <7> on input line 10.
[1

{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}]
LaTeX Font Info:    External font `cmex10' loaded for size
(Font)              <12> on input line 15.
LaTeX Font Info:    External font `cmex10' loaded for size
(Font)              <8> on input line 15.
LaTeX Font Info:    External font `cmex10' loaded for size
(Font)              <6> on input line 15.

Underfull \hbox (badness 10000) in paragraph at lines 15--24

 []


Underfull \hbox (badness 10000) in paragraph at lines 45--64

 []

[1]
Underfull \hbox (badness 10000) in paragraph at lines 65--76

 []


Underfull \hbox (badness 10000) in paragraph at lines 77--82

 []


! LaTeX Error: Bad math environment delimiter.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.86 ...reduction): & \(2H_{2}O_{(l)} + 2e^{-}\) &
                                                  
? 
! Missing $ inserted.
<inserted text> 
                $
l.86 ...reduction): & \(2H_{2}O_{(l)} + 2e^{-}\) &
                                                  
? 

! LaTeX Error: Bad math environment delimiter.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.88     Anode (oxidation): & \(2I^{-}_{(aq)}\) &
                                                  \(I_{2(s)} + 2e^{-}\)\\
? 
! Missing $ inserted.
<inserted text> 
                $
l.88     Anode (oxidation): & \(2I^{-}_{(aq)}\) &
                                                  \(I_{2(s)} + 2e^{-}\)\\
? 

! LaTeX Error: Bad math environment delimiter.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.91 ...reduction): & \(2H_{2}O_{(l)} + 2e^{-}\) &
                                                  
? 
! Missing $ inserted.
<inserted text> 
                $
l.91 ...reduction): & \(2H_{2}O_{(l)} + 2e^{-}\) &
                                                  
? 

! LaTeX Error: Bad math environment delimiter.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.93     Anode (oxidation): & \(2Br^{-}_{(aq)}\) &
                                                   \(Br_{2(l)} + 2e^{-}\)\\
? 
! Missing $ inserted.
<inserted text> 
                $
l.93     Anode (oxidation): & \(2Br^{-}_{(aq)}\) &
                                                   \(Br_{2(l)} + 2e^{-}\)\\
? 

! LaTeX Error: Bad math environment delimiter.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.96 ...reduction): & \(2H_{2}O_{(l)} + 2e^{-}\) &
                                                  
? 
! Missing $ inserted.
<inserted text> 
                $
l.96 ...reduction): & \(2H_{2}O_{(l)} + 2e^{-}\) &
                                                  
? 

! LaTeX Error: Bad math environment delimiter.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.98     Anode (oxidation): & \(2Cl^{-}_{(aq)}\) &
                                                   \(Cl_{2(g)} + 2e^{-}\)\\
? 
! Missing $ inserted.
<inserted text> 
                $
l.98     Anode (oxidation): & \(2Cl^{-}_{(aq)}\) &
                                                   \(Cl_{2(g)} + 2e^{-}\)\\
? 

Underfull \hbox (badness 10000) in paragraph at lines 84--109

 []


Underfull \hbox (badness 10000) in paragraph at lines 84--109

 []

[2]

! LaTeX Error: Bad math environment delimiter.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.111 ...lution: & \(KI_{(aq)} + 2H_{2}O_{(l)}\) &
                                                   \(KOH_{(aq)} + 2H_{2(g)} +
? 
! Missing $ inserted.
<inserted text> 
                $
l.111 ...lution: & \(KI_{(aq)} + 2H_{2}O_{(l)}\) &
                                                   \(KOH_{(aq)} + 2H_{2(g)} +
? 

! LaTeX Error: Bad math environment delimiter.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.113 ...ution: & \(KBr_{(aq)} + 2H_{2}O_{(l)}\) &
                                                   \(KOH_{(aq)} + 2H_{2(g)} +
? 
! Missing $ inserted.
<inserted text> 
                $
l.113 ...ution: & \(KBr_{(aq)} + 2H_{2}O_{(l)}\) &
                                                   \(KOH_{(aq)} + 2H_{2(g)} +
? 

! LaTeX Error: Bad math environment delimiter.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.115 ...ution: & \(KCl_{(aq)} + 2H_{2}O_{(l)}\) &
                                                   \(KOH_{(aq)} + 2H_{2(g)} +
? 
! Missing $ inserted.
<inserted text> 
                $
l.115 ...ution: & \(KCl_{(aq)} + 2H_{2}O_{(l)}\) &
                                                   \(KOH_{(aq)} + 2H_{2(g)} +
? 

! LaTeX Error: Bad math environment delimiter.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.122 ... (reduction): & \(K^{+}_{(l)} + e^{-}\) &
                                                   \(K_{(s)}\)\\
? 
! Missing $ inserted.
<inserted text> 
                $
l.122 ... (reduction): & \(K^{+}_{(l)} + e^{-}\) &
                                                   \(K_{(s)}\)\\
? 

! LaTeX Error: Bad math environment delimiter.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.123     Anode (oxidation): & \(2I^{-}_{(l)}\) &
                                                  \(I_{2(s)} + 2e^{-}\)\\
? 
! Missing $ inserted.
<inserted text> 
                $
l.123     Anode (oxidation): & \(2I^{-}_{(l)}\) &
                                                  \(I_{2(s)} + 2e^{-}\)\\
? 

! LaTeX Error: Bad math environment delimiter.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.124     Overall Equation: & \(2KI_{(l)}\) &
                                              \(2K_{(s)} + I_{2(s)}\)\\
? 
! Missing $ inserted.
<inserted text> 
                $
l.124     Overall Equation: & \(2KI_{(l)}\) &
                                              \(2K_{(s)} + I_{2(s)}\)\\
? 

! LaTeX Error: Bad math environment delimiter.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.129 ... (reduction): & \(K^{+}_{(l)} + e^{-}\) &
                                                   \(K_{(s)}\)\\
? 
! Missing $ inserted.
<inserted text> 
                $
l.129 ... (reduction): & \(K^{+}_{(l)} + e^{-}\) &
                                                   \(K_{(s)}\)\\
? 

! LaTeX Error: Bad math environment delimiter.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.130     Anode (oxidation): & \(2Br^{-}_{(l)}\) &
                                                   \(Br_{2(l)} + 2e^{-}\)\\
? 
! Missing $ inserted.
<inserted text> 
                $
l.130     Anode (oxidation): & \(2Br^{-}_{(l)}\) &
                                                   \(Br_{2(l)} + 2e^{-}\)\\
? 

! LaTeX Error: Bad math environment delimiter.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.131     Overall Equation: & \(2KBr_{(l)}\) &
                                               \(2K_{(s)} + Br_{2(s)}\)\\
? 
! Missing $ inserted.
<inserted text> 
                $
l.131     Overall Equation: & \(2KBr_{(l)}\) &
                                               \(2K_{(s)} + Br_{2(s)}\)\\
? 

! LaTeX Error: Bad math environment delimiter.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.136 ... (reduction): & \(K^{+}_{(l)} + e^{-}\) &
                                                   \(K_{(s)}\)\\
? 
! Missing $ inserted.
<inserted text> 
                $
l.136 ... (reduction): & \(K^{+}_{(l)} + e^{-}\) &
                                                   \(K_{(s)}\)\\
? 

! LaTeX Error: Bad math environment delimiter.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.137     Anode (oxidation): & \(2Cl^{-}_{(l)}\) &
                                                   \(Cl_{2(g)} + 2e^{-}\)\\
? 
! Missing $ inserted.
<inserted text> 
                $
l.137     Anode (oxidation): & \(2Cl^{-}_{(l)}\) &
                                                   \(Cl_{2(g)} + 2e^{-}\)\\
? 

! LaTeX Error: Bad math environment delimiter.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.138     Overall Equation: & \(2KCl_{(l)}\) &
                                               \(2K_{(s)} + Cl_{2(g)}\)\\
? 
! Missing $ inserted.
<inserted text> 
                $
l.138     Overall Equation: & \(2KCl_{(l)}\) &
                                               \(2K_{(s)} + Cl_{2(g)}\)\\
? 

Underfull \hbox (badness 10000) in paragraph at lines 120--140

 []


Underfull \hbox (badness 10000) in paragraph at lines 120--140

 []

[3] (./electrolysis_of_water_and_aqueous_solutions.aux) ) 
Here is how much of TeX's memory you used:
 757 strings out of 495028
 10597 string characters out of 6181498
 69479 words of memory out of 5000000
 4023 multiletter control sequences out of 15000+600000
 8501 words of font info for 30 fonts, out of 8000000 for 9000
 14 hyphenation exceptions out of 8191
 24i,8n,32p,521b,207s stack positions out of 5000i,500n,10000p,200000b,80000s
</usr/share/texlive/te
xmf-dist/fonts/type1/public/amsfonts/cm/cmbx12.pfb></usr/share/texlive/texmf-di
st/fonts/type1/public/amsfonts/cm/cmmi12.pfb></usr/share/texlive/texmf-dist/fon
ts/type1/public/amsfonts/cm/cmmi8.pfb></usr/share/texlive/texmf-dist/fonts/type
1/public/amsfonts/cm/cmr12.pfb></usr/share/texlive/texmf-dist/fonts/type1/publi
c/amsfonts/cm/cmr17.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfo
nts/cm/cmr6.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/c
mr8.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy10.pf
b></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy6.pfb></usr
/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy8.pfb>
Output written on electrolysis_of_water_and_aqueous_solutions.pdf (4 pages, 119
021 bytes).
PDF statistics:
 57 PDF objects out of 1000 (max. 8388607)
 40 compressed objects within 1 object stream
 0 named destinations out of 1000 (max. 500000)
 1 words of extra memory for PDF output out of 10000 (max. 10000000)

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Many Errors Compiling Latex

Post by Stefan Kottwitz »

Welcome to the forum!

You can add also code to the forum post. There's a button for it. The same like you did with the .log file. One of the benefits is, that we can easily open it by one click in the online LaTeX compiler. Here is the code from the paste bin:

Code: Select all

\documentclass[12pt]{article}
\title{Electrolysis of Water and Aqueous Solutions}
\author{Carlo Abelli \\ AP Chemistry --- Mr.\ Kern}
\date{February 19, 2015}

\usepackage[margin=1.0in]{geometry}

\begin{document}
  \begin{titlepage}
    \maketitle
    \thispagestyle{empty}
  \end{titlepage}
  \section{Water Electrolysis Calculations and Questions}
  \subsection{Half Reaction for Each Electrode}
  Cathode (reduction): \(2H^{+}_{(aq)} + 2e^{-} \rightarrow H_{2(g)}\)\\
  This reaction took place at the cathode because during the splint test the gas
  produced a popping sound, characteristic of hydrogen, a highly flammable gas.
  \\
  \\
  Anode (oxidation): \(2H_{2}O_{(l)} \rightarrow O_{2(g)} + 4H^{+}_{(aq)} +
   4e^{-}\)\\
  This reaction took place at the anode because during the splint test the gas
  reignited the splint ember, characteristic of oxygen.
  \subsection{Overall Reaction}
  \(2H_{2}O_{(l)} \rightarrow 2H_{2(g)} + O_{2(g)}\)
  \subsection{Average Current}
  Average Current: \(\frac{0.44 + 0.43 + 0.44 + 0.44 + 0.45 + 0.46 + 0.45 + 0.46
    + 0.46 + 0.45 + 0.45 + 0.46 + 0.45 + 0.47 + 0.46}{15} = 0.45\)
  \subsection{Amount of Hydrogen Produced in One Hour}
  \(\frac{0.45\ coulombs}{1.00\ \sec} * \frac{60.0\ \sec}{1.00\ \min} *
    \frac{60.0\ \min}{1.00\ hour} * \frac{1.00\ e^{-}}{1.60*10^{-19}\ coulombs} *
    \frac{1.00\ mol\ e^{-}}{6.022*10^{23}\ e^{-}} * \frac{1.00\ mol\ H_{2}}
    {2.00\ mol\ e^{-}} = 0.0084\ mol\ H_{2}\)\\
  \(0.0084\ mol\ H_{2} * 22.4\ L/mol = 0.19\ L\ H_{2}\)\\
  \(0.0084\ mol\ H_{2} * 2.016\ g/mol = 0.0017\ g\ H_{2}\)
  \subsection{Amount of Time Needed to Produce 30 mL Oxygen Gas at
  22\(^{\circ}\)C and 1.00 atm}
  \(1.00\ atm * 0.030\ L = n * 0.08206\ L\ atm\ K^{-1}\ mol^{-1} * 295\ K\)\\
  \(n = 0.0012\ mol\ O_{2}\)\\
  \(0.0012\ mol\ O_{2} * \frac{4.00\ mol\ e^{-}}{1.00\ mol\ O_{2}} *
    \frac{6.022*10^{23}\ e^{-}}{1.00\ mol\ e^{-}} *
    \frac{1.60*10^{-19}\ coulombs}{1\ e^{-}} * \frac{1.00\ \sec}{0.45\ coulombs}
    = 100.\ \sec\)
  \subsection{Moles of Gas Produced in Experiment}
  Cathode (Hydrogen)\\
  \(P_{container} = 36.8\ cm\ H_{2}O * \frac{10.0\ mm}{1.00\ cm} *
    \frac{1.08\ g\ H_{2}O} {1\ mL\ H_{2}O} * \frac{1\ mL\ Hg}
    {13.534\ g\ Hg} + 751.1\ mm\ Hg = 780.5\ mm\ Hg\)\\
  \(P_{gas} = P_{container} - P_{H_{2}O}\)\\
  \(P_{gas} = 780.5\ mm\ Hg - 18.7\ mm\ Hg = 761.8\ mm\ Hg\)\\
  \(761.8\ mm\ Hg * 0.0486\ L = n * 62.363\ L\ mmHg\ K^{-1}\ mol^{-1} * 294.0\ K\)
  \\
  \(n = 0.00202\ mol\ H_{2}\)\\
  \\
  Anode (Oxygen)\\
  \(P_{container} = 24.0\ cm\ H_{2}O * \frac{10.0\ mm}{1.00\ cm} *
    \frac{1.08\ g\ H_{2}O} {1\ mL\ H_{2}O} * \frac{1\ mL\ Hg}
    {13.534\ g\ Hg} + 751.1\ mm\ Hg = 770.3\ mm\ Hg\)\\
  \(P_{gas} = P_{container} - P_{H_{2}O}\)\\
  \(P_{gas} = 770.3\ mm\ Hg - 18.7\ mm\ Hg = 751.6\ mm\ Hg\)\\
  \(751.6\ mm\ Hg * 0.0239\ L = n * 62.363\ L\ mmHg\ K^{-1}\ mol^{-1} * 294.0\ K\)
  \\
  \(n = 0.000980\ mol\ O_{2}\)
  \subsection{Theoretical Moles of Gas Produced}
  Cathode (Hydrogen)\\
  \(\frac{0.45\ coulombs}{1.00\ \sec} * \frac{60.0\ \sec}{1.00\ \min} * 14.0\ \min *
    \frac{1.00\ e^{-}}{1.60*10^{-19}\ coulombs} * \frac{1.00\ mol\ e^{-}}
    {6.022*10^{23}\ e^{-}} * \frac{1.00\ mol\ H_{2}}{2.00\ mol\ e^{-}} =
    0.0020\ mol\ H_{2}\)\\
  \\
  Anode (Oxygen)\\
  \(\frac{0.45\ coulombs}{1.00\ \sec} * \frac{60.0\ \sec}{1.00\ \min} * 14.0\ \min *
    \frac{1.00\ e^{-}}{1.60*10^{-19}\ coulombs} * \frac{1.00\ mol\ e^{-}}
    {6.022*10^{23}\ e^{-}} * \frac{1.00\ mol\ O_{2}}{4.00\ mol\ e^{-}} =
    0.00098\ mol\ O_{2}\)
  \subsection{Percent Deviation}
  Cathode (Hydrogen)\\
  \(\frac{0.00202\ mol - 0.0020\ mol}{0.0020\ mol} * 100 = 0.0\%\ deviation\)\\
  \\
  Anode (Oxygen)\\
  \(\frac{0.000980\ mol - 0.00098\ mol}{0.00098\ mol} * 100 = 0.0\%\ deviation\)
  \section{Aqueous KI, KBr and KCl Electrolysis Calculations and Questions}
  \subsection{Half Reactions for Each Electrode}
  \begin{tabular}{ l r @{\(\rightarrow\)} l }
    KI Solution\\
    Cathode (reduction): & \(2H_{2}O_{(l)} + 2e^{-}\) &
      \(2OH^{-}_{(aq)} + H_{2(g)}\)\\
    Anode (oxidation): & \(2I^{-}_{(aq)}\) & \(I_{2(s)} + 2e^{-}\)\\
    \\
    KBr Solution\\
    Cathode (reduction): & \(2H_{2}O_{(l)} + 2e^{-}\) &
      \(2OH^{-}_{(aq)} + H_{2(g)}\)\\
    Anode (oxidation): & \(2Br^{-}_{(aq)}\) & \(Br_{2(l)} + 2e^{-}\)\\
    \\
    KCl Solution\\
    Cathode (reduction): & \(2H_{2}O_{(l)} + 2e^{-}\) &
      \(2OH^{-}_{(aq)} + H_{2(g)}\)\\
    Anode (oxidation): & \(2Cl^{-}_{(aq)}\) & \(Cl_{2(g)} + 2e^{-}\)\\
  \end{tabular}\\
  \\
  The water half reaction had to have occurred at the cathode because the
  phenolphthalein indicator was activated by the creation of \(OH^{-}\),
  creating the purple color observed at the cathode.\\
  \\
  The iodine, chlorine and bromine half reactions had to have occurred at the
  anode because in the first experiment, a dark solid was created at the anode
  (iodine), in the second experiment, a yellow liquid was observed (bromine)
  and in the third experiment, a chlorine smelling gas was produced (chlorine).
  \subsection{Overall Equations}
  \begin{tabular}{ l r @{\(\rightarrow\)} l }
    KI Solution: & \(KI_{(aq)} + 2H_{2}O_{(l)}\) & \(KOH_{(aq)} + 2H_{2(g)} +
      I_{2(s)}\)\\
    KBr Solution: & \(KBr_{(aq)} + 2H_{2}O_{(l)}\) & \(KOH_{(aq)} + 2H_{2(g)} +
      Br_{2(l)}\)\\
    KCl Solution: & \(KCl_{(aq)} + 2H_{2}O_{(l)}\) & \(KOH_{(aq)} + 2H_{2(g)} +
      Cl_{2(g)}\)\\
    Test Solution:
  \end{tabular}
  \subsection{Half Reactions and Overall Equation for Molten KI, KBr and KCl}
  KI\\
  \begin{tabular}{ l r @{\(\rightarrow\)} l }
    Cathode (reduction): & \(K^{+}_{(l)} + e^{-}\) & \(K_{(s)}\)\\
    Anode (oxidation): & \(2I^{-}_{(l)}\) & \(I_{2(s)} + 2e^{-}\)\\
    Overall Equation: & \(2KI_{(l)}\) & \(2K_{(s)} + I_{2(s)}\)\\
  \end{tabular}\\
  \\
  KBr\\
  \begin{tabular}{ l r @{\(\rightarrow\)} l }
    Cathode (reduction): & \(K^{+}_{(l)} + e^{-}\) & \(K_{(s)}\)\\
    Anode (oxidation): & \(2Br^{-}_{(l)}\) & \(Br_{2(l)} + 2e^{-}\)\\
    Overall Equation: & \(2KBr_{(l)}\) & \(2K_{(s)} + Br_{2(s)}\)\\
  \end{tabular}\\
  \\
  KCl\\
  \begin{tabular}{ l r @{\(\rightarrow\)} l }
    Cathode (reduction): & \(K^{+}_{(l)} + e^{-}\) & \(K_{(s)}\)\\
    Anode (oxidation): & \(2Cl^{-}_{(l)}\) & \(Cl_{2(g)} + 2e^{-}\)\\
    Overall Equation: & \(2KCl_{(l)}\) & \(2K_{(s)} + Cl_{2(g)}\)\\
  \end{tabular}
  \subsection{Time Required to Produce 1.25 g Iodine at 0.75 amps}
  \(1.25\ g\ I_{2} * \frac{1.00\ mol\ I_{2}}{253.80\ g} *
    \frac{2.00\ mol\ e^{-}}{1.00\ mol\ I_{2}} *
    \frac{6.022*10^{23}\ e^{-}}{1.00\ mol\ e^{-}} *
    \frac{1.60*10^{-19}\ coulombs}{1.00\ e^{-}} *
    \frac{1.00\ \sec}{0.75\ coulombs} *
    \frac{1.00\ \min}{60.0\ \sec} = 21\ \min\)
  \subsection{Time Required to Produce 0.100 L Hydrogen gas in Lab Conditions at
    0.75 amps}
  \(751.1\ mmHg * 0.100\ L\ H_{2} = n * 62.363\ L\ mmHg\ K^{-1}\ mol^{-1} *
  294\ K\)\\
  \(n = 0.00410\ mol\)\\
  \(0.00410\ mol\ H_{2} * \frac{2.00\ mol\ e^{-}}{1.00\ mol\ H_{2}} *
    \frac{6.022*10^{23}\ e^{-}}{1.00\ mol\ e^{-}} *
    \frac{1.60*10^{-19}\ coulombs}{1.00\ e^{-}} *
    \frac{1.00\ \sec}{0.75\ coulombs} * \frac{1.00\ \min}{60.0\ \sec} = 18\ \min\)
\end{document}
I will have a look at it now.

Stefan
LaTeX.org admin
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Many Errors Compiling Latex

Post by Stefan Kottwitz »

Now I reduced your code to a Infominimal working example, which produces the same error like the first one in the original code:

Code: Select all

\documentclass[12pt]{article}
\begin{document}
  \begin{tabular}{ l r @{\(\rightarrow\)} l }
    KI Solution\\
    Cathode (reduction): & $2H_{2}O_{(l)} + 2e^{-}$ &
      \(2OH^{-}_{(aq)} + H_{2(g)}\)
  \end{tabular}
\end{document}
It brings:

Code: Select all

! LaTeX Error: Bad math environment delimiter.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.7 ...e (reduction): & $2H_{2}O_{(l)} + 2e^{-}$ &
The root cause of the problem is the \(\rightarrow\) in the tabular column head, since \( ... \) is not robust. In the newest LaTeX version, this is fixed. With an older LaTeX version, this can be fixed by adding to the preamble:

Code: Select all

\usepackage{fixltx2e}
Alternatively it's fixed by $\rightarrow$.

However, the appearance of the chemical equations is pretty wrong regarding spacing and custom style, such as using upright letters for atoms. I will make some code to show it in the next post.

Stefan
LaTeX.org admin
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Many Errors Compiling Latex

Post by Stefan Kottwitz »

Here is my recommendation for writing chemical equations. I would use chemmacros or chemformula.

Code: Select all

\documentclass{article}
\usepackage{chemformula}
\begin{document}
  Cathode (reduction):
  \ch{2 H2O_{(l)} + 2 e- -> 2 OH_{(aq)}- + H2_{(g)}}
\end{document}
For my next book, I made a demonstration example for writing chemical formulas. It shows how you can simply write chemical formulas and equations with an easy syntax, even easier than math, with different examples, such as with subscripts for numbers of atoms, isotopes with left subscripts, reaction arrows, bonds, and electric charges of ions. It works in math and text mode and even respects the outer font, such as bold and sans-serif in the heading.

Code: Select all

\documentclass{scrartcl}
\usepackage{chemformula}
\pagestyle{empty}
\begin{document}
\section*{About \ch{Na2SO4}}
\ch{Na2SO4} is sodium sulfate.
It contains \ch{Na+} and \ch{SO4^2-}.
\ch{Na2SO4 * 10 H2O} is a decahydrate.
\[
\ch{Na2SO4 + 2 C -> Na2S + 2 CO2}
\]
\begin{equation}
\ch{Na2SO4 + H2SO4 <=> 2 NaHSO4}
\end{equation}
\section*{Isotopes}
\ch{^{232}_{92}U140} is uranium-232.
\section*{Hydrocarbons}
\begin{itemize}
  \item \ch{H3C-CH3} is ethane,
  \item \ch{H2C=CH2} is ethylene,
  \item \ch{H2C+CH2} is ethyne.
\end{itemize}
\end{document}
chemical-formula.png
chemical-formula.png (27.14 KiB) Viewed 6147 times
Stefan
LaTeX.org admin
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Many Errors Compiling Latex

Post by Johannes_B »

Please note, that you should not have \maketitle in the {titlepage} environment. If you want a titlepage, use titlepage as option to the documentclass.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Many Errors Compiling Latex

Post by cgnieder »

Apart from chemformula which also would be my choice (but I'm biased) I also seriously recommend using siunitx for typesetting numbers and units and also recommend reading mathmode. For example you might want to use \cdot instead of * for denoting a product operation.

One small example. You have

Code: Select all

\subsection{Amount of Hydrogen Produced in One Hour}
  \(\frac{0.45\ coulombs}{1.00\ \sec} * \frac{60.0\ \sec}{1.00\ \min} *
    \frac{60.0\ \min}{1.00\ hour} * \frac{1.00\ e^{-}}{1.60*10^{-19}\ coulombs} *
    \frac{1.00\ mol\ e^{-}}{6.022*10^{23}\ e^{-}} * \frac{1.00\ mol\ H_{2}}
    {2.00\ mol\ e^{-}} = 0.0084\ mol\ H_{2}\)\\
  \(0.0084\ mol\ H_{2} * 22.4\ L/mol = 0.19\ L\ H_{2}\)\\
  \(0.0084\ mol\ H_{2} * 2.016\ g/mol = 0.0017\ g\ H_{2}\)
In your document. I'd rather do something like

Code: Select all

\begin{align*}
  &\frac{\SI{0.45}{\coulomb}}{\SI{1.00}{\second}} \cdot
  \frac{\SI{60.0}{\second}}{\SI{1.00}{\minute}} \cdot
  \frac{\SI{60.0}{\minute}}{\SI{1.00}{\hour}} \cdot
  \frac{1.00\,\el}{\SI{1.60e-19}{\coulomb}} \cdot
  \frac{\SI{1.00}{\mole}\,\el}{\num{6.022e23}\,\el} \cdot
  \frac{\SI{1.00}{\mole}\,\ch{H2}}{\SI{2.00}{\mole}\,\el} \\
  &= \SI{0.0084}{\mole}\, \ch{H2}
\end{align*}
This uses amsmath, chemmacros and siunitx. A complete example with a direct comparison:

Code: Select all

\documentclass{article}

\usepackage{chemmacros}
\chemsetup{phases/pos=sub}

\usepackage{siunitx}
\sisetup{exponent-product=\cdot}

\usepackage{mathtools}

\begin{document}
\subsection{Amount of Hydrogen Produced in One Hour}
  \(\frac{0.45\ coulombs}{1.00\ \sec} * \frac{60.0\ \sec}{1.00\ \min} *
    \frac{60.0\ \min}{1.00\ hour} * \frac{1.00\ e^{-}}{1.60*10^{-19}\ coulombs} *
    \frac{1.00\ mol\ e^{-}}{6.022*10^{23}\ e^{-}} * \frac{1.00\ mol\ H_{2}}
    {2.00\ mol\ e^{-}} = 0.0084\ mol\ H_{2}\)\\
  \(0.0084\ mol\ H_{2} * 22.4\ L/mol = 0.19\ L\ H_{2}\)\\
  \(0.0084\ mol\ H_{2} * 2.016\ g/mol = 0.0017\ g\ H_{2}\)

\subsection{My suggestion}
\begin{align*}
  &\frac{\SI{0.45}{\coulomb}}{\SI{1.00}{\second}} \cdot
  \frac{\SI{60.0}{\second}}{\SI{1.00}{\minute}} \cdot
  \frac{\SI{60.0}{\minute}}{\SI{1.00}{\hour}} \cdot
  \frac{1.00\,\el}{\SI{1.60e-19}{\coulomb}} \cdot
  \frac{\SI{1.00}{\mole}\,\el}{\num{6.022e23}\,\el} \cdot
  \frac{\SI{1.00}{\mole}\,\ch{H2}}{\SI{2.00}{\mole}\,\el} \\
  &= \SI{0.0084}{\mole}\, \ch{H2}
\end{align*}

\end{document}
Best regards
site moderator & package author
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Many Errors Compiling Latex

Post by Stefan Kottwitz »

Very nice, here's an image of Clemens' solution for easy comparing for the quick reader.
units.png
units.png (32.3 KiB) Viewed 6132 times
Stefan
LaTeX.org admin
Post Reply