我的要求如下:
我现在仍然尝试的是:
\documentclass{book}
\usepackage{xcolor,framed}
\begin{document}
\begin{leftbar}\setlength{\fboxsep}{0pt}
\begin{oframed}
\noindent{{\bf Estimate: The Boltzmann Law for Levitation}\\
As a first example which is instructive both in the context of how to use
the Boltzmann distribution and in telling us how to think about the energy
scale $k_BT$, we consider
the probability of levitating, by commenting
quantitatively on the probability
that a mass $m$ will levitate to a height $h$.
\index{levitation!and Boltzmann distribution}
Specifically, recall that the gravitational potential energy of a mass $m$ near the surface of the earth is
$PE=mgh$. If we recall the Boltzmann law in the form of equation~\ref{eqn:BoltzmannLaw}
and take as our zero of potential energy the surface of the earth itself, we can compute the probability of an object such as a human or a bacterium levitating to a height
$h$ as
\def\theequation{2.9}
\begin{equation}
p(h)=p(0)e^{-mgh/k_BT},
\label{eqn:LevitationEquation}
\end{equation}
\index{Boltzmann distribution!and levitation}
\index{levitation!Boltzmann distribution and}
\noindent
as shown in Figure~\ref{fig:Levitation}.
This equation jibes with our intuition
about the drop-off
of atmospheric pressure with height, a phenomenon seen easily on any
sports watch which reports changes in height with 5 m resolution. Effectively,
the altimeter on such a watch is nothing more than a Boltzmann meter,
reporting on precisely the same quantity as computed
in equation~\ref{eqn:LevitationEquation} but instead of using
a mass of 100~kg as for a human, using $5 \times 10^{-26}$~kg
for the typical mass of molecules
in the atmosphere. Ultimately, it is the dimensionless ratio $mgh/k_BT$ that tells us
whether levitation is likely or not. For cases in which this dimensionless number is much
greater than 1, the likelihood of levitation is negligible. By way of contrast,
when this dimensionless number is much smaller than 1, levitation is inevitable.}
\end{oframed}
\end{leftbar}
\end{document}
还有其他更好的选择吗?请建议...
答案1
tcolorbox
使用和 Ti 的解决方案钾Z。
\documentclass{book}
\usepackage{tikz}
\usepackage{tcolorbox}
\tcbuselibrary{skins,breakable}
\definecolor{estimateframe}{HTML}{F4DEA9}
\definecolor{estimatetext}{HTML}{898989}
\newtcolorbox{estimate}[1][]
{%
,check odd page
,toggle enlargement
,colframe=estimateframe
,colback=white
,right skip=23pt
,boxrule=3pt
,enhanced
,sharp corners
,overlay unbroken and first =
{%
\tcbifoddpage
{%
\filldraw[estimateframe]
([xshift=3pt]frame.north east) rectangle
([xshift=23pt]frame.south east)
;
\node[rotate=90,font=\sffamily\Large\color{estimatetext}]
at ([xshift=13pt,yshift=-2cm]frame.north east)
{\MakeUppercase{estimate}};
}%
{%
\filldraw[estimateframe]
([xshift=-3pt]frame.north west) rectangle
([xshift=-23pt]frame.south west)
;
\node[rotate=90,font=\sffamily\Large\color{estimatetext}]
at ([xshift=-13pt,yshift=-2cm]frame.north west)
{\MakeUppercase{estimate}};
}%
}
,overlay middle and last =
{%
\tcbifoddpage
{%
\filldraw[estimateframe]
([xshift=3pt]frame.north east) rectangle
([xshift=23pt]frame.south east)
;
}%
{%
\filldraw[estimateframe]
([xshift=-3pt]frame.north west) rectangle
([xshift=-23pt]frame.south west)
;
}%
}
,#1%
}
\usepackage{duckuments} % dummy content
\begin{document}
\blindduck[1-3]
\begin{estimate}[breakable]
\textbf{Estimate: The Boltzmann Law for Levitation}\\
As a first example which is instructive both in the context of how to use
the Boltzmann distribution and in telling us how to think about the energy
scale $k_BT$, we consider
the probability of levitating, by commenting
quantitatively on the probability
that a mass $m$ will levitate to a height $h$.
\index{levitation!and Boltzmann distribution}
Specifically, recall that the gravitational potential energy of a mass $m$ near the surface of the earth is
$PE=mgh$. If we recall the Boltzmann law in the form of equation~\ref{eqn:BoltzmannLaw}
and take as our zero of potential energy the surface of the earth itself, we can compute the probability of an object such as a human or a bacterium levitating to a height
$h$ as
\def\theequation{2.9}
\begin{equation}
p(h)=p(0)e^{-mgh/k_BT},
\label{eqn:LevitationEquation}
\end{equation}
\index{Boltzmann distribution!and levitation}
\index{levitation!Boltzmann distribution and}
\noindent
as shown in Figure~\ref{fig:Levitation}.
This equation jibes with our intuition
about the drop-off
of atmospheric pressure with height, a phenomenon seen easily on any
sports watch which reports changes in height with 5 m resolution. Effectively,
the altimeter on such a watch is nothing more than a Boltzmann meter,
reporting on precisely the same quantity as computed
in equation~\ref{eqn:LevitationEquation} but instead of using
a mass of 100~kg as for a human, using $5 \times 10^{-26}$~kg
for the typical mass of molecules
in the atmosphere. Ultimately, it is the dimensionless ratio $mgh/k_BT$ that tells us
whether levitation is likely or not. For cases in which this dimensionless number is much
greater than 1, the likelihood of levitation is negligible. By way of contrast,
when this dimensionless number is much smaller than 1, levitation is inevitable.
\end{estimate}
\end{document}
请注意,这只是一个快速模型,我打算进一步改进它。
答案2
使用以下解决方案mdframed
:
\documentclass{book}
\usepackage{xcolor}
\usepackage[framemethod=tikz]{mdframed}
\usetikzlibrary{shadows,calc}
\definecolor{warning}{RGB}{255,231,231}
\definecolor{warnline}{RGB}{155,231,231}
\definecolor{estbg}{RGB}{255, 232, 186}
% Definition for Warning Boxes
\newmdenv[
skipabove=10pt,
skipbelow=10pt,
innermargin=-51pt,
outermargin=19pt,
backgroundcolor=white,
innertopmargin=15pt,
innerbottommargin=15pt,
innerleftmargin=15pt,
middlelinewidth=0pt,
everyline=true,
linecolor=estbg,
linewidth=4pt,
font=\normalfont\normalsize,
frametitlefont=\normalfont\normalsize\bfseries,
frametitleaboveskip=1em,
singleextra={
\draw[estbg,line width=28pt] ($(O)+(-20pt,-2pt)$) -- ($(O|-P)+(-20pt,-\mdfframetitleboxtotalheight)+(0,2pt)$);
\node[inner sep=0pt,color=black]at ($(O|-P)+(-20pt,-60pt)$) {\rotatebox{90}{\Large\textsf{\textcolor{black!50}{ESTIMATE}}}};
}
]{estimate}
\begin{document}
\begin{estimate}
{\bf Estimate: The Boltzmann Law for Levitation}\\
As a first example which is instructive both in the context of how to use
the Boltzmann distribution and in telling us how to think about the energy
scale $k_BT$, we consider
the probability of levitating, by commenting
quantitatively on the probability
that a mass $m$ will levitate to a height $h$.
\index{levitation!and Boltzmann distribution}
Specifically, recall that the gravitational potential energy of a mass $m$ near the surface of the earth is
$PE=mgh$. If we recall the Boltzmann law in the form of equation~\ref{eqn:BoltzmannLaw}
and take as our zero of potential energy the surface of the earth itself, we can compute the probability of an object such as a human or a bacterium levitating to a height
$h$ as
\def\theequation{2.9}
\begin{equation}
p(h)=p(0)e^{-mgh/k_BT},
\label{eqn:LevitationEquation}
\end{equation}
\index{Boltzmann distribution!and levitation}
\index{levitation!Boltzmann distribution and}
\noindent
as shown in Figure~\ref{fig:Levitation}.
This equation jibes with our intuition
about the drop-off
of atmospheric pressure with height, a phenomenon seen easily on any
sports watch which reports changes in height with 5 m resolution. Effectively,
the altimeter on such a watch is nothing more than a Boltzmann meter,
reporting on precisely the same quantity as computed
in equation~\ref{eqn:LevitationEquation} but instead of using
a mass of 100~kg as for a human, using $5 \times 10^{-26}$~kg
for the typical mass of molecules
in the atmosphere. Ultimately, it is the dimensionless ratio $mgh/k_BT$ that tells us
whether levitation is likely or not. For cases in which this dimensionless number is much
greater than 1, the likelihood of levitation is negligible. By way of contrast,
when this dimensionless number is much smaller than 1, levitation is inevitable.
\end{estimate}
\end{document}
由于您使用的是书籍类(它将假定所有内容都是双面的),因此在交替页面上这可能不太正确。