我怎样才能尊重边距?正如您在图中看到的,“他的”这个词超出了边距。我怎样才能正确地放置所有单词?
这是代码:
\documentclass[10pt]{beamer}
\usepackage{subfig}
\usepackage{grffile}
\usepackage{pdfpages}
\usepackage{epstopdf}
\usepackage{tikz}
\usepackage{textpos}
\usepackage{graphicx}
\usepackage{booktabs}
\setbeamerfont{structure}{family=\rmfamily}
\usepackage{amsthm}
\usepackage{graphicx}
\usepackage{graphics}
\usepackage{hyperref}
\usepackage{xcolor}
\beamertemplatenavigationsymbolsempty
\setbeamertemplate{blocks}[rounded][shadow=true]
\setbeamertemplate{bibliography item}[text]
\setbeamertemplate{caption}[numbered]
\usetheme{default}
\usecolortheme{seahorse}
\newcommand{\SMIT}{\mathfrak{P}}
\newcommand{\vc}[3]{\overset{#2}{\underset{#3}{#1}}}
\newcommand{\prob}[1]{\mathbb{P}\left[#1\right]}
\newcommand{\cprob}[2]{\mathbb{P}\left[#1 \;\middle\vert\; #2\right]}
\newcommand{\E}[1]{\mathbb{E}\left[#1\right]}
\newcommand{\Et}[1]{\mathbb{E}_{t}\left[#1\right]}
\newcommand{\Econd}[2]{\mathbb{E}_{#1}\left[#2\right]}
\newcommand{\VAR}[1]{\mathbb{V}\left[#1\right]}
\newcommand{\abs}[1]{\left|#1\right|}
\newcommand{\floor}[1]{\left\lfloor#1\right\rfloor}
\newcommand{\norma}[1]{\left\|#1\right\|}
\newcommand{\tonde}[1]{\left(#1\right)}
\newcommand{\quadre}[1]{\left[#1\right]}
\newcommand{\graffe}[1]{\left\{#1\right\}}
\newcommand{\Sm}[1]{\mathcal{S}\tonde{#1}}
\newcommand{\due}[2]{\left(\begin{array}{c}#1\\#2\end{array}\right)}
\newcommand{\duedue}[4]{\left(\begin{array}{ll}#1 & #2\\#3 & #4\end{array}\right)}
\newcommand{\tre}[3]{\left(\begin{array}{c}#1\\#2\\#3\end{array}\right)}
\newcommand{\quattro}[4]{\left(\begin{array}{c}#1\\#2\\#3\\#4\end{array}\right)}
\newcommand{\ra}{\rightarrow}
\newcommand{\I}[1]{\mathds{1}_{\left\{#1\right\}}}
\newcommand{\lra}{\longrightarrow}
\newcommand{\Ra}{\Rightarrow}
\newcommand{\bart}{\overline{t}}
\newcommand{\Rset}{\mathbb{R}}
\newcommand{\spei}{\mathrm{E}_{i-1}}
\newcommand{\ba}{\begin{eqnarray}}
\newcommand{\ea}{\end{eqnarray}}
\newcommand{\bi}{\begin{itemize}}
\newcommand{\ei}{\end{itemize}}
\newcommand{\ben}{\begin{enumerate}}
\newcommand{\een}{\end{enumerate}}
\newcommand{\blem}{\begin{lem}}
\newcommand{\elem}{\end{lem}}
\newcommand{\bteo}{\begin{theorem}}
\newcommand{\eteo}{\end{theorem}}
\newcommand{\bcor}{\begin{corollary}}
\newcommand{\ecor}{\end{corollary}}
\newcommand{\brem}{\begin{rmk1}}
\newcommand{\erem}{\end{rmk1}}
\newcommand{\be}{\begin{equation}}
\newcommand{\ee}{\end{equation}}
\newcommand{\cond}{\;\middle\vert\;}
\newcommand{\accapo}{\nonumber\\}
\newcommand{\convp}{\overset{p}{\longrightarrow}}
\newcommand{\convlone}{\stackrel{L^1}{\longrightarrow}}
\newcommand*{\second}{^{\prime\prime}\mkern-1.2mu}
\newcommand*{\third}{^{\prime\prime\prime}\mkern-1.2mu}
\newcommand*{\fourth}{^{\prime\prime\prime\prime}\mkern-1.2mu}
\newcommand{\idlen}{\SIT_{n}}
\newcommand{\kidlen}{\SIT_{n,k}}
\newcommand{\bidlen}{\SIT_{n,1}}
\newcommand{\p}{\mathfrak{p}}
\newcommand{\plim}{\stackrel{p}{\longrightarrow}}
\newcommand{\dlim}{\stackrel{d}{\longrightarrow}}
\newcommand{\df}{\stackrel{\textrm{def}}{=}}
\newcommand\myeq{\mathrel{\stackrel{\makebox[0pt]{\mbox{\normalfont\tiny def}}}{=}}}
\newcommand{\dav}[1]{\color{red}\fbox{DAV}: #1\color{black} }
\newcommand{\Var}[1]{\mathbf{Var}\left[#1\right]}
\newcommand{\Cov}[1]{\mathbf{Cov}\left[#1\right]}
\newcommand{\EQ}[1]{\mathbf{E}^{\mathcal Q}\left[#1\right]}
\newcommand{\EP}[1]{\mathbf{E}^{\mathcal Q}\left[#1\right]}
\newcommand{\EC}[2]{\mathbf{E}\left[#1\left| #2 \right. \right]}
\newcommand{\SIT}{\mathfrak{S}}
\newcommand{\Ei}[2]{\mathbb{E}_{#1}\left[#2\right]}
\newcommand{\Op}[1]{O_p\left(#1\right)}
\newcommand{\op}[1]{o_p\left(#1\right)}
\newcommand{\matrice}[4]{\left( \begin{array}{cc} #1 & #2 \\ #3 & #4\end{array}\right)}
\newcommand{\vettoredue}[2]{\left( \begin{array}{c} #1 \\ #2 \end{array}\right)}
\newcommand{\de}[2]{\frac{\partial #1}{\partial #2}}
\newcommand{\dede}[2]{\frac{\partial^2 #1}{\partial #2^2}}
\newcommand{\stable}{\overset{L-st.}{\longrightarrow}}
\newcommand{\dsum}{\displaystyle\sum}
\newcommand{\dint}{\displaystyle\int}
\newtheorem{proposition}{Proposition}[section]
\newcommand{\ucp}{\vc{\longrightarrow}{\text{ucp}}{n\rightarrow\infty}}
\usetikzlibrary{shapes,arrows}
\tikzset{
myarrow/.style={
draw,
fill=red,
single arrow,
minimum height=2.5ex,
line width=1pt,
single arrow head extend=0.1ex
}
}
\newcommand{\arrowdown}{%
\tikz [baseline=-1ex]{\node [myarrow,rotate=-90, yscale=.5, single arrow head extend=1mm] {};}
}
\newcommand{\arrowright}{%
\tikz [baseline=-0.5ex]{\node [myarrow,rotate=0, yscale=.4, single arrow head extend=1mm] {};}
}
\begin{document}
\begin{frame}
\frametitle{The Kelly Criterion - Gambling}
Since the probabilities and the payoffs are all the same in each bet, it seems likely that the gambler will always wager the same fraction \textit{f} of his bankroll. \\ Then, the quantity $B_{i}$, called \textit{fixed fraction bet}, that he wagers in each bet is: $$B_{i}=f \smallskip W_{i-1},$$ where $0 \leq f \leq 1$. \\
Let \textit{S} and \textit{F} the number of successes and losses. \\Then, the capital of the gambler after \textit{n} trials is: \\
$$W_{n} =W_{0}(1+f)^{S}(1-f)^{F}$$
\end{frame}
\end{document}
答案1
它实际上并没有超出范围,但我同意这是一个糟糕的突破。
只需加一条领带即可。
\documentclass[10pt]{beamer}
\setbeamerfont{structure}{family=\rmfamily}
\beamertemplatenavigationsymbolsempty
\setbeamertemplate{blocks}[rounded][shadow=true]
\setbeamertemplate{bibliography item}[text]
\setbeamertemplate{caption}[numbered]
\usetheme{default}
\usecolortheme{seahorse}
\begin{document}
\begin{frame}
\frametitle{The Kelly Criterion -- Gambling}
Since the probabilities and the payoffs are all the same in each bet,
it seems likely that the gambler will always wager the same fraction~$f$ of his~bankroll.
Then, the quantity $B_{i}$, called \emph{fixed fraction bet}, that he wagers in each bet is
\[
B_{i}=f \, W_{i-1},
\]
where $0 \leq f \leq 1$.
Let $S$ and $F$ be the number of successes and losses.
Then, the capital of the gambler after $n$ trials is
\[
W_{n} =W_{0}(1+f)^{S}(1-f)^{F}
\]
\end{frame}
\end{document}
我做了一些修复:
\textit{f}
和类似的应该是$f$
(它是数学);- 我删除了显示方程式前的冒号(样式不好);
- 我改成
$$...$$
了合适的\[...\]
; - 我变成
\smallskip
了\,
(前者没有按照你希望的方式运行); \textit
为强调最好是\emph
。
您定义的命令会有几点注释。
答案2
您可以使用包中的环境\raggedright
临时对齐相关段落,而不是使用默认值。环境会在后面插入垂直空间以区别于其他段落。为了删除这个垂直空间,我直接在后面使用。justify
ragged2e
justify
\unskip
\end{justify}
\documentclass[10pt]{beamer}
\usepackage{amsthm}
\usepackage{ragged2e}
\begin{document}
\begin{frame}{The Kelly Criterion - Gambling}
\begin{justify}
Since the probabilities and the payoffs are all the same in each
bet, it seems likely that the gambler will always wager the same
fraction $f$ of his bankroll.
\end{justify}
\unskip
Then, the quantity $B_{i}$, called \emph{fixed fraction bet}, that
he wagers in each bet is:
\begin{equation*}
B_{i}=f \, W_{i-1},
\end{equation*}
where $0 \leq f \leq 1$.
Let $S$ and $F$ the number of successes and losses.
Then, the capital of the gambler after $n$ trials is:
\begin{equation*}
W_{n} =W_{0}(1+f)^{S}(1-f)^{F}
\end{equation*}
\end{frame}
\end{document}