横向きモードでは横向きページが小さくなりすぎる

横向きモードでは横向きページが小さくなりすぎる

私は以下の指示に従いました

特定のページを横長/縦長モードに変更する方法

横向きモードでプロットを含むテーブルを作成します。

ページはめくられますが、右側が上ではなく左側が上になります。

また、横長ページは通常ページの半分のサイズしかありません。なぜでしょうか?

私のコード:

\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、、環境をネストするlandscapesidewaysfigure必ず問題が発生します。単一のsidewaysfigure環境で十分です。

  • tabular合計幅が (回転した) テキストブロックの幅を大幅に超える環境を設定しようとしています。 (たとえば、0.45*3=1.35>>1 で、最初の列の幅は考慮されていません。) 使用可能な最大列幅を自分で計算する代わりに、tabularx環境を使用して全体の幅を に設定し\textwidth、LaTeX に列 2、3、4 の使用可能な幅を計算させて、\linewidth12 個のグラフのそれぞれに の幅を指定します。

  • キャプションの配置を予測可能にするには、\captionコマンドを使用します。ない「Figure :」プレフィックスが必要な場合は、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。おそらく、これらのいずれかがほしいでしょう。私は 3 番目を選びましたが、あなたは好きなものを選んでください。また、黒いボックスがページに収まるように画像のサイズを調整し、 に切り替え、欠落していた垂直線を修正し、と\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}

表形式の

関連情報