同时使用 adjustbox 和 ltablex 包

同时使用 adjustbox 和 ltablex 包

我正在使用ltablex包创建一个跨多个页面的长表。我想使用adjustbox包在同一页面中容纳更多内容,以便将其缩小一点,并通过操作来增加表格大小\textwidth。但似乎ltablexadjustbox包彼此不兼容。我也尝试了\scaleboxgraphicx,它也会抛出类似的错误。有什么建议或解决方法吗?为了以防万一,我附上了我的代码。

提前致谢!

\documentclass[10,landscape]{article}
\usepackage{amsmath, amsfonts, amsthm}
\usepackage{babel}
\usepackage{microtype}
\usepackage{mathpazo}
\setlength\parindent{0pt}
\usepackage[T1]{fontenc}
\usepackage{ltablex}
\usepackage{booktabs}
\usepackage{float}
\restylefloat{table}
\usepackage{adjustbox}

\begin{document}

\begin{adjustbox}{width=1.2\columnwidth,center}
\begin{tabularx}{1.2\textwidth}{X X X X X X X}

\textbf{Tumors}
    & \textbf{Epidemiology}
    & \textbf{Etiology}
    & \textbf{Pathogenesis} 
    & \textbf{Clinical manifestation} 
    & \textbf{Diagnostic workup} 
    & \textbf{Morphology} 
    \\
    
\toprule

Hepatocellular adenomas
    & Women taking estrogen rich oral contraceptives and body builders taking anabolic steroids
    & 30 to 40 fold higher in oral contraceptive users compared to nonusers 
    & Inactivation of HNF1-$\alpha$, activation of $\beta$-Catenin, and chronic irritation of inflammatory processes
    & 50\% are asymptomatic, mild ill-defined abdominal pain in right hypochondrium or epigastrium, bloating, hepatomegaly with mild tenderness
    & Elevated ALP, GGT, and within range $\alpha$-FP as long as the lesion doesn't become malignant. WBC, fibrinogen, CRP maybe elevated. Core needle biopsy is useless unless stained with immuno-histochemical stains. US fails to dx. Dynamic MRI with hepatocyte specific contrast agent is the best modality. Dynamic CT can also be useful at times. 
    & HNF1-$\alpha$ mutated are fatty and devoid of cellular or architectural atypia. $\beta$-Catenin mutated have a high degree of cytologic or architectural dysplasia. Adenomas due to inflammatory processes are comprised only of hepatocytes and vessels with minor amounts of stroma. 
    \\

\bottomrule

\end{tabularx}
\end{adjustbox}

\end{document}

答案1

下列方法可使表格适合页面大小,同时减少其中的空白。我添加了geometry包以允许更小的边距,使用\small字体大小并结合相邻列之间较小的水平分隔(减小的值tabcolsep),xltabular而不是ltablex/tabularx假设您的实际表格跨越多页并左对齐X类型列,其宽度略有不同,具体取决于每列文本的长度。由于表格只能在表格行之间跨页面拆分,而不是在表格行内拆分,因此如果添加更多具有相当长文本的行,您可能会得到不想要的输出。因此,我采用了一种完全不同的信息呈现方式:嵌套description列表:

在此处输入图片描述

在此处输入图片描述

\documentclass[10pt,landscape]{article}
\usepackage{geometry}
\usepackage{amsmath, amsfonts, amsthm}
\usepackage[english]{babel}
\usepackage{microtype}
\usepackage{mathpazo}
\setlength\parindent{0pt}
\usepackage[T1]{fontenc}
\usepackage{xltabular}
\usepackage{booktabs}
\usepackage{float}
\restylefloat{table}

\usepackage{enumitem}


\begin{document}
{\small \setlength{\tabcolsep}{4pt}
\begin{xltabular}{\linewidth}{@{}*{5}{>{\raggedright\arraybackslash\hsize=0.85\hsize}X} *{2}{>{\raggedright\arraybackslash\hsize=1.375\hsize}X}@{}}

\textbf{Tumors}
    & \textbf{Epidemiology}
    & \textbf{Etiology}
    & \textbf{Pathogenesis} 
    & \textbf{Clinical manifestation} 
    & \textbf{Diagnostic workup} 
    & \textbf{Morphology} 
    \\
    
\toprule
\endhead

Hepatocellular adenomas
    & Women taking estrogen rich oral contraceptives and body builders taking anabolic steroids
    & 30 to 40 fold higher in oral contraceptive users compared to nonusers 
    & Inactivation of HNF1-$\alpha$, activation of $\beta$-Catenin, and chronic irritation of inflammatory processes
    & 50\% are asymptomatic, mild ill-defined abdominal pain in right hypochondrium or epigastrium, bloating, hepatomegaly with mild tenderness
    & Elevated ALP, GGT, and within range $\alpha$-FP as long as the lesion doesn't become malignant. WBC, fibrinogen, CRP maybe elevated. Core needle biopsy is useless unless stained with immuno-histochemical stains. US fails to dx. Dynamic MRI with hepatocyte specific contrast agent is the best modality. Dynamic CT can also be useful at times. 
    & HNF1-$\alpha$ mutated are fatty and devoid of cellular or architectural atypia. $\beta$-Catenin mutated have a high degree of cytologic or architectural dysplasia. Adenomas due to inflammatory processes are comprised only of hepatocytes and vessels with minor amounts of stroma. 
    \\
\bottomrule
\end{xltabular}}

\newpage

\begin{description}
\item[Hepatocellular adenomas]\hfill
  \begin{description}
  \item[Epidemiology] Women taking estrogen rich oral contraceptives and body builders taking anabolic steroids
  \item[Etiology] 30 to 40 fold higher in oral contraceptive users compared to nonusers 
  \item[Pathogenesis] Inactivation of HNF1-$\alpha$, activation of $\beta$-Catenin, and chronic irritation of inflammatory processes
  \item[Clinical manifestation] 50\% are asymptomatic, mild ill-defined abdominal pain in right hypochondrium or epigastrium, bloating, hepatomegaly with mild tenderness
  \item[Diagnostic workup] Elevated ALP, GGT, and within range $\alpha$-FP as long as the lesion doesn't become malignant. WBC, fibrinogen, CRP maybe elevated. Core needle biopsy is useless unless stained with immuno-histochemical stains. US fails to dx. Dynamic MRI with hepatocyte specific contrast agent is the best modality. Dynamic CT can also be useful at times.
  \item[Morphology] HNF1-$\alpha$ mutated are fatty and devoid of cellular or architectural atypia. $\beta$-Catenin mutated have a high degree of cytologic or architectural dysplasia. Adenomas due to inflammatory processes are comprised only of hepatocytes and vessels with minor amounts of stroma. 
  \end{description}
\end{description}



\end{document}

相关内容