1

Could you please explain how to define a command \tower{<1>}{<2>}, whose first argument is to be the basis (and the exponent) while the second the number of its repetitions in successive exponentiations. To be more precise, for example \tower{2}{4} and \tower{3}{5} are to be, respectively:

enter image description here

I am particularly interested in pure TeX code.

The answer linked above applies \numexpr command, which (as percusse wrote below) is from etex inventory. So could you please point to these plain TeX commands which should be used to construct a suitable plain TeX counterpart of the linked solution. I am not asking for a full code, but for some hints rather.
  • 1
    Does this question help? http://tex.stackexchange.com/questions/144490/how-do-i-typeset-a-tenfold-powering-a-tower-of-powers-with-latex – Paulo Cereda May 07 '14 at 09:32
  • This is exactly what I need. Thanks a lot for linking the answer. But I have a question: is \numexpr TeX primitive? I could not locate it in the TeXbook index. – Rafał Gruszczyński May 07 '14 at 09:42
  • @MadHatter No it's one of the etex goodies. – percusse May 07 '14 at 09:43
  • @percusse Thanks. So what about creating \tower version in plain TeX. Would this be much harder? – Rafał Gruszczyński May 07 '14 at 09:44
  • @MadHatter Not really. It's a nice shortcut for making integer arithmetics. If you go the long way it would be the same. – percusse May 07 '14 at 09:45
  • 1
    @MadHatter you can of course use plain tex over an etex engine (and most people do for example if you use pdftex as the engine the etex extensions are in by default) but \numexpr there was only a minor convenience to subtract 1 you could use classic TeX \advance on a count register instead. – David Carlisle May 07 '14 at 10:24

0 Answers0