21

I'm having serious problems understanding the syntax of LaTeX well. I know a lot of programming languages but LaTeX still is a little cryptic for me. Do you know what the key to fully understanding it is?

David Carlisle
  • 757,742
mjsr
  • 3,425
  • 3
    Are you talking about using LaTeX for document preparation (e.g. for writing articles), or are you talking about programming in LaTeX (e.g. for creating new style files or class files, for other people to use to write documents such as articles)? – Niel de Beaudrap Jan 06 '11 at 09:03
  • 3
    i'm talking about "Understand" LaTeX, not only limit to the use.It is not difficult create a general document using copy-paste and edit little stuff, but when i face a trouble or something that i want to achieve that is not so trivial i start jumping from forum to forum, website to website, hoping that someone else has this magic answer. I feel unable to machinate by my self a solution, that is a very disappointing feeling – mjsr Jan 06 '11 at 17:44

5 Answers5

21

Since LaTeX builts on TeX, a very good foundation to understand its syntax is learning the TeX syntax. Here are helpful documents (I took it from a list on my blog):

Specifically for LaTeX syntax, there's a huge amount of documentation and there are many books and online tutorials and introductions. For understanding what the LaTeX author Leslie Lamport meant with LaTeX syntax extensions, I recommend to read his book "LaTeX: A Document Preparation System".

Stefan Kottwitz
  • 231,401
  • great, excellent free references, i'm going to start reading them right away, i'm tired of not understand well this language. – mjsr Jan 08 '11 at 02:02
  • Trying the first link TeXbook: How can I read this on my phone? What link do I need to click? fot, log, dvi, typ? – jjk Dec 12 '22 at 15:41
  • From that CTAN page: "it should not be processed without Knuth’s direct permission". That's why there is no PDF or DVI file, the license doesn't allow it. It is for reading the source: the .tex file and the others. You can use any text editor or viewer. The TeXbook is available in printed format, also in cheaper student editions. – Stefan Kottwitz Dec 13 '22 at 07:26
9

The key to understanding the syntax or rather shall I say to get used to it, is to do a bit of reading and programming in TeX. The best source of information on TeX is the Knuth's TeXbook. Trying to understand LaTeX reading its source alone is like trying to understand a computer language by reading its standard library.

The language is a bit cryptic but so is any language that one does not understand well (try Erlang or Brainfuck or even some of the code for Perl)! Perseverance is a good attribute to have when dealing with TeX/LaTeX!

yannisl
  • 117,160
7

I suggest you to read The Not So Short Introduction to LATEX 2ε several pages a day and do many real experiments.

Theoritically you need only 157 minutes in total to read the tutorial. And if you still have problems, just post it in a new thread.

Display Name
  • 46,933
4

The Wikibooks entry on LaTeX has an awesome amount of basic tutorials, examples, explanations, etc. It's pretty thorough for a beginner and yet has a very well-laid-out structure that can easily accommodate people of any level of experience.

Andrew
  • 1,514
1

If you are talking about doing document preperation with LaTeX, then it may help to remember that LaTeX works more like a markup language than a programming language. Try thinking more in terms of HTML (and CSS) than C/Python/VB.

Tom W
  • 191
  • Try thinking more in terms of HTML (and CSS) than C/Python/VB. so you suggest him to learn Latex by learning another markup language?! – CroCo Nov 14 '21 at 09:04