如何用图片格式化横向表格

如何用图片格式化横向表格

我一直尝试用 Latex 格式化这个表格,但至今没有成功。

\begin{sidewaystable}[ph!]
\resizebox{\textwidth}{!}{%
\begin{tabular}{ccccccccccc}

                   & \Huge JAGA Penny \cite{JAGA16Jinga-hi}                                  
                   & \Huge \begin{tabular}[c]{@{}c@{}} Multichannel Systems\\  W2100-HS4
                   \cite{W2100-HS4}\end{tabular} 
                   
                   & \Huge \begin{tabular}[c]{@{}c@{}}Pinnacle\\ 8274-SL \cite{EEGSystems}\end{tabular}
                   
                   & \Huge
                   \begin{tabular}[c]{@{}c@{}}Biopac Epoch\\ EPTX-10210 \cite{WirelessBIOPAC}\end{tabular} 
                   
                   & \Huge
                   \begin{tabular}[c]{@{}c@{}}Vyssotski \\ Neurologger 2A \cite{VyssotskiAlexeiVyssotski}\end{tabular}
                   
                   & \Huge
                   \begin{tabular}[c]{@{}c@{}}Deuteron\\ MouseLog-16C \cite{MouseLog16CNeuroscience}\end{tabular} 
                   
                   & \Huge \textbf{TaiNi} \cite{Jiang2017TaiNi:Experiments}       
                   
                   & \Huge \textbf{NAT-1}\cite{Crispin-Bailey2019MiniatureMethodologies}
                   
                   & \Huge  \textbf{\cite{Massot2019AnConditions}}   
                   
                   & \Huge \textbf{\cite{Pinnell2015MiniatureTesting}}                                                     \\ \hline

    \Huge No. Channels & \Huge 16 & \Huge 8  &
                          \Huge 3  & \Huge 4  &
                          \Huge 4  & \Huge 16 &
                          \Huge 16 & \Huge 4  &
                          \Huge 16 & \Huge 4  \\
                        
  \Huge Bandwidth(Hz)  & \Huge 0.1-300   & \Huge 1-5000 & 
  \Huge \begin{tabular}[c]{@{}c@{}}EEG:0.5\\EMG:10\end{tabular}                               & \Huge 0.1-100   & \Huge n/a &                                        \Huge 0.35- 10k & \Huge 0.2-500 &
                          \Huge n/a       & \Huge 0.34-100 \\
                         
  \Huge Bit Resolution & \Huge 16  & \Huge 16  &
                          \Huge 12  & \Huge n/a &
                          \Huge 10  & \Huge n/a &
                          \Huge n/a & \Huge 12  &
                          \Huge 16  & \Huge 16  \\
                          
  \Huge Sampling Rate(Hz)  & \Huge 1k      & \Huge  25k    &
                              \Huge 256     & \Huge  n/a    &    
                              \Huge 100-400 & \Huge  31.25k &         
                              \Huge 19.5k   & \Huge  250    &
                              \Huge n/a     & \Huge  500    \\
                              
 \Huge Input Impedance    & \Huge \begin{tabular}[c]{@{}c@{}}1300M(10Hz)\\ 13M(1kHz)\end{tabular} &
                            \Huge 1G 10pF & \Huge n/a &
                            \Huge 5M      & \Huge n/a &
                            \Huge n/a     & \Huge n/a &
                            \Huge n/a     & \Huge n/a &
                            \Huge n/a \\
                            
  \Huge Data Acquisition  & \Huge Wireless & \Huge Wireless &
                             \Huge Wireless & \Huge Wireless & \Huge 1GB      & \Huge 32GB     &
                             \Huge Wireless & \Huge 4GB      & \Huge 8GB      & \Huge Wireless \\
                             
   \Huge Noise(uVrms)       & \Huge 2.7 & \Huge 1.9 &
                               \Huge n/a & \Huge n/a &
                               \Huge n/a & \Huge 2.2 &
                               \Huge n/a & \Huge n/a &
                               \Huge n/a & \Huge n/a \\
                               
   \Huge Device Weight(g)     & \Huge 1.8  & \Huge 2.1 &
   \Huge \begin{tabular}[c]{@{}c@{}}3.8\\ (Total)\end{tabular} &
   \Huge \begin{tabular}[c]{@{}c@{}}2.3\\ (Total)\end{tabular} &
                                \Huge 1.42 & \Huge 1.6 &
                                \Huge 0.9  & \Huge 1.7 &
                                \Huge n/a  &
    \Huge\begin{tabular}[c]{@{}c@{}}8.5\\ (Total)\end{tabular} \\
    
    \Huge Battery Weight(g)  & \Huge 1.2-12 & \Huge 1.7-8.5 &
                                \Huge n/a    & \Huge n/a     &
                                \Huge 0.635  & \Huge 3.0     &
                                \Huge 0.6    & \Huge 0.6     &
                                \Huge n/a    & \Huge n/a     \\
                                
    \Huge Battery Life(h)    & \Huge 1.5-24 & \Huge 1-7.6    &
                                \Huge 144+   & \Huge 2 months &
                                \Huge 33     & \Huge 4        &
                                \Huge 72     & \Huge 70       & 
                                \Huge $>$48     & \Huge 6-8   \\

\Huge Device Size(mm) & \Huge 24 x 15.4 x 3  & \Huge 12.5 x 12.5 x 5.5 &                          \Huge 17.1 x 16.2 x 11 & \Huge 7 x 9 x 29      &                          \Huge 22 x 15 x 5      & \Huge 13 x 18         &
                         \Huge 20 x 12 x 14     & \Huge 18 x 22 x 10    & \Huge 20 x 10          & \Huge 28 x 17 x 7   \\ 
\end{tabular}%
}
\caption{Table showing available neural logging devices from literature and industry}
\label{tab:StateOfArtEEG}
\end{sidewaystable}

