4

I mean something like this: TeX - Wikibooks

I found it looking up documentation for \if. I didn't expect to find it to be a WikiBook.

Open the link, scroll down to "TeX Primitives" and click ìf in the third column or use this link: TeX \if.

TeX Wikibooks


Requirements to "good documentation":

  • online
  • structured, hyperlinks
  • easy to find, easy to access
  • comprehensive, complete
  • examples


    Advanced requirements:

    • generated from a database
    • requirements of use
    • used in package, file, line
    • peculiarities
    • where defined
    • where redefined
    • importance, statistically determined
    • supply of tooltips for typesetting system editors
    • links to good blog posts
    • links to StackExchange
    • maintenance by all users of the community



And for comparison TeX, The Program Index \if section 487:

TeX, the program section 487 \if

That doesn't really help me.

And here \if in TeX by Topic:

enter image description here

That's better but in both cases no reference to \else \fi.

Thanks to the hint from Marcel Krüger:

The TeXbook

enter image description here

It looks a lot better.

  • 6
    This text seems a bit imprecise, I'm afraid. The usual reference for TeX primitives is the TeXbook (Knuth). There is also TeX by topic (Vic­tor Ei­jkhout) but I haven't read it. LaTeX doesn't have primitives stricto sensu. The LaTeX Companion (now at its 2nd edition) explains a few internal LaTeX commands, but I'd say this is not its main objective; for those that are not covered (a lot), you have the source2e document (commented source code). – frougon Aug 05 '19 at 22:28
  • 5
    the official reference documentation for tex is the texbook and the official reference documentation for latex are the latex book and the latex companion, all three books published by Addison-Wesley. – David Carlisle Aug 05 '19 at 22:44
  • @frougon You're right. I can see your point and have confined the question to typesetting systems. source2e is exactly what I searched for! So the question was worth it. Thank you! – CarpeDiemKopi Aug 05 '19 at 23:25
  • 3
    You only quoted 13.2.1 of TeX By Topic. At minimum you should read the section headings. Chapter 13 is called “Conditionals”, so the entire chapter is about \if and variants. Specifically, the \else and \fi that you say are missing are listed on the very first page of the chapter, then 13.1 explains the general structure of conditionals (including the \fi or \else ... \fi), then 13.2 lists specific ones (\if, \ifcat etc), then 13.7 says more about how conditionals are evaluated (skipping until \else etc). – ShreevatsaR Aug 06 '19 at 04:25
  • @ShreevatsaR I just looked for \if and took the first usable result. When I got there I would have had to scroll up a page. I found the right page in "TeX WikiBooks" simply by entering TeX \if on google. – CarpeDiemKopi Aug 06 '19 at 04:50
  • 1
    @CarpeDiemKopi Yes, that was my point exactly: you should look at least the nearby pages or at a bare minimum read the section titles to get context; would you expect all the information about \else … \fi to be duplicated for each of \if, \ifcat, \ifx, \ifhmode, \ifvmode,\ifvmode, \ifmmode, \ifinner, \ifnum, \ifodd, \ifvoid, \ifhbox, \ifvbox, \ifeof, \ifcase, \iftrue, \iffalse, and custom conditionals defined with \newif, just in case someone looks at only one of them? (If so, I am certain that no documentation with so much redundancy currently exists.) – ShreevatsaR Aug 06 '19 at 05:06
  • @CarpeDiemKopi The TeXbook excerpt of which you posted a screenshot is only a small part of the story for \if (this is a generic introduction to the conditionals). You need to look at p. 209 for specific info about each conditional, in particular here about \if. Also, the top of p. 213 (generic) is very important (all in all: pp. 209-213). – frougon Aug 06 '19 at 06:49
  • 2
    As it stands, this feels hard to answer: what the bar for 'good documentation here? The various manuals (e-TeX, pdfTeX, LuaTeX) plus The TeXbook and TeX by Topic feel like they offer reasonable coverage to me. – Joseph Wright Aug 06 '19 at 06:52
  • @JosephWright I take from my question e.g. the importance of fast access. Maybe I should replace good with fast e.g. look Overleaf list of primitives would be a good start but unfortunately, there are no links to documentation for a primitive. – CarpeDiemKopi Aug 06 '19 at 15:04
  • @frougon I intentionally made only a small excerpt, because it's probably not in the sense of Knuth to post screenshots from his book (and I have also indicated: "It looks a lot better"). – CarpeDiemKopi Aug 06 '19 at 15:25
  • @JosephWright I've added a few requirements for "good documentation". – CarpeDiemKopi Aug 06 '19 at 16:08
  • 4
    Documentation of this sort doesn't exist, and is unlikely to (who would do it?) TeX predates the web so the idea that its documentation would suddenly exist in the form that you've become used to with some other more modern software seems unreasonable. As Stackexchange discovered with their disastrous documentation site attempt, writing good documentation for existing systems is both hard and not something most people are interested in putting time into. There's plenty of adequate documentation around; the fact that it requires traditional reading rather than clicking shouldn't be a problem. – Alan Munn Aug 06 '19 at 16:45
  • 1
    I know that it may be surprising, but as TeX is fundamentally a typesetting system, the 'gold standard' of documentation is normally oriented toward dead-tree reproduction. The TeXbook is the reference work for TeX programmers, after all. – Joseph Wright Aug 06 '19 at 21:30
  • 1
    See https://tex.stackexchange.com/q/11/5763 and https://tex.stackexchange.com/q/66/5763 – Martin Schröder Aug 06 '19 at 22:04

3 Answers3

2

A dedicated server for querying and browsing TeX and LaTeX package information and general documentation texdoc.net.

Only LaTex:

LaTeX2e unofficial reference manual latexref.xyz

LaTeX Formatting Information here

1

I just discovered by chance David Bausum's TeX Reference Manual here HTML version. At first glance more extensive than the TeX-Wikibooks.

1

I just found at random from an internet search the book Making TeX Work by Norman Walsh

Making TeX Work

AndréC
  • 24,137