Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am a student (still in high school) who wants to start using LaTeX more regularly, however, I have on major problem: I know nothing about computer science or computer programming. And I mean nothing. I don't know what a source code is, I don't know what an algorithm is, and just when lurking on this site I see hundreds of words I don't understand, for example 'typeset'. I hope this gives you an idea of my ignorance of this subject.

My question is: What are the prerequisites for using LaTeX efficiently? What programming language is best to learn? What subjects should one read about? I know there are a lot of books and sites such as Wikibooks - Latex, but I doubt one can gain a decent command 'naturally' of LaTeX. With naturally I mean that you actually know what you're doing, instead of just copy-pasting it from site.

share|improve this question
Two steps: 1. you have to type following the LaTeX rules; 2. you have to compile what you typed to see the result (a PDF file, for example). Now, to learn the rules you have to read a lot and study some minimal examples. But at first you have to install the compiler (if you use Windows, MikTeX is the most famous) and you should use an LaTeX editor, just to help you with that rules (TeXMaker is the most famous and free). –  Sigur Jan 4 '13 at 13:43
At first you copy-paste big chunks of code from co-workers, or from the wikibook... Then smaller bits from forums or questions here... Then the bits become small enough that you actually know what you're doing. And then you discover a new package or feature you're completely ignorant of, and the process starts over again. But a background in programmation is definitely not needed, past the "what is a compiler?" question. –  T. Verron Jan 4 '13 at 13:44
I started using LaTeX by copy-pasting. After some time I already knew what was happening. BTW source code is the code you write, and a compiler is a program that creates something else from your code. In the case of LaTeX, this thing is a document. Feel free to ask for definitions of the words you don't know. I love to answer those. –  marczellm Jan 4 '13 at 13:52
Perhaps of interest are the related posts tex.stackexchange.com/questions/11/… and tex.stackexchange.com/questions/8571/… –  hpesoj626 Jan 4 '13 at 13:56
The suggestions below are good, but you really must have a need to learn it. So find something that want to use LaTeX for and then "just do it". As you struggle you'll look up things and learn as you go. Or alternatively, pick up a book and type in the examples as you read them -- do not cut and paste, otherwise you will miss out on one of the important things you need to learn and that is how to troubleshoot problems when they occur - and they will occur. If you get stuck, compose a small test case and post a question on this site. Good luck. –  Peter Grill Jan 12 '13 at 0:27
show 1 more comment

8 Answers

Only way to learn latex is to Start using it -- Practical first and reading next

You need not know any programming language. What you need is -- Strong will to use latex, a latex-aware editor (since it will save you from switching to command prompt often), a tex distribution installed and tex.stackexchange.com ;-)

Source code

What you find below is called source code -- it is what you write:

%% This place is called the preamble
Hello world

You have to save the above code as some file (say mycode.tex). BTW you have to edit/write this code in an editor that is latex aware - like texmaker, texniccenter, texstudio, Vim, winedt (windows only, shareware), Inlage (windows only, not free) to name a few. Now you need to have a Tex distribution to compile the above code - Famous ones are texlive 2012 (multi platform) and miktex (windows only). You may google to find out from where to download ;-). Say you downloaded texlive 2012 and installed it. Now there are two ways to compile the code:

  1. Go to the command prompt. Navigate to the folder where you have kept mycode.tex by typing something like cd c:\my folder. Then type pdflatex mycode Then the source code will be compiled and a pdf file named mycode.pdf will be generated in the same folder. This pdf is the output.


  2. The editor will have a toolbar button (that is why we call it latex aware). Just click that button and you will be saved from using the command prompt. (trust me, I am also afraid of command prompt, Please keep it a secret ;-))

Additionally in tex/latex, there is a package for every need. Say you want to play with the page magins (layout), then geometry package, if you want to insert a figure, then the graphicx package, so on and so forth. They can be loaded using \usepackage{<package name>}. And how to use those packages? You will find the details in the documentation of respective packages. To access them, you can type texdoc <package name> (for example texdoc geometry) from the command prompt, or the editor you are using will provide some (help) menu item for the purpose. Clicking it, will open a dialogue window where you can type the package name and proceed.

And please don't get intimidated by (some of) the technical documentations. There are well written (I mean easy to follow) manuals too, for example, check the pgfmanual. In case if some thing troubles you a lot and you can't get rid of it by yourself, please post a question here. This site has expertise equivalent to years of reading the documentation and people here are very friendly, helping and very kind hearted.

Hope this will be useful. I wish you less troublesome start and happy texing.

share|improve this answer
My problem with the official package documentation pdfs is that they are sometimes too technical and don't provide a tutorial with detailed explanations for beginners. Or even assume the reader knows how to define macros! –  marczellm Jan 4 '13 at 15:03
@marczellm That is why you have TeX.SX :-) –  Harish Kumar Jan 4 '13 at 15:04
@HarishKumar, if using the command prompt to run pdflatex, the editor need not be latex-aware. (That said, I like my editor to be omniscient, so I use emacs.) –  GTK Jan 11 '13 at 3:31
add comment

About credible sources

To address the concern of the investor of the bounty, I think the most credible sources are the books written for learning LaTeX and the manuals written for learning the packages. We can also say that the package and class writers are credible sources, since they have enough experience with LaTeX and TeX to create the packages. But the thing is, most of them learned LaTeX through different paths. Many people who use LaTeX don't have a programming background--like me. See for instance the post:

On learning LaTeX efficiently

Most of the other answers have already dealt with this. So I will divide my answer into sources available here in TeX.sx and my own experience for efficiently(?) learning LaTeX. I can't say though that I have been learning it efficiently enough. I still consider myself a newbie.

For related reading

There have been related posts regarding your question. Look for Linked and Related at the right sidebar, notably the following:

Keks Dose mentioned about buying a book. You can see a list of free and commercial books and manuals in the following posts.

I agree with the other posts and comments to start with small examples that you can either copy-and-paste or manually type in a short time. Try deleting small numbers of characters from the code and compile, and see what happens. If an error occurs, ask yourself what happened wrong by deleting such characters. In some manuals, this strategy is sometimes used. Some examples are suggested in a recent post.

LaTeX-aware editors

I agree with Harish Kumar. Coming from a non-programming, MS Word/OpenOffice background, I find that text-completion was a big help (but now somewhat irritating). You can see a big list of them from this post.

From a non-programming background, I am somewhat biased in favor of TeXMaker/TeXStudio. Some people, especially professional programmers would say emacs or vim though, although they can be frustratingly hard to set up. Just see related posts regarding editors in this site ;).

Give yourself time to learn

The truth of the matter is, I love to procrastinate. Learning LaTeX, for me, is a form of creative procrastination. Having said that, it is still possible to learn LaTeX efficiently without procrastinating.

I am a high school teacher and I have successfully taught some basic LaTeX to four of my students who have shown some willingness to learn LaTeX and alot some of their time to learn it. They use LaTeX to typeset their assignments (if they have time).

The following are the only things I demonstrated to them:

  • Setting up the basic source code, that one provided in Harish Kumar's answer.
  • Setting up the margin using the geometry package.
  • Setting up list environments (enumerate and itemize)
  • Setting up equation environments. (My students are from an elective math class.)

The rest they learned on their own. But it will help you to know that they finished writing their math assignments by hand, ready for submission, before typesetting it in LaTeX. That way, they were doing the LaTeX part for fun (and for beautifully printed assignments). They don't get additional credits for typing it in LaTeX, but the same is true, too, if they typed it in MS Word.

Since essays are required often in high school and they are not that hard to type, I suggest you adapt the strategy mentioned above. Write them by hand first, then type them in LaTeX if you have the time. Or just for fun, even if you have already submitted your assignment but have a draft copy of it, type that in LaTeX if you have the time. The thing is, you should not try to learn it if you are rushing to submit what you are trying to learn it for. In that case, learning LaTeX becomes a burden and you might get discouraged.

The Danger of Copy-and-Paste Learning

I have mentioned above that for small code, you can copy-and-paste and tweak to learn what the code does. However, make sure that you understand what the code does, line by line. This might not help you now but it will in the future. At this point, try to explore what the default settings of the LaTeX classes book, article and report have to offer. In most cases, you will be working with the article class a lot.

