6

Coming from the C/C++ world, I am used to a standardized language. There are differenct standards, such as ISO or ANSI C.

Is there a language standard for LaTeX? (Syntax, keywords, ...)

David Carlisle
  • 757,742
  • 3
    @Mico Some people in the LaTeX team would strongly dispute your first sentence! [Not the the 'welcome' one ;-)] ((La)TeX as a means of information exchange and all that.) – Joseph Wright Oct 28 '15 at 07:34
  • 3
    @Mico one could also dispute it for latex2e, latex has always had a role as a language for document exchange, and includes non-tex implementations (latexml, mathjax, latex2html, ....) – David Carlisle Oct 28 '15 at 08:35
  • @DavidCarlisle - Clearly, I'm out of my depth here. I'll delete my comments and let you (or Joseph, or somebody else...) provide a better write-up. – Mico Oct 28 '15 at 09:13
  • 1
    Donald Knuth said that should he ever pass away then the version number of TeX becomes π and "[f]rom that moment on, all 'bugs' will be permanent 'features.'" That's pretty much like a standard. – phk Oct 28 '15 at 11:49
  • 2
    there's one difference between tex and other language standards. even once the tex language is frozen at π it will not be feasible to create a fixed bnf definition for it. – barbara beeton Oct 28 '15 at 13:03
  • @barbarabeeton: Actually, that is true for many languages. Pascal, Modula, and Oberon are outliers in this regard, because Niklaus Wirth specifically designed them to be context-free. Most languages are "almost context-free", and thus cannot be described in Backus-Naur-Form. – Jörg W Mittag Oct 28 '15 at 14:03
  • I think what the OP is actually interested in, is a formal specification more than a standard. I.e. a document which unambiguously describes the syntax, semantics and type system of LaTeX, such that one could create a 100% compatible re-implementation just from that document. As was explained below, the source code of LaTeX is kind-of a standard, but it's not a specification. (Or rather, it's a trivial specification, where there cannot ever be any bugs, because a bug is a discrepancy between specification and implementation.) – Jörg W Mittag Oct 28 '15 at 14:06
  • For example, a couple of years ago, when ECMAScript 5 was released, some guy from Germany sat down, downloaded the spec, and just started implementing it top-to-bottom, ending up with a 100% compliant (modulo some bugs which he fixed in the next couple of weeks) implementation of ECMAScript 5 after just two weeks, which is about one year faster than Mozilla, Microsoft, Apple, Google, and Opera managed to, despite being part of the standardization process and thus having advance (and advanced) knowledge of the features (plus, having money, large teams, and a starting codebase). – Jörg W Mittag Oct 28 '15 at 14:09
  • 2
    @JörgWMittag -- thanks for the correction. in the 1980s it was proposed in iso circles to "standardize" tex, but after examination, it was decided not to, for reasons both of difficulty and others (one of the most important being that formal standardization could open it up to changes that would not have been accepted by knuth, with the result that, according to dek's wishes, it could no longer be called "tex"). – barbara beeton Oct 28 '15 at 14:21
  • 2
    As the comments detail, some more idea of what you are after would be helpful (TeX, LaTeX as in the LaTeX2e kernel, packages, just math mode symbols, ...). In any case the answer is the same ('no') but it would allow a more nuanced answer to to given. (In the C world there is more than one compiler which is supposed to give a working result. For TeX, there's TeX and derivatives, all of which must pass the TRIP test, and for LaTeX there is LaTeX2e and that's it.) – Joseph Wright Oct 28 '15 at 16:00

1 Answers1

6

Short answer:

There is no specifications

Long answer about standard:

We should differenciate several point here I think. You speak about LaTeX but nothing about TeX, LuaLaTeX or XeLaTeX.

TeX

Basic command are written by D. E. Knuth himself. No need to standardize then. For information you can modified the source code of TeX but in this case, you have not the right to called the modified program TeX:

% This program is copyright (C) 1982 by D. E. Knuth; all rights are reserved. 
% Copying of this file is authorized only if (1) you are D. E. Knuth, or if 
% (2) you make absolutely no changes to your copy. (The WEB system provides 
% for alterations via an auxiliary file; the master file should stay intact.) 
% See Appendix H of the WEB manual for hints on how to install this program. 
% And see Appendix A of the TRIP manual for details about how to validate it.

LaTeX

  1. LaTeX2e is a standard "de facto": "Until LaTeX3 is delivered, the project team are committed to the active maintenance of The New Standard LaTeX (LaTeX2e). The experience gained from the production and maintenance of The New Standard LaTeX will have a major influence on the design of LaTeX3. "
  2. LaTeX3e is still in development and so not standard yet.

Lua(La)TeX and Xe(La)TeX

I decided to put both of them in the same categories. The goal is to make extension of (La)TeX:

Conclusion

There is no specifications as ISO, ANSI, AFNOR or from other organization but standard de facto.

Romain Picot
  • 6,730
  • 4
  • 28
  • 58
  • I suspect the OP didn't actually mean to ask about standards but about specifications, in which case I guess the answer is a simple "No"? – Jörg W Mittag Oct 28 '15 at 14:44
  • @JörgWMittag There is no specifications but only standard. I modified the conclusion and had a "short answer" part. – Romain Picot Oct 28 '15 at 14:57