左侧有垂直标题的表格格式的 3 x 3 图像存在对齐和缩放问题

左侧有垂直标题的表格格式的 3 x 3 图像存在对齐和缩放问题

我正在使用 overleaf 和 IEEE 会议模板,该模板是双列格式。我试图显示 3 x 3 图像。在互联网上搜索后,我得到了以下几乎可以正常工作的代码,但它存在对齐和缩放问题。1) 左侧旋转的图像标签应与单元格底部对齐。2) 我希望图像稍微大一点。是什么导致了这个问题,我该如何解决它们?这是我的代码(usepackage 部分不是最小的,但核心代码是最小的):我得到了附加的图像。

\documentclass[letterpaper, 10 pt, conference]{ieeeconf}  % Comment this line out if you need a4paper

\IEEEoverridecommandlockouts                              % This command is only needed if 
                                                          % you want to use the \thanks command

\overrideIEEEmargins                                      % Needed to meet printer requirements.

%In case you encounter the following error:
%Error 1010 The PDF file may be corrupt (unable to open PDF file) OR
%Error 1000 An error occurred while parsing a contents stream. Unable to analyze the PDF file.
%This is a known problem with pdfLaTeX conversion filter. The file cannot be opened with acrobat reader
%Please use one of the alternatives below to circumvent this error by uncommenting one or the other
%\pdfobjcompresslevel=0
%\pdfminorversion=4

% See the \addtolength command later in the file to balance the column lengths
% on the last page of the document

% The following packages can be found on http:\\www.ctan.org
%\usepackage{graphics} % for pdf, bitmapped graphics files
%\usepackage{epsfig} % for postscript graphics files
%\usepackage{mathptmx} % assumes new font selection scheme installed
%\usepackage{times} % assumes new font selection scheme installed
\usepackage{amsmath} % assumes amsmath package installed
\usepackage{amssymb}  % assumes amsmath package installed
\usepackage{geometry}
\usepackage{array}
\usepackage{amsmath}
\usepackage[LGRgreek]{mathastext}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage{xcolor}
\usepackage{amsmath,mathtools}
\usepackage{amssymb}
\usepackage{multirow}
\usepackage{colortbl,booktabs}
\usepackage{array,ragged2e}
\usepackage{stfloats}
\usepackage{fancyhdr}
\usepackage{graphicx,subcaption,ragged2e}
\usepackage{comment}
\usepackage[export]{adjustbox}
\usepackage{rotating}
\usepackage{booktabs, makecell, tabularx}

% For controlling hyphenations
\lefthyphenmin=10
\righthyphenmin=10

% if there are consecutive entries with same author names, ieee style
% replaces the 2nd entry by "--". To change this non-sense behavior,
% set the following 'dashed' flag to false.

\begin{document}

\thispagestyle{empty}
\pagestyle{empty}

\begin{table}[t]
\caption{Bla bla blah}
\label{wasr_as_is_ir}
    \centering
    \begin{tabular}{l  m{15mm}  m{15mm}  m{15mm}  }
         \rothead{Blah blah longer blah} &  
         \includegraphics[width=\linewidth, ]{images/input/1603212920.750480_color_grayscale_resized_color.png}  & 
         \includegraphics[width=\linewidth, ]{images/input/1603391732.530753_color_grayscale_resized_color.png}  &
         \includegraphics[width=\linewidth, ]{images/input/1603391799.096494_color_grayscale_resized_color.png}  \\
        \rothead{Blah blah longer blah} &  
         \includegraphics[width=\linewidth, ]{images/wasr_as_is/ir/1603212920.750480_color_grayscale_resized_color_output_mask.png} & 
         \includegraphics[width=\linewidth, ]{images/wasr_as_is/ir/1603391732.530753_color_grayscale_resized_color_output_mask.png} &
         \includegraphics[width=\linewidth, ]{images/wasr_as_is/ir/1603391799.096494_color_grayscale_resized_color_output_mask.png} \\
        \rothead{Blah blah longer blah} &  
        \includegraphics[width=\linewidth, ]{images/wasr_with_mastr_rgb2gray_retrain/1603212920.750480_color_grayscale_resized_color_output_mask.png} & 
        \includegraphics[width=\linewidth, ]{images/wasr_with_mastr_rgb2gray_retrain/1603391732.530753_color_grayscale_resized_color_output_mask.png} &
         \includegraphics[width=\linewidth, ]{images/wasr_with_mastr_rgb2gray_retrain/1603391799.096494_color_grayscale_resized_color_output_mask.png} \\
        \rothead{Blah blah longer blah} &  
        \includegraphics[width=\linewidth, ]{images/wasr_with_our_ir_retrain/1603212920.750480_color_grayscale_resized_color_output_mask.png} & 
         \includegraphics[width=\linewidth, ]{images/wasr_with_our_ir_retrain/1603391732.530753_color_grayscale_resized_color_output_mask.png} &
          \includegraphics[width=\linewidth, ]{images/wasr_with_our_ir_retrain/1603391799.096494_color_grayscale_resized_color_output_mask.png} \\
    \end{tabular}
