How can I give one line in LaTeX more vertical height so that something like

$\frac{n^n}{{2}^{2n} * {n^n}^{2}}$

displays correctly? I mean, how to give the {2} term more vertical displacement, so that it looks like it's above the top n in the term {n^n}^{2} in the denominator?

Note that increasing line spacing doesn't work because LaTeX does not fill the space with the characters. (When I searched for this ability, this was all that came up.)

  • 2
    Could you please add a minimal example which reproduces your problem?
    – CarLaTeX
    Feb 1, 2019 at 4:13
  • You can add additional space using {\fboxrule=0pt \fbox{...}} Feb 1, 2019 at 4:22

2 Answers 2


I think the denominator of your \frac expression suffers from two issues:

  • a "cramped" look, i.e., the exponents are not raised much above the baseline
  • first- and second-order exponents are raised to (very nearly) the same height

How to remedy these issues?

  • To address the first issue, switch to "uncramped" mode -- see the \ufrac macro below.

  • To remedy the second issue, I suggest you switch from {n^n}^2 to n^{n^2}. (The two forms are the same, mathematically speaking, but they are quite differnt from a typographic point of view.) That, or use parentheses to visually "enclose" the n^n term.

    Alternatively, consider switching from "standard" \frac notation to inline-fraction notation.

Whatever else you do, please don't use the unnecessary * multiplication symbol. If you can't do without an explicit multiplication symbol, do use \cdot, not *.

enter image description here


%% "uncramped" \frac macro:
%% (Source: @egreg [who else?!], https://tex.stackexchange.com/a/337334/5001)

inline math mode, \verb+\frac+ notation

$\frac{n^n}{{2}^{2n} * {n^n}^{2}} % OP's expression
 \ufrac{n^n}{2^{2n} n^{n^2}}   
 \ufrac{n^n}{2^{2n} (n^n)^2}$ 

display math mode, \verb+\frac+ notation

 \frac{n^n}{2^{2n} n^{n^2}}
 \ufrac{n^n}{2^{2n} n^{n^2}} 
 \ufrac{n^n}{2^{2n} (n^n)^2}$

inline-frac notation

$n^n/(2^{2n} n^{n^2})           
 n^n/(2^{2n} (n^n)^2)$ 
  • 1
    I specially like the 3rd option instead of the first one. We need more parentheses, but we guarantee not to destroy line spacing (and sometines it is visually better). Thanks for showing us the options!
    – manooooh
    Feb 1, 2019 at 7:10

Does this go in the right direction?


$\frac{n^n}{{2}^{2n} * {n^n}^{2}}$
\[\frac{n^n}{{2}^{2n} * {n^n}^{2}}\]

$\frac{n^n}{{2}^{2n} * {\mathstrut n^n}^{2}}$
\[\frac{n^n}{{2}^{2n} * {\mathstrut n^n}^{2}}\]

\paragraph{With brackets:}
$\frac{n^n}{{2}^{2n} * ( n^n)^{2}}$

\[\frac{n^n}{{2}^{2n} * (n^n)^{2}}\]


enter image description here


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .