![그림(그림 캡션 포함)이 나란히 있는 표입니다.](https://rvso.com/image/286337/%EA%B7%B8%EB%A6%BC(%EA%B7%B8%EB%A6%BC%20%EC%BA%A1%EC%85%98%20%ED%8F%AC%ED%95%A8)%EC%9D%B4%20%EB%82%98%EB%9E%80%ED%9E%88%20%EC%9E%88%EB%8A%94%20%ED%91%9C%EC%9E%85%EB%8B%88%EB%8B%A4..png)
이미지가 나란히 있는 테이블을 만들고 싶습니다. 내가 만난 문제는 테이블 정렬입니다. 누구든지 Lambda_1과 Lambda_2가 그에 따라 각 그림의 캡션이 되도록 코드를 수정할 수 있습니까? 그리고 옆에 &를 포함하지 않으면 1.~Real unequal eigenvalues of same sign &
테이블의 왼쪽 테두리가 제목 테두리에 연결되지 않습니다. 문제가 에 있다는 것을 알고 있습니다 \begin{tabularx}{\textwidth}{|XX|}
. 더 나은 정렬을 위해 코드를 변경하는 방법을 안내해 줄 수 있나요? 그림의 열을 1로 변경하고 그림을 2열 대신 나란히 포함하고 싶습니다.
내가 tabularx를 사용하기로 고집한 이유는 테이블이 내 문서의 여백 위로 이동하는 것을 원하지 않았기 때문입니다.
\begin{table} [H]
\begin{tabularx}{\textwidth}{|XX|}
\hline
\multicolumn{2}{|c|}{Collection of Figures of 2D Phase Portraits} \\ \hline
1.~Real unequal eigenvalues of same sign & \\
\includegraphics[height=1.8in]{2D/rup.png} $\lambda_1 > \lambda_2 > 0$ & \includegraphics[height=1.8in]{2D/run.png}$\lambda_1 > \lambda_2 < 0$ \\
\hline
\end{tabularx}
\end{table}
답변1
tabularx
단 하나의 열에 대해서는 실제로 필요하지 않습니다 . 대신 간단한 것을 tabular
사용할 수 있습니다. subfigure
의 환경 subcaption
과 기능을 사용했습니다 .booktabs
(테이블에 대한 수직 규칙이 없음):
\documentclass[11pt]{article}
\usepackage[demo]{graphicx}
\usepackage{subcaption}
\usepackage{booktabs}
\begin{document}
\begin{table}[H]
\begin{tabular}{l}
\toprule
\multicolumn{1}{c}{Collection of Figures of 2D Phase Portraits} \\
\midrule
1.~Real unequal eigenvalues of same sign \\
\begin{subfigure}{\dimexpr.5\linewidth-2\fboxsep\relax}
\centering
\includegraphics[height=1.8in]{2D/rup.png}
\caption{$\lambda_1 > \lambda_2 > 0$}
\end{subfigure}\hfill%
\begin{subfigure}{\dimexpr.5\linewidth-2\fboxsep\relax}
\centering
\includegraphics[height=1.8in]{2D/run.png}
\caption{$\lambda_1 > \lambda_2 < 0$}
\end{subfigure} \\
\bottomrule
\end{tabular}
\end{table}
\end{document}
캡션에 상호 참조를 위한 번호 매기기가 필요하지 않은 경우 간단히 미니페이지를 사용할 수 있습니다.
\documentclass[11pt]{article}
\usepackage[demo]{graphicx}
\usepackage{booktabs}
\begin{document}
\begin{table}[H]
\begin{tabular}{l}
\toprule
\multicolumn{1}{c}{Collection of Figures of 2D Phase Portraits} \\
\midrule
1.~Real unequal eigenvalues of same sign \\
\begin{minipage}{\dimexpr.5\linewidth-2\fboxsep\relax}
\centering
\includegraphics[height=1.8in]{2D/rup.png}\par
$\lambda_1 > \lambda_2 > 0$
\end{minipage}%
\begin{minipage}{\dimexpr.5\linewidth-2\fboxsep\relax}
\centering
\includegraphics[height=1.8in]{2D/run.png}\par
$\lambda_1 > \lambda_2 < 0$
\end{minipage} \\
\bottomrule
\end{tabular}
\end{table}
\end{document}
옵션은 demo
실제 graphicx
그림을 검은색 직사각형으로 대체합니다. 하다~ 아니다실제 문서에서 해당 옵션을 사용하세요.