\end{table}
    
\end{document}

此代码生成所附的图像。 布局问题

答案1

旋转标签的“错误”定位有两个原因:

  1. \rothead首先;
  2. m是另一个问题。

而是使用\rotatebox。这里我展示了如何让图像之间的水平和垂直空间相同。

\documentclass[letterpaper, 10 pt, conference]{ieeeconf}  % Comment this line out if you need a4paper

\IEEEoverridecommandlockouts                              % This command is only needed if 
                                                          % you want to use the \thanks command

\overrideIEEEmargins                                      % Needed to meet printer requirements.

% See the \addtolength command later in the file to balance the column lengths
% on the last page of the document

% The following packages can be found on http:\\www.ctan.org
\usepackage{graphicx}
\usepackage{rotating}
\usepackage{array}

\begin{document}

\begin{table}[t]
\centering

\caption{Bla bla blah}
\label{wasr_as_is_ir}

\setlength{\tabcolsep}{0.5\dp\strutbox} % the devious trick!

\begin{tabular}{@{} l @{\quad} ccc @{}}
  \rotatebox{90}{\parbox{10mm}{\raggedright Blah blah longer blah}} &
  \includegraphics[width=15mm]{example-image} &
  \includegraphics[width=15mm]{example-image} &
  \includegraphics[width=15mm]{example-image} \\
  \rotatebox{90}{\parbox[t]{10mm}{\raggedright Blah blah longer blah}} &
  \includegraphics[width=15mm]{example-image} &
  \includegraphics[width=15mm]{example-image} &
  \includegraphics[width=15mm]{example-image} \\
  \rotatebox{90}{\parbox[t]{10mm}{\raggedright Blah blah longer blah}} &
  \includegraphics[width=15mm]{example-image} &
  \includegraphics[width=15mm]{example-image} &
  \includegraphics[width=15mm]{example-image} \\
\end{tabular}

\end{table}
    
\end{document}

在此处输入图片描述

答案2

对于旋转对齐到底部,使用b选项rothead

        \rothead[b]{Blah blah longer blah} 

结果

在此处输入图片描述

对于更大的图像,只需将表格的列尺寸更改为

\begin{tabular}{l  m{0.3\textwidth}  m{0.3\textwidth}  m{0.3\textwidth}  }

textwidth就绝对刚性/固定尺寸而言

结果

在此处输入图片描述

平均能量损失

\documentclass{article}  % Comment this line out if you need a4paper

%\IEEEoverridecommandlockouts                              % This command is only needed if 
% you want to use the \thanks command

%\overrideIEEEmargins                                      % Needed to meet printer requirements.

%In case you encounter the following error:
%Error 1010 The PDF file may be corrupt (unable to open PDF file) OR
%Error 1000 An error occurred while parsing a contents stream. Unable to analyze the PDF file.
%This is a known problem with pdfLaTeX conversion filter. The file cannot be opened with acrobat reader
%Please use one of the alternatives below to circumvent this error by uncommenting one or the other
%\pdfobjcompresslevel=0
%\pdfminorversion=4

