PDA

View Full Version : Help with LaTex



drakir_nosslin
2010-05-28, 03:36 PM
Hi!

I've just started working with LaTex (http://en.wikipedia.org/wiki/LaTex), and I don't really get it. In short, does anyone know of a good source for LaTex templates, or even better, if there's any way of reverse engineer PDF:s into LaTex code, so I can take a look and see how it's done?

Any help is appreciated!

Astrella
2010-05-28, 03:40 PM
Hmm, I had classes on LaTex, so I don't really know of any good tutorials online. I could send you my course material, but since it's in Dutch I doubt it's going to be of much use to you.

Always ready to answer questions though.

Telonius
2010-05-28, 03:42 PM
I'm not aware of any way to reverse the process of building a .pdf back into a .tex file.

The best way I've found of understanding it, is to think of the LaTeX file as instructions for your computer to build a document. It's exactly like code. As long as you know the shortcuts and the commands, and don't forget which order you're doing things in, you can get it to do what you want it to do.

Building an image in .tex is a bit more complicated, but it's the same concept. You basically tell the computer where to pull the image files, and how to arrange them, when you produce the .png or .eps.

Tirian
2010-05-28, 03:57 PM
Yeah, turning a .PDF into LaTeX code would be like trying to turn a cake into flour and eggs and sugar again.

My best recommendation is that you install LyX (http://www.lyx.org/), which is the best front end you could possibly want for LaTeX plus a number of solid tutorials. Beyond that, if you're truly interested in the nuts and bolts, I find that my copy of Knuth's original TeXbook is still relevant.

drakir_nosslin
2010-05-28, 04:09 PM
Ah, well then I don't even have to start looking for some reverse engineering then... Thanks for the info anyway!

I've started on my first document, a short article. A simple header, a small picture in the middle and some chemistry letters. However, when I try to generate a pdf from it, it says 'Undefined Control Sequence' at line 1, but I think that I've done it correctly.

\\documentclass [11pt,a4paper]{article}
\begin {document}
text
\end {document}

I haven't fixed the picture and stuff yet, since I figured that I should get this to work first... Any ideas?

EDIT: I've installed LyX, but can I get code from that? I need to be able to show the code, and not a finished document. Right now I don't care how I do it, just as long as I get it done (I'm running out of time here :smalltongue:)

Tirian
2010-05-28, 04:18 PM
Yeah, you can create whatever document you want in LyX and then export it as LaTeX if you're dying to see the source.

Seppl
2010-05-28, 04:21 PM
Use only one backslash before documentclass.

My advise on LaTeX in general: Don't try anything fancy. Just use the standard classes and the standard layout. Do not try any manual formatting. Just let LaTeX do all the magic and you will get a nice, professional looking document. Anything you change yourself would probably be for the worse as the developers of LaTeX are professional typesetters and you are (most probably) not.

drakir_nosslin
2010-05-28, 04:26 PM
Yeah, you can create whatever document you want in LyX and then export it as LaTeX if you're dying to see the source.


I see, thank you very much! This'll make my work a lot easier!


Use only one backslash before documentclass.

My advise on LaTeX in general: Don't try anything fancy. Just use the standard classes and the standard layout. Do not try any manual formatting. Just let LaTeX do all the magic and you will get a nice, professional looking document. Anything you change yourself would probably be for the worse as the developers of LaTeX are professional typesetters and you are (most probably) not.

Indeed I'm not, and I nor do I ever intend to become one :smallbiggrin:
Thanks for the tip on the code btw, one day I'll really learn how to use this properly, for now, LyX will have to do...

valadil
2010-05-28, 06:57 PM
I'm learning it too. Here are some good places to start:

LaTeX primer (http://www.maths.tcd.ie/~dwilkins/LaTeXPrimer/) and Cheat Sheet (http://www.maths.otago.ac.nz/home/downloads/stat431/2010/latexsheet.pdf).

Print the cheat sheet and keep it by your computer. It shows you what you'll need to know 99% of the time. The rest of the time, google will do the work.

The primer will explain what you don't get about LaTeX and show you what it's capable of. It's a long read, but it's worth it.

Save all the .tex files you make. You'll refer back to them eventually.

Also, documentation online is pretty good. The trick is figuring out what to search for. In my experience, googling "latex two column layout" got a response pretty quickly but "latex list" didn't because I needed an enumeration of items.

Finally, I recommend doing simple stuff in LaTex. If you only break it out when you need a fancy table it'll do nothing but confuse you. If you practice with basic papers requiring nothing more fancy than section headers and paragraphs, you'll be much more familiar with LaTeX when you need it for fancy formatting.