9

For some reason, I am getting hit with a bad math environment delimiter. I know the problem has to stem from the \begin\end figure I added since the file compiled prior to this begin added.

In my preamble, I have tried everything suggested error using environment inside the section argument

Here is my preamble in case there is something conflicted in it:

\documentclass[11pt, dvipsnames]{article}

\usepackage{amsmath, amssymb, eucal, pxfonts, setspace, enumerate, amscd,           
  dsfont, wasysym, tikz, tikz-qtree, mathtools, kurier, pgfplots, listings,         
  etoolbox, tikz-3dplot, float, wrapfig, multirow, array, tkz-fct, graphicx,        
  datetime, fancyhdr, amsfonts, xcolor, microtype, marvosym, starfont, hyperref,    
  fixltx2e}
\usepackage[margin=0.75in]{geometry}
\usepackage[caption = false]{subfig}
\usepackage[all]{hypcap}

Figure that is causing the issue is below:

\begin{figure}
  \centering
  \subfloat[\(z\in [-50, 0]\)]{\includegraphics[width = 3.25in]
    {stumpffneg50to0.eps}}
  \subfloat[\(z\in [0, 30]\)]{\includegraphics[width = 3.25in]
    {stumpff0to30.eps}}
  \subfloat[\(z\in [0, 500]\)]{\includegraphics[width = 3.25in]
    {stumpff0to500.eps}}
  \caption{The Stumpff functions \(C(z)\) and \(S(z)\) plotted for the specified    
    ranges.}
  \label{fig:stumpff}
\end{figure}

Here is the log file:

