0

I am examining a way to adjust the size of nested delimiters automatically.

This gives 'double subscript':

\documentclass[a4paper, 12pt]{article}

\usepackage[english]{babel}

\usepackage{amsmath}

\title{Untitled} \date{Typeset on \today}

\newcommand{\p}[1]{\mathopen{}\left({#1}{{}{}},\negthickspace\right)\mathclose{}}

\begin{document}

\maketitle

$$ D_{v_p} = \p{ {\widehat e}_i } $$

\end{document}

Without the _i, the error vanishes.

How to understand that?

Mike Land
  • 143
  • 4

1 Answers1

1

If the base of the math accent is just a single character node (or single character node that has been subscripted or superscripted) the outer braces are essentially lost to allow finer font-specified control over positioning. Note how even the empty {} in the first form avoids the error (but adversely affects the display in some cases.

\documentclass[a4paper, 12pt]{article}

\begin{document}

${{}{\widehat e}i}{} $

${{\widehat e}i}{} $

\end{document}

This is a tex-primitive behaviour not controlled by latex, see this plain tex example


${{}\mathaccent"7013 a_i}_{} $

${\mathaccent"7013 {a_i}}_{} $

% error ${\mathaccent"7013 {za}i}{} $

% error ${{\mathaccent"7013 a_i}}_{} $

% error $\begingroup \mathaccent"7013 a_i\endgroup_{} $

% error ${\mathaccent"7013 a_i}_{} $

\bye

David Carlisle
  • 757,742