What helps me when learning a new code is I comment on what each line does. I find this helpful especially coming from a non-programming background. There are instances, too, that copy-and-paste approach introduces invisible characters that introduce errors. In the long run, typing the code character-by-character, line-by-line makes you think more about what goes into your code and what fix you can do in instances of errors.

Some more advice

Just as the other posts had mentioned, there will be a lot of frustrations ahead. Especially when there is an error that you can't easily solve or a style that you can't easily implement. Treat these instances as learning opportunities. Just keep using LaTeX. Like any new skill, it takes time before you feel that using it is a natural thing. And there are a lot of help now to be had. In my case, there is no local TeX group I can join so I joined this site instead. And I learned a lot in the short time that I am here. And I am still learning a lot. I think I learned more in five months about LaTeX more than I have learned in the three years of using it before joining here. So use LaTeX, read the manuals/books, and ask if you have a problem that you can't solve on your own. And your learning will be tremendous.

share|improve this answer
add comment

I have found the best way to learn LaTeX (or any programming language) is to find a simple project that you can do that will make you learn the new material. I have found that working a real world example is the only way to really do it. For example, try writing your next paper in LaTeX, but make sure that you give yourself enough time to write the paper and learn LaTeX. It is better to not learn LaTeX than to turn your paper in late because you are trying to learn something new.

A good place to start is The Not So Short Introduction to LaTeX2e. There are also a number of short introductions to LaTeX which a simple Google search will come up with.

Of course tex.stackexchange.com is a wonderful resource for specific questions. Don't be afraid to ask questions!

share|improve this answer
add comment

First of all, you did something really important: Your realised that one has to learn quite a bunch of things to be able to use LaTeX. Many people I know are convinced that they never have to open a book to use Word. And that's what the results look like.

Now, there is not the one, best way to learn how to use LaTeX. The approaches differ a lot between people from the technical side, who have a programming background, and people like you and me, who simply want to get a neatly printed sheet of paper out of the printer with (much more important) the text on it, which they wrote on the screen during the last hours.

You have to get a basic knowledge about compiling, pdfTeX and pdfLaTeX and editors, commands and and and.

It may sound funny, but the best way to get that information is to buy a book for beginners. Maybe you ask here for the best books for beginners in your country. Read it, there should be some examples and lots of explanations.

There is more than a wonderfull thing in using LaTeX. One of the best side effects is that we cooperate, here and in many websites around the world. In my country, Germany, people in a couple of cities meet once a month to have beer together and discuss LaTeX.

In short: get a book, read it and find some LaTeX fans at your town.

And don't listen the advise to google everything. That's a waste of time.

share|improve this answer
add comment

I will focus my answer on this part of your question, which I believe is the most important aspect.

What are the prerequisites for using LaTeX efficiently?

At least ten of our members can produce a solution to a difficult TeX problem in a few minutes, if not seconds. Two of them are reputed to dream in LaTeX code. Chess grand masters can often make the best move in a few seconds. J.L.B.Smith could identify almost any species of fish in a few seconds and recite its scientific name.

Expertise is not just the sheer amount of information stored in a brain, but the way it is used, recast and organized. This is the product of intense motivation -- fascination, obsession -- driving long, hard work:

enter image description here

All expertise theorists agree that it takes enormous effort to build these structures in the mind. Most cite the the 10-year rule which states, that it takes approximately a decade of heavy labour to master any field. Some of us think it takes longer.

The path to mastery and efficiency as you call it is effortful learning. Simply put effortful learning is rasing your expectations bit by bit. At first, even beginners so often improve rapidly in chess, or in driving a car. But having reached an acceptable performance--for instance, say passing a driver's exam, most people relax.

Their performance then becomes automatic and therefore impervious to further improvement. They gain experience, but is the same experience every day. In contrast, experts-in-training keep their mind's open all the time, so that they can inspect, criticize and augment its contents and in doing so, approach the standard set by themselves and the leaders in their fields.

