섹션 제목의 매트릭스

섹션 제목의 매트릭스

섹션 제목에 매트릭스를 배치할 수 있나요?

이것은 나의 현재 시도입니다:

\section{Analyze the invertible $M= \left[ \begin{array}{rr}2 & 6 \\
2 & 4 \end{array} \right]$ matrix by doing the following:}

나는 그것을 읽고 싶습니다 : 여기에 이미지 설명을 입력하세요

내가 새로운 것이기 때문에 어떤 도움이라도 감사하겠습니다.

답변1

lrboxa를 사용 하여 수학 내용이 포함된 상자를 만든 다음 이를 의 인수에 사용할 수 있습니다 \section.

우선, 추가하세요.

\newsavebox{\mybox}

서문에서. 그런 다음 수학 내용을lrbox

\begin{lrbox}{\mybox}
$M= \left[ \begin{array}{rr}2 & 6 \\
2 & 4 \end{array} \right]$
\end{lrbox}

마지막으로 다음 안에 있는 상자를 인쇄합니다 \section.

\section{Analyze the invertible \usebox{\mybox} matrix by doing the following:}

MWE:

\documentclass{article}
\newsavebox{\mybox}

\begin{document}

\begin{lrbox}{\mybox}
$M= \left[ \begin{array}{rr}2 & 6 \\
2 & 4 \end{array} \right]$
\end{lrbox}

\section{Analyze the invertible \usebox{\mybox} matrix by doing the following:}

\end{document} 

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

이는 방해가 되지 않지만 인쇄하는 경우 ToC에서 다른 내용을 인쇄하려면 \tableofcontents선택적 인수 사용을 고려하십시오 .\section

답변2

;-)\protecttoc

\documentclass{article}
\usepackage{mathtools}
\usepackage{array}
\begin{document}

\tableofcontents

% Protection for the math stuff written to toc
\section[{$M= \protect\left[\protect\begin{array}{rr}   2 & 6 \\   2 & 4 \protect\end{array}\protect\right]$}]{Analyze the invertible  matrix \protect{$M= \left[ \begin{array}{rr}
  2 & 6 \\
  2 & 4 
\end{array} \right]$}
 by doing the following:}

% protection for both heading and toc
\section{Analyse the matrix {$M= \protect\left[\protect\begin{array}{rr}   2 & 6 \\   2 & 4 \protect\end{array}\protect\right]$}
 by doing the following:}


\end{document}

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

답변3

또한 "smallmatrix" 환경을 사용하면 섹션 제목이 더 잘 보일 수 있습니다.

샘플 출력

\documentclass[11pt,a4paper]{article}
\usepackage{amsmath}
\newsavebox{\mybox}
\begin{document}
\begin{lrbox}{\mybox}
$M=\small[\begin{smallmatrix}a&b\\c&d\end{smallmatrix}\small]$
\end{lrbox}
\tableofcontents
\section{Analyze the invertible {\usebox{\mybox}} by doing the following}
\end{document}

관련 정보