35

I think I've reached the stage to where I can't get any better at producing documents that look the way I want them to unless I put serious effort into learning how to write the kind of as-of-now-to-me-completely-opaque code littered with @ symbols and all manner of unfamiliar low-level commands that typically appears in forum answers and obscure blogs, from which I must copy the code straight into my file and not modify it one bit (unless I want 174 error messages).

But with all the anticipation for LaTeX3 and LuaTeX and what else, I wonder if soon there will be easier ways to achieve the layouts I want than sitting down and plowing through the TeXbook. Any opinions?

5
  • 15
    I'm curious what kind of layout requirements are forcing you to hack the kernel like this. It's true that basic LaTeX is pretty inadequate for doing anything complicated, but there are literally thousands of packages that did the @-hacking thing for you and are extremely powerful and intuitive, effectively extending the system. Unless you have something strange and genuinely new, you shouldn't have to program TeX. Are you sure your question isn't "how do I avoid hacking the kernel by using CTAN?"?
    – Ryan Reich
    Dec 3, 2011 at 6:24
  • 8
    (continued) This is not intended to be snide. I've found that most of the really terrible, unmodifiable "LaTeX" code I've seen is really a plain TeX/LaTeX chimera that would be vastly simpler if the author knew about, say, minipage or the exam documentclass. This may be oversimplifying for you, but you may have a similar problem.
    – Ryan Reich
    Dec 3, 2011 at 6:26
  • 4
    You will most likely have to plough through a similar style reference for LaTeX3 and Lua(La)TeX, don't you think?
    – Werner
    Dec 3, 2011 at 6:27
  • 3
    The development of LaTeX3 is being seen as advancements in LaTeX now. By learning LaTeX today, it will be an easy step if you want to move to 3 in the future. Keep an eye on places like this, and when there's something you don't understand, just ask! I'd also like to echo @RyanReich's point. The most sophisticated document I ever wrote was my Thesis, and that had a handful of @-hacks in one special file, which was well documented and easily understandable. In hindsight, even those could probably have been avoided if I knew more about what packages were available at the time.
    – qubyte
    Dec 3, 2011 at 9:49
  • 1
    So what can we use otherwise? When writing a paper with a lot of math we usually have no better choice. And for professional typesetting, those GUI tools (e.g. Adobe InDesign) are also rather complex. Indeed, TeX is hard; but without TeX, I can't get what I need.
    – Leo Liu
    Dec 3, 2011 at 11:50

3 Answers 3

26

Yes, it is definitely worth learning TeX and its derivatives.

It sounds like you have tried going straight to the core:

learning how to write the kind of as-of-now-to-me-completely-opaque code littered with @ symbols and all manner of unfamiliar low-level commands that typically appears in forum answers and obscure blogs

Personally, I don't think that this is the best way to get started. Instead, start gently by working with LaTeX, load packages and let them do the hard work for you. This will allow you to keep your .tex files relatively free from low-level commands.

Some packages to help you tweak the appearance of the standard classes (article, report, book)

  • geometry to get your page dimensions setup
  • fancyhdr to get your headers and footers
  • enumitem to customize your enumerations
  • titlesec to customize your section/chapter headings

You might also like to explore some of the other documentclass that have pre-built settings, such as memoir, koma-script.

If you find that you really can't get the packages to do what you want to (which is very unlikely these days) then you can start the low-level hacking.

The TeXbook is a wonderful manual, but I wouldn't recommend it as the first book you ever read about TeX. Start with some of the references given in this answer

What are good learning resources for a LaTeX beginner?

and when you're curious about how things work, then come back to the TeXbook as the definitive reference.

2
  • 3
    This is an excellent answer. You can do a lot without getting into low-level hacking. Yes! you can. Do not give up.
    – Sony
    Dec 3, 2011 at 22:47
  • 1
    Agree with @Sony! TeX is much more low-level than LaTeX. But your TeX-hacking will definitely benefit you, much more so than, say, learning Assembly would make you a better Java programmer.
    – Ryan
    Nov 29, 2012 at 14:57
14

Yes, do learn some TeX, for at at least two reasons:

  • ConTeXt, LuaTeX, LaTeX3 - very nice and good, but it'll be years, if not many years, before any combination of these replaces (La)TeX the way it is now. And people will be writing today's kind of LaTeX for these years. The LaTeX 3 project got started in the early 1990s (!).
  • I think there is a lot of things that any of us could do to improve his/her documents using TeX programming. It doesn't have to be "hacking the core", but \@namedef, \@ifundefined and other @-riddled low-level commands are useful tools. Here's a recent example from my own experience: How do you add a list of figures only if you have figures - this isn't something esoteric or obscure, and still, you need a bit of low-level programming for it.

Of course, you don't need to go through the entire TeXBook and the other reference material, it may be enough to pick up some tricks here-and-there.

3
  • 7
    "It doesn't have to be "hacking the core", but \@namedef, \@ifundefined and other @-riddled low-level commands are useful tools.": Well, that are two good examples for the "thousands of packages that did the @-hacking thing for you and are extremely powerful" @Ryan has mentioned. I strongly suggest to use the well-crafted etoolbox substitutes here.
    – Daniel
    Dec 3, 2011 at 10:09
  • @Daniel: Well, actually, the existence of many powerful packages which hack for you is more of an argument against learning more low-level programming. Maybe you should write a 'Maybe Not' answer.
    – einpoklum
    Dec 3, 2011 at 12:57
  • 1
    I agree with @einpokium, learning some plain tex most certainly enhances your ability to get things done, even if your documents are compiled with a flavor of latex.
    – A Feldman
    Apr 15, 2016 at 4:15
11

Yes, the solution have been there for 20 years now, no need to wait any longer; use ConTeXt :)

3
  • Is it possible to get the background color combination at the ConTeXt garden to be changed to the background color combination at TeX.SX? My eyes are sending urgent messages to my brain "leave! leave!" as soon as I see those ugly colors. They must consult some artists.
    – Sony
    Dec 3, 2011 at 14:05
  • 1
    khaled is a stirrer, of course;-) but he has a real point -- if you're a real beginner (very little investment in latex), and if when you look at the context docs on context garden, you find them pleasing, then it's worth thinking of going that way -- find, through questions on contextgarden, whether what you need to do is practical with context. (i've been writing latex since the late 80s, and am old enough that a change probably isn't practical, for me.) Dec 3, 2011 at 19:29
  • 1
    @Sony: ask ConTeXt garden admins, I'm not one of them, I'm just a poor user who wants to a powerful TeX-system but not the pain of LaTeX. Dec 4, 2011 at 0:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .