Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

TeX's primitives can be renamed by macro formats/packages: this allows new/altered features or behaviours. Usually this is done such that the originals are still available ('renamed'): certainly LaTeX2e does this (for example \@@end). Which primitives does ConTeXT rename/move, and where do they 'end up'? As there are two ConTeXt versions (MkII and MkIV), are there any differences between the two in this regard?

share|improve this question
    
An interesting question! Thanks for sharing your knowledge :) –  Sean Allred Apr 16 at 15:56

1 Answer 1

up vote 11 down vote accepted

ConTeXt moves several primitives, renaming them systematically using the prefix \normal.... For ConTeXt MkII, all but one of the primitives moved are from TeX90: there is also one from e-TeX and one 'pdfTeX' one that appears only in LuaTeX:

  • \end
  • \everyjob
  • \expanded
  • \input
  • \language
  • \mathop
  • \month
  • \outer
  • \over
  • \unexpanded
  • \vcenter

All of these are saved as \normal..., e.g. \normalend is the \end primitive.

ConTeXt MkIV moves all of the above plus a few additional primitives from TeX90/e-TeX:

  • \/ (saved as \normalitaliccorrection)
  • \hoffset
  • \left
  • \middle
  • \right
  • \voffset

MkIV uses some Lua code to extend/alter the behaviour of these primitives: again the originals are saved as \normal....

It also moves two LuaTeX primitives:

  • \bodydir
  • \pagedir

These are 'hidden' as \spac_directions_normal_body_dir and \spac_directions_normal_page_dir: the \normal... commands do exist but are not equivalent to the primitives.

share|improve this answer
    
ConTeXt MkIV also moves \left and \right to \normalleft and \normalright –  Aditya Apr 16 at 17:54
    
@Aditya Are you sure: is this a recent thing? For me, a minimal document \show\left gives > \left=\left. with ConTeXt in TL2013. –  Joseph Wright Apr 16 at 17:56
    
@JosephWright: In ConTeXt terms, TL2013 is stone-age. I think that this change was done around Feb 2014 or so (but I am not 100% certain). On my old 2014.03.28 version, I get *\show\left > \left=\protected macro: ->\afterassignment \math_left \let \nexttoken. –  Aditya Apr 16 at 18:18
    
@Aditya Thanks for that: makes a 'full' answer a bit trickier than I expected. (That I know of there is no public SVN or similar for ConTeXt, so adding in version info will be tricky.) –  Joseph Wright Apr 17 at 6:10
    
@JosephWright: There are unofficial public git repos of the ConTeXt betas at repo.or.cz/w/context.git/shortlog/refs/heads/origin and gitorious.org/context. Running git blame on math-fen.mkiv shows that these primitives were overridden on 2013.10.20 commit: repo.or.cz/w/context.git/commit/… –  Aditya Apr 17 at 6:23

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.