\v유령 및 위 첨자

\v유령 및 위 첨자

위 첨자 위치는 다음 두 명령문에서 정확히 동일합니다.

\vphantom{\int}^S그리고{}^S

위 첨자를 더 높이려면 어떻게 해야 합니까?

편집하다

이는 \int단지 예일 뿐입니다. 여기 또 다른 것이 있습니다: \vphantom{)}^S그리고 )^S.

답변1

구성은 \vphantom수학 연산자가 아니므로 위 첨자에는 일반 수학 원자의 규칙이 적용됩니다. \mathop도움이 됩니다:

\documentclass{article}

\begin{document}
\[
  \int^S = \mathop{\vphantom{\int}}\nolimits^S
\]
\[
  \int\limits^S = \mathop{\vphantom{\int}}^S
\]
\end{document}

결과

패키지를 사용하면 amsmath"빈" 수학 연산자를 다음과 같이 선언할 수 있습니다 \DeclareMathOperator.

\documentclass{article}

\usepackage{amsmath}
\DeclareMathOperator*{\vint}{\vphantom{\int}}

\begin{document}
\[
  \int^S = \vint\nolimits^S
\]
\[
  \int\limits^S = \vint^S
\]
\end{document}

닫는 구분 기호가 더 큰 경우 \mathclose다음과 같이 도움이 될 수 있습니다.

\documentclass{article}

\begin{document}
\[
  \Biggr)^S = \mathclose{\vphantom{\Biggr)}}^S
\]
\end{document}

보이지 않는 닫는 구분 기호의 위 첨자

질문의 이유를 모르겠습니다. 외로운 상위 첨자만 필요한 경우에는 보이지 않는 \ruleor \raisebox가 도움이 될 것입니다.

\documentclass{article}

\begin{document}
\[
  {}^S < \rule{0pt}{2.5ex}^S < \raisebox{3ex}{$\scriptstyle S$}
\]
\end{document}

높은 위 첨자

답변2

그 이유는 매크로가 프리미티브 \vphantom로 확장되기 때문입니다 \mathchoice. 이 프리미티브는 "선택 항목"을 수학 목록에 넣습니다. 다음 과 같은 경우 ^원자핵이 바로 직전에 생성되지 않으며 TeXbook, 291페이지를 읽을 수 있습니다.

<superscript>: 현재 목록이 원자로 끝나지 않으면 모든 필드가 비어 있는 새 Ord 원자가 추가됩니다.

이 시도:

$ \int^S, {\int}^S  % <- both creates the same result, Ord or Op is irrelevant
  \mathchoice{\int}{\int}{\int}{\int}^S % <- this emulates \vphnatom{\int}^S
  % and the empty atom is inserted (see TeXbook) like: 
  \mathchoice{\int}{\int}{\int}{\int}{}^S
  % so the result is the same as:
  {}^S
$

다음을 통해 문제를 해결할 수 있습니다.

$ {\vphantom{\int}}^S $ 

왜냐하면 Ord 원자는 "선택 항목"을 핵으로 하여 생성되기 때문입니다.

참고: 일반 원자는 문제가 되지 않습니다. 문제는 입니다 \mathchoice.

관련 정보