항목 간의 증분을 표시하도록 테이블에 주석을 답니다.

항목 간의 증분을 표시하도록 테이블에 주석을 답니다.

연속 항목 간의 변경 사항을 보여주는 주석이 포함된 테이블을 조판하는 방법을 찾고 있습니다. 아래의 (엉성하고 손으로 만든) 이미지는 제가 염두에 두고 있는 것을 보여줍니다. 추가된 항목은 테이블 항목 "사이"에 나타나야 합니다. 나는 테이블이 그림과 같이 수평으로 놓여 있는지 아니면 수직으로 놓여 있는지 특별히 신경 쓰지 않습니다.

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

이상적으로는 다음 이미지와 같이 제안할 수 있는 모든 솔루션이 반복될 수 있습니다.

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

~하지 않다차이가 자동으로 계산되어야 하며 실제로 그렇지 않은 경우가 더 좋습니다.

내가 요구하는 것이 분명하기를 바랍니다. 기꺼이 설명해 드리겠습니다.

편집하다:마크업하려는 테이블은 다음과 같습니다.

\begin{tabular}{|c|c|c|c|c|c|c|c|c|c|}
\hline
$x$&$0$&$3$&$6$&$9$&$12$&$15$&$18$&$21$&$24$\\
\hline
$f(x)$&$-20$&$-15$&$-8$&$1$&$12$&$25$&$40$&$57$&$76$\\
\hline
\end{tabular}

하지만 그것이 특히 도움이 되는지 모르겠습니다. 특히 (댓글의 @cfr과 같이) 내 이미지를 볼 수 없는 경우에는 더욱 그렇습니다.

답변1

matrix of math nodesTi를 사용하는 방법은 다음과 같습니다.케이Z. 나는 루프를 사용하여 타이핑을 절약하지만 물론 필수는 아닙니다.

\documentclass[border=10pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{matrix}
\begin{document}
\begin{tikzpicture}
  \matrix (m) [inner sep=0pt, draw=gray!75!blue, thick, matrix of math nodes, nodes={inner sep=2.5pt, text width=20pt, align=center}, column 1/.append style={nodes={align=right, text width=25pt}}]
  {
     \strut x&0&3&6&9&12&15&18&21&24\\
     \strut f(x)&-20&-15&-8&1&12&25&40&57&76\\
  };
  \draw [gray!75!blue, semithick] (m.west |- m-1-1.south) -- (m.east |- m-1-1.south) \foreach \i in {1,...,9} { (m.north -| m-1-\i.east) -- (m.south -| m-1-\i.east) };
  \foreach \i [count=\k from 1, count=\j from 3, remember=\j as \jlast (initially 2)] in {5,7,9,11,13,15,17,19}
  \draw [thick, draw=blue!50!cyan]
    ([xshift=1.5pt, yshift=.5pt]m-2-\jlast.south) -- ([yshift=-7.5pt]m-2-\jlast.south east) node (d\k) [below] {$\i$} -- ([xshift=-1.5pt, yshift=.5pt]m-2-\j.south)
    ([xshift=1.5pt, yshift=-.5pt]m-1-\jlast.north) -- ([yshift=7.5pt]m-1-\jlast.north east) node [above] {$3$} -- ([xshift=-1.5pt, yshift=-.5pt]m-1-\j.north)
    ;
  \foreach \i [remember=\i as \ilast (initially 1), count=\k from 3] in {2,...,8}
  \draw [thick, draw=magenta!50!blue]
  ([xshift=1.5pt, yshift=.5pt]d\ilast.south) -- ([yshift=-7.5pt]d\ilast.south -| m-1-\k.center) node [below] {$2$} -- ([xshift=-1.5pt, yshift=.5pt]d\i.south);
\end{tikzpicture}
\end{document}

주석이 달린 행렬

답변2

이는 다음을 기반으로 구축할 수 있는 출발점입니다.

\documentclass{article}

\begin{document}

\begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|} \hline
$\Delta x$ & & \multicolumn{2}{|c|}{3} & \multicolumn{2}{|c|}{3}  & \multicolumn{2}{|c|}{3} & \multicolumn{2}{|c|}{3} &   \\  \hline
$x$ & \multicolumn{2}{|c|}{0} & \multicolumn{2}{|c|}{3} & \multicolumn{2}{|c|}{6} & \multicolumn{2}{|c|}{9} & \multicolumn{2}{|c|}{12} \\  \hline
\end{tabular} 

\end{document}

결과는 다음과 같습니다.

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

아직은 시각적으로 매우 매력적이지는 않지만, 이것이 원하는 것에 대한 유효한 접근 방식이라고 생각한다면 아이디어를 갖고 다듬을 수 있습니다.

물론 두 번째 차이에 대한 행을 가질 수도 있습니다.

관련 정보