1

Brand new to LaTeX, using LaTeXit on OSX 10.10.1. Here is my preamble and my code after the preamble.

 \documentclass[10pt]{article}
    \usepackage[usenames]{color} %used for font color
    \author{Nathan}
    \usepackage{amssymb} %maths   
    \usepackage{amsmath} %maths    
    \usepackage{ragged2e}    
    \usepackage[utf8]{inputenc} %useful to type directly diacritic characters    
    \usepackage{verbatim}   
    %\pagestyle{plain}






 \title{Test Document for LaTeX}
    \date{December 14 2014}
    \author{AuthorName}    
    \maketitle    
    \center    
    This  is  a  practice  document  for  LaTeX     
    \begin{comment} testing some stuff     
    Like Comments and such    
    \end{comment}    
    this is fun!    
    % \clearpage    
    %\section{page2}    
    \pagebreak    
    \begin{flushleft}   

    NEW PAGE!

    Lots of stuff

    Things

    More Things! 
    \end{flushleft}

Now, when I run this, it runs fine except that it only outputs the title page with numbering. Anything below \newpage does not show up. I have been learning LaTeX using "The Not So Short Introduction to LaTeX 2e", and I seem to have followed the new page instructions to the letter, unless I am completely missing something.

Bonus question: In LaTeXit, when I open my preamble, the first two lines are greyed out and cannot be edited except from the templates section of the Preferences. Why is this?

Thanks!!

Nate
  • 11
  • Welcome to TeX.SX! Rather than adding blank lines, select the code and press the {} button. Note also that \center is not to be used: there's the center environment. – egreg Dec 19 '14 at 00:01
  • Thanks! I put some edits in, I hope it is more readable now. – Nate Dec 19 '14 at 00:26

2 Answers2

3

From LaTeXiT's page:

The interface is designed for equations, not for multi-pages documents. For such an usage, other applications my be more relevant.

You should choose a regular editor/IDE for creating something like an entire article.

cfr
  • 198,882
  • Thanks! It seems like TexClipse is a good bet. Any chance you have a recommendation for running on OSX? A Windows recommendation would be great too. – Nate Dec 19 '14 at 00:45
  • @Nate I used TeXShop when I was on Mac OS X. I think it is an especially nice editor when you are beginning to use LaTeX. (It is probably part of MacTeX?) Can't help with Windows. However, the link I gave in my answer lists a lot of different choices, with the platforms they run on and their specific advantages. – cfr Dec 19 '14 at 01:04
  • @Nate TeXShop. On GNU/Linux, I use Kile. You can use it on Windows but I have no experience with it. The highest voted answers in that list are *not, IMHO, good choices to begin with unless you are already* an experienced user of emacs or vim. So I would not start with those unless your response to those posts is, 'I can use LaTeX in emacs?? Brilliant!' (Or similarly for vim.) – cfr Dec 19 '14 at 01:08
  • Haha well my response was "...yes...emacs...I have heard this word... so I will scout around for something simpler. I have coding experience only in MATLAB and PSPICE, but am trying to branch out (I'll let you guess what I am studying :P ). Thanks again! – Nate Dec 19 '14 at 02:37
2

The posted code generates multiple errors and spurious output as it is missing \begin{document} and \end[document}. Also \center is not intended to be used in that form (although it doesn't generate an error).

\documentclass[10pt]{article}
\usepackage[usenames]{color} %used for font color

\author{Nathan Bernards}
\usepackage{amssymb} %maths
\usepackage{amsmath} %maths
\usepackage{ragged2e}
\usepackage[utf8]{inputenc} %useful to type directly diacritic characters
\usepackage{verbatim}

%\pagestyle{plain}

\title{Test Document for LaTeX}

\date{December 14 2014}
\author{AuthorName}

\begin{document}

\maketitle

\begin{center}
This  is  a  practice  document  for  LaTeX 
\end{center}

\begin{comment} testing some stuff 

Like Comments and such

\end{comment}

this is fun!

% \clearpage

%\section{page2}

\pagebreak

\begin{flushleft}

NEW PAGE!

Lots of stuff

Things

More Things! 
\end{flushleft}

\end{document}
David Carlisle
  • 757,742
  • Hi David! Thanks for your response.

    So, should \begin{document} be in my preamble? Because when I try that and run the code, I get the error that my \title section should be in my preamble..

    – Nate Dec 19 '14 at 00:22
  • @Nate If you run the code as above you should get no error (i ran it to test earlier). \title can be in the preamble or the document according to taste it does not make any difference, as long as it is before \maketitle. the "preamble" is by definition the part between \documentclass and \begin{document} so you can't put \begin{document} in the preamble, but that's just a form of words not an actual restriction. – David Carlisle Dec 19 '14 at 00:27
  • @DavidCarlisle Are you sure you wouldn't get an error running it in LaTeXit, though? Given it is not designed for this at all... – cfr Dec 19 '14 at 00:35
  • @David Carlisle Hmmm, I copy/pasted your code above (that should work right?) and got an error. I have "\begin{document}" right before I have \maketitle. I am getting the error "Can be used only in the preamble" with the red X marker on the line with \begin{document}. If I remove any \begin{document} then the code runs, but I have my same problem as before, namely that the first page I want (the title page) will show up, but nothing below that. I will post a picture of what I mean, once I figure out how. – Nate Dec 19 '14 at 00:35
  • @Nate Can LaTeXit produce multipage output at all? It is designed to typeset e.g. a single equation. – cfr Dec 19 '14 at 00:36
  • Erm...I am not sure. I found this particular program after having LaTeX in general suggested to me by a professor for writing long reports with lots of equations in it. I was lamenting Word's Equation editor and she recommended learning LaTeX as a general skill (I am on break ATM and finding useful things to do with my time off). Is there a better program than LaTeXit for this purpose?

    Oh wait! I remember now. I downloaded MacTex and LaTeXit seems to be the editor that came with that..

    – Nate Dec 19 '14 at 00:37
  • i don't know latexit to be honest I used pdflatex to test that document @Nate – David Carlisle Dec 19 '14 at 00:40
  • @cfr no idea about latexit :-) – David Carlisle Dec 19 '14 at 00:40
  • @Nate See my answer below for both questions. The programme's homepage says it is not suitable for this. [Well, it starts by saying it would like to be an editor. But it ends by saying it isn't a good choice for multi-page documents. I suspect it is somewhat understating the issue and it may just not be able to do this.] – cfr Dec 19 '14 at 00:42
  • Ah! Gotcha. Hmmm I think I got MacTex from the LaTeX main website.. weirdness. Ok! Off to hunt for a better editor. Thank you so much! – Nate Dec 19 '14 at 00:43