답변1
답변2
다음은 텍스트 스타일과 표시 스타일의 크기를 변경하는 구현입니다.
\documentclass{article}
\usepackage{amsmath,mathtools,xparse}
\NewDocumentCommand{\hyper}{mommmm}{%
\IfValueTF{#2}{\prescript{}{#2}{#1}^{}_{#3}}{#2^{}_{#3}}%
\innerhyper{{#4}{#5}{#6}}
}
\makeatletter
\newcommand{\innerhyper}[1]{\mathpalette\inner@hyper{#1}}
\newcommand{\inner@hyper}[2]{\inner@@hyper{#1}#2}
\newcommand{\inner@@hyper}[4]{%
\ifx#1\displaystyle\!\left(\else\bigl(\fi
\begin{\ifx#1\displaystyle\else small\fi matrix}
#2 \\ #3
\end{\ifx#1\displaystyle\else small\fi matrix}
\ifx#1\displaystyle\;\middle|\;\else\bigm|\fi
#4
\ifx#1\displaystyle\right)\else\bigr)\fi
}
\makeatother
\begin{document}
$\hyper{\phi}[2]{1}{az,a/z}{ab}{q,\frac{bt}{a}}$
\[
\hyper{\phi}[2]{1}{az,a/z}{ab}{q,\frac{bt}{a}}
\]
\end{document}