\documentclass{beamer}
\usetheme{Copenhagen}
\begin{document}
\begin{frame}{Proton Pump Inhibitor use and the Risk of Chronic Kidney Disease }
\framesubtitle{Benjamin Lazarus et al, in JAMA Intern Med. 2016;176(2) }
\begin{block}{Result}
\begin{description}
\item [Hazard ratio {\textit{unadjusted analysis}}:]1.45 95\% CI: (1.11-1.90)
\item [Hazard ratio \textit{adjusted} analysis for demographic, socioeconomic, and clinical variables:]1.5 95\% CI : (1.14-1.96)
\item [Hazard ratio for PPI verses H2RA:] 1.35 95\% CI : 1.01-1.91
\end{description}
\end{block}
\end{frame}
\end{document}
第 2 项溢出了块。我尝试将\\
其分成两行,但最终出错。请帮忙。
答案1
最终的解决方案是缩短标签。“风险率”是每个标签中的冗余信息,为什么不将其移至区块标题中呢?
我认为在这种情况下,最简单的方法是不使用description
环境而是手动换行。
\documentclass{beamer}
\usetheme{Copenhagen}
\begin{document}
\begin{frame}{Proton Pump Inhibitor use and the Risk of Chronic Kidney Disease }
\framesubtitle{Benjamin Lazarus et al, in JAMA Intern Med. 2016;176(2) }
\begin{block}{Result}
{\usebeamercolor[fg]{item} Hazard ratio {\textit{unadjusted analysis}}:} 1.45 95\% CI: (1.11-1.90)\\[0.2cm]
{\usebeamercolor[fg]{item} Hazard ratio \textit{adjusted} analysis for demographic, socioeconomic, and clinical variables:} 1.5 95\% CI: (1.14-1.96)\\[0.2cm]
{\usebeamercolor[fg]{item} Hazard ratio for PPI verses H2RA:} 1.35 95\% CI: 1.01-1.91
\end{block}
\end{frame}
\end{document}
答案2
您可以在这里写第二行:
% arara: pdflatex
\documentclass{beamer}
\usetheme{Copenhagen}
\usepackage{siunitx}
\sisetup{range-phrase=--}
\begin{document}
\begin{frame}{Proton Pump Inhibitor use and the Risk of Chronic Kidney Disease }
\framesubtitle{Benjamin Lazarus et al, in JAMA Intern Med. 2016;176(2)}
\begin{block}{Result}
\begin{description}
\item [Hazard ratio \emph{unadjusted analysis}:]1.45 \SI{95}{\percent} CI: (\numrange{1.11}{1.90})
\item [Hazard ratio \emph{adjusted} analysis for demographic, socioeconomic,]
\item [and clinical variables:]1.5 \SI{95}{\percent} CI: (\numrange{1.14}{1.96})
\item [Hazard ratio for PPI verses H2RA:] 1.35 \SI{95}{\percent} CI: (\numrange{1.01}{1.91})
\end{description}
\end{block}
\end{frame}
\end{document}