0

Why does LaTeX macro spells \LaTeX{} (which requires 3x presses and 2x releases of Shift) and not \latex{} (which can be typed w/o Shift)?

Same about \TeX{} macro of course.

The current spelling seems counter-productive w/o any pros, unless I am missing something.

ajeh
  • 2,572
  • 11
    How often do you use it? If very often, define your own \let\latex\LaTeX and/or \let\tex\TeX; this question doesn't really seem all that helpful, in my opinion. – Werner Sep 24 '14 at 19:49
  • 4
  • This is an objective and purely technical question. There is no place for opinionating in its verbiage. The fact that typing LaTeX requires 3 presses of Shift is not an opinion, but reality. This is just to address the reasoning for on hold. – ajeh Sep 24 '14 at 21:43
  • 2
    Please don't downvote below a score of -1, even if the question in its current form needs some improvement. A score of -1 is enough to show that the question needs work, anything below that is of no use. – cfr Sep 24 '14 at 22:11
  • 1
    @barbarabeeton But a fundamental tenet of TeX's philosophy is that the markup need not resemble the desired output. The fact that \TeX produces a logo does not explain why the macro must resemble one. – cfr Sep 24 '14 at 22:13
  • 2
    @ajeh - Your question starts with "Why". Short of having the original creator of the macro that typesets the logo provide some insights into his/her thinking, there is no way to avoid any discussion of this subject becoming guesswork and opinion-mongering. – Mico Sep 25 '14 at 05:20
  • 1
    @cfr - while there's nothing in TeX and friends that stipulates that macro names must be mnemonic, there's nothing either that stipulates that macro names must not be at least somewhat mnemonic, right? Speaking for myself, I find it quite helpful that the macros \TeX and \LaTeX are spelled the way they are: the lowercase letters sort of evoke the use of either small-caps or lowered uppercase letters in the logos. – Mico Sep 25 '14 at 07:03
  • 1
    @cfr -- re \TeX, it's that way because that's the way knuth defined it. the \LaTeX macro was named by analogy. as someone has already said, you're entirely welcome to define an alternative command name -- but please don't (at least in "official" documents) fail to use the agreed form of the logos. although the "products" are now recognized, in the case of TeX, if some lawyer tries to contest it with ams, i'm the one who gets stuck with the initial task of documenting the history, and i'm rather tired of doing that. – barbara beeton Sep 25 '14 at 11:43
  • @Mico I agree. I just think that, short of asking Knuth, it is not possible to say why it is \TeX rather than \tex. So I think attempts to answer the question a priori are necessarily unconvincing. (You may find it helpful; others may not. Who knows if that is why Knuth did it that way?) [And, I'm tempted to add, who cares?] – cfr Sep 25 '14 at 13:20
  • @barbarabeeton I agree. But that is not a satisfying explanation to somebody asking the 'why?' question here. Moreover, I remain unconvinced that there is any such answer. Knuth chose one of several reasonable possibilities (\Tex, \tex, TEX, \TeX) as opposed to an unreasonable one (\asdfsdafgdse). But a reasonable person could have chosen one of the other possibilities. Reason does not determine a particular choice even though it rules some out. So the only answer to the question has to appeal to Knuth's particular reasons. But that's not the right 'why?'. That 'why?' has no answer. – cfr Sep 25 '14 at 13:25
  • 1
    @cfr -- regarding \TeX, i can only refer you to chapter 1 of the texbook: "Hence the name \TeX, which is an uppercase form of \tau\epsilon\chi." regarding \LaTeX, the \La is presumably the first two letters of leslie lamport's last name; you're not likely to get a definitive answer from leslie. but a reasonable conjecture is that he followed knuth's model -- as have many (thought by some to be too many) other developers of tex-related tools and software. "imitation is the sincerest form of flattery." – barbara beeton Sep 25 '14 at 13:33
  • @barbarabeeton Sure. But it is not the kind of 'hence' I take it the question asks for. Of course it isn't. It couldn't be. The question asks for a 'A. Hence, B.' where B is unique i.e. this is why only B made sense/was possible. But that kind of reason is not available. B makes sense in light of A. But C, D and E also make sense in light of A even though F, G and H do not. I just don't think there is an answer to this question of the kind the OP is looking for. (If there was such an answer, it would not be opinion-based.) – cfr Sep 25 '14 at 18:28
  • 2
    @cfr -- actually, i agree with the reasoning that the question is opinion based; that's one reason i'm not trying to write an answer, only comments. one last conjecture ... tex input is text, not highly coded in the sense of x/html. so it's logical to think that one might want the source file to be human readable, and having the typescript for what's basically text look as much like the output isn't a bad goal. as tugboat editor, i happen to have the source files for some rather old material. in an article submitted by lamport, in 6:3 (1985; p.150), the source contains \LaTeX. – barbara beeton Sep 25 '14 at 19:46
  • @barbarabeeton Indeed. That would be one consideration in favour of those choices. But, of course, there are other considerations, too, such as memorability or efficiency of typing which would favour the alternatives. I just think that looking for a reason which would select the particular macros as uniquely reasonable choices is a mistake. (But that's what the question wants which is why it cannot be answered.) – cfr Sep 25 '14 at 21:13
  • Because typing simplicity is not always desirable. Replace "are" by "r", "you" by "u", etc and you save a lot of keystrokes, but your text is hardly readable. Lowercase names and surnames is unpleasant and may be confusing ("agate brown": A girl or a dark stone?) and it is well-know that this is also true for "LaTeX" vs. "latex". In the old times without syntax highlighting, that was is some extent true for \LaTeX. A highlighted \LaTeX is more clear that \latex? Not sure, but tradition still matters. – Fran Sep 26 '14 at 10:20

1 Answers1

14

There is no other reason than

Because that's the correct capitalization.

TeX is so written to denote that, in the official logo, the capital E is lowered. Similarly, the A in the official LaTeX logo is raised, but there is no intuitive way to denote 'raising' with letter case, so we lowercase it. Thus, \TeX and \LaTeX.

From the TeXbook (ch.1, p.1):

The correct way to refer to [\TeX] in a computer file, or when using some other medium that doesn’t allow lowering of the 'E', is to type 'TeX'.


The issue has been raised that, despite TeX being the official logo of the technology, TeX is a language that is rooted in the idea of markup. There is no hard-and-fast rule for the markup that it provides—what is laid out on the page isn't required to be (and usually isn't) representative of what's used as input. For example,

\textsc{This is small caps text.}

This does not strictly resemble small caps, but the logical idea is there. Another example,

\includegraphics[width=2.\linewidth]{example-image-a}

This certainly does not look like what gets put on the page, but this is okay. TeX is a markup language and it is comprised of instructions to a typesetter rather than a crude mock-up of the final product (which is the usual approach to word processing).

The important thing to note here is that TeX was also designed to be readable. While the desired output would be far clearer from a markup point of view to use

\[ f^\prime(x) = x^2 \]

or even the ridiculous, MathML-esque

\[ \equality{\function{f}{1}{x}}{\exponent{x}{2}} \]

With this kind of syntax, TeX would have never taken off. Wherever possible/reasonable considering the limits of plain text, input syntax is geared to resemble output:

\[ f'(x) = x^2 \]

Thus, we have \TeX and \LaTeX instead of \tex and \latex as the reasonable representation and thus the input syntax.

Sean Allred
  • 27,421
  • Tell that to \section. – Steven B. Segletes Sep 24 '14 at 19:52
  • @Johannes_B How do you mean the source? Do you mean the pages of the TeXbook and Lamport's book? – Sean Allred Sep 24 '14 at 19:53
  • The point of taking an effort of typing \LaTeX{} is to... save keystrokes and get LaTeX. LOL. Whatever. – ajeh Sep 24 '14 at 20:02
  • @ajeh: you don't get LaTeX in the resulting pdf, you get the correct logo. And, as others said, if you use it often, you may define your own macro or configure your editor to capitalize \LaTeX correctly. – mbork Sep 24 '14 at 20:05
  • 2
    @ajeh I would rather type \LaTeX than write L\kern -.36em{\sbox \z@ T\vbox to\ht \z@ {\hobx {\check@mathfonts \fontsize \sf@size \z@ \math@fontsfalse \selectfont A}\vss }}\kern -.15em T\kern -.1667em\lower .5ex\hbox {E}\kern -.125emX – Sean Allred Sep 24 '14 at 20:05
  • @mbork My convenience is not the point. It is just harder to advocate for LaTeX when its own logo is rendered with a macro of questionable efficiency. – ajeh Sep 24 '14 at 20:08
  • 3
    @ajeh Unless you're willing to learn the TeX primitives and look at their C sources, you should trust that the above macro is extremely efficient. Long when humans look at it, but extremely efficient. Advocating for LaTeX is often done by examples of its output and the workflow that went into it. The logo has nothing to do with it. (Try replicating Microsoft Word's logo in Word. Does that mean it's hard to advocate for the use of Word?) – Sean Allred Sep 24 '14 at 20:10
  • 3
    @ajeh: You should try to sue Leslie Lamport for compensation once you get Tenosynovitis from pressing the shift key all the time. ;-) – Fritz Sep 24 '14 at 20:11
  • @SeanAllred You are probably talking about different efficiency (such as expressed in CPU cycles). My question was about keystrokes. Try to compare typing: Shift-T-Release Shift-e-Shift-X with tex. – ajeh Sep 24 '14 at 20:50
  • @ajeh There are a lot of alternatives to inputting this macro, ranging from editor customizations to TeX-level redefinitions, but your question didn't ask that. This is the reason; take it or leave it. – Sean Allred Sep 24 '14 at 21:23
  • @Downvoter, is there anything I can do to make this question better? – Sean Allred Sep 24 '14 at 21:23
  • 1
    @SeanAllred --- and who might the downvoter be I wonder? – Ian Thompson Sep 24 '14 at 21:30
  • @IanThompson While I have my own thoughts, I don't make assumptions :) – Sean Allred Sep 24 '14 at 21:32
  • 1
    @ajeh Keystrokes are strictly either die-hard coder or secretary standards for efficiency. Nobody types this macro more than a handful of times in a thousand page document (unless you are writing a manual). So your hypothesis is the culprit. – percusse Sep 24 '14 at 21:51
  • I don't agree that this answers the question although I do agree that the issue is a trivial one. That is, I completely understand that TeX is a logo. And I completely understand why you would therefore type TeX in, say, a comment on this site. However, that does not explain why the macro to produce the logo is \TeX rather than \tex. The macro is markup - it does not need to look like the desired result. If I want some text to appear in small-caps, I don't have to issue a macro which resembles small-caps. As an explanation, this answer seems inconsistent with TeX's basic philosophy. – cfr Sep 24 '14 at 22:07
  • @cfr I get what you're saying. I'll try to expand on it after dinner, then. – Sean Allred Sep 24 '14 at 22:08
  • 1
    Note that I am not the down-voter ;). So I cannot undo the (-1)! I just say this in case it affects your decision to return to the topic after dinner. – cfr Sep 24 '14 at 22:08
  • 1
    @cfr See edit :) – Sean Allred Sep 24 '14 at 22:42
  • 3
    @cfr Macro naming is due to Knuth. There is nothing more to it. That's why it's opinion based. – percusse Sep 24 '14 at 22:47
  • 1
    @percusse I agree. It isn't that I think there are better answers than this one. I just don't think these are supposed to be justified or, if they are, you would need Knuth or friend-of-knuth to discern that justification. [Of course, we can make reasonable inferences concerning some of Knuth's choices. But I don't think there is any reason to use \LaTeX rather than \latex. There is a reason to use one of these rather than, say, \adfasowerrgerl. But that is not the question.] – cfr Sep 24 '14 at 23:41
  • @jon I agree. As I said, I don't think that there is a better answer. I just don't think this is a convincing one. Until somebody produces some evidence to the contrary, I don't think there is a better answer than 'because some macro was needed to ease typesetting the logo, and this choice was one of several which a reasonable person might have made'. That is, while \asdga would not be reasonable, there is no reason to choose one of \tex, \TeX, \Tex, \TEX, \texlogo,... rather than another. At least, no non-trivial reason. – cfr Sep 25 '14 at 00:05