更改投影仪幻灯片中某个项目的边距

更改投影仪幻灯片中某个项目的边距

您可以看到公式在幻灯片右侧被截断。我可以只减少此项的左边距吗?

在此处输入图片描述

\begin{frame}{Conditional Hazard Ratio under Competing Risks}
\begin{itemize}
\item Competing Risks: 
\item $ h(t) = h_1(t) + h_2(t) $
\item $ \theta_{k_1,k_2}(t_1,t_2) = \dfrac{h_{1,k_1}(t_1|T_2 = t_2, K_2 = k_2)}{h_{1,k_1}(t_1|T_2>t_2)} $

 \begin{equation}
 \dfrac{ \Pr(T_{1a}-T_{1b})(T_{2a}-T_{2b}) > 0 | (T_{1ab} = t_1, T_{2ab} = t_2), (K_{1ab},K_{2ab}) = (k_1,k_2)}{ \Pr(T_{1a}-T_{1b})(T_{2a}-T_{2b}) < 0 | (T_{1ab} = t_1, T_{2ab} = t_2), (K_{1ab},K_{2ab}) = (k_1,k_2)} 
\end{equation}

\end{itemize}
\end{frame}

答案1

您的方程式比文本宽度更宽...因此您需要缩短或局部扩大水平空间。如果这仍然不能给出令人满意的结果,使用较小的字体可能会有所帮助。在下面的 MWE 中考虑了这两种措施:

在此处输入图片描述

\documentclass{beamer}
\usepackage{calc}
\usepackage{changepage}
\makeatletter
    \newsavebox\restorebox
\newenvironment{restoretext}%
    {\@parboxrestore% 
     \begin{adjustwidth}{-8mm}{-8mm}%
                \begin{lrbox}{\restorebox}%
                \begin{minipage}{\linewidth}%
    }{\end{minipage}\end{lrbox}
        \usebox\restorebox
        \end{adjustwidth}
     }
\makeatother

\begin{document}
\begin{frame}{Conditional Hazard Ratio under Competing Risks}
\begin{itemize}
\item Competing Risks:
\item $ h(t) = h_1(t) + h_2(t) $
\item $ \theta_{k_1,k_2}(t_1,t_2) = \dfrac{h_{1,k_1}(t_1|T_2 = t_2, K_2 = k_2)}{h_{1,k_1}(t_1|T_2>t_2)} $
\begin{restoretext}\small
\begin{equation}
 \dfrac{ \Pr(T_{1a}-T_{1b})(T_{2a}-T_{2b}) > 0 | (T_{1ab} = t_1, T_{2ab} = t_2), (K_{1ab},K_{2ab}) = (k_1,k_2)}{ \Pr(T_{1a}-T_{1b})(T_{2a}-T_{2b}) < 0 | (T_{1ab} = t_1, T_{2ab} = t_2), (K_{1ab},K_{2ab}) = (k_1,k_2)}
\end{equation}
\end{restoretext}
\item item 
\item item

\end{itemize}
\end{frame}
    \end{document}

通过定义框,restoretext首先将列表环境中的文本宽度恢复为,\textwidth然后使用adjustwidth包中的宏changepage将每边放大 8 毫米。通过此操作并将字体大小缩小到\small方程式可以适合 Beamer 框架。

相关内容