0

You can see that the equation is cut off at the right side of the slide. Can I reduce left margin only for this item?

enter image description here

\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 Answer 1

2

Your equation is wider than text width ... so you need to make shorter or locally enlarge horizontal space for it. If this still not gives satisfactory result, use of smaller fonts may help. In MWE below are considered both measures:

enter image description here

\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}

By defined box restoretext is first restored text width in list environment to \textwidth and than with adjustwidth macro from package changepage enlarged for 8 mm on each side. With this and reducing font size to \small the equation can be fitted into Beamer frame.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .