GeneralLatex stops processing

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
yoavk
Posts: 3
Joined: Thu May 17, 2007 2:18 pm

Latex stops processing

Post by yoavk »

Hi,

I need some help.
I worte a file and while latexing, the process stacks (at page 8) and the black window of latex stay as it is and stops processing.
I cut the relevant paragraph and file is running well. I took the part that i cut and put it in a different file and it runs well.

What should I do ?

Many thanks,

Yoav

Recommended reading 2024:

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

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

User avatar
countbela666
Posts: 64
Joined: Thu Apr 26, 2007 2:44 pm

Latex stops processing

Post by countbela666 »

Hi Yoav,
yoavk wrote: What should I do ?
You should provide more information, e.g. a minimum example reproducing the error or at least the mentioned "relevant paragraph". Without this information we could only consult our crystal balls ;)

Regards
Marcel
Listen to me children of the night, beyond the doors of darkness you will find
a thousand worlds for you to see here, take my hand and follow me...
yoavk
Posts: 3
Joined: Thu May 17, 2007 2:18 pm

Re: Latex stops processing

Post by yoavk »

Thanks for replying.
After hitting the "latex" icon, (I'm using winedt) the black window of latex processing is starting. This process stops at page eight. The last thing which is written there is
[5] [6] [7] [8] and then is stops processing. I went to the tex file and cut from the file a pragraph from page 8. I hit "Latex" again it was processed properly.
I thought that the problematic part is the one I cut. But, I took this part and pasted it into a blanc file (with beign and end document) and it was processed properly.
It is strange. Each parts works sepratly but the mrged file does not.
If needed, I can emial the file.

Thanks,

Yoav
User avatar
countbela666
Posts: 64
Joined: Thu Apr 26, 2007 2:44 pm

Latex stops processing

Post by countbela666 »

yoavk wrote: If needed, I can emial the file.
Yes, please *sigh*. Or even better, shrink it down to a minimal working example:
What are these minimal working examples (MWEs) you keep talking about?
Creating an MWE is a way of tracking down and fixing bugs, as well as of finding the cause of certain behaviour. MWEs must be as small and simple as possible, yet complete, i.e. they accord to the base structure of a LATEX document and can be LATEXed without further additions.
An MWE should be complete and working,
• so that you cannot accidentally omit information important to diagnosing the problem;
• so that the person responding can just copy-and-paste the code to try it out.
A MWE should be small,
• so that responders does not have to concern themselves with long unnecessary lines of code;
• because it will narrow down possible causes of misbehaviour;
• because short examples are well suited for posting;
• because many problems, such as missing brackets, faulty syntax, forgotten switches, etc. will easily be found in the process creating it;
• because short documents will help you not to lose track of what’s going on.
Listen to me children of the night, beyond the doors of darkness you will find
a thousand worlds for you to see here, take my hand and follow me...
yoavk
Posts: 3
Joined: Thu May 17, 2007 2:18 pm

Re: Latex stops processing

Post by yoavk »

I'm attaching. I cut most of the file and the part which I left still suffers from the problem.

Thanks,

Yoav
Attachments
simclas4.tex
(2.48 KiB) Downloaded 304 times
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Latex stops processing

Post by localghost »

Why do you use the old LaTeX 2.09 syntax to declare your documentclass? The cause of your problem seems to be in these strange definitions at the beginning of your document.

Code: Select all

\def\l{\lambda}
\def\m{\m}
\def\P{\mbox{\rm P}}
\def\Var{\mbox{\rm Var}}
\def\E{\mbox{\rm E}}
\def\Cov{\mbox{\rm Cov}}
If you really need them, use \newcommand instead of \def. Since these definitions are all used to define a plain text style in math mode, you should use the amsmath package. It provides the command \text{...} to format text in normal shape within mathematical environments.

Code: Select all

\documentclass[12pt]{article}
\usepackage{amsmath}
\begin{document}
  ...
  \noindent {\bfseries Exercise 2.} Let $X$ be with a gamma distribution with parameters $\alpha=3/2$ and \beta=1$. Thus, for $x \geq 0$, $f(x)=Kx^{1/2}e^{-x}$. Note that $K=1/\Gamma(3/2)=2/\sqrt{\pi}$, the constant with respect to which the integral is one. In particular, $\text{E}(X)=3/2$ and $\text(X)=3/2$.
  ...
\end{document}
Last edited by localghost on Fri May 18, 2007 4:21 pm, edited 1 time in total.
User avatar
pumpkinegan
Posts: 91
Joined: Thu May 03, 2007 10:29 pm

Latex stops processing

Post by pumpkinegan »

Yes the problems are from the strange definitions when compiling the last paragraph.

If you use the amsmath package and replace all $\m$ and $\l$ by $m$ (or \text{m}) and $\lambda$ the document should compile fine. Note also that the $\max$ command is defined in amsmath (so without amsmath, the $\max$ command would have given problems)

Code: Select all


\noindent {\bf Example.}
This example is somewhat artificial but is put here in order to exemplify the
technique. Let $X$ and $Y$ be exponentially distributed with
parameters $\lambda$ and $m$, respectively. Assume $m < \lambda$. The
acceptance-rejection method is as follows. First, to sample $Y$,
just take $Y = - \frac{1}{m} \log U_1$. Then, when looking for $\max
f(x)/g(x)$, note that it is attained in $x = 0$ (that's where the
assumption that $m < \lambda$ kicks in). Hence, the optimal value for
$c$ is $c = \lambda / m$. Moreover, as $Y = -\frac{1}{m}\log U_1$, is it easy
to see (using some properties of the exponential and logarithmic
functions), that $\frac{f(Y)}{c g(Y)}=U_1 ^ {\frac{ \lambda -m}{ m}}$.
In summary the procedure is as follows:

.

Patrick.
User avatar
sommerfee
Posts: 503
Joined: Mon Apr 09, 2007 4:20 pm

Latex stops processing

Post by sommerfee »

localghost wrote: The cause of your problem seems to be in these strange definitions at the beginning of your document.

Code: Select all

\def\m{\m}


...especially since this definition of \m causes an endless loop.
Post Reply