我正在尝试使用 aragraph 模式将列表放入表格中p
,但项目之间的间距太大,所以我正在考虑使用该setstretch{}
命令。你知道我在以下示例中如何设置它吗?
\documentclass[12pt]{report}
\usepackage[left=35mm, right=25mm, top=30mm, bottom=30mm]{geometry}
\usepackage{graphicx}
\usepackage{tabularx}
\being{document}
\begin{table}[htbp]
\caption{Something}
\noindent
\begin{center}
\begin{tabular}{|p{3in}<{\raggedright}|p{3in}|}
\hline
Preconception Counselling & Pre-pregnancy Care \\
\hline
\begin{itemize} \itemsep1pt
\item Pregnancy planning
\item Education regarding the risks and methods to optimize outcome
\item Drugs
\item Referral mechanisms
\end{itemize}
&
\begin{itemize} \itemsep1pt
\item Contraception
\item Counselling re risks of diabetes/obesity/glycemic control to:
\item Glycemic control
\begin{itemize}
\item HbA1c: Individualised and realistic targets
\item Self monitoring: 4-7 times daily; pre-meals \textless 6 mmol/l; 1h post meals \textless 8 mmol/l
\item Oral drugs: Stop and initiate insulin if suboptimal control
\item Hypoglycemia: Advice on risks and education of carers in use of glucagon
\end{itemize}
\item Education
\begin{itemize}
\item Dietetic advice regular, but small/moderate carbohydrate portions
\item Weight loss if BMI > 27
\item Regular exercise
\item Smoking and alcohol cessation
\item Sick day rules
\end{itemize}
\item Medications
\begin{itemize}
\item Folic Acid 5 mg daily
\end{itemize}
\item Stop ACEIs, ARBs, statins, diuretics
\begin{itemize}
\item Start methyldopa, labetalol as alternatives
\end{itemize}
\item Screening
\begin{itemize}
\item Rubella immunity
\item Complications (eye, kidney, heart) with referral and treatment as appropriate
\end{itemize}
\item Referral Mechanisms
\begin{itemize}
\item Advice on urgent referral mechanisms if pregnant
\end{itemize}
\end{itemize}
\\
\hline
\end{tabular}
\end{center}
\label{tab:counselling}
\end{table}
\end{document}
答案1
nosep
您可以使用选项禁用间距enumitem
。
我还添加了一些改进表格的方法,例如如何使其填满整个文本宽度而无需猜测。
请注意,center
不应使用环境;另外,最好将\label
放在 旁边\caption
,以便于查找。我建议使用siunitx
单位和值,如下所示。
\documentclass[12pt]{report}
\usepackage[left=35mm, right=25mm, top=30mm, bottom=30mm]{geometry}
\usepackage{graphicx}
\usepackage{tabularx}
\usepackage{enumitem,calc}
\usepackage{siunitx}
\sisetup{per-mode=symbol}
\newenvironment{tabitemize}[1][]
{\begin{itemize}[nosep,#1]}
{\end{itemize}}
\begin{document}
\begin{table}[htbp]
\centering
\caption{Something}\label{tab:counselling}
\medskip
\begin{tabular}{
|>{\raggedright}p{.5\textwidth-2\tabcolsep-1.5\arrayrulewidth}|
>{\raggedright\arraybackslash}p{.5\textwidth-2\tabcolsep-1.5\arrayrulewidth}|
}
\hline
Preconception Counselling & Pre-pregnancy Care \\
\hline
\begin{tabitemize}[leftmargin=*]
\item Pregnancy planning
\item Education regarding the risks and methods to optimize outcome
\item Drugs
\item Referral mechanisms
\end{tabitemize}
&
\begin{tabitemize}[leftmargin=*]
\item Contraception
\item Counselling re risks of diabetes/obesity/glycemic control to:
\item Glycemic control
\begin{tabitemize}
\item HbA1c: Individualised and realistic targets
\item Self monitoring: 4--7 times daily; pre-meals $<\SI{6}{\milli\mol\per\litre}$;
\SI{1}{h} post meals $<\SI{8}{\milli\mol\per\litre}$
\item Oral drugs: Stop and initiate insulin if suboptimal control
\item Hypoglycemia: Advice on risks and education of carers in use of glucagon
\end{tabitemize}
\item Education
\begin{tabitemize}
\item Dietetic advice regular, but small/moderate carbohydrate portions
\item Weight loss if BMI $>27$
\item Regular exercise
\item Smoking and alcohol cessation
\item Sick day rules
\end{tabitemize}
\item Medications
\begin{tabitemize}
\item Folic Acid \SI{5}{\milli\gram} daily
\end{tabitemize}
\item Stop ACEIs, ARBs, statins, diuretics
\begin{tabitemize}
\item Start methyldopa, labetalol as alternatives
\end{tabitemize}
\item Screening
\begin{tabitemize}
\item Rubella immunity
\item Complications (eye, kidney, heart) with referral and treatment as appropriate
\end{tabitemize}
\item Referral Mechanisms
\begin{tabitemize}
\item Advice on urgent referral mechanisms if pregnant
\end{tabitemize}
\end{tabitemize}
\\
\hline
\end{tabular}
\end{table}
\end{document}
您可能需要考虑采用不同的方式来排版表格。
\documentclass[12pt]{report}
\usepackage[left=35mm, right=25mm, top=30mm, bottom=30mm]{geometry}
\usepackage{graphicx}
\usepackage{tabularx}
\usepackage{enumitem,calc}
\usepackage{siunitx}
\usepackage{booktabs}
\sisetup{per-mode=symbol}
\newenvironment{tabitemize}[1][]
{\begin{itemize}[nosep,#1]}
{\end{itemize}}
\begin{document}
\begin{table}[htbp]
\centering
\caption{Something}\label{tab:counselling}
\medskip
\begin{tabular}{@{}>{\raggedright\arraybackslash}p{\textwidth}@{}}
\toprule
\multicolumn{1}{c}{\textbf{Preconception Counselling}} \\
\midrule
\begin{tabitemize}[leftmargin=*]
\item Pregnancy planning
\item Education regarding the risks and methods to optimize outcome
\item Drugs
\item Referral mechanisms
\end{tabitemize}
\\
\midrule[\heavyrulewidth]
\multicolumn{1}{c}{\textbf{Pre-pregnancy Care}} \\
\midrule
\begin{tabitemize}[leftmargin=*]
\item Contraception
\item Counselling re risks of diabetes/obesity/glycemic control to:
\item Glycemic control
\begin{tabitemize}
\item HbA1c: Individualised and realistic targets
\item Self monitoring: 4--7 times daily; pre-meals $<\SI{6}{\milli\mol\per\litre}$;
\SI{1}{h} post meals $<\SI{8}{\milli\mol\per\litre}$
\item Oral drugs: Stop and initiate insulin if suboptimal control
\item Hypoglycemia: Advice on risks and education of carers in use of glucagon
\end{tabitemize}
\item Education
\begin{tabitemize}
\item Dietetic advice regular, but small/moderate carbohydrate portions
\item Weight loss if BMI $>27$
\item Regular exercise
\item Smoking and alcohol cessation
\item Sick day rules
\end{tabitemize}
\item Medications
\begin{tabitemize}
\item Folic Acid \SI{5}{\milli\gram} daily
\end{tabitemize}
\item Stop ACEIs, ARBs, statins, diuretics
\begin{tabitemize}
\item Start methyldopa, labetalol as alternatives
\end{tabitemize}
\item Screening
\begin{tabitemize}
\item Rubella immunity
\item Complications (eye, kidney, heart) with referral and treatment as appropriate
\end{tabitemize}
\item Referral Mechanisms
\begin{tabitemize}
\item Advice on urgent referral mechanisms if pregnant
\end{tabitemize}
\end{tabitemize}
\\
\bottomrule
\end{tabular}
\end{table}
\end{document}