GeneralStrange Compilation Errors

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
StarKid
Posts: 21
Joined: Thu May 26, 2011 8:47 pm

Strange Compilation Errors

Post by StarKid »

My file suddenly has compilation errors on lines that I haven't even edited recently. They are erros like:

Code: Select all

LaTeX Font Info:    Try loading font information for U+msb on input line 250.
And line 250 is

Code: Select all

We focus on the choice of a consumer moving to a particular area in year $t$, who is
So I commented it out and recompiled; same error for line 263, which has text

Code: Select all

of $\theta$ times the price, which is denoted $P_{t}$. Homeowners finance the rest of the mortgage, rolling
and on and one for lines 264-266 (except its U+msa instead of U+msb in those cases). Each following error doesn't show up unless the line containing the previous error is commented out. Line 266 is as far as I've looked because the file is large. I'm using Kile but the result is the same in other editors I've tried.

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
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Strange Compilation Errors

Post by localghost »

There are no errors, just information about font loading. A proper minimal example will certainly help to get a clue. Due to missing information it's not possible to tell anything specific at the moment.


Thorsten
StarKid
Posts: 21
Joined: Thu May 26, 2011 8:47 pm

Strange Compilation Errors

Post by StarKid »

Ok, I chopped up the file and the problem seems to be incorrect syntax in the \renewcommand with which I attempted to change equation numbering.

I did a CTAN search but I can't figure out what package \renewcommand is in, or maybe I should look at math package documentation to find the correct syntax for changing equation numbering?

Someone please point me in the right direction.
User avatar
sommerfee
Posts: 503
Joined: Mon Apr 09, 2007 4:20 pm

Strange Compilation Errors

Post by sommerfee »

StarKid wrote:I did a ctan search but I can't figure out what package renewcommand is in...
\renewcommand is a basic LaTeX command, so it's not part of a package but the LaTeX kernel instead.

If you would post a mininal example document we would (hopefully) be able to help you. (See post from localghost)
User avatar
Stefan Kottwitz
Site Admin
Posts: 10321
Joined: Mon Mar 10, 2008 9:44 pm

Strange Compilation Errors

Post by Stefan Kottwitz »

Hi,
StarKid wrote:I did a ctan search but I can't figure out what package renewcommand is in...
have a look at Definitions in the LaTeX manual, the command is explained there.

Stefan
LaTeX.org admin
StarKid
Posts: 21
Joined: Thu May 26, 2011 8:47 pm

Strange Compilation Errors

Post by StarKid »

Well here is the MWE.

Code: Select all

\documentclass[a4paper,12pt,leqno]{report}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}


\begin{document}


\begin{equation}
        \theta P_t + \sum_{j=1}^{\infty}
            \left(\frac{1-\delta}{1+\rho_t^{t+j}}\right)^j
            \frac{1}{1-\delta}
            \left\{
                \begin{array}{c}
                    r_{t+j} (1-\phi)(1-\theta)P_t + \tau (1+g)^{j-1} P_t \\
                    -\delta\left[P_{t+j} - (1-\theta) P_t\right]
                \end{array}
            \right\}
 \end{equation}


\renewcommand{\theequation}{2'}

\begin{equation}
P_{t} \left( \frac{\theta_{\rho_{t}}+(1-\theta)(1-\varphi)r-g+\tau+g(1-\theta)(1-\delta) \frac{\rho_{t}-(1-\varphi)r}{\rho_{t}+\delta}}{\rho_{t}+\delta+g\delta-g} \right).
\end{equation}


\renewcommand{\theequation}{2''}
\begin{equation}
	\frac{R_{t}}{P_{t}} =\theta\rho_{t}+(1-\theta)(1-\varphi)r-g+\tau+g(1-\theta)(1-\delta)\frac{\rho_{t}-(1-\varphi)r}{\rho_{t}+\delta}.
\end{equation}

\renewcommand{\theequation}{\theequation}

\footnotesize
\begin{equation}
\frac{R_{t}}{P_{t}}=\theta\hat{\rho}(\hat{r})-\varphi\pi+(1-\theta)(1-\varphi) \hat{r} -\hat{g}+\tau+(\hat{g}+\pi)(1-\theta)(1-\delta)\frac{\hat{\rho}(\hat{r})-(1-\varphi) \hat{r}}{\hat{\rho}(\hat{r})+(1-\varphi)\pi+\delta}.
\end{equation}
\normalsize

\end{document}

It is causing pdflatex to crash, but if compiles fine if I change

Code: Select all

\renewcommand{\theequation}{\theequation}
to

Code: Select all

\renewcommand{\theequation}
,

but that prevents the equations that come after it from being numbered. Simple case of not knowing how to use the command, I think.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10321
Joined: Mon Mar 10, 2008 9:44 pm

Strange Compilation Errors

Post by Stefan Kottwitz »

StarKid wrote:

Code: Select all

\renewcommand{\theequation}{\theequation}
It is causing pdflatex to crash
Yes, that's a recursive definition. A valid example would be

Code: Select all

\renewcommand{\theequation}{\arabic{equation}}
Stefan
LaTeX.org admin
StarKid
Posts: 21
Joined: Thu May 26, 2011 8:47 pm

Re: Strange Compilation Errors

Post by StarKid »

How do I get the equation numbering to resume the normal pattern?
User avatar
Stefan Kottwitz
Site Admin
Posts: 10321
Joined: Mon Mar 10, 2008 9:44 pm

Strange Compilation Errors

Post by Stefan Kottwitz »

There are various ways.
  • The redefinition I gave above changes the equation numbering back to arabic numbers in braces. Just try.
  • Limit the effect of your own definition by braces or \begingroup ... \endgroup, or an environment. Afterwards, the original definition is valid again.
  • Save the original definition in a macro by using \let or \LetLtxMacro from the letltxmacro package, and restore it later in the same way.
  • Don't redefine the equation presentation. Instead, use the \tag command of the amsmath package:

    Code: Select all

    \begin{equation}\tag{2''}
    ...
    \end{equation}
Stefan
LaTeX.org admin
Post Reply