0

The code a_x_y is undefined in pdflatex, it could mean a_{x_y}, {a_x}_y, a_{xy}, or a_x{}_y.

Is there a way to define a_x_y as a_{xy} by default, as is in XeTex?

  • 3
    Sorry I do not follow, what exactly do you mean by Is there a way to define a_{xy} as default, as is in XeTex ?? – daleif Aug 30 '23 at 08:44
  • 2
    $a_x_y_$ is same with PDFLaTeX, XeLaTeX and even PDFTeX or XeTeX: “Double subscript” error. So your questionn is very unclear. – cabohah Aug 30 '23 at 08:50
  • 1
    BTW: IMHO $a_{xy}$ is the least intuitive meaning of $a_x_y$. I've never seen such an interpretation before. But this is only an opinion. – cabohah Aug 30 '23 at 08:55
  • @cabohah In math, it’s quite common to have multiple sub- and superscripts added one by one, e.g. \mathcal{F}_{1x} (the sheaf \mathcal{F}_1 stalked at x). Ideally, you would like such constructions to be macro-based, but this becomes hard due to multiple subscripts. If you define e.g. \newcommand\stalk[2]{#1_{#2}} and \newcommand\sheafFone{\mathcal{F}_1}, then \stalk{\sheafFone}{x} fails miserably. In this case, indeed, allowing multiple subscripts to be stacked would improve the situation significantly. And yes, I think the syntax would be entirely intuitive. – Gaussler Aug 30 '23 at 09:13
  • 2
    this is an error in all tex variants including xetex, you can not change this while keeping _ with its subscript meaning, of course you could make it active and do the parsing "by hand" but that will break some things. – David Carlisle Aug 30 '23 at 09:29
  • 1
    Since LaTeX cannot guess if the user want really $a_{x_y}$ or ${a_x}_y$, IMHO the question explain itself why define double subscripts to make something, other than a error, is not a good idea, even if this make harder the use of some macros. – Fran Aug 30 '23 at 09:59

0 Answers0