
\newenvironment
我是第一次使用該命令,它造成了麻煩。我用它來創造一個新theorem
環境
\documentclass{article}
\usepackage{amsmath, amssymb}
\usepackage{amsthm , amsfonts, latexsym}
\usepackage{tikz}
\usepackage{shadethm}
\usepackage[mathscr]{euscript}
\usepackage{graphics,graphicx}
\usepackage{enumerate}
\usepackage{color}
\theoremstyle{definition}
\newshadetheorem{lems}{Lemma}[section]
\newenvironment{lem}[1][]{
\definecolor{shadethmcolor}{HTML}{00FFFF}
\begin{lems}[#1]\hspace*{1mm}
}{\end{lems}}
使用這個新theorem
環境,我正在做一個需要一些頁面空間的引理證明。
\begin{document}
\begin{lem}
Let $H$ be a connected S-thin hypergraph, and $A \boxtimes B$ and $C \boxtimes D$ be two
decompositions of $H$ with respect to the strong product. Then there exists a decomposition
$$ A_C \boxtimes A_D \boxtimes B_C \boxtimes B_D $$
of $H$ such that $A = A_C \boxtimes A_D, B= B_C \boxtimes B_D , C= A_C \boxtimes B_C,
D=A_D \boxtimes B_D$.
\begin{proof}
The idea of the proof is by using the PFD of the cartesian skeleton $H^{\Box}$ of $H$ to define four proper factors, such that
each factor has as vertex set the set of one of our desired factors, e.g. $A_C$. Then we define the desired factors of $H$ by defining projections on $H$ where the vertex set is given by the composed factors of the cartesian skeleton and such that the
edges obey the definition of the strong product. Finally via those projections it is shown that $A=A_C \boxtimes A_D$.\
Let $ H_1 \Box H_2 \Box ... \Box H_n $ be the unique PFD of a cartesian skeleton $H^{\Box}$ of $H$ . Let $I_A$ be the subset of the index set $ {1,2,...,n}$ with $V(A)=V(\Box_{i \in I_A} H_i)$
and $I_B, I_C$ and $I_D$ be defined analogously. Furthermore set
$$ H_{A,C} = \Box_{i \in I_A \cap I_C} H_i$$
and define $H_{A,D}, H_{B,C}$ and $H_{B,D}$ similarly. Then
$$ H^{\Box} = H_{A,C} \Box H_{A,D} \Box H_{B,C} \Box H_{B,D} . $$
It will be convenient to use only four coordinates $(x_1,x_2,x_3,x_4)$ for every vertex $x \in V(G)$ henceforth. Of course it is possible that not all of the intersections $I_A \cap I_C, I_A \cap I_D, I_D \cap I_C$
and $I_B \cap I_D$ are nonempty. Suppose that $I_B \cap I_C = \emptyset$ then $I_A \cap I_D \neq \emptyset$. If in addition $I_A \cap I_C$ were empty, then $I_A = I_D$ and thus $I_B=I_C$, but then
would be nothing to prove. \
We can thus assume that all but possibly $I_B \cap I_D$ are nonempty and at least three of the four
coordinates are nontrivial, that is to say, there are at least two vertices that differ in the first, second
and third coordinates, but it is possible that all vertices have the same fourth coordinate. \
Clearly, for $y=(y_1,y_2,y_3,y_4),$
$$V(A^y) = { (x_1,x_2,y_3,y_4) | x_1 \in V(H_{A,C}), x_2 \in V(H_{A,D}) } $$
$$V(B^y) = { (y_1,y_2,x_3,x_4) | x_3 \in V(H_{B,C}), x_4 \in V(H_{B,D}) } $$
$$V(C^y) = { (x_1,y_2,x_3,y_4) | x_1 \in V(H_{A,C}), x_3 \in V(H_{B,C}) } $$
$$V(D^y) = { (y_1,x_2,y_3,x_4) | x_2 \in V(H_{A,D}), x_4 \in V(H_{B,D}) } $$
are the vertex sets of the $A-,B-,C-$ and $D-$ layers of $H$. \
We now define $A_C$ as $p_1(H)$, namely $V(A_C) = V(H_{A,C})$ and $${x_1^1,...,x_k^1 } \in E(A_C)$$
if and only if there are vertices $ \tilde x_1=(x_1^1,x_1^2,x_1^3,x_1^4),...,
\tilde x_k =(x_k^1,x_k^2,x_k^3,x_k^4) \in H \text { such that} $
$$ \exists e \in E(H) : \exists S \subseteq I={2,3,4} : p_1(e) = { x_1^1,...,x_k^1} $$
\begin{itemize}
\item[(i)] $ p_s(e) \subseteq e_s \in E_s , \forall s \in S$
\item[(ii)]$ |e| = |p_s(e)|, \forall s \in S$
\item[(iii)] $|p_i(e)|=1, \forall i \in I \setminus S$
\end{itemize}
It is clear what is meant by $A_D, B_C$ and $B_D$. For the proof of the lemma it suffices to show that
$A = A_C \boxtimes A_D$. Recall that $A$ is obtained by projection of $H$ onto the vertex set of $A$. We
call this projection $p_A$ and define $p_B,p_C,p_D$ analogously. With our present coordinatization we thus have
$$p_A(x_1,x_2,x_3,x_4) = (x_1,x_2,-,-), $$
$$p_B(x_1,x_2,x_3,x_4) = (-,-,x_3,x_4), $$
$$p_C(x_1,x_2,x_3,x_4) = (x_1,-,x_3,-), $$
$$p_D(x_1,x_2,x_3,x_4) = (-,x_2,-,x_4). $$
In order to show that $A=A_C \boxtimes A_D$, it suffices to prove that for $e={\tilde x_1,..., \tilde x_k } \in H$ holds
$$ p_A(e) \in A $$ if and only if
$$ p_1(e) \in A_C \text{ and either is } e \text{ an edge in }A_D \text{, hence } p_2(e) \subseteq e \in A_D, |e|=|p_2(e)| $$
$$\text{ or not and thus } |p_2(e)|=1 $$
(wlog. we assume that the edge of $A_C$ is of minimal rank, otherwise we could easily add a case to the above definition
where the edge of $A_D$ was the minimal one. But for the sake of clarity we omit this case).
Suppose that $ {p_A \tilde x_1,..., p_A \tilde x_k } \subseteq e \in A$. We can assume, wlog., that
$\tilde x_1, ... , \tilde x_k $ are chosen such that ${ \tilde x_1 ,... , \tilde x_k } \in E(H).$ But then
$ {p_1 \tilde x_1, ... , p_1 \tilde x_k } \in A_C $ and ${p_2 \tilde x_1, ... , p_2 \tilde x_k } \in A_D$
by the definition of $A_C$ and $A_D$. \
On the other hand, suppose that the edge
${ (x_1^1,-,-,-),(x_2^1,-,-,-),...,(x_k^1,-,-,-}$ is in $A_C$ and ${(_,x_1^2,-,-),...,(-,x_t^2,-,-)} $ is
in $A_D , t \leq t $. \
Then there are vertices $\tilde x_1, \tilde x_2, ... , \tilde x_k, ... , \tilde x_t$ of the form
$$ \tilde x_i = ( x_i^1, x_i^2, x_i^3, x_i^4) $$
with ${ \tilde x_1 , ... , \tilde x_k } \in E(H)$ and ${ \tilde x_1 , ... ,\tilde x_t } \in E(H)$. \
From this we infer that there are edges
$$ { (x_1^1,-,x_1^3,-),...,(x_s^1,-,x_s^3,-) } \in E(C) , k \leq s \leq t $$
$$ {(-,x_1^2,-,x_1^4),...,(-,x_r^2,-,x_r^4) } \in E(D), k \leq r \leq t $$
Since $H = C \boxtimes D$ this implies that
$$ {(x_1^1,x_1^2,x_1^3,x_1^4),...,(x_s^1,x_s^2,x_s^3,x_s^4) } \in E(H) \text{ where wlog. } s \leq r$$
and hence ${(x_1^1,x_1^2,-,-),...,(x_s^1,x_s^2,-,-) } \subseteq e \in E(A)$.
\end{proof}
\end{lem}
\end{document}
這不是困擾我的證據,因此沒有人需要為我檢查它;)。問題在於證明需要好幾頁,而 LaTeX 將其全部放在一頁上,這顯然有點不利。
因此,如果有人能告訴我如何調整環境以使內容跨頁面流動,我會很高興。
答案1
您看到的行為是由於該shadethm
包造成的,該包承認它無法處理分頁符
該shadethm
軟體包相當舊 - 好消息是,從那時起,功能極其強大且用戶友好mdframed
軟體包由 Marco Daniel 創建。
您可以使用它來創建真正美麗的框架環境,並且它可以處理分頁符號。接下來是完整的 MWE,您可以根據需要進行調整 - 有關更多詳細信息,請參閱文件。
\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{tikz}
\usepackage[framemethod=tikz]{mdframed}
\usepackage{lipsum}
\newmdtheoremenv[outerlinewidth=3,
innerlinewidth=2,linecolor=gray,
backgroundcolor=blue!20,%
innerlinecolor=blue!50,outerlinecolor=red!50,innertopmargin=0pt,%
splittopskip=\topskip,skipbelow=0pt,%
]{lem}{Lemma}[section]
\begin{document}
\begin{lem}
Let $H$ be a connected S-thin hypergraph, and $A \boxtimes B$ and $C \boxtimes D$ be two
decompositions of $H$ with respect to the strong product. Then there exists a decomposition
$$ A_C \boxtimes A_D \boxtimes B_C \boxtimes B_D $$
of $H$ such that $A = A_C \boxtimes A_D, B= B_C \boxtimes B_D , C= A_C \boxtimes B_C,
D=A_D \boxtimes B_D$.
\mbox{} % needed because you end your lemma with mathematical content
\begin{proof}
\lipsum
\end{proof}
\end{lem}
\end{document}
其他一些注意事項:
- 我注意到您正在使用
$$...$$
顯示的數學內容。這已經過時了,您應該使用\[...\]
,請參閱為什麼 \[ ... \] 優於 $$ ... $$?進行良好的討論。 - 我還注意到你們有很多連續顯示的數學環境。這也應該避免,並且您應該使用包中的環境之一
amsmath
,例如gather
Maybe.