如何在 NiceTabular 环境中在图像下方添加文本

如何在 NiceTabular 环境中在图像下方添加文本

我想问一下如何在该图生成的图像下方放置一些文字:

\documentclass[journal,twocolumn,10pt]{IEEEtran}

\usepackage{graphicx}

\usepackage{nicematrix} % added <<<<
\usepackage[center]{caption} % centering the caption


\begin{document}    

\newlength{\FrameHeight}
\setlength{\FrameHeight}{0.165\textwidth} % to control the figure Frame width and height

\begin{figure*}

\begin{NiceTabular}{rl}[cell-space-limits=1.2pt] % add space between rows 
        
\Block{}{\includegraphics[keepaspectratio,height=\FrameHeight]{_kkk/javier-sesion-14-SEC-6-FRAMES-crop.pdf}}&
\Block{}{\includegraphics[keepaspectratio,height=1.85\FrameHeight]{_kkk/javier-sesion-14-SEC-6-ALL.pdf}}
    \\ 
\Block{}{\includegraphics[keepaspectratio,height=\FrameHeight]{_kkk/javier-sesion-14-SEC-3-FRAMES-crop.pdf}}&
\Block{}{\includegraphics[keepaspectratio,height=1.85\FrameHeight]{_kkk/javier-sesion-14-SEC-3-ALL.pdf}}
    \\
\Block{}{\includegraphics[keepaspectratio,height=\FrameHeight]{_kkk/javier-sesion-14-SEC-26-FRAMES-crop.pdf}}&
\Block{}{\includegraphics[keepaspectratio,height=1.85\FrameHeight]{_kkk/javier-sesion-14-SEC-26-ALL.pdf}}
    \\
\Block{}{\includegraphics[keepaspectratio,height=\FrameHeight]{_kkk/javier-sesion-14-SEC-16-FRAMES-crop.pdf}}&
\Block{}{\includegraphics[keepaspectratio,height=1.85\FrameHeight]{_kkk/javier-sesion-14-SEC-16-ALL.pdf}}
    \\
    
\end{NiceTabular}

\caption{Combinations examples from session S4}\label{SESION4}
\end{figure*}   
    
\end{document}

.PDF 图像位于此处关联

我想创建如下图形:

在此处输入图片描述

下面的图片在哪里"Combination: LH-LH-LH-RH...

答案1

\Block命令允许您在内部使用\\,因此添加一行文本很简单。

第一页

在最后一行,右侧的图形填充了表格单元格,因此\Block[c]{}{...将图形和文本行置于中央。

在另外三行中,最简单的解决方案是在文本行末尾添加空白,\hspace {..}通过眼睛计算。

z1

第二页

第二页是更精确的解决方案。图像和文本行被封装在一个中,parbox并相互居中。

每个 parbox 的宽度的计算考虑了各个框架的高度和每种情况下框架数量的宽度(两个、四个和六个)之间的关系。

在图形和文本行之间添加了一个小间隙。

z5

% !TeX TS-program = pdflatex    

\documentclass[journal,twocolumn,10pt]{IEEEtran}

\usepackage{graphicx}

\usepackage{nicematrix} % added <<<<
\usepackage[center]{caption} % centering the caption    

\begin{document}    
    
    \newlength{\FrameHeight}
    \setlength{\FrameHeight}{0.165\textwidth} % to control the figures *FRAMES width and height 
    
        \begin{figure*}
        
        \begin{NiceTabular}{rl}[cell-space-limits=1.2pt] % add space between rows 
            
            \Block{}{\includegraphics[keepaspectratio,height=\FrameHeight]{_kkk/javier-sesion-14-SEC-6-FRAMES-crop.pdf} \\ 
                Combination: LH-LH\hspace*{0.08\FrameHeight}}&
            \Block{}{\includegraphics[keepaspectratio,height=1.85\FrameHeight]{_kkk/javier-sesion-14-SEC-6-ALL.pdf}}
            \\ 
            \Block{}{\includegraphics[keepaspectratio,height=\FrameHeight]{_kkk/javier-sesion-14-SEC-3-FRAMES-crop.pdf}\\
                Combination: LH-LH-LH-RH\hspace*{0.58\FrameHeight}}&
            \Block{}{\includegraphics[keepaspectratio,height=1.85\FrameHeight]{_kkk/javier-sesion-14-SEC-3-ALL.pdf}}
            \\
            \Block{}{\includegraphics[keepaspectratio,height=\FrameHeight]{_kkk/javier-sesion-14-SEC-26-FRAMES-crop.pdf}\\
                Combination: LH-LH-LH-RH\hspace*{0.58\FrameHeight}}&
            \Block{}{\includegraphics[keepaspectratio,height=1.85\FrameHeight]{_kkk/javier-sesion-14-SEC-26-ALL.pdf}}
            \\
            \Block[c]{}{\includegraphics[keepaspectratio,height=\FrameHeight]{_kkk/javier-sesion-14-SEC-16-FRAMES-crop.pdf}\\
                Combination: LH-LH-LH-RH-LH-RH}&
            \Block{}{\includegraphics[keepaspectratio,height=1.85\FrameHeight]{_kkk/javier-sesion-14-SEC-16-ALL.pdf}}
            \\
            
        \end{NiceTabular}
        
        \caption{Combinations examples from session S4}\label{SESION4}
    \end{figure*}   
    
    
\begin{figure*}
        
        \begin{NiceTabular}{rl}[cell-space-limits=1.2pt] % add space between rows 
                                            
            \Block{}{%
            \parbox{1.32\FrameHeight}{\centering
                    \includegraphics[keepaspectratio,height=\FrameHeight]{_kkk/javier-sesion-14-SEC-6-FRAMES-crop.pdf} \\ \smallskip
                 Combination: LH-LH}} &
            \Block{}{\includegraphics[keepaspectratio,height=1.85\FrameHeight]{_kkk/javier-sesion-14-SEC-6-ALL.pdf}}
            \\ 
            \Block{}{%
                \parbox{2.66\FrameHeight}{\centering
                \includegraphics[keepaspectratio,height=\FrameHeight]{_kkk/javier-sesion-14-SEC-3-FRAMES-crop.pdf}\\ \smallskip
                 Combination: LH-LH-LH-RH}}&
            \Block{}{\includegraphics[keepaspectratio,height=1.85\FrameHeight]{_kkk/javier-sesion-14-SEC-3-ALL.pdf}}
            \\
            \Block{}{%
                    \parbox{2.66\FrameHeight}{\centering
                \includegraphics[keepaspectratio,height=\FrameHeight]{_kkk/javier-sesion-14-SEC-26-FRAMES-crop.pdf}\\ \smallskip
                 Combination: LH-LH-LH-RH}}&
            \Block{}{\includegraphics[keepaspectratio,height=1.85\FrameHeight]{_kkk/javier-sesion-14-SEC-26-ALL.pdf}}
            \\
            \Block{}{%
                \parbox{4.0\FrameHeight}{\centering
                \includegraphics[keepaspectratio,height=\FrameHeight]{_kkk/javier-sesion-14-SEC-16-FRAMES-crop.pdf}\\ \smallskip
                Combination: LH-LH-LH-RH-LH-RH}}&
            \Block{}{\includegraphics[keepaspectratio,height=1.85\FrameHeight]{_kkk/javier-sesion-14-SEC-16-ALL.pdf}}
            \\              
            
        \end{NiceTabular}
        
        \caption{Combinations examples from session S4}\label{SESION4}
    \end{figure*}       

\end{document}

相关内容