26

I have, after learning some LaTeX, in trying to understand more about what I am doing, started to learn some plain TeX.

This has naturally led to me using some plain TeX control sequences in the latex that I write. It has also led to me asking questions that have MWE's that begin with \begin{document} and end with \end{document} but nonetheless contain \def and other primitives and plain TeX macros.

Am I asking a LaTeX question or a plain TeX question when I do this? Does it really matter?

Can two \vtop boxes exist side by side?

  • 2
    I've answered the general question below but for the specific vtop question if just the title text it should be tagged tex-core as that is a primitive feature of tex, but actually it's sort of an x-y question as in a latex context a question could have been can I have two vertical boxes side by side, in which case the correct answer would be two \parbox and not use \vtop at all. – David Carlisle May 7 '16 at 8:39
  • Sometimes I feel like I've stepped into a small, quiet war here when dealing with this issue. Caught between plain tex`ers with the feeling that latex provides overly complicated constructs (latex therefore shouldn't be used) and what seems to be the majority, that tex control sequences do not do as much as their latex counterparts/derivatives and should not be used in latex (plain-tex should be "avoided"). Of everything said here, the comment of @AndrewCashner below very strongly resonated with me. – A Feldman May 8 '16 at 14:54
  • 2
    not a war, just different systems. latex is written in tex, clearly tex primitives can be used, but only with care. like using assembly from a high level language it can be done effectively but saying "don't do it" is correct advice almost always. eg \sbox0{\color{red} hello}\usebox0 will print a red hello the similar \setbox0\hbox{\color{red}hello}\usebox{0} will corrupt the color stack and used to crash old laser writers requiring a hard reset. If you use an extra group \setbox0\hbox{{\color{red}hello}}\usebox{0} the tex primitives are safe, but using the latex commands is simpler. – David Carlisle May 8 '16 at 15:11
27

We have two tags that try to separate the differences:

  • is about format-independent questions involving TeX the language, and so it can be used for LaTeX questions involving TeX primitives.

  • is about the plain TeX format, and is mainly there for people who use it so that their questions don't get lost in the sea of LaTeX questions.

So if you are asking about TeX primitives in the context of a LaTeX document, add the tag; if your minimal example ends with \bye and can be compiled with plain TeX, then use the tag.

  • 2
    I'd add that if you want to ask about a tex-core concept, it's strongly encouraged to formulate the question using plain as this is the 'basic' test bed for a lot of stuff. (Questions really about primitives can almost always be stripped down.) – Joseph Wright May 6 '16 at 15:59
  • 1
    @JosephWright Although I agree in principle, since many users really only use (and have experience with) LaTeX, I think it's still fine if people ask about TeX primitives in wrapped in simple LaTeX documents, especially since many users might not even know what's a primitive and what's not. Of course if you are working through the TeX Book and asking questions, posting examples in plain is obviously the thing to do. – Alan Munn May 6 '16 at 16:55
  • To expand on what @AlanMunn says: Some users want to know, "What is the plainest, most bare-bones, old-school TeX-programming way to do this?" Other users might feel more like, "Apparently I have to use a loop for this thing in my LaTeX document; that must mean I need to use TeX", but their interest is not really in learning the language but in getting a document made in LaTeX. So an answer that uses only \newcount and \loop and \advance, etc., would not help this more pragmatic second type of LaTeX user. – musarithmia May 6 '16 at 18:49
  • Thanks for the thoughtful answers, and very thoughtful comments. – A Feldman May 8 '16 at 1:04
22

Note that you can not actually use plain tex in latex. plain is a different format defined in plain.tex which is not input into the latex format. There are of course some macros with the same name in both plain and latex and (some) of those have the same definition, but it's not really plain tex whatever you do.

So if you want to ask how to do a floating insert and want people to answer using \topinsert and with code that requires the command tex rather than latex to process it, tag your question plain-tex but if you are asking about the use of a primitive such as \def in latex, tag it tex-core if you want to ask about a macro such as \loop tag it as macros or latex-base or some such (\loop being an example of a low level macro with similar but different definitions in plain and latex).

If you just want to ask a question and don't know how to tag it just tag it with anything reasonable, it doesn't matter that much anyway and the tags can always be changed once the answer and context is clearer.

You must log in to answer this question.

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