\박스 텍스트를 아래 첨자로 표시

\박스 텍스트를 아래 첨자로 표시

우리는 이미 \boxed콘텐츠를 아래 첨자로 설정했습니다.

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

그러나 아래 첨자 크기가 업데이트되지 않았습니다. 정의를 사용하여 스크립트 크기를 설정하는 방법에 대해 조언을 구하십시오 \boxed.

MWE 파일을 찾으십시오:

\documentclass{book}
\usepackage{amsmath}


\makeatletter
\renewcommand{\boxed}[1]{\fboxsep1pt\arraycolsep1pt\fbox{\m@th$#1$}}
\makeatother

\begin{document}

the passenger moving with a velocity of +11 m/s, due in part to the walking motion and in part to the train's motion. As  $\boxed{\begin{array}{c}
{PT}\\
{AT}\\
{CT}\\
\end{array}}$ the passenger moving with a velocity of +11 m/s, due in part to the walking motion and in part to the train's motion. As

$$\vec{\mathbf{V}}_{\boxed{\begin{array}{c}
{PT}\\
{AT}\\
{CT}\\
\end{array}}}$$

\end{document}

답변1

TABstack을 사용한 메서드:

\documentclass{book}
\usepackage{amsmath,scalerel,tabstackengine}
\TABstackMath
\TABstackMathstyle{\SavedStyle}

\renewcommand{\boxed}[1]{\ThisStyle{\fboxsep1pt\fbox{%
  \setstackgap{L}{12\LMpt}\tabbedCenterstack{#1}}}}

\begin{document}

the passenger moving with a velocity of +11 m/s, due in part to the walking 
motion and in part to the train's motion. As  $\boxed{PT\\AT\\CT}$ the 
passenger moving with a velocity of +11 m/s, due in part to the walking 
motion and in part to the train's motion. As
\[
\vec{\mathbf{V}}_{\boxed{PT\\AT\\CT}}
\]
\end{document}

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

답변2

\textfrom 을 사용할 수 있지만 amsmath기준선과 관련하여 도움이 필요합니다.

\documentclass{book}
\usepackage{amsmath}
\usepackage{array}
\usepackage{siunitx}

\sisetup{retain-explicit-plus}

\makeatletter
\newcommand{\boxedarray}[2][c]{%
  \begingroup
  \let\current@f@size\f@size
  \setlength\fboxsep{1pt}%
  \text{\fbox{\fix@baseline$\begin{array}[#1]{c}#2\end{array}$}}%
  \endgroup
}
\newcommand{\fixbaseline}{%
  \ifx\f@size\current@f@size\else\ifx\f@size\sf@size\linespread{0.7}\else\linespread{0.5}\fi\fi
  \selectfont
}
\makeatother

\begin{document}

The passenger moving with a velocity of \SI{+11}{m/s}, due in part to the 
walking motion and in part to the train's motion. As
$\boxedarray{ PT \\ AT \\ CT }$ 
the passenger moving with a velocity of \SI{+11}{m/s}, due in part to the 
walking motion and in part to the train's motion. As
\[
\vec{\mathbf{V}}_{\boxedarray{ PT \\ AT \\ CT }}
\]

\end{document}

이미 제안한 바와 같이 유닛의 경우 siunitx시설을 사용하십시오.

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

답변3

\subboxed나는 수학이 \scriptstyle에 있고 값이 \boxsep조정되도록 하는 매우 간단한 명령을 제안합니다 . 본문 \Vectorstack에서는 간단히 stackengine.

문제와 관련 없음: 의 확장 가능한 벡터 화살표를 사용했는데 굵은 V esvec보다 더 멋져 보입니다 .\vec

\documentclass{book}
\usepackage{amsmath}
\usepackage{siunitx}
\usepackage[b]{esvect}
\usepackage[usestackEOL]{stackengine}

\newcommand{\subboxed}[1]{{\setlength{\fboxsep}{1pt}\boxed{\everymath{\scriptstyle}#1}}}

\begin{document}

The passenger moving with a velocity of \SI{+11}{\meter/\second}, due in part to the walking
motion and in part to the train's motion. As $\boxed{\Vectorstack{PT \\ AT \\ CT}}$ the passenger moving with a velocity of \SI{+11}{\meter/\second},
due in part to the walking motion and in part to the train's motion. As
\[\vv{\mathbf{V}}_{\subboxed{\substack{PT\\ AT \\ CT}}}
\]

\end{document} 

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

답변4

\makeatletter이것은 너무 순진할 수도 있지만 배열을 상자에 넣기 위해 복잡한 내용이 필요하지 않습니다 .

\documentclass{book}
\usepackage{amsmath}
\usepackage{siunitx}

\begin{document}

The passenger moving with a velocity of \SI{+11}{\meter/\second}, due in part to the walking
motion and in part to the train's motion.  As  $\begin{array}{|@{\,}c@{\,}|}
\hline
{PT}\\
{AT}\\
{CT}\\
\hline
\end{array}$ the passenger moving with a velocity of \SI{+11}{\meter/\second},
due in part to the walking motion and in part to the train's motion. As
\[\vec{\mathbf{V}}_{\begin{array}{|@{\,}c@{\,}|}
\hline
{PT}\\
{AT}\\
{CT}\\
\hline
\end{array}}\]

\end{document}

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

물론 문제는 독자가 그러한 상자를 원하는지 여부입니다. (적어도 나는 추가 siunitx하고 대체했기 $$ ... $$때문에 \[ ... \]이것이 완전히 의미가 없을 수도 있습니다.)

관련 정보