# I'm having problems with PDF preview

I just started using TeXworks, and for some reason, I'm having problems with PDF preview. For example, when I type,

\documentclass[12 pt, a4paper]{article}

\begin{document}

\section{}

$x^2 + y^2 = 18$

\section{}

\section{}

\section{}

a) We need to show that $S_4$ has 4!=24 elements. Since $|H|=4$, we have 24/4=6 right cosets and 6 left cosets. If the left and right cosets are equal, then H is normal in $S_4$.
Left Cosets:\\

eH=\{e, (1 2)(3 4), (1 3)(2 4), (1 4)(2 3)\}\\

(1 2) = \{(1 2), (3 4), (1 3 2 4), (1 4 2 3)\}\\


...and then click play, the pdf viewer has no problems. But when I continue typing..

(1 4)=\{(1 4), (1 2 4 3), (1 3 4 2), (2 3)\}\\

(1 2 3)= \{(1 2 3), (1 3 4), (2 4 3), (1 4 2)\}\\

(1 3 2)=\{(1 3 2), (2 3 4), (1 2 4), (1 4 3)\}\\


...and then click on play again...it doesn't show the second part that I added. Can anybody help me with this? There are no LaTeX problems with I typed either. I know there are spaces between the lines here (but I don't have the spaces in TeXworks).

-
Welcome to TeX.sx! I do not think the problems relate to TeXworks since it is only a front end. Could you specify what LaTeX distribution you are using and particularly how you compile your document (pdfLaTeX/LaTeX/other?) –  Peter Jansson Feb 25 '13 at 10:51
is it what you are expecting ? writelatex.com/75540wckwqd –  texenthusiast Feb 25 '13 at 10:57
@Artus i checked with texworks on linux, it works as well. Did you go through this link at TUG for "LaTeX distribution?" tug.org/levels.html. using terminal window(linux) or command window(windows) try running the pdflatex -v to check if you have "LaTeX distribution" installed, if yes run pdflatex your-filename.tex from the command window/terminal –  texenthusiast Feb 25 '13 at 11:27
@Artus texworks is an TeX editor on your local machine which uses pdflatex engine from a ""LaTeX distribution" to generate pdf document, whereas writelatex.com is a online latex compiler where you can see the source and output pdf in the browser(as texlive LaTeX distribution is installed on the webserver). When you are in hurry or small and quick latex example, you can use writelatex.com. But for heavy stuff(more files and attachments) try local machine when internet is not available. I recommend installing texlive 2012(latex distribution) and texworks as editor. –  texenthusiast Feb 25 '13 at 11:42
@Artus please go through ctan.org/starter. It will help you to install "LaTeX distribution". I have noticed in your code \end{document} is missing. Is this the cause of your error ? Please post the details of error messages( inside the your-filename.log) so that someone here can help you. –  texenthusiast Feb 25 '13 at 11:59
show 7 more comments

• In your LaTeX code \end{document} is missing at the end of document.Once you add this works fine on TeXworks or any TeX editor.

• Your problem is not related to TeXworks editor as TeXworks just compiles the source code on local machine using pdflatex engine to generate pdf document.pdflatex engine is available from any "LaTeX distribution" like TeXlive and MiKTeX.

• for detailed information on What is "LaTeX distribution" vs Editors ?

Basic Troubleshooting issues:

• When in trouble compiling LaTeX source code from a TeX editor ?

Always double check using terminal/command windows approach to narrow down diagnosis of problems

• Type pdflatex -v at the terminal window(linux) or command window(windows) to check if you have an "LaTeX distribution" installed and to know its version.

• If yes run pdflatex your-filename.tex from the command window/terminal else install any LaTeX distribution

• Last important step would be to report the details of error messages inside the your-filename.log generated during pdflatex your-filename.tex compilation

• For a quick debugging and short LaTeX example you can always utilise Online compilers to verify your problems.

-