Need to create latex document.

203 Views Asked by At

I am an undergrad and currently doing my first research project. I was wondering if anyone has a recommendation of a good latex software to use. I downloaded TexWorks but I am having a hard time figuring it out. It says I need to download something to typeset my work. Pretty much I need some advice on how to get going. Thanks!

2

There are 2 best solutions below

0
On

The easiest for someone getting started would be to use MikTex for Windows. It comes with an editor (TexWorks), compilers (PdfLatex, xeLatex, LuaLatex) and a package manager.

Just launch up TexWorks (the editor) and type up your document. Google "short introduction to latex" and there is a standard introductory pdf that everyone recommends. This will teach you exactly how to structure your document. In the SIMPLEST document, you will find:

\documentclass{article}
\usepackage{amsmath}                     % Dummytext

\begin{document}
 Hello world! Hello $a^2 + b^2 = c^2$

\end{document}

LaTeX itself is pretty "barebones". It uses packages to extend its capabilities. Packages are stored on CTAN (but you need not worry about this, as MikTex comes with a package manager). For mathematics, the amsmath package is very useful. They define certain mathematical symbols and notation. To use it, you simply type in \usepackage{amsmath} on top. For most of my documents, my standard "headers" are

\usepackage{amsmath, amssymb,  amsfonts}
\usepackage{amsthm}

which loads up the ams math suite. To fully understand how to use math mode, you HAVE to read this: ftp://ftp.ams.org/pub/tex/doc/amsmath/short-math-guide.pdf

from the page: AMS Latex

Simply speaking, all "math" is contained within $ ... $ or \[ \] or $$ ... $$. The single dollar signs enters "math mode" in the line, so for example solving $2x = 10$ gives us $x = 5$. The double dollar signs enters "math mode" is display mode as in, a famous formula is mathematics is $$e^{i \pi} + 1 = 0$$

You can right click these equations and look at the latex code.

After you've typed up a document correctly, you have to "compile" that document. The standard defacto method is PdfLatex. It's literally a .exe file that accepts the .tex file as input and spits out a .pdf file (pending there are no errors in your code). You also have other compilers like xeLatex and LuaLatex which I havnt much experience with. I know that for LuaLatex, you can have Lua code in your .tex document. This is built into miktex. As it's compiling, its adding the packages on the fly and again if you are missing a package, miktex will prompt you. It's a very good system to learn the basics.

Be prepared to spend considerable time typing and considerable time debugging. LaTeX has a very steep learning curve, but don't be discouraged. You will only get better. You will begin your document with a standard line and end your document with a standard line.

Like the others have mentioned, use the Tex SE website to ask questions.

0
On

I use sharelatex.com myself. Using a web-based latex compiler prevents you from having to download and install all kinds of software and sharelatex simply gives you some free online storage and free example documents from which you can get started on understanding and using latex syntax.