% See the \addtolength command later in the file to balance the column lengths
% on the last page of the document

% The following packages can be found on http:\\www.ctan.org
%\usepackage{graphics} % for pdf, bitmapped graphics files
%\usepackage{epsfig} % for postscript graphics files
%\usepackage{mathptmx} % assumes new font selection scheme installed
%\usepackage{times} % assumes new font selection scheme installed
\usepackage{amsmath} % assumes amsmath package installed
\usepackage{amssymb}  % assumes amsmath package installed
\usepackage{geometry}
\usepackage{array}
\usepackage{amsmath}
\usepackage[LGRgreek]{mathastext}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage{xcolor}
\usepackage{amsmath,mathtools}
\usepackage{amssymb}
\usepackage{multirow}
\usepackage{colortbl,booktabs}
\usepackage{array,ragged2e}
\usepackage{stfloats}
\usepackage{fancyhdr}
\usepackage[demo]{graphicx}
\usepackage{comment}
\usepackage[export]{adjustbox}
\usepackage{rotating}
\usepackage{booktabs, makecell, tabularx}

% For controlling hyphenations
\lefthyphenmin=10
\righthyphenmin=10

% if there are consecutive entries with same author names, ieee style
% replaces the 2nd entry by "--". To change this non-sense behavior,
% set the following 'dashed' flag to false.

\begin{document}
    
    \thispagestyle{empty}
    \pagestyle{empty}
    
    \begin{table}[t]
        \caption{Bla bla blah}
        \label{wasr_as_is_ir}
        \centering
        \begin{tabular}{l  m{0.3\textwidth}  m{0.3\textwidth}  m{0.3\textwidth}  }
                        \rothead[b]{Blah blah longer blah} &  
            \includegraphics[width=\linewidth, ]{images/input/1603212920.750480_color_grayscale_resized_color.png}  & 
            \includegraphics[width=\linewidth, ]{images/input/1603391732.530753_color_grayscale_resized_color.png}  &
            \includegraphics[width=\linewidth, ]{images/input/1603391799.096494_color_grayscale_resized_color.png}  \\
            \rothead[b]{Blah blah longer blah} &  
            \includegraphics[width=\linewidth, ]{images/wasr_as_is/ir/1603212920.750480_color_grayscale_resized_color_output_mask.png} & 
            \includegraphics[width=\linewidth, ]{images/wasr_as_is/ir/1603391732.530753_color_grayscale_resized_color_output_mask.png} &
            \includegraphics[width=\linewidth, ]{images/wasr_as_is/ir/1603391799.096494_color_grayscale_resized_color_output_mask.png} \\
            \rothead[b]{Blah blah longer blah} &  
            \includegraphics[width=\linewidth, ]{images/wasr_with_mastr_rgb2gray_retrain/1603212920.750480_color_grayscale_resized_color_output_mask.png} & 
            \includegraphics[width=\linewidth, ]{images/wasr_with_mastr_rgb2gray_retrain/1603391732.530753_color_grayscale_resized_color_output_mask.png} &
            \includegraphics[width=\linewidth, ]{images/wasr_with_mastr_rgb2gray_retrain/1603391799.096494_color_grayscale_resized_color_output_mask.png} \\
            \rothead[b]{Blah blah longer blah} &  
            \includegraphics[width=\linewidth, ]{images/wasr_with_our_ir_retrain/1603212920.750480_color_grayscale_resized_color_output_mask.png} & 
            \includegraphics[width=\linewidth, ]{images/wasr_with_our_ir_retrain/1603391732.530753_color_grayscale_resized_color_output_mask.png} &
            \includegraphics[width=\linewidth, ]{images/wasr_with_our_ir_retrain/1603391799.096494_color_grayscale_resized_color_output_mask.png} \\
        \end{tabular}
    \end{table}
    
\end{document}

在此处输入图片描述

相关内容