Math & Science ⇒ Error Missing $ inserted for my formula
-
- Posts: 13
- Joined: Wed Sep 09, 2009 6:55 am
Error Missing $ inserted for my formula
Hi there
I know it is a common problem and I found this question been answered before http://www.latex-community.org/forum/vi ... =46&t=4854 But that doesn't help me much.
What I want to do is to write the following formula for lognormal distribution
\[
p(t|a, b) = \frac{1}{{b^a}\Gamma
(a)}{t^{a-1}}{\exp^{\frac{-t}{b}}}
\]
But it kept giving me that annoying error of Missing $. The same error I get for simple $\rho(t|d)$.
Most importantly, I am writing those equation for my PhD thesis and the error only occurs with my PhD thesis compilation. The same equation compiles and I have used them in my published paper.
Looking forward to your help.
cheers
Arif.
I know it is a common problem and I found this question been answered before http://www.latex-community.org/forum/vi ... =46&t=4854 But that doesn't help me much.
What I want to do is to write the following formula for lognormal distribution
\[
p(t|a, b) = \frac{1}{{b^a}\Gamma
(a)}{t^{a-1}}{\exp^{\frac{-t}{b}}}
\]
But it kept giving me that annoying error of Missing $. The same error I get for simple $\rho(t|d)$.
Most importantly, I am writing those equation for my PhD thesis and the error only occurs with my PhD thesis compilation. The same equation compiles and I have used them in my published paper.
Looking forward to your help.
cheers
Arif.
-
- Site Moderator
- Posts: 814
- Joined: Tue Jul 01, 2008 2:19 pm
Error Missing $ inserted for my formula
Pleas post a full example. The following is fine
Code: Select all
\documentclass{article}
\begin{document}
\[
p(t|a, b) = \frac{1}{{b^a}\Gamma
(a)}{t^{a-1}}{\exp^{\frac{-t}{b}}}
\]
\end{document}
Joseph Wright
-
- Posts: 13
- Joined: Wed Sep 09, 2009 6:55 am
Re: Error Missing $ inserted for my formula
Hi there
I think it is same as mine. Yes I tried inside DOCUMENT. By the way, with article as documentclass it works for me. But my document class looks like
\documentclass[11pt,a4paper,titlepage,twoside,openright]{book}
Any help?
I think it is same as mine. Yes I tried inside DOCUMENT. By the way, with article as documentclass it works for me. But my document class looks like
\documentclass[11pt,a4paper,titlepage,twoside,openright]{book}
Any help?
Error Missing $ inserted for my formula
This code:
does not produce any errors either. It would help if you tried to construct a minimal example in which the error is actually produced. Otherwise, it's very hard to tell what's going on.
Code: Select all
\documentclass[11pt,a4paper,titlepage,twoside,openright]{book}
\begin{document}
\[
p(t|a, b) = \frac{1}{{b^a}\Gamma
(a)}{t^{a-1}}{\exp^{\frac{-t}{b}}}
\]
\end{document}
- localghost
- Site Moderator
- Posts: 9201
- Joined: Fri Feb 02, 2007 12:06 pm
Error Missing $ inserted for my formula
You have to reduce the code of your dissertation to a complete and compilable minimal working example (MWE). Depending on how many code you've already written, this can imply very much trouble. But it is the only possible way to get closer to a solution. Everything else would only dwindle into a quiz.jubairarifctg wrote:[…] Most importantly, I am writing those equation for my PhD thesis and the error only occurs with my PhD thesis compilation. […]
Best regards and welcome to the board
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]
¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
Board Rules
Avoidable Mistakes[/size]
¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
-
- Posts: 13
- Joined: Wed Sep 09, 2009 6:55 am
Re: Error Missing $ inserted for my formula
Hi Guys
Thank you
I don't think I have written too much of the code as I am in my first chapter. Rather I think my problem is something like these links:
http://randomtech.blogspot.com/2004/11/ ... erted.html
http://www.karakas-online.de/mySGML/mis ... erted.html
Now, how do I stop latex to take intelligent decision from adding $ sign to my stuff. As I mentioned before, it works for my article but it does not work for my thesis. Thus, I believe it is something to do with my style file that I am using. How can I share my style file with you? I don't see any option to attach any files here. Can I use any email?
Thank you
I don't think I have written too much of the code as I am in my first chapter. Rather I think my problem is something like these links:
http://randomtech.blogspot.com/2004/11/ ... erted.html
http://www.karakas-online.de/mySGML/mis ... erted.html
Now, how do I stop latex to take intelligent decision from adding $ sign to my stuff. As I mentioned before, it works for my article but it does not work for my thesis. Thus, I believe it is something to do with my style file that I am using. How can I share my style file with you? I don't see any option to attach any files here. Can I use any email?
Error Missing $ inserted for my formula
Hi,
When you reply to a post (or open a new thread) you will see, right after the message window and to the left, a link labeled "Upload attachment". Following that link you can upload files.
Board Rule 2.1: ...There will be no support via PM, IM or e-Mail!jubairarifctg wrote:...I don't see any option to attach any files here. Can I use any email?
When you reply to a post (or open a new thread) you will see, right after the message window and to the left, a link labeled "Upload attachment". Following that link you can upload files.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
-
- Posts: 13
- Joined: Wed Sep 09, 2009 6:55 am
Re: Error Missing $ inserted for my formula
Thanks and sorry, I wasn't aware of that rule.
I am attaching my style file.
Plus I got another clue:
\[
p(t|a, b) = \frac{1}{{b^a}\Gamma
(a)}{t^{a-1}}{\exp^{\frac{-t}{b}}}
\]
I get error on things like \frac{}, \Gamma{} etc.
But there is no error for things like:
\begin{eqnarray}
m& = &ab\\
v& = &ab^2
\end{eqnarray}
As the later one does not have any functions such as \Gamma{}.
Looking forward to your help.
I am attaching my style file.
Plus I got another clue:
\[
p(t|a, b) = \frac{1}{{b^a}\Gamma
(a)}{t^{a-1}}{\exp^{\frac{-t}{b}}}
\]
I get error on things like \frac{}, \Gamma{} etc.
But there is no error for things like:
\begin{eqnarray}
m& = &ab\\
v& = &ab^2
\end{eqnarray}
As the later one does not have any functions such as \Gamma{}.
Looking forward to your help.
- Attachments
-
- uomthesis.sty
- (12.82 KiB) Downloaded 388 times
Error Missing $ inserted for my formula
After downloading your style file, a file such as:
Still does not produce any errors for me.
Try to follow Thorsten's advice, refer to the link he gave about producing a minimal working example, and attach it here, and maybe someone can help -- you just aren't giving enough information to diagnose the problem. If we can't even reproduce your error, there's nothing for us to go on.
Code: Select all
\documentclass[11pt,a4paper,titlepage,twoside,openright]{book}
\usepackage{uomthesis}
\begin{document}
\[
p(t|a, b) = \frac{1}{{b^a}\Gamma
(a)}{t^{a-1}}{\exp^{\frac{-t}{b}}}
\]
\end{document}
Try to follow Thorsten's advice, refer to the link he gave about producing a minimal working example, and attach it here, and maybe someone can help -- you just aren't giving enough information to diagnose the problem. If we can't even reproduce your error, there's nothing for us to go on.
Error Missing $ inserted for my formula
Hi,
I did a simple test with your sty file and the code that you proposed as culprit, but it compiled OK in my system.
Let's try to detect the problem. Please do the following:
1) Copy the following test code (the one that I used) and save it as, for example, test.tex:
2) Save a copy of the file uomthesis.sty in the same folder that contains test.tex.
3) Compile the following document:
You will get some warnings; we'll handle those later. If you get any errors, please search the file test.log and attach it to your next post. If no error messages occur, then the problem is somewhere else and we'll ask you for more information.
I did a simple test with your sty file and the code that you proposed as culprit, but it compiled OK in my system.
Let's try to detect the problem. Please do the following:
1) Copy the following test code (the one that I used) and save it as, for example, test.tex:
2) Save a copy of the file uomthesis.sty in the same folder that contains test.tex.
3) Compile the following document:
Code: Select all
\listfiles
\documentclass{book}
\usepackage{uomthesis}
\begin{document}
\[
p(t|a, b) = \frac{1}{{b^a}\Gamma(a)}{t^{a-1}}{\exp^{\frac{-t}{b}}}
\]
\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...