아래 첨자로 배열

아래 첨자로 배열

$\begin{matrix} 2 & 4 & 6 & 5 & 4 & 3 & 2 \\ && 3 \end{matrix}$가장 높은 루트에 대해서는 훌륭해 보이지만 끔찍해 보입니다. 를 사용하면 합리적인 결과에 더 가까워질 수 있지만 , 아래 첨자 및 기타 적절한 컨텍스트에서 자동으로 크기가 조정되는 / 유형 환경 의 변형이 있어야 하는 것 같습니다 . 그런 것이 존재합니까, 아니면 , 및 의 조합을 사용해야 합니까 ?$\mathsf E_8$$s_{\begin{matrix} 2 & 4 & 6 & 5 & 4 & 3 & 2 \\ && 3 \end{matrix}}$$s_{\begin{smallmatrix} 2 & 4 & 6 & 5 & 4 & 3 & 2 \\ && 3 \end{smallmatrix}}$arraymatrix\mathchoicematrixsmallmatrix

array추가 보너스 질문으로, or 환경 전후의 공간을 제어하는 ​​매개변수는 무엇입니까 matrix?

답변1

항목 대신 smallmatrix해당 용도 의 변형을 사용할 수 있습니다 . 또한 맨 윗줄이 일반 아래 첨자 수준이 되도록 변경해야 합니다 .\scriptscriptstyle\scriptstyle\vcenter\vtop

\documentclass{article}
\usepackage{amsmath}
\usepackage{etoolbox}
\let\tinymatrix\smallmatrix
\let\endtinymatrix\endsmallmatrix
\patchcmd{\tinymatrix}{\scriptstyle}{\scriptscriptstyle}{}{}
\patchcmd{\tinymatrix}{\scriptstyle}{\scriptscriptstyle}{}{}
\patchcmd{\tinymatrix}{\vcenter}{\vtop}{}{}
\patchcmd{\tinymatrix}{\bgroup}{\bgroup\scriptsize}{}{}

\begin{document}
$s_{\begin{tinymatrix}2 & 4 & 6 & 5 & 4 & 3 & 2 \\ && 3 \end{tinymatrix}}$
\end{document}

여기에 이미지 설명을 입력하세요

세 가지 패치 대신 smallmatrixfrom 정의를 편집하여 정의할 수 있습니다 amsmath.

\makeatletter
\newenvironment{tinymatrix}{\null\,\vtop\bgroup\scriptsize % smallmatrix has \vcenter\bgroup
  \Let@\restore@math@cr\default@tag
  \baselineskip6\ex@ \lineskip1.5\ex@ \lineskiplimit\lineskip
  \ialign\bgroup\hfil$\m@th\scriptscriptstyle##$\hfil&&\thickspace\hfil % smallmatrix has \scriptstyle
  $\m@th\scriptscriptstyle##$\hfil\crcr % smallmatrix has \scriptstyle
}{%
  \crcr\egroup\egroup\,%
}
\makeatother

If you want to use a single command for all styles, then it's necessary to use `\mathchoice`:

\documentclass{article}
\usepackage{amsmath}

\makeatletter
\newenvironment{tinymatrix}{%
  % removed also \, from left and right
  \null\vtop\bgroup\scriptsize % smallmatrix has \vcenter\bgroup
  \Let@\restore@math@cr\default@tag
  \baselineskip6\ex@ \lineskip1.5\ex@ \lineskiplimit\lineskip
  \ialign\bgroup
    \hfil$\m@th\scriptscriptstyle##$\hfil&&\thickspace\hfil % smallmatrix has \scriptstyle
    $\m@th\scriptscriptstyle##$\hfil\crcr % smallmatrix has \scriptstyle
}{%
  \crcr\egroup\egroup
}
\makeatother


\newcommand{\spicematrix}[1]{\mathchoice
  {\spicematrixaux{matrix}{#1}}
  {\spicematrixaux{matrix}{#1}}
  {\spicematrixaux{tinymatrix}{#1}}
  {\spicematrixaux{tinymatrix}{#1}}
}
\newcommand{\spicematrixaux}[2]{\begin{#1}#2\end{#1}}


\begin{document}

\begin{gather*}
A \spicematrix{2 & 4 & 6 & 5 & 4 & 3 & 2 \\ && 3} B
\\
\textstyle A\spicematrix{2 & 4 & 6 & 5 & 4 & 3 & 2 \\ && 3} B
\\
s_{\spicematrix{2 & 4 & 6 & 5 & 4 & 3 & 2 \\ && 3}}
\end{gather*}

\end{document}

여기에 이미지 설명을 입력하세요

텍스트 스타일에 대한 마음이 바뀌면 두 번째 스타일을 다음 {\spicematrixaux{matrix}{#1}}으로 변경하세요.

{\null\!\spicematrixaux{smallmatrix}{#1}\!}

의 왼쪽과 오른쪽에 있는 얇은 공간을 제거하기 위해 smallmatrix.

관련 정보