Why Doesn't My LaTeX Code Compile Correctly?

  • Context: LaTeX 
  • Thread starter Thread starter latentcorpse
  • Start date Start date
  • Tags Tags
    Code Issues Latex
Click For Summary

Discussion Overview

The discussion revolves around troubleshooting LaTeX code that is not compiling correctly. Participants explore various aspects of LaTeX document structure, packages, and potential errors in the provided code.

Discussion Character

  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant shares their LaTeX code and seeks advice on why it does not compile, indicating they believe the code is straightforward.
  • Another participant suggests using LyX, a WYSIWYM front-end for LaTeX, which may help avoid compilation issues by providing a more visual editing experience.
  • A different participant recommends using the amsart document class along with the amssymb and latexsym packages, implying that this may resolve some issues.
  • One participant asks for clarification on the specific error message that LaTeX produces, indicating that understanding the error could help in troubleshooting.
  • A participant questions whether certain equations need to be enclosed in an equation environment or dollar signs, suggesting a potential misunderstanding of LaTeX syntax.

Areas of Agreement / Disagreement

Participants express differing opinions on the best approach to resolve the compilation issues, and there is no consensus on the specific error or solution at this time.

Contextual Notes

Participants have not provided specific error messages from LaTeX, which may limit the ability to diagnose the problem accurately. There is also uncertainty regarding the necessity of certain formatting choices in the LaTeX code.

latentcorpse
Messages
1,411
Reaction score
0
hi i wrote the following code. i think it's fairly easy to understand what I am trying to get it to print. but LaTeX really doesn't like it. any advice?

\documentclass[12pt]{report}
\usepackage{float}
\usepackage{multirow}
\usepackage{graphicx}
\usepackage{subfigure}
\usepackage{mathrsfs}


\begin{document}
\begin{subequations}
\begin{equation}
U(\theta,t)=\beta \ln{t} + \gamma + \nu(\theta,t) t^{-\frac{1}{2}}+\kappa(\theta,t)
\end{equation}
where $\beta$ and $\gamma$ are constants, $\nu$ is a bounded solution of the wave equation $\nu''=\ddot{\nu}$ and the remainder, $\kappa$, obeys
\begin{align*}
| \kappa(\theta,t) | &\leqslant C_7 t^{-\frac{3}{2}} \\
| \partial_t \kappa(\theta,t)| &\leqslant C_8 t^{-\frac{3}{2}}
\end{align*}
and
\begin{equation}
A(\theta,t)= \begin{cases}
\alpha + \beta^2 \ln{t} & \quad \text{ if $\nu(\theta,t)=0 \forall \theta,t$} \\
\delta t + \epsilon(\theta,t) & \quad \text{ if $\nu(\theta,t) \neq 0$ for some $\theta$ and $t$}
\end{cases}
\end{equation}
\end{subequations}
\end{document}
 
Physics news on Phys.org
My advice is "www.lyx.org"[/URL]. It is a multi-platform LaTeX front-end (also free) that is a WYSIWYM (mean) (opposed to the OOo and MS WYSIWYG (get) ). No more need for $mathstuff$ and no more front matter (you can still add new codes via the Preamble option in the Document menu). I've been using it since version 1.4.2 (now on version 1.6.4).

What is great about it is you can see your work (math-type work I mean) as you are writing so there will be no compiling issues unless your single line of math-code is missing something necessary, like {,}, or something else of that nature.
 
Last edited by a moderator:
Use the amsart document class along with the amssymb and latexsym packages.
 
What is the error LaTeX gives?
 
\begin{align*}
| \kappa(\theta,t) | &\leqslant C_7 t^{-\frac{3}{2}} \\
| \partial_t \kappa(\theta,t)| &\leqslant C_8 t^{-\frac{3}{2}}
\end{align*}

these don't need to be in an equation or $$'s?
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
6K
  • · Replies 9 ·
Replies
9
Views
6K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 8 ·
Replies
8
Views
13K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 11 ·
Replies
11
Views
6K
  • · Replies 3 ·
Replies
3
Views
7K