程序:
\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{graphicx}
\begin{document}
\title{Math: subscripts and superscripts}
\author{he}
\maketitle
%put math in dollar signs: $x^2$ or $y_k$
% $x^{123}$ for superscript
% $y_^2$ or $y_[123] subscrikpt
%mix and match: $y^{123}_[abc]$
Here is some math $x^2$ and $y_k$.
This is some more advanced subscripts and
superscripts $x^{124}$ and $y_{ijk}$.
Mix and mach: $x^2_i$ or $z^{123}_{abc}$.
\end{document}
运行如下: