【问题标题】:adjust table and picture size in latex according to page size根据页面大小调整latex中的表格和图片大小
【发布时间】:2021-03-21 08:37:45
【问题描述】:

我正在尝试在乳胶中调整我的表格和图片大小。我尝试了所有方法,但没有根据我的页面大小调整表格下图。当我运行我的乳胶文件时,我在 pdf 中的原始表格和图片大小在这张图片中enter image description here

这是我的表格代码:

\linespread{1.9}

\begin{adjustbox}{max width=\textwidth}
\begin{tabular}{|l|l|l|l|l|l|}
\hline
Feature   Extraction                         & Feature selection                     & classifier & Accuracy & Precision & Recall \\ \hline
\multirow{7}{*}{GLCM/GLDM Texture Features} & \multirow{3}{*}{No Feature Selection}      & SVM-RBF    & 85    & 93     & 73  \\ \cline{3-6} 

                                             &                                       & KNN        & 86    & 91      & 78  \\ \cline{3-6} 
                                             &                                       & Rf         & 93   & 95     & 89  \\ \cline{2-6} 


\multirow{7}{*}{}                            & \multirow{3}{*}{Trace Ratio}          & SVM-RBF    & 59    &69     & 24  \\ \cline{3-6} 
                                                                                

                                             &                                       & KNN        & 64    & 62     & 58 \\ \cline{3-6} 
                                             &                                       & RF         & 87    & 89     & 82  \\ \cline{2-6} 




\multirow{7}{*}{}                            & \multirow{3}{*}{SVFS}          & SVM-RBF    & 65    &68     &  22 \\ \cline{3-6} 
                                                                                

                                             &                                       & KNN        & 79    & 62     & 60  \\ \cline{3-6} 
                                             &                                       & RF         & 93    & 95    & 86  \\ \cline{2-6} 

\multirow{7}{*}{}                            & \multirow{3}{*}{PCA}          & SVM-RBF    & 61    & 64     & 42  \\ \cline{3-6}                                   

                                             &                                       & KNN        & 60    & 58     & 50  \\ \cline{3-6} 
                                             &                                       & RF         & 58    & 55     & 52  \\ \cline{2-6} 
\multirow{7}{*}{}                            & \multirow{3}{*}{Univariate Selection}   & SVM-RBF    & 71 & 80    & 50  \\ \cline{3-6} 
                                                                                 

                                             &                                       & KNN        &73    & 72    & 70  \\ \cline{3-6} 
                                             &                                       & RF         & 74    & 75    & 67  \\ \hline
\end{tabular}

\end{adjustbox}

这里是图:

\begin{figure}[H]
  \centering
  \includegraphics[height=6cm,width=.9\textwidth]{newpic1.JPG}
\end{figure}

【问题讨论】:

  • 您好,我对您的问题进行了编辑。我不确定你是否能看到。我认为你应该简化你的例子,让它成为一个最小的、可重复的例子,见here
  • 能否请您制作一个可编译的minimal reproducible example

标签: pdf latex tex


【解决方案1】:

关于你的身材的建议:

  • 我不知道你的身材有什么问题。对我来说看起来不错。您是否包含了包裹graphicx
  • 如果宽度是限制因素,您可以进一步删除height。像这样:\includegraphics[width=0.8.\textwidth]{fig.JPG}

关于您的桌子的建议:

  • 删除第一列,因为它对所有行都具有相同的值。那么它可能已经适合了。
  • 删除`调整框。我不确定这是否有帮助。
  • 使用p 限制某些列的宽度,例如在this question。所以在你的代码中尝试\begin{tabular}{|l|p{2cm}|l|l|l|l|}。我不知道这是否与multirow 交互。
  • 删除单元格之间的一些边界,例如\begin{tabular}{l|l|l|ccc}

我希望其中一些建议会有所帮助。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-03-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多