# Math Help - Latex in Texnic Center

1. ## Latex in Texnic Center

I am trying to create a Latex document but it isn't formatting correctly and it says there are 31 errors.

\documentclass{article}
\begin{document}
\begin{flushleft}
The sequence \left(\frac{1}{\sqrt{n}}\right)\rightarrow 0. \\

\mbox{For each} \epsilon =0.01, 0.001, 0.0001, \mbox{determine an} \mathbb{Z} \mbox{N with the property that}
\left |\frac{1}{\sqrt{n}}-0\right |<\epsilon, \forall n>N.\\

\left |\frac{1}{\sqrt{n}}\right |<\epsilon\rightarrow n^2>\frac{1}{\epsilon}, \mbox{whenever} n>N\\

\mbox{I obtained:}\\

\begin{vmatrix}\epsilon & 0.01 & 0.001 & 0.0001\\ N & 10 & 10\sqrt{10} & 100\end{vmatrix}\\

\mbox{However, the book has the values of N as 10,0000; 1,000,000; and 100,000,000; respectively.}\\

\end{flushleft}

\end{document}

Can someone let me know the problem?

2. You need to put  around you math or use



also you need to load some packages in your preamble

Here is my standard setup.

\documentclass{amsart}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{fullpage}
\usepackage{color}
\begin{document}
\title{Chapter 7 Practice Test}
\maketitle

most of the standard math found in these packages.

The fullpage page insnt needed but I like how it formats the margins.

Edit: Also I don't know which version of Texnic center you are using but in my version if you go to file > newproject > English advanced if will have some templates so you don't have to start from scratch every time. You can also make your own templates and save them for future use.

3. Here's a sample document that I've written before, which should give you the feel for how this works; its a little bit different than how you would do things on MHF. XD

Code:
\documentclass{article} %book, amsbook, amsart, exam, beamer, etc.
\usepackage{amsmath,amssymb,color}

\begin{document}

\begin{flushleft} % left justification; right justificiation - flushright; centered - center;
Here is first line \\
{\color{red}Here is second line.}\\

Here is third line.\vskip1in
{\color{blue}Here is fourth line.}\vskip1pc
\end{flushleft}

Onto some math forumulas...\vskip1pc

Green's Theorem: $\displaystyle\oint f(x,y)\,dx+g(x,y)\,dy=\iint\limits_R\left(\frac{\partial g}{\partial x}-\frac{\partial f}{\partial y}\right)\,dA$.

Gamma Function: $\Gamma(x)=\displaystyle\int_0^{\infty}e^{-t}t^{x-1}\,dt$

Some symbols...

$\forall,\,\exists,\,\in,\,\cup,\,\cap,\,\wedge,\,\vee,\,\neg,\,\ldots$

System of Differential Equations

\begin{aligned} \frac{dx}{dt} &= x^2+t^2 \\ \frac{dy}{dt} &= 2y+\ln t+xyt \end{aligned}

\end{document}
Hope this helps!

EDIT: And FYI - the '%' symbols represent the start of a comment. If you want % to appear with the text in your compiled document, you would need to use the command '\%'.

4. One more thing. I sometimes don't like the default margins they give the document, so I've come up with my own... XD

(This goes in the preamble of the document, before the \begin{document} tag)

Code:
\oddsidemargin 0in
\topmargin -0.5in
\textwidth 6.5in
\textheight 9.0in

5. How can I setup the margins equal to paper: left and right 1in and top and bottom .5?

Also, I always get this error when I compile as a popup box.

[DocOpen("%bm.pdf")][FileOpen("%bm.pdf")]
Cannot execute the command.

6. Originally Posted by dwsmith
How can I setup the margins equal to paper: left and right 1in and top and bottom .5?
Try this:

Code:
\oddsidemargin 0in
\topmargin -0.5in
\textwidth 6.5in
\textheight 10.0in
Also, I always get this error when I compile as a popup box.

[DocOpen("%bm.pdf")][FileOpen("%bm.pdf")]
Cannot execute the command.
I had this problem too, but this is how you should fix it:

First, go to the Build menu, and select the option "Define Output Profiles..."

Now, use the following settings under the viewer tab:

I hope this helps!

P.S. The first entry in that menu is the location of your pdf reader executable -- it isn't necessarily the one I have; I just updated it recently... XD