Results 1 to 6 of 6

Math Help - Latex in Texnic Center

  1. #1
    MHF Contributor
    Joined
    Mar 2010
    From
    Florida
    Posts
    3,093
    Thanks
    5

    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?
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Behold, the power of SARDINES!
    TheEmptySet's Avatar
    Joined
    Feb 2008
    From
    Yuma, AZ, USA
    Posts
    3,764
    Thanks
    78
    You need to put $ $ around you math or use

    \begin{equation} \end{equation}

    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.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Rhymes with Orange Chris L T521's Avatar
    Joined
    May 2008
    From
    Santa Cruz, CA
    Posts
    2,844
    Thanks
    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 '\%'.
    Last edited by Chris L T521; May 25th 2011 at 11:59 AM.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Rhymes with Orange Chris L T521's Avatar
    Joined
    May 2008
    From
    Santa Cruz, CA
    Posts
    2,844
    Thanks
    3
    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
    Follow Math Help Forum on Facebook and Google+

  5. #5
    MHF Contributor
    Joined
    Mar 2010
    From
    Florida
    Posts
    3,093
    Thanks
    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.
    Last edited by dwsmith; May 25th 2011 at 04:52 PM.
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Rhymes with Orange Chris L T521's Avatar
    Joined
    May 2008
    From
    Santa Cruz, CA
    Posts
    2,844
    Thanks
    3
    Quote Originally Posted by dwsmith View Post
    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
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Issue with Winshell/TeXnic
    Posted in the LaTeX Help Forum
    Replies: 0
    Last Post: February 15th 2010, 08:39 AM
  2. Obtain word count on TeXnic center document
    Posted in the LaTeX Help Forum
    Replies: 1
    Last Post: June 11th 2009, 06:39 PM
  3. texnic centre problem
    Posted in the LaTeX Help Forum
    Replies: 7
    Last Post: March 30th 2009, 03:38 AM
  4. TeXnic Center
    Posted in the LaTeX Help Forum
    Replies: 7
    Last Post: December 9th 2008, 05:35 PM
  5. Rotation Center Vs. Actual Center.
    Posted in the Differential Geometry Forum
    Replies: 0
    Last Post: August 7th 2008, 08:17 AM

/mathhelpforum @mathhelpforum