这是我第一次制作带有化学公式的表格。我很难提高其可读性。
问题
- 如何使所有行垂直居中?
- 如何删除页码?页码与表格重叠
- 如何让表格使用所有可用的水平空间?这是横向模式的 A4 纸,它应该使用所有空间。
- 第二列中的公式太近了。如果能以某种方式将它们错开,使它们不重叠,那就太棒了。
- 生成的 PDF 有两页长,但第一页是空白的。如果内容本来就适合一页,那么再加一页有什么意义呢?
以下是代码:
\documentclass{article}
\usepackage[landscape,a4paper]{geometry}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{booktabs}
\usepackage[version=3]{mhchem}
\usepackage{chemfig}
\usepackage{array}
\begin{document}
\thispagestyle{empty}
\section*{Principali composti organici} % (fold)
\label{sec:org}
\setatomsep{2em}
\begin{tabular}{l c c c l}
\toprule
Nome & $\lambda$ & Formula bruta & Suffisso & Esempio \\
\midrule
Alcani & & \ce{C_nH_{2n+2}} & \textit{-ano} &
Metano: \ce{CH4}\\
Alcheni & \chemfig{C(-[:135])(-[:225])=C(-[:45])(-[:315])} &
\ce{C_nH_{2n}} & \textit{-ene} &
Etene: \ce{H2C=CH2}\\
Alchini & \chemfig{-C=C-} & \ce{C_nH_{2n-2}} & \textit{-ino} &
Etino: \ce{HC#CH}\\
Areni & \chemfig{**6(------)} & & \textit{-benzene} & $1,3$-dimetilbenzene\\
\midrule
Alogenuri organici & \chemfig{-X} & & & Bromoetano: \ce{CH3-CH2-Br}\\
Alcoli & \chemfig{C(-[:90])(-[:180])(-[:270])-OH} & & \textit{-olo} &
Etanolo: \ce{CH3-CH2-OH}\\
Aldeidi & \chemfig{R-[:30]C(=[:90]O)-[:330]H} & & \textit{-ale} &
Metanale (formaldeide): \ce{H-CHO}\\
Chetoni & \chemfig{R_1-[:30]C(=[:90]O)-[:330]R_2} & & \textit{-one} &
Propanone (acetone): \ce{CH3-CO-CH3}\\
Acidi carbossilici & \chemfig{R-[:30]C(=[:90]O)-[:330]O-[:30]H} & &
\textit{-oico} & Acido metanoico (formico): \ce{H-COOH}\\
Esteri & \chemfig{R_1-[:30]C(=[:90]O)-[:330]O-[:30]R_2} & &
\textit{-oato} & Etanoato di etile: \ce{CH3COOCH2CH3}\\
Eteri & \chemfig{R_1-[:330]O-[:30]R_2} & & etere &
Dietil etere: \ce{CH3CH2-O-CH2CH3}\\
Ammine & \chemfig{C(-[:90])(-[:180])(-[:270])-N} & & \textit{-ammina} &
Etilammina: \ce{CH3CH2NH2}\\
Ammidi & \chemfig{C(=[:90]O)(-[:180])-N(-[:45])(-[:315])} & &
\textit{-ammide} & Etanammide: \ce{CH3CONH2}\\
Nitrili & \chemfig{-C~N} & & \textit{-nitrile} & Etanonitrile: \ce{CH3CN}\\
\bottomrule
\end{tabular}
% section org (end)
\end{document}
它看起来是这样的:
答案1
您可以将化学式垂直居中,包括它们在内tabular
;行之间也应添加一些垂直空间。对于一行对象来说,对齐效果并不好\chemfig
,但这可能是另一个问题。
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[italian]{babel}
\usepackage[landscape,a4paper,top=1cm,bottom=1cm]{geometry}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{booktabs}
\usepackage[version=3]{mhchem}
\usepackage{chemfig}
\usepackage{array}
\newcommand{\tabce}[1]{\begin{tabular}{@{}c@{}}\ce{#1}\end{tabular}}
\newcommand{\tabchemfig}[1]{\begin{tabular}{@{}c@{}}\chemfig{#1}\end{tabular}}
\begin{document}
\thispagestyle{empty}
\section*{Principali composti organici} % (fold)
\label{sec:org}
\setatomsep{2em}
\begin{tabular}{l c c c l}
\toprule
Nome & $\lambda$ & Formula bruta & Suffisso & Esempio \\
\midrule
Alcani & & \tabce{C_nH_{2n+2}} & \textit{-ano} &
Metano: \tabce{CH4}\\\addlinespace
Alcheni & \tabchemfig{C(-[:135])(-[:225])=C(-[:45])(-[:315])} &
\tabce{C_nH_{2n}} & \textit{-ene} &
Etene: \tabce{H2C=CH2}\\\addlinespace
Alchini & \tabchemfig{-C=C-} & \tabce{C_nH_{2n-2}} & \textit{-ino} &
Etino: \tabce{HC#CH}\\\addlinespace
Areni & \tabchemfig{**6(------)} & & \textit{-benzene} & $1,3$-dimetilbenzene\\
\midrule
Alogenuri organici & \tabchemfig{-X} & & & Bromoetano: \tabce{CH3-CH2-Br}\\\addlinespace
Alcoli & \tabchemfig{C(-[:90])(-[:180])(-[:270])-OH} & & \textit{-olo} &
Etanolo: \tabce{CH3-CH2-OH}\\\addlinespace
Aldeidi & \tabchemfig{R-[:30]C(=[:90]O)-[:330]H} & & \textit{-ale} &
Metanale (formaldeide): \tabce{H-CHO}\\\addlinespace
Chetoni & \tabchemfig{R_1-[:30]C(=[:90]O)-[:330]R_2} & & \textit{-one} &
Propanone (acetone): \tabce{CH3-CO-CH3}\\\addlinespace
Acidi carbossilici & \tabchemfig{R-[:30]C(=[:90]O)-[:330]O-[:30]H} & &
\textit{-oico} & Acido metanoico (formico): \tabce{H-COOH}\\\addlinespace
Esteri & \tabchemfig{R_1-[:30]C(=[:90]O)-[:330]O-[:30]R_2} & &
\textit{-oato} & Etanoato di etile: \tabce{CH3COOCH2CH3}\\\addlinespace
Eteri & \tabchemfig{R_1-[:330]O-[:30]R_2} & & etere &
Dietil etere: \tabce{CH3CH2-O-CH2CH3}\\\addlinespace
Ammine & \tabchemfig{C(-[:90])(-[:180])(-[:270])-N} & & \textit{-ammina} &
Etilammina: \tabce{CH3CH2NH2}\\\addlinespace
Ammidi & \tabchemfig{C(=[:90]O)(-[:180])-N(-[:45])(-[:315])} & &
\textit{-ammide} & Etanammide: \tabce{CH3CONH2}\\\addlinespace
Nitrili & \tabchemfig{-C~N} & & \textit{-nitrile} & Etanonitrile: \tabce{CH3CN}\\
\bottomrule
\end{tabular}
% section org (end)
\end{document}
为什么你会得到两页?\section
处理时,TeX 被指示在标题和后面的两行之间绝对不留间隙;在你的情况下只有一行(tabular
),但章节标题和表格不适合一页。因此会发出一个空白页,然后发出一个满页。