Closed AJ16 closed 8 years ago
I see you still haven't read the very basic stuff about LaTeX. You should definitely do that. Once you are done, you know how to post a question that is worth answering.
I have read that. However, when I use the phd template I have problems and I can't fix them. Maybe because I have never faced these problems, I did not pay attention. Will be glad to have your help. Thanks.
Hi @AJ16 I tried a minimal example and that seems to work.
\newtheorem{thm}{Theorem}
\begin{thm}[Main Theorem]
This is the main theorem.
\end{thm}
The command \newtheorem{thm}{Theorem}
has two parameters, the first one is the name of the environment that is defined, the second one is the word that will be printed, in boldface font, at the beginning of the environment. Once this new environment is defined it can be used normally within the document, delimited it with the marks \begin{thm}
and \end{thm}
.
Could you please explain why you are using babel
package?
Hi @kks32 Thank you so much for your help. I am not using the babel package as far as I know. At least when I check the preamble, I have not included the bable package. I use \begin{thm} \end{thm} and \begin{lem}
\end{lem} but I still get the same error as above. Really appreciate your help.
Have you defined this command \newtheorem{thm}{Theorem}
somewhere?
Yes, I defined at the beginning of the chapter that I am using the theorem in. Shall I move it elsewhere?
Have you tried compiling a minimal case with the clean default template and add this to a chapter and see if it compiles?
\newtheorem{thm}{Theorem}
\begin{thm}[Main Theorem]
This is the main theorem.
\end{thm}
Yes, I just did but still have the same issue. Does the same apply to "lem" too? And I am still trying to figure out how to solve the bable package error! Thanks a lot for the help.
Could you upload the minimal example case you tried?
\newtheorem{thm}{Theorem} \begin{thm} \begin{equation} p^{\textrm{cov}}=\sum{n=1}^{N}T{diff}(n), \label{eq:Theorem_1} \end{equation} \end{thm}
When I copy and use it on my template, it works fine without any issues. Are you sure you tried it with a clean version of this template? and it didn't work? I can see IEEEproof
in the error message, where is that coming from? Do you get the babel
and IEEEproof
errors without using the theorem sections in your thesis?
I get the babel and IEEEproof even without using the theorem sections and I am not sure what these errors are related to. I have moved the newcommand and the theorem error is resolved, however, I still get the lemma error. Thank you for the time.
Clearly, there is something dodgy going on. We cannot provide help by interviewing. We need to see a minimal working example, as described in http://www.dickimaw-books.com/latex/minexample/index.html
Thanks for your comment.
Dear kks32, please can you also advise about the use of "lem"? Thanks a lot.
Could you please provide us the files with a minimal working example?
Thanks a lot. Beside the error with "Lemma" and "Algorithm" which I will provide working example shortly, I still do not understand the error due to "Package babel error" and that "You haven't specified a language option."
Not sure where the source of this error is? And how to resolve it. Much appreciate your help.
We are unable to help unless you provide us files with a minimal working example.
This is my code for the algorithm
\begin{algorithm} \begin{singlespace} \noindent \begin{equation} \alpha{1}^{\textrm{L}}\left(r\right),\ \label{eq:proposedmodel \end{equation} \end{singlespace} \end{algorithm}
and this is my code for the lemma
\begin{lem} \noindent \label{lem:proposed_lem1} $mathit{P}{I{r}}\left(\frac{\alpha r^{\alpha}}{S^{\rm {T}}}\right)$ in the region of $z\leq 0.5$ is given by \begin{equation} \Gamma{2} = \frac{\alpha^{k} +2}{ k\left(k+ k^{n-1}\right)} \label{eq:gamma_formula} \end{equation} \end{lem}
I appreciate to have your help. I am also attaching the errors I get. Thanks a lot.
Have you defined algorithm2e
package or equivalent in preamble.tex
file?
Also \alpha_{1}^{\textrm{L}}\left(r\right),\
is incomplete.
For your lemma
you need something like \newtheorem{lem}{Lemma}
The \newtheorem{thm}{Theorem} works for "Theorem" but not for the "Lemma".
Do you mean the \usepackage{algorithm2e} ?
Sorry the complete code is
\begin{algorithm} \begin{singlespace} \noindent \begin{equation} \alpha{1}^{\textrm{L}}\left(r\right) = \sum\limits{i =1}^{N} z^{r} +i^{z}, \label{eq:proposed_model \end{equation} \end{singlespace} \end{algorithm}
\newtheorem{lemma}{Lemma}
\begin{lemma}
\noindent
\label{lem:proposed_lem_1}
$mathit{P}{I{r}}\left(\frac{\alpha r^{\alpha}}{S^{\rm {T}}}\right)$ in the region of $z\leq 0.5$ is given by
\begin{equation}
\Gamma_{2} = \frac{\alpha^{k} +2}{ k\left(k+ k^{n-1}\right)}
\label{eq:gamma_formula}
\end{equation}
\end{lemma}
This is the lemma code and it works. Yes, for algorithm you need algorithm2e
package. This works in the template without any issues.
I am exactly doing the same. However, I now face these new errors.
It looks like you have already defined lemma
and you are redefining it again! Please check.
Yeah, that is what error says but I have not defined anywhere. That is the first place I am using "Lemma".
Looking at your files, It was in fact redefined before in Macros.tex
which is included in thesis.tex
file. That was the issue.
Personally i am thinking that this kind of support is a waste of time. The question has nothing to do with the template, it is just a question about LaTeX. It has no place here. @AJ16 We still haven't seen a single minimal working example, which we told you multiple times is needed to help you and understand your problem. Please read some introductory material. Right now, this is a waste of your time as well.
Thanks a lot @johannesbottcher. @kks32 was incredibly helpful and it was resolved. It had been impossible to resolve without his help. Thanks a lot.
Hi, Please can you help me with the following errors?
f_{\mathit{\Gamma}}
\begin{thm} for the theorem!
\begin{lem} for the lemma!
It seems these are not defined! Thanks a lot.