./230OrbitalMechanicsNotes.tex:2184: LaTeX Error: Bad math environment delimite
r.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.2184   \subfloat[\(z\in [-50, 0]\)
                                    ]{\includegraphics[width = 3.25in]
Your command was ignored.
Type  I <command> <return>  to replace it with another command,
or  <return>  to continue without it.

./230OrbitalMechanicsNotes.tex:2184: Missing $ inserted.
<inserted text> 
                $
l.2184   \subfloat[\(z\in [-50, 0]\)
                                    ]{\includegraphics[width = 3.25in]
I've inserted a begin-math/end-math symbol since I think
you left one out. Proceed, with fingers crossed.

./230OrbitalMechanicsNotes.tex:2184: Missing $ inserted.
<inserted text> 
                $
l.2184   \subfloat[\(z\in [-50, 0]\)
                                    ]{\includegraphics[width = 3.25in]
I've inserted a begin-math/end-math symbol since I think
you left one out. Proceed, with fingers crossed.


Overfull \hbox (9.3413pt too wide) in paragraph at lines 2184--2184
[]\OT1/kurier/m/n/9 (-20) (a)
 []


Overfull \hbox (11.57193pt too wide) in paragraph at lines 2184--2184
|$\OML/pxmi/m/it/9 z \OMS/pxsy/m/n/9 2
 []


Overfull \hbox (26.26796pt too wide) in paragraph at lines 2184--2184
\OT1/pxr/m/n/9 [\OMS/pxsy/m/n/9 ^^@\OT1/pxr/m/n/9 50\OML/pxmi/m/it/9 ; \OT1/pxr
/m/n/9 0$ 
 []

Package epstopdf Info: Source file: <stumpffneg50to0.eps>
(epstopdf)                    date: 2013-06-04 21:23:34
(epstopdf)                    size: 25117 bytes
(epstopdf)             Output file: <stumpffneg50to0-eps-converted-to.pdf>
(epstopdf)                    date: 2013-06-04 21:24:44
(epstopdf)                    size: 14370 bytes
(epstopdf)             Command: <repstopdf --outfile=stumpffneg50to0-eps-conver
ted-to.pdf stumpffneg50to0.eps>
(epstopdf)             \includegraphics on input line 2185.
Package epstopdf Info: Output file is already uptodate.
<stumpffneg50to0-eps-converted-to.pdf, id=590, 578.16pt x 433.62pt>
File: stumpffneg50to0-eps-converted-to.pdf Graphic file (type pdf)

<use stumpffneg50to0-eps-converted-to.pdf>
Package pdftex.def Info: stumpffneg50to0-eps-converted-to.pdf used on input lin
e 2185.
(pdftex.def)             Requested size: 234.87749pt x 176.15768pt.


./230OrbitalMechanicsNotes.tex:2186: LaTeX Error: Bad math environment delimite
r.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.2186   \subfloat[\(z\in [0, 30]\)
                                   ]{\includegraphics[width = 3.25in]
Your command was ignored.
Type  I <command> <return>  to replace it with another command,
or  <return>  to continue without it.

./230OrbitalMechanicsNotes.tex:2186: Missing $ inserted.
<inserted text> 
                $
l.2186   \subfloat[\(z\in [0, 30]\)
                                   ]{\includegraphics[width = 3.25in]
I've inserted a begin-math/end-math symbol since I think
you left one out. Proceed, with fingers crossed.

./230OrbitalMechanicsNotes.tex:2186: Missing $ inserted.
<inserted text> 
                $
l.2186   \subfloat[\(z\in [0, 30]\)
                                   ]{\includegraphics[width = 3.25in]
I've inserted a begin-math/end-math symbol since I think
you left one out. Proceed, with fingers crossed.


Overfull \hbox (9.53748pt too wide) in paragraph at lines 2186--2186
[]\OT1/kurier/m/n/9 (-20) (b)
 []


Overfull \hbox (11.57193pt too wide) in paragraph at lines 2186--2186
|$\OML/pxmi/m/it/9 z \OMS/pxsy/m/n/9 2
 []


Overfull \hbox (20.24696pt too wide) in paragraph at lines 2186--2186
\OT1/pxr/m/n/9 [0\OML/pxmi/m/it/9 ; \OT1/pxr/m/n/9 30$ 
 []

Package epstopdf Info: Source file: <stumpff0to30.eps>
(epstopdf)                    date: 2013-06-04 21:23:35
(epstopdf)                    size: 25597 bytes
(epstopdf)             Output file: <stumpff0to30-eps-converted-to.pdf>
(epstopdf)                    date: 2013-06-04 21:24:44
(epstopdf)                    size: 15001 bytes
(epstopdf)             Command: <repstopdf --outfile=stumpff0to30-eps-converted
-to.pdf stumpff0to30.eps>
(epstopdf)             \includegraphics on input line 2187.
Package epstopdf Info: Output file is already uptodate.
<stumpff0to30-eps-converted-to.pdf, id=591, 578.16pt x 433.62pt>
File: stumpff0to30-eps-converted-to.pdf Graphic file (type pdf)

<use stumpff0to30-eps-converted-to.pdf>
Package pdftex.def Info: stumpff0to30-eps-converted-to.pdf used on input line 2
187.
(pdftex.def)             Requested size: 234.87749pt x 176.15768pt.


./230OrbitalMechanicsNotes.tex:2188: LaTeX Error: Bad math environment delimite
r.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.2188   \subfloat[\(z\in [0, 500]\)
                                    ]{\includegraphics[width = 3.25in]
Your command was ignored.
Type  I <command> <return>  to replace it with another command,
or  <return>  to continue without it.

./230OrbitalMechanicsNotes.tex:2188: Missing $ inserted.
<inserted text> 
                $
l.2188   \subfloat[\(z\in [0, 500]\)
                                    ]{\includegraphics[width = 3.25in]
I've inserted a begin-math/end-math symbol since I think
you left one out. Proceed, with fingers crossed.

./230OrbitalMechanicsNotes.tex:2188: Missing $ inserted.
<inserted text> 
                $
l.2188   \subfloat[\(z\in [0, 500]\)
                                    ]{\includegraphics[width = 3.25in]
I've inserted a begin-math/end-math symbol since I think
you left one out. Proceed, with fingers crossed.
dustin
  • 18,617
  • 23
  • 99
  • 204
  • not relevant to the answer, but a package listing is easier to read if the packages are listed on separate lines. and some of the packages you're using are redundant, in the sense that they are called by other packages in the list. two such instances are amsfonts (loaded by amssymb) and amsmath (loaded by mathtools). in the latter case, loading mathtools after amsmath precludes the application of some useful options provided by mathtools that require their being passed along to amsmath. – barbara beeton Jun 05 '13 at 12:47
  • @barbarabeeton Werner and I discussed that about the packages in a different post, but if I remove, one that is redundant, my pdf wont compile and it will be hit with an error; therefore, they aren't totally redundant. – dustin Jun 05 '13 at 15:47
  • @barbarabeeton I would like to clarify so there is no confusion. If I remove amsmath and just load mathtools, my file will have errors during compilation. – dustin Jun 05 '13 at 15:57
  • i assume that you mean an error other than the one reported in this question. it would be useful to know exactly what the error is, and have a minimal example that demonstrates it, so that this can be taken into consideration when amsmath is overhauled. my off-line contact info can be found in my profile. – barbara beeton Jun 05 '13 at 18:45
  • @barbarabeeton I didn't see a contact for you in your profile just one for tech support. The error from removing amsmath and only keeping mathtools is about references being duplicated even though no reference has the same name. – dustin Jun 05 '13 at 21:19
  • the tech-support address is the correct place to send bug reports. if you could send a small file with just two references and \cites to them, along with your log showing the error you receive, that would be very helpful. – barbara beeton Jun 06 '13 at 12:05

1 Answers1

11

The ranges in z \in [..] contains square brackets which confuses LaTeX when reading the optional argument of \subfloat. So, you need to conceal it by using {[...]}:

\begin{figure}
  \centering
  \subfloat[\(z\in {[-50, 0]}\)]{\includegraphics[width = 3.25in]%
    {example-image-a}}
  \subfloat[\(z\in {[0, 30]}\)]{\includegraphics[width = 3.25in]%
    {example-image-a}}
  \subfloat[\(z\in {[0, 500]}\)]{\includegraphics[width = 3.25in]%
    {example-image-a}}
  \caption{The Stumpff functions \(C(z)\) and \(S(z)\) plotted for the specified    
    ranges.}
  \label{fig:stumpff}
\end{figure}
Werner
  • 603,163