5

It seems that whenever we have a fraction in an exponent, the denominator looks terrible. For example,

enter image description here

The K in the subscript looks unduly large. This is definitely a bug or something. Is there any way to fix this? I tried to use \scalebox, but it also looks unnatural.

In this paper I often unavoidably have certain long fractions in the exponent, such as \frac{x^{1-\frac{c_1}{\log(Q(t+3)^{n_K})}}}{\log x}, as shown below

enter image description here

In such situations, expressions like 1/2n can either be interpreted as 1/2 * n, or 1/(2n).

MWE:

\documentclass[11pt]{article}
\usepackage[english]{babel}
\begin{document}
Hello,
$$
Q^{\frac{1}{n_K}}
$$
$$
x^{\frac{1}{a_1}}
$$
Compare with usual
$$
\frac{1}{n_K},\quad \frac{1}{a_1}
$$
\end{document}
6
  • 8
    It is not a bug. It is merely a bad choice of notation.
    – mickep
    Commented Jul 6 at 18:07
  • @mickep I don't have any another choice. This is a number theory paper I'm working on. n_K and Q all have very particular meanings, and they can't be changed. Also the fractions are sometimes very long, and I can't really use /.
    – Sardines
    Commented Jul 6 at 21:48
  • 1
    @Sardines - "I don't have any other choice . ... I can't really use /" -- There's always a (notational) choice. If the fraction term in the exponent is very long, it's advisable to display it separately (especially as it's clearly important): Instead of $Q^{\frac{...}{...}$, I suggest you write $Q^{z}$, where $z=(...)/(...)$. That way, the important terms will be displayed in \textstyle math mode instead of \scriptscriptstyle math mode.
    – Mico
    Commented Jul 7 at 6:48
  • It would be helpful if you gave a couple of examples of the "very long fractions" that occur in your real document.
    – Mico
    Commented Jul 7 at 7:41
  • 1
    @Mico Your suggestion makes sense, and I have also updated the question.
    – Sardines
    Commented Jul 7 at 16:53

2 Answers 2

8

In order for

$Q^{\frac{1}{n_K}}$

to have a chance to look decent, TeX would have to provide not just two but, in fact, three subscript depth layers.

  • TeX's two basic subscript and superscript depth layers in math mode are called \scriptstyle, for a 1-0.7=30% linear reduction in font size relative to \normalsize, and \scriptscriptstyle, for a (1-0.7)^2 \approx 50% linear reduction in font size.

  • A third-level of subscripts and superscripts would have entailed performing a (1-0.7)^3 \approx 66% linear reduction in font size -- not infeasible from a purely technical point of view, I suppose, but definitely pushing (and quite likely exceeding) the boundaries of visual discernibility on paper and on screen for all but the highest-resolution devices.

Let's examine the formula $Q^{\frac{1}{n_K}}$ more closely: While Q is processed in \textstyle, 1 and n are processed in \scriptscriptstyle (because they occur in the numerator and denominator of a \frac expression). And, because TeX doesn't provide a third-level of subscript depth, K gets typeset in \scriptscriptstyle as well, making it look too large relative to n.

The fix? Abandon your poor approach to selecting notation for fraction-type material in an exponent. Specifically, replace the \frac notation with inline-fraction notation for the superscript material, i.e., write Q^{1/n_K} instead of Q^{\frac{1}{n_K}}.

The only meaningful, i.e., still somewhat decent-looking, alternative to writing Q^{1/n_K} would be to load the amsmath package (which provides the \tfrac macro) and write Q^{\tfrac{1}{n_K}}. However, this method risks creating a needlessly large, even turgid-looking, exponent term.

enter image description here

Note the optional use of \mkern-1.5mu (which corresponds to half of a negative thinspace, or \!) to "snug up" the K term to n.

\documentclass{article}
\usepackage{amsmath} % for '\tfrac' macro

\begin{document}
\[
Q^{\frac{1}{n_K}}
\quad
Q^{1/n_{\mkern-1.5mu K}}
\quad
Q^{\tfrac{1}{n_{\mkern-1.5mu K}}}
\]
\end{document}

Addendum to address the additional material posted by the OP, which asks how to best typeset an expression of the form

\frac{x^{1-\frac{c_1}{\log(Q(t+3)^{n_K})}}}{\log x}

I maintain that an inline-math expression would look better. Even better, though, would be to replace \frac{c_1}{\log(Q(t+3)^{n_K})} with a symbol such as, say, \kappa, and to state separately what \kappa is.

In the following screenshot, I try to make the version that employs the \frac expression as good as possible by employing \tfrac instead of \frac.

enter image description here

\documentclass{article}
\usepackage{amsmath}   % for '\tfrac' macro
\usepackage{graphicx}  % for '\scalebox' macro
\newcommand{\nK}{n_{\mkern-1.5mu K}} % snug up 'n' and 'K' terms
% create a de-facto 3rd-level-subscript form of 'K':
\newcommand{\smallK}{\scalebox{0.7}{$\scriptscriptstyle K$}} 
\newcommand{\nKK}{n_{\mkern-1.5mu\smallK}}

\begin{document}

$\displaystyle
\frac{x^{1-\tfrac{c_1}{\log(Q(t+3)^{n_K})}}}{\log x} % note the use of '\tfrac`
\quad\text{vs.}\quad
x^{\{1-c_1/[\log(Q(t+3)^{\nKK})]\}}\big/\log x
$

\bigskip

$x^{1-\kappa}/\log x$, where $\kappa = c_1/[\log(Q(t+3)^{\nK})]$

\end{document}
6
  • 1
    Thanks for the explanation. In the paper I'm working on, I often unavoidably have very long fractions in the exponent, so I can't really use /. But \tfrac sounds like an alternative, or I have to use \exp more...
    – Sardines
    Commented Jul 6 at 21:55
  • 8
    @Sardines - For very long fractions in the exponent positions, it's often an excellent idea to write $Q^{\theta}$, where $\theta=\frac{...}{...}$ or ... where $\theta=(...)/(...)$.
    – Mico
    Commented Jul 6 at 22:07
  • hm, what about $Q^{\frac{1}{n^{}_{\mkern-3mu K} } }$ ?
    – Zarko
    Commented Jul 7 at 7:46
  • @Zarko - This couldn't change the relative sizes of n and K, whinny the OP has identified as being an issue.
    – Mico
    Commented Jul 7 at 11:14
  • @Mico, you are right, but to my eyes looks prettier ... :-)
    – Zarko
    Commented Jul 7 at 11:30
5

Bad notation, I'd say. Your readers won't be very happy.

\RequirePackage{fix-cm}
\documentclass[11pt]{article}
\usepackage{amsmath}

%\DeclareMathSizes{5}{5}{4}{3}% for 10pt
\DeclareMathSizes{6}{6}{5}{4}% for 11pt

\newcommand{\tinysub}[1]{\mbox{\tiny$\scriptscriptstyle#1$}}

\begin{document}

\[
\frac{x^{1-\frac{c_{\tinysub{1}}}{\log(Q(t+3)^{n_{\tinysub{K}}})}}}{\log x}
\]

\end{document}

image

Avoid $$ in LaTeX: Why is \[ ... \] preferable to $$ ... $$?

You must log in to answer this question.

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