
나는 다음의 지침을 사용했습니다.
가로 모드의 플롯이 포함된 테이블을 생성합니다.
페이지가 뒤집어졌으나 오른쪽이 위로 향하지 않고 왼쪽이 위로 향하게 되었습니다.
또한 가로 페이지는 일반 페이지 크기의 절반에 불과합니다. 왜 그런 겁니까?
내 코드:
\begin{sideways}
\begin{landscape}
\begin{sidewaysfigure}
\par \textbf{Results for the CHSH}
\begin{tabular}{|c|c|c|c|}
\hline
\multirow{epsilon} & \multicolumn{3}{c|}{some text}\tabularnewline
\cline{2-4}
& some more text\tabularnewline
\hline
0 (asdsa) & \includegraphics[width=0.45\textwidth]{dasdas} & \includegraphics[width=0.45\textwidth]{asda} & \includegraphics[width=0.45\textwidth]{asda}\tabularnewline
\hline
0.1 & \includegraphics[width=0.45\textwidth]{asdas} & \includegraphics[width=0.45\textwidth]{asdas} & \includegraphics[width=0.45\textwidth]{asdasd}\tabularnewline
\hline
10 & \includegraphics[width=0.45\textwidth]{asdasdas} & \includegraphics[width=0.45\textwidth]{asdasd} & \includegraphics[width=0.45\textwidth]{adasda}\tabularnewline
\hline
100 & \includegraphics[width=0.45\textwidth]{asdasdad} & \includegraphics[width=0.45\textwidth]{sadasd} & \includegraphics[width=0.45\textwidth]{asdasdad}\tabularnewline
\hline
\end{tabular}
\end{sidewaysfigure}
\end{landscape}
\end{sideways}
방금 테이블의 내용을 임의의 내용으로 대체했습니다. 누구든지 도와줄 수 있나요?
답변1
게시한 코드에는 몇 가지 개념적 문제가 있습니다.
중첩
sideways
,landscape
및sidewaysfigure
환경은 슬픔을 안겨줄 것입니다. 단일sidewaysfigure
환경이면 충분합니다.tabular
전체 너비가 (회전된) 텍스트 블록의 너비를 크게 초과하는 환경을 설정하려고 합니다 . (예를 들어 0.45*3=1.35>>1 -- 첫 번째 열의 너비도 고려하지 않았습니다!) 사용 가능한 최대 열 너비를 직접 계산하는 대신 환경을 사용하여tabularx
전체 너비를 설정합니다. 에 대해\textwidth
LaTeX가 열 2, 3, 4에 대해 사용 가능한 너비를 계산하고\linewidth
12개 그래프 각각의 너비로 지정하도록 합니다.캡션의 예측 가능한 위치를 얻으려면
\caption
명령을 사용하십시오. 만약 당신이~ 아니다"그림:" 접두사를 원하는 경우 패키지를 로드 하고 캡션을 생성하는 데caption
사용해야 합니다 .\caption*
이것이 아래 예에서 수행된 작업입니다.
사소한 문제: 지시문은 \multirow
다음과 같습니다.삼논쟁은 하나가 아닙니다.
\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{rotating,multirow,tabularx,caption}
\captionsetup{font=bf} % use this instruction if you really need bold captions
\begin{document}
\begin{sidewaysfigure}
\caption*{Results for the CHSH} % use "\caption" if you want numbered output
\begin{tabularx}{\textwidth}{|c|X|X|X|} % let LaTeX calculate width of columns 2, 3, and 4
\hline
\multirow{2}{*}{epsilon}
& \multicolumn{3}{c|}{some text}\\
\cline{2-4}
& \multicolumn{1}{c|}{some more text} & & \\
\hline
0 (asdsa) &
\includegraphics[width=\linewidth]{dasdas} &
\includegraphics[width=\linewidth]{asda} &
\includegraphics[width=\linewidth]{asda}\\
\hline
0.1 &
\includegraphics[width=\linewidth]{asdas} &
\includegraphics[width=\linewidth]{asdas} &
\includegraphics[width=\linewidth]{asdasd}\\
\hline
10 &
\includegraphics[width=\linewidth]{asdasdas} &
\includegraphics[width=\linewidth]{asdasd} &
\includegraphics[width=\linewidth]{adasda}\\
\hline
100 &
\includegraphics[width=\linewidth]{asdasdad} &
\includegraphics[width=\linewidth]{sadasd} &
\includegraphics[width=\linewidth]{asdasdad}\\
\hline
\end{tabularx}
\end{sidewaysfigure}
\end{document}
답변2
문제를 재현하기 위해 컴파일할 수 있는 적절한 예제가 없으면 무엇이 잘못되었는지 정확히 말할 수 없습니다. 실험을 해보았지만 설명하신 문제를 재현하지 못했습니다.
최소한의 문서를 생성하기 위해 코드를 완성한 후에도 오류가 발생했습니다.
\multirow{}{}{}
1개가 아닌 3개의 인수가 필요합니다.- 누구도 특별한 조치 없이는 자신이 가지고 있지 않은 파일이 필요한 문서를 편집할 수 없습니다.
파일 이름으로 볼 때 게시하기 전에 예제를 테스트하지 않은 것 같습니다. 도움이 필요한 문제를 재현하지 못하는 경우에는 예가 거의 쓸모가 없습니다. 예제를 테스트하여 문제가 발생하는지 확인하지 않으면 해당 문제가 재현되지 않을 것입니다.
사용하는 것은 확실히 실수라고 할 수 있습니다sideways
그리고 landscape
그리고 sidewaysfigure
. 당신은 아마도 이것들 중 하나를 원할 것입니다. 나는 세 번째를 선택했지만 당신이 선택할 수 있습니다. 또한 검은색 상자가 페이지에 맞도록 이미지 크기를 조정하고, 로 전환하고 \caption
, 누락된 수직선을 수정하고, 사용을 수정하고 공간을 절약하는 데 \multirow
사용했습니다 $\epsilon$
.
귀하의 킬로미터는 다를 수 있습니다.
\documentclass[a4paper]{article}
\usepackage[demo]{graphicx}
\usepackage{rotating,multirow}
\begin{document}
\begin{sidewaysfigure}
\centering
\caption{Results for the CHSH}
\begin{tabular}{|c|c|c|c|}
\hline
\multirow{2}*{$\epsilon$} & \multicolumn{3}{c|}{some text}\tabularnewline
\cline{2-4}
& some more text &&\tabularnewline
\hline
0 (asdsa) & \includegraphics[width=0.25\textwidth]{dasdas} & \includegraphics[width=0.25\textwidth]{asda} & \includegraphics[width=0.25\textwidth]{asda}\tabularnewline
\hline
0.1 & \includegraphics[width=0.25\textwidth]{asdas} & \includegraphics[width=0.25\textwidth]{asdas} & \includegraphics[width=0.25\textwidth]{asdasd}\tabularnewline
\hline
10 & \includegraphics[width=0.25\textwidth]{asdasdas} & \includegraphics[width=0.25\textwidth]{asdasd} & \includegraphics[width=0.25\textwidth]{adasda}\tabularnewline
\hline
100 & \includegraphics[width=0.25\textwidth]{asdasdad} & \includegraphics[width=0.25\textwidth]{sadasd} & \includegraphics[width=0.25\textwidth]{asdasdad}\tabularnewline
\hline
\end{tabular}
\end{sidewaysfigure}
\end{document}