So what you need is essentially four things:

  1. Motivation that you want to produce great documents or become an (all)TeX Hacker (the two are not necessarily the same).

  2. Understand the concept of effortful learning (need to learn something new often and master it).

  3. Start by buying or borrowing the LaTeX Companion, dowload a full distribution and start learning and practicing.

  4. Keep yourself motivated and entertained by posting and answering questions on this website.

Pushing your limits inevitably involves a lot of failure. When you fail, you need to back off a bit, learn to correct your weaknesses, and build your way back up.

To get really, really good takes time. Be patient with yourself, because you need that time for your training and experience to evolve into mastery.

Some links:

The Expert Mind

Five percenter policemen

Effortful Learning

share|improve this answer
+1 for effortful learning. I will upvote as soon as I can vote again. Thanks for the links. –  hpesoj626 Jan 12 '13 at 17:03
@hpesoj626 Thanks, on this sorrowful day I needed to write something inspirational. –  Yiannis Lazarides Jan 12 '13 at 17:08
add comment

I think that the most important prerequisite is attitude:

  • be willing to expand (pun intended) your mind to a new way of producing documents;
  • when you get stuck on a problem, try not to get (too) frustrated, and think of it as a learning experience- if you get properly stuck, then ask a question on this site :)
  • if you think that there is a better way of doing something (for example, not manually enumerating a list) then there probably is a better way; perhaps someone has already found it, and has created a package, or perhaps your idea is new and unique, in which case, you get to publish it as a package!
  • be prepared to let your style of coding evolve (of course, this applies to many other skills too).

Depending on how much you want to read and learn about TeX and friends, your skills will evolve, but your first few documents may not do everything you want them to, and you may not be very efficient at first- be patient and one day you could be the next egreg :)

share|improve this answer
add comment

There are so many good answers here but I will tie in with the answer by cmhughes by highlighting the word commitment. Learning LaTeX is similar to learning any programming language or learning a new type of software. If you do not use it, learning it will be of limited use. By commitment, I mean that you need to make a decision to using it on at least a semi-regular basis. That is the only way to progress. Using the freely available introductions and the TeX.sx site I am sure you will get into LaTeX quickly and also see the wealth of useful aspects of LaTeX. So starting with LaTeX should go beyond just one report. As a useful example of other things to do, take a look at Beamer (tag: ) for making presentations. Rather than promoting a single introduction to Beamer, I urge you to search for "beamer+introduction" and you will find many good introductions.

So o sum up. If you want to start using LaTeX, and there is no reason why not, then commit to using it as often as you can.

share|improve this answer
add comment

One of the prerequisites is

As you have to prepare a TeX input file to compile, you should have an ability to type with 10 fingers. Two-finger typists exponentially get bored and tired.

More detailed explanation:

A TeX input file is a plain text file consisting of contents and markup codes. Without having to prove it, the number of characters you type to prepare the input file is greater than the number of characters you type the same content when using a word processor. If you type with 2 fingers slowly, then you will waste much time. As a result, you cannot make use of LaTeX efficiently.

share|improve this answer
ahem. I type with two fingers, but TeX is never boring to me :-) –  Stephan Lehmke Jan 4 '13 at 14:34
Well if you think about typing the text content itself, there isn't really a difference between TeX or any word processor. Concerning writing TeX macros (or math or diagrams which are written as symbolic source code in TeX), 90% of the time goes into thinking up a proper structure, so typing speed is inconsequential. –  Stephan Lehmke Jan 4 '13 at 14:44
you're too young to have ever worked at a news bureau, but if you had, you would realize the "old pros" would very often be two-fingered typists, and on a manual typewriter, they could almost always outpace a ten-fingered newbie. and never once did i see them get bored; getting the story out was too important, and in their blood. computers have made things too easy. –  barbara beeton Jan 4 '13 at 18:34
When I write mathematics in LaTeX, typically the bottleneck is in my brain and not in my fingers. :) –  Federico Poloni Jan 4 '13 at 22:54
I always write \begin{... very slowly, one character at a time(not using any shortcut) - this give a little time to think. One, two or ten fingers; it makes no difference for me - my brain is the limiting factor. –  Hans-Peter E. Kristiansen Jan 10 '13 at 21:35
show 4 more comments

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.