# How can a make a product of nested exponentials look nicer?

Ideally, I would like to squeeze all of the exponentials under this integral together so that everything doesn't look so spaced out. My latex is

$$\int_0^1 e^{e^{e^{e^{e^{e^{e^{e^{e^{e^x}}}}}}}}}e^{e^{e^{e^{e^{e^{e^{e^{e^x}}}}}}}} e^{e^{e^{e^{e^{e^{e^{e^x}}}}}}} e^{e^{e^{e^{e^{e^{e^x}}}}}} e^{e^{e^{e^{e^{e^x}}}}} e^{e^{e^{e^{e^x}}}} e^{e^{e^{e^x}}} e^{e^{e^x}} e^{e^x} e^x \exd x$$


which results in this:

• You could introduce some negative \kern but I somehow don't think one can make this look good. Commented Aug 17, 2018 at 19:17
• Look this Why is [ … ] preferable to $$…$$? Commented Aug 17, 2018 at 19:45
• Why don't you just define $\tau(0,x) = x, \tau(n,x) = e^{\tau(n-1,x)}$ and then write $\int\limits_0^1\!\mathrm{d}x\ \sum_{n=1}^10\tau(n,x)$? Commented Aug 17, 2018 at 22:21
• Yeah I could do that, but I am still curious about how to format this.
– SFSH
Commented Aug 17, 2018 at 23:46
• – user4686
Commented Sep 6, 2018 at 13:18

Maybe this one:

\documentclass{article}
\usepackage{amsmath,mathtools}
\usepackage{xparse}

\ExplSyntaxOn
\NewDocumentCommand{\epowersx}{m}
{
\mathmakebox[1.5em][l]
{
e\prg_replicate:nn { #1 - 1 } { ^\c_group_begin_token \scriptstyle e }
^{ \scriptstyle x }
\prg_replicate:nn { #1 - 1 } { \c_group_end_token }
}
}
\ExplSyntaxOff

\begin{document}

$\int_{0}^{1} \epowersx{10} \epowersx{9} \epowersx{8} \epowersx{7} \epowersx{6} \epowersx{5} \epowersx{4} \epowersx{3} \epowersx{2} e^x \, dx$

\end{document}


but I'd use different notation.