예제 제목 바로 아래에 표를 넣습니다.

예제 제목 바로 아래에 표를 넣습니다.

지금, 하늘색 공간에 테이블이 있습니다. 저는 이 테이블을 예제 바로 아래에 있는 더 어두운 파란색 상자에 넣고 싶습니다. 나는 또한 들여쓰기를 원하지 않습니다. 이것이 내가 지금까지 가지고 있는 것입니다.여기에 이미지 설명을 입력하세요

\documentclass[a4paper,11pt,addpoints]{exam}
\usepackage[left=1.5cm,right=1.5cm,top=1.5cm,bottom=2cm]{geometry}

%noindent for whole doc
\setlength\parindent{0pt} 
%noindent for whole doc

%%%%%COLORS
\usepackage[dvipsnames]{xcolor}

%tables
\usepackage{tabularray}

%clour cells in table
\usepackage{nicematrix}

\usepackage{mathrsfs} 

%%%%%EXAMPLE BOX
\usepackage[most]{tcolorbox}
\usepackage{xcolor}
\usepackage{framed}
\usepackage{amssymb}
\tcbuselibrary{theorems}
\newtcbtheorem
  []% init options
  {Example}% name
  {\textcolor{black}{\textbf{Example}}}% title
  {%
    colback=cyan!5,
    colframe=cyan!40,
    fonttitle=\rmfamily,
    arc=0pt,
  }% options
  {exam}% prefix

%%%%%EXAMPLE BOX

\begin{document}

\begin{Example}{Complete the table and plot the points to sketch a line of the linear relationship, $y = x + 3$.
}{label}
 \begin{tblr}{colspec = {|X[1,c]|X[1,c]|X[1,c]|X[1,c]|X[1,c]|X[1,c]|X[1,c]|X[1,c]|},
cell{1}{1} = {yellow!40},
cell{2}{1} = {yellow!40},
}
    \hline
    $x$ & $-3$ & $-2$ & $-1$ & $0$ & 1 & 2 & 3 \\
    \hline
    $y$ & & & & &\\
    \hline
\end{tblr} 
  
\end{Example}

\end{document}

텍스트를 검정색으로 만드는 데 어려움을 겪고 있으므로 이상하다면 무시할 수 있습니다.

답변1

귀하의 질문을 이해했는지 잘 모르겠습니다.
나는 다음과 같은 것을 제안합니다.

\documentclass[a4paper,11pt,addpoints]{exam}
\usepackage[left=1.5cm,right=1.5cm,top=1.5cm,bottom=2cm]{geometry}

%noindent for whole doc
\setlength\parindent{0pt} 
%noindent for whole doc

%%%%%COLORS
\usepackage[dvipsnames]{xcolor}

%tables
\usepackage{tabularray}

%clour cells in table
\usepackage{nicematrix}

\usepackage{mathrsfs} 

%%%%%EXAMPLE BOX
\usepackage[most]{tcolorbox}
\usepackage{xcolor}
\usepackage{framed}
\usepackage{amssymb}
\tcbuselibrary{theorems}
\newtcbtheorem
  []% init options
  {Example}% name
  {Example}% title
  {%
  theorem hanging indent=0pt,
    colback=cyan!5,
    colframe=cyan!40,
    fonttitle=\rmfamily,
    arc=0pt,
    coltitle=black,
    fonttitle=\bfseries,
    description font=\normalfont,
  }% options
  {exam}% prefix

%%%%%EXAMPLE BOX

\begin{document}

\begin{Example}{Complete the table and plot the points to sketch a line of the linear relationship, $y = x + 3$.\vspace{4pt}\newline
  \begin{tblr}{
    colspec = {*8{X[c]}},
    hlines, vlines,
    column{1} = {yellow!40},
    columns={mode=math},
    }
    x & -3 & -2 & -1 & 0 & 1 & 2 & 3 \\
    y &&&&&&&\\
  \end{tblr}
  }{label}

\end{Example}

\end{document}

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

관련 정보