放大投影仪中宽表的文本

放大投影仪中宽表的文本

我有一张宽表格beamer。我将表格宽度调整为resizebox。但表格中的文本不可见。我怎样才能放大文本?

在此处输入图片描述

\documentclass{beamer}
\usepackage{booktabs}
\begin{document}

        \begin{table}
        \caption{Characteristics of studies of cardiovascular disease risk in individuals with and without cardiovascular risk factors.}                                
        \resizebox{\textwidth}{!}{

        \begin{tabular}{l l l l l l }\\
            Study & Country & Journal & Risk Factor & Study size (No. with risk factors) & No. of cases (No. of cases with risk factors)\\
            \hline
            Wilson 1998 & United States& American Heart Association&Hypertension&68211(21577)&610(321)\\
            \hline
            Asia Pacific Cohort Studies Collaboration 2003 & Asia, Australia, and New Zealand & DIABETES CARE & Diabetes & 160555(4812)&3635(250)\\
            \hline
            Iqbal 2012 & Pakistan & Middle-East Journal of Scientific Research & Hypertension & 600(253) & 344(170)\\
            \hline
            Kannel 1979 & United States & American Heart Association & Diabetes & 34621(2506)& 1049(148)\\
            \hline 
            Vasan 2001 & United States & The New England Journal of Medicine &  Hypertension & 3979(1794) & 316(180)\\
            \hline
            Din 2007 & Pakistan & Pakistan Journal of Statistics and Operation Research & Diabetes & 700(150) & 500(143)\\
            \hline
            Din 2007 & Pakistan & Pakistan Journal of Statistics and Operation Research & Hypertension & 700(240) & 500(214)\\
            \hline
            Fraser 1992 & United States & American Heart Association & Diabetes & 53628(1825) & 99(11)\\
            \hline
            Fraser 1992 & United States & American Heart Association & Hypertension & 53628(8161) & 99(30)\\
            \hline
            \end{tabular}
        }
        \end{table}                     

\end{document}          

答案1

您的表格是一个很好的例子,说明为什么尝试\resizebox使其适合文本块可能会导致比它解决的更多的问题。

我建议你使用tabularx环境来让 LaTeX 插入换行符。仍然需要切换到较小的字体大小;下面,我建议使用,将字体大小线性缩小 30%。我还建议使用缩写和首字母缩略词,例如,“NEJM”而不是“The New England Journal of Medicine”。如果需要,可以在环境下方的框架底部\scriptsize拼写出首字母缩略词。tabularx

顺便说一句,在beamer文档中,table环境不会“浮动”(在 LaTeX 中是这个意思)。首先,使用它们就没有什么意义。

在此处输入图片描述

\documentclass{beamer}
\usepackage{booktabs,tabularx,ragged2e}
\newcolumntype{Y}{>{\RaggedRight\arraybackslash}X}
\begin{document}
\begin{frame}

Characteristics of studies of cardiovascular disease risk in individuals with and without cardiovascular risk factors

\smallskip
\setlength\tabcolsep{2pt}
\scriptsize
\begin{tabularx}{\textwidth}{@{} *{6}{Y} @{}}
\toprule
Study & Country & Journal & Risk Factor & Study size  (No.\ with risk factors) & No.\ of cases  (No.\ of cases with risk factors)\\
\midrule
Wilson 1998 & USA& AHA&Hypertension&68211 (21577)&610 (321)\\
\addlinespace[2pt]
APCSC 2003 & Asia, Australia, NZ & Diabetes Care & Diabetes & 160555 (4812)&3635 (250)\\
\addlinespace[2pt]
Iqbal 2012 & Pakistan & MEJSRH & Hypertension & 600 (253) & 344 (170)\\
\addlinespace[2pt]
Kannel 1979 & USA & AHA & Diabetes & 34621 (2506)& 1049 (148)\\
\addlinespace[2pt] 
Vasan 2001 & USA & NEJM &  Hypertension & 3979 (1794) & 316 (180)\\
\addlinespace[2pt]
Din 2007 & Pakistan & PJSOR & Diabetes & 700 (150) & 500 (143)\\
\addlinespace[2pt]
Din 2007 & Pakistan & PJSOR & Hypertension & 700 (240) & 500 (214)\\
\addlinespace[2pt]
Fraser 1992 & USA & AHA & Diabetes & 53628 (1825) & 99 (11)\\
\addlinespace[2pt]
Fraser 1992 & USA & AHA & Hypertension & 53628 (8161) & 99 (30)\\
\bottomrule
\end{tabularx}

\smallskip\tiny
APCSC: Asia Pacific Cohort Studies Collaboration; AHA: American Heart Association; MEJSRH: Middle-East Journal of Scientific Research; PJSOR: Pakistan Journal of Statistics and Operation Research

\end{frame}
\end{document}

相关内容