# Compiling a LaTeX document manually

I've created LaTeX documents before using 'nice IDEs' such as TeXnicCenter and have a little experience in general with TeX, however, now I'm wondering about creating one "manually". By that, I mean doing something such as writing the tex document in a very simple editor (such as VIM) and then compiling it myself with pdflatex via the command prompt. Has anyone ever done this and if so, I really just need to know how I'd go about it? What's the process to doing it? While the IDE is nice, I'd really like to be able to create LaTeX documents 'on my own'. Thanks for any information you can provide!

-
Err ... just go ahead and do it! This is how I've always created my LaTeX documents (except that I use Emacs, not vim). I don't even know what "IDE" stands for. –  Andrew Stacey Apr 28 '11 at 18:19
I can't tell if you're being facetious or not, but if not IDE == Integrated Development Environment. –  JToland Apr 28 '11 at 18:22
"in a very simple editor (such as VIM)". VIM is one of the most complex editors in existence. I assume you mean "simple" as "without a fancy graphical interface", which is true for VIM. Also, I never knew that TeXnicCenter can create LaTeX documents "automatically". –  Martin Scharrer Apr 28 '11 at 18:42
Well, in reality, probably not the command line, but something like Cygwin. And Yes, I'm on Windows. By TeXnicCenter automatically creating documents, I mean I just have to type the 'code', then push a button and somehow I have a pdf document -- all the work is done for me to get from code to pdf. I just wonder how (and what I'd need) to do it myself with commands starting with just the tex document. –  JToland Apr 28 '11 at 18:51
You would need a functioning TeX distribution like MiKTeX. Then you just go to command prompt and write `pdflatex yourdocument.tex`, or `yourtexengine yourdocument.tex`. –  ipavlic Apr 28 '11 at 20:41
show 4 more comments

Your question is a little confusing. What you mean is compiling a LaTeX document manually (into a PDF). You might want to adjust your title. Creating one would be the process of writing the document. This can be done in the command line using `pdflatex <filename>`. In VIM you could just use ESC`:!pdflatex %` (`%` can be used instead of the current filename) when you edit the main file. There is also the LaTeX Suite for VIM which gives you short cuts for the compilation and a lot of IDE functionality. The LaTeX compiler must be in your `PATH` for this to work, but this should be already the case for a proper installed LaTeX.

The latexmk script (also called with the filename) will compile the LaTeX document as often as required and also run external tools like `bibtex` and `makeindex`, which is basically the things the IDE is doing automatically when you press the compile button.

-
Oh come on, you don't have to tear his question to pieces like this. His last comment clarifies his post perfectly well. He has so far used a program that created the pdf with the press of a button, and now wants to know if there's anything he needs to know about producing (La)TeX output so by entering commands into some interface. There's really no reason to ridicule some minorly suboptimal wording in this manner. –  doncherry Apr 28 '11 at 20:08
See, your edit about `latexmk` is something someone coming from TeXnicCenter wouldn't know, for example. That's the kind of thing he was asking for. I think a GUI made him feel like he's "triggering a whole bunch of complex commands" (I'm exaggerating), and I'm sure he's right in the respect that there's certainly a lot to learn what can be done instead of "clicking that button", just like `latexmk`. –  doncherry Apr 28 '11 at 20:34
@doncherry: I rewrote the answer to be more useful. –  Martin Scharrer Apr 28 '11 at 20:38
Great, I think he'll be much happier with this response :) I hope you didn't take my criticism amiss, I just didn't feel like this was the way we want to answer questions here. –  doncherry Apr 28 '11 at 20:53
Thank you for the edit. This is supremely more helpful than your initial answer. –  JToland Apr 28 '11 at 20:54