该表格有十列,为了使其适合页面,我设法使用 sidewaystable 包和 resizebox 将其设置为横向模式。但是,我无法使用任何 latex 字体大小命令正确缩放文本。我尝试在 begin{table} 和 resizebox{} 之后插入命令,但字体大小没有改变,所以我最终尝试在表格的每个单元格中手动插入它。我认为这可能是由于 resizebox 应用的缩放,我不知道如何在不让表格超出页面的情况下修复它。

我还想在每个设备标题上方插入一张图片,但每次我尝试时表格都会搞乱,而且我不知道如何最好地缩放图像。

谢谢您的帮助。 在此处输入图片描述

答案1

我不建议使用resizebox,因为它会导致字体大小不一致。就个人而言,我发现旋转标题单元格比旋转整个表格更不具侵入性。此外,我将整个表格的字体大小更改为,\small并使用了一些注释来缩短列宽。我为此使用了包talltblr中的环境。在里面,您可以将单元格括在里面,并像往常一样用于换行。因此,您不需要所有这些嵌套的表格。 另外,我不得不将尺寸分成 3 行。如果您应用所有这些更改并选择相对较小的边距,则表格适合纵向布局。tabularraytalltblr{}\\

表输出

\documentclass{article}

\usepackage[margin=1.8cm]{geometry}

\usepackage{rotating}
\usepackage{makecell}
\usepackage{siunitx}

\usepackage{tabularray}
\UseTblrLibrary{booktabs}

\settowidth\rotheadsize{{\small Multichannel Systems}}
\newcommand{\NA}{---} % change to n/a if you want

\begin{document}
    
\begin{table}
    \centering
    \begin{talltblr}[
            caption={Table showing available neural logging devices from literature and industry},
            label={tab:StateOfArtEEG},
            note{1}={\qty{10}{Hz}}, note{2}={\qty{1}{kHz}},
            note{3}={Wireless}, note{4}={Total},
        ]{
            colspec={@{}Q[l,m]*{10}{Q[c,m]}@{}},
            cells={font=\small},
            row{1}={cmd=\rotcell},          
        }
        \toprule
        & JAGA Penny \cite{JAGA16Jinga-hi}
        & {Multichannel Systems \\ W2100-HS4 \cite{W2100-HS4}}
        & {Pinnacle \\ 8274-SL \cite{EEGSystems}}
        & {Biopac Epoch \\ EPTX-10210 \cite{WirelessBIOPAC}}
        & {Vyssotski \\ Neurologger 2A \cite{VyssotskiAlexeiVyssotski}}
        & {Deuteron \\ MouseLog-16C \cite{MouseLog16CNeuroscience}}
        & \textbf{TaiNi} \cite{Jiang2017TaiNi:Experiments}
        & \textbf{NAT-1}\cite{Crispin-Bailey2019MiniatureMethodologies}
        & \textbf{\cite{Massot2019AnConditions}}
        & \textbf{\cite{Pinnell2015MiniatureTesting}} \\
        \midrule
        No. Channels & 16 & 8 & 3 & 4 & 4 & 16 & 16 & 4 & 16 & 4 \\
        Bandwidth (\si{Hz}) & 0.1--300 & 1--5000 & {EEG:0.5\\EMG:10} & 0.1--100 & \NA & \NA & 0.35--10k & 0.2-500 & \NA & 0.34--100 \\
        Bit Resolution & 16 & 16 & 12 & \NA & 10 & \NA & \NA & 12 & 16 & 16 \\
        Sampling Rate (\si{Hz}) & 1k & 25k & 256 & \NA & 100--400 & 31.25k & 19.5k & 250 & \NA & 500 \\
        Input Impedance & {1300M\TblrNote{1} \\ 13M\TblrNote{2}} & 1G \qty{10}{pF} & \NA & 5M & \NA & \NA & \NA & \NA & \NA & \NA \\
        {Data Acquisition} & WLS\TblrNote{3} & WLS\TblrNote{3} & WLS\TblrNote{3} & WLS\TblrNote{3} & 1GB & 32GB & WLS\TblrNote{3} & 4GB & 8GB & WLS\TblrNote{3} \\
        Noise (\si{\micro V_{RMS}}) & 2.7 & 1.9 &\NA & \NA & \NA & 2.2 & \NA & \NA & \NA & \NA \\
        Device Weight (\si{g}) & 1.8 & 2.1 & 3.8\TblrNote{4} & 2.3\TblrNote{4} & 1.42 & 1.6 & 0.9 & 1.7 & \NA & 8.5\TblrNote{4} \\
        Battery Weight(g)  & 1.2--12 & 1.7--8.5 & \NA & \NA & 0.635 & 3.0 & 0.6 & 0.6 & \NA & \NA \\
        Battery Life (\si{h})    & 1.5--24 & 1--7.6 & 144+ & 2 mths. & 33 & 4 & 72 & 70 & $>48$ & 6--8 \\
        Height (\si{mm}) & 24 & 12.5 & 17.1 & 7 & 22 & 13 & 20 & 18 & 20 & 28 \\
        Width (\si{mm}) & 15.4 & 12.5 & 16.2 & 9 & 15 & 18 & 12 & 22 & 10 & 17 \\ 
        Depth (\si{mm}) & 3 & 5.5 & 11 & 29 & 5 & \NA & 14 & 10 & \NA & 7 \\ 
        \bottomrule
    \end{talltblr}
\end{table}

\end{document}

我定义了命令\NA以插入 em-dash ---,我认为这样看起来更好。如果您想更改它,可以将命令重新定义为其他内容。对于范围,最好使用 en-dash --。此外,我使用了siunitx包来正确格式化单位。

相关内容