阴影框的水平空间

阴影框的水平空间

当我在搜索有关阴影环境的一些答案时,我在网上找到了一些有趣的代码,我稍加修改就可以满足我的需求。下面是我举的小例子

\documentclass{amsart}
\scrollmode
\newtheorem{theorem}{Theorem}[section]
\newtheorem{definition}[theorem]{Definition}
\usepackage{xcolor}
\usepackage{framed}
\setlength{\OuterFrameSep}{0pt}
\begin{document}
\title{Test File}

\begin{abstract}
In this paper I test shaded environment.
\end{abstract}
\maketitle

\newenvironment{Shaded}{%
\def\FrameCommand{\fboxsep0pt \colorbox{shadecolor}}%
  \MakeFramed {\FrameRestore}}%
 {\endMakeFramed}

\newenvironment{framedPage}[1][\hsize]
{\MakeFramed{\hsize#1\advance\hsize-\width \FrameRestore}}%
{\endMakeFramed}

\newenvironment{shadedPage}[1][\hsize]
{
\def\FrameCommand{\fboxsep0pt \colorbox{shadecolor}}%
\MakeFramed{\hsize#1\advance\hsize-\width \FrameRestore}}%
{\endMakeFramed}

\begin{framedPage}[.5\textwidth]
\setlength{\parindent}{4mm}
To prove the theorem
it is sufficient to show that
at least one transformation of left-side representation is defined for any two bases
and this transformation is unique.

Homomorphism $a$ operating on basis $e$ has form
\[
e'_i=e_i* a
\]
where $e'$ is coordinate matrix of vector $e'_i$
relative basis $h$ and
$e$ is coordinate matrix of vector
$e_i$ relative basis $h$.
Therefore, coordinate matrix of image of basis equal to
produc.
Since the theorem,
matrices $g$ and $e$ are nonsingular. Therefore, matrix
is the matrix of automorphism mapping basis $e$
to basis $e'$.

Suppose elements $g_1$, $g_2$ of group $G$ and basis $e$ satisfy equation
\[
e* g_1=e* g_2
\]
Since theorems,
we get $g_1=g_2$.
This proves statement of theorem.
\end{framedPage}


\begin{framedPage}[.5\textwidth]
\setlength{\parindent}{4mm}
To prove the theorem
it is sufficient to show that
at least one transformation of left-side representation is defined for any two bases
and this transformation is unique.

Homomorphism $a$ operating on basis $e$ has form
\[
e'_i=e_i* a
\]
where $e'$ is coordinate matrix of vector $e'_i$
relative basis $h$ and
$e$ is coordinate matrix of vector
$e_i$ relative basis $h$.
Therefore, coordinate matrix of image of basis equal to
produc.
Since the theorem,
matrices $g$ and $e$ are nonsingular. Therefore, matrix
is the matrix of automorphism mapping basis $e$
to basis $e'$.

Suppose elements $g_1$, $g_2$ of group $G$ and basis $e$ satisfy equation
\[
e* g_1=e* g_2
\]
Since theorems,
we get $g_1=g_2$.
This proves statement of theorem.
\end{framedPage}

\definecolor{shadecolor}{rgb}{.94,.94,.95}%
\begin{shadedPage}[.5\textwidth]
\setlength{\parindent}{4mm}
To prove the theorem
it is sufficient to show that
at least one transformation of left-side representation is defined for any two bases
and this transformation is unique.

Homomorphism $a$ operating on basis $e$ has form
\[
e'_i=e_i* a
\]
where $e'$ is coordinate matrix of vector $e'_i$
relative basis $h$ and
$e$ is coordinate matrix of vector
$e_i$ relative basis $h$.
Therefore, coordinate matrix of image of basis equal to
produc.
Since the theorem,
matrices $g$ and $e$ are nonsingular. Therefore, matrix
is the matrix of automorphism mapping basis $e$
to basis $e'$.

Suppose elements $g_1$, $g_2$ of group $G$ and basis $e$ satisfy equation
\[
e* g_1=e* g_2
\]
Since theorems,
we get $g_1=g_2$.
This proves statement of theorem.
\end{shadedPage}


\definecolor{shadecolor}{rgb}{.94,.94,.95}%
\begin{shadedPage}[.5\textwidth]
\setlength{\parindent}{4mm}
To prove the theorem
it is sufficient to show that
at least one transformation of left-side representation is defined for any two bases
and this transformation is unique.

Homomorphism $a$ operating on basis $e$ has form
\[
e'_i=e_i* a
\]
where $e'$ is coordinate matrix of vector $e'_i$
relative basis $h$ and
$e$ is coordinate matrix of vector
$e_i$ relative basis $h$.
Therefore, coordinate matrix of image of basis equal to
produc.
Since the theorem,
matrices $g$ and $e$ are nonsingular. Therefore, matrix
is the matrix of automorphism mapping basis $e$
to basis $e'$.

Suppose elements $g_1$, $g_2$ of group $G$ and basis $e$ satisfy equation
\[
e* g_1=e* g_2
\]
Since theorems,
we get $g_1=g_2$.
This proves statement of theorem.
\end{shadedPage}


\end{document}

我原本以为两个阴影环境会分开页面,并像表格一样一个挨着一个地打印。但是如果你翻译代码,你会看到它们出现在行的中间,一个接一个。当我尝试使用表格或矩阵环境时,代码崩溃了,我无法完成编译

答案1

平行列的替代解决方案可能是使用paracol包。您可以定义列数,每次需要更改列插入\switchcolumn命令时,这些列会从一页流到下一页,而这在 中是不可能的minipage

在下面的代码中,我还更改了framed包,tcolorbox以便可以声明可破坏的盒子。

\documentclass{amsart}
\usepackage[most]{tcolorbox}
\usepackage{paracol}

\definecolor{shadecolor}{rgb}{.94,.94,.95}%

\newtcolorbox{framedPage}[1][]{%
    enhanced, breakable, sharp corners, colback=white, size=fbox, notitle,#1
}

\newtcolorbox{shadedPage}[1][]{%
    enhanced, breakable, sharp corners, colback=shadecolor, size=tight, boxrule=0pt, notitle,#1
}

\begin{document}
\title{Test File}

\begin{abstract}
In this paper I test shaded environment.
\end{abstract}
\maketitle

\begin{framedPage}[width=.5\textwidth, center]
\setlength{\parindent}{4mm}
To prove the theorem
it is sufficient to show that
at least one transformation of left-side representation is defined for any two bases
and this transformation is unique.

Homomorphism $a$ operating on basis $e$ has form
\[
e'_i=e_i* a
\]
where $e'$ is coordinate matrix of vector $e'_i$
relative basis $h$ and
$e$ is coordinate matrix of vector
$e_i$ relative basis $h$.
Therefore, coordinate matrix of image of basis equal to
produc.
Since the theorem,
matrices $g$ and $e$ are nonsingular. Therefore, matrix
is the matrix of automorphism mapping basis $e$
to basis $e'$.

Suppose elements $g_1$, $g_2$ of group $G$ and basis $e$ satisfy equation
\[
e* g_1=e* g_2
\]
Since theorems,
we get $g_1=g_2$.
This proves statement of theorem.
\end{framedPage}

\begin{framedPage}[width=.5\textwidth, center]
\setlength{\parindent}{4mm}
To prove the theorem
it is sufficient to show that
at least one transformation of left-side representation is defined for any two bases
and this transformation is unique.

Homomorphism $a$ operating on basis $e$ has form
\[
e'_i=e_i* a
\]
where $e'$ is coordinate matrix of vector $e'_i$
relative basis $h$ and
$e$ is coordinate matrix of vector
$e_i$ relative basis $h$.
Therefore, coordinate matrix of image of basis equal to
produc.
Since the theorem,
matrices $g$ and $e$ are nonsingular. Therefore, matrix
is the matrix of automorphism mapping basis $e$
to basis $e'$.

Suppose elements $g_1$, $g_2$ of group $G$ and basis $e$ satisfy equation
\[
e* g_1=e* g_2
\]
Since theorems,
we get $g_1=g_2$.
This proves statement of theorem.
\end{framedPage}

\begin{paracol}{2}
\begin{shadedPage}
\setlength{\parindent}{4mm}
To prove the theorem
it is sufficient to show that
at least one transformation of left-side representation is defined for any two bases
and this transformation is unique.

Homomorphism $a$ operating on basis $e$ has form
\[
e'_i=e_i* a
\]
where $e'$ is coordinate matrix of vector $e'_i$
relative basis $h$ and
$e$ is coordinate matrix of vector
$e_i$ relative basis $h$.
Therefore, coordinate matrix of image of basis equal to
produc.
Since the theorem,
matrices $g$ and $e$ are nonsingular. Therefore, matrix
is the matrix of automorphism mapping basis $e$
to basis $e'$.

Suppose elements $g_1$, $g_2$ of group $G$ and basis $e$ satisfy equation
\[
e* g_1=e* g_2
\]
Since theorems,
we get $g_1=g_2$.
This proves statement of theorem.
\end{shadedPage}
\switchcolumn
\begin{shadedPage}
\setlength{\parindent}{4mm}
To prove the theorem
it is sufficient to show that
at least one transformation of left-side representation is defined for any two bases
and this transformation is unique.

Homomorphism $a$ operating on basis $e$ has form
\[
e'_i=e_i* a
\]
where $e'$ is coordinate matrix of vector $e'_i$
relative basis $h$ and
$e$ is coordinate matrix of vector
$e_i$ relative basis $h$.
Therefore, coordinate matrix of image of basis equal to
produc.
Since the theorem,
matrices $g$ and $e$ are nonsingular. Therefore, matrix
is the matrix of automorphism mapping basis $e$
to basis $e'$.

Suppose elements $g_1$, $g_2$ of group $G$ and basis $e$ satisfy equation
\[
e* g_1=e* g_2
\]
Since theorems,
we get $g_1=g_2$.
This proves statement of theorem.
\end{shadedPage}
\end{paracol}

\end{document}

在此处输入图片描述

答案2

使用 minipages:\begin{minipage}{0.5\textwidth} .....\end{minipage}封闭每个阴影环境。

A

这是代码。标出了%<<<<<更改或添加的行。

\documentclass{amsart}
\scrollmode
\newtheorem{theorem}{Theorem}[section]
\newtheorem{definition}[theorem]{Definition}
\usepackage{xcolor}
\usepackage{framed}
\setlength{\OuterFrameSep}{0pt}
\begin{document}
\title{Test File}

\begin{abstract}
In this paper I test shaded environment.
\end{abstract}
\maketitle

\newenvironment{Shaded}{%
\def\FrameCommand{\fboxsep0pt \colorbox{shadecolor}}%
  \MakeFramed {\FrameRestore}}%
 {\endMakeFramed}

\newenvironment{framedPage}[1][\hsize]
{\MakeFramed{\hsize#1\advance\hsize-\width \FrameRestore}}%
{\endMakeFramed}

\newenvironment{shadedPage}[1][\hsize]
{
\def\FrameCommand{\fboxsep0pt \colorbox{shadecolor}}%
\MakeFramed{\hsize#1\advance\hsize-\width \FrameRestore}}%
{\endMakeFramed}

\begin{framedPage}[.5\textwidth]
    \setlength{\parindent}{4mm}
    To prove the theorem
    it is sufficient to show that
    at least one transformation of left-side representation is defined for any two bases
    and this transformation is unique.
    
    Homomorphism $a$ operating on basis $e$ has form
    \[
    e'_i=e_i* a
    \]
    where $e'$ is coordinate matrix of vector $e'_i$
    relative basis $h$ and
    $e$ is coordinate matrix of vector
    $e_i$ relative basis $h$.
    Therefore, coordinate matrix of image of basis equal to
    produc.
    Since the theorem,
    matrices $g$ and $e$ are nonsingular. Therefore, matrix
    is the matrix of automorphism mapping basis $e$
    to basis $e'$.
    
    Suppose elements $g_1$, $g_2$ of group $G$ and basis $e$ satisfy equation
    \[
    e* g_1=e* g_2
    \]
    Since theorems,
    we get $g_1=g_2$.
    This proves statement of theorem.
\end{framedPage}


\begin{framedPage}[.5\textwidth]
    \setlength{\parindent}{4mm}
    To prove the theorem
    it is sufficient to show that
    at least one transformation of left-side representation is defined for any two bases
    and this transformation is unique.
    
    Homomorphism $a$ operating on basis $e$ has form
    \[
    e'_i=e_i* a
    \]
    where $e'$ is coordinate matrix of vector $e'_i$
    relative basis $h$ and
    $e$ is coordinate matrix of vector
    $e_i$ relative basis $h$.
    Therefore, coordinate matrix of image of basis equal to
    produc.
    Since the theorem,
    matrices $g$ and $e$ are nonsingular. Therefore, matrix
    is the matrix of automorphism mapping basis $e$
    to basis $e'$.
    
    Suppose elements $g_1$, $g_2$ of group $G$ and basis $e$ satisfy equation
    \[
    e* g_1=e* g_2
    \]
    Since theorems,
    we get $g_1=g_2$.
    This proves statement of theorem.
\end{framedPage}

\bigskip

\begin{minipage}{0.5\textwidth} %<<<<  added
\definecolor{shadecolor}{rgb}{.94,.94,.95}%
    \begin{shadedPage} % [.5\textwidth] changed <<<<<<
        \setlength{\parindent}{4mm}
        To prove the theorem
        it is sufficient to show that
        at least one transformation of left-side representation is defined for any two bases
        and this transformation is unique.
        
        Homomorphism $a$ operating on basis $e$ has form
        \[
        e'_i=e_i* a
        \]
        where $e'$ is coordinate matrix of vector $e'_i$
        relative basis $h$ and
        $e$ is coordinate matrix of vector
        $e_i$ relative basis $h$.
        Therefore, coordinate matrix of image of basis equal to
        produc.
        Since the theorem,
        matrices $g$ and $e$ are nonsingular. Therefore, matrix
        is the matrix of automorphism mapping basis $e$
        to basis $e'$.
        
        Suppose elements $g_1$, $g_2$ of group $G$ and basis $e$ satisfy equation
        \[
        e* g_1=e* g_2
        \]
        Since theorems,
        we get $g_1=g_2$.
        This proves statement of theorem.
    \end{shadedPage}
\end{minipage} 
\hfill
\begin{minipage}{0.5\textwidth}%<<<<  added
    \definecolor{shadecolor}{rgb}{.94,.94,.95}%
    \begin{shadedPage} % [.5\textwidth] changed <<<<<<
        \setlength{\parindent}{4mm}
        To prove the theorem
        it is sufficient to show that
        at least one transformation of left-side representation is defined for any two bases
        and this transformation is unique.
        
        Homomorphism $a$ operating on basis $e$ has form
        \[
        e'_i=e_i* a
        \]
        where $e'$ is coordinate matrix of vector $e'_i$
        relative basis $h$ and
        $e$ is coordinate matrix of vector
        $e_i$ relative basis $h$.
        Therefore, coordinate matrix of image of basis equal to
        produc.
        Since the theorem,
        matrices $g$ and $e$ are nonsingular. Therefore, matrix
        is the matrix of automorphism mapping basis $e$
        to basis $e'$.
        
        Suppose elements $g_1$, $g_2$ of group $G$ and basis $e$ satisfy equation
        \[
        e* g_1=e* g_2
        \]
        Since theorems,
        we get $g_1=g_2$.
        This proves statement of theorem.
    \end{shadedPage}
\end{minipage}

\end{document}

使用\begin{minipage}{0.46\textwidth}将在阴影列之间创建间隙,以获得更好的外观。

b

答案3

使用paracol包时,有一个事件给我带来了疑问。有时它会无缘无故地在输出中创建空行。以下是示例代码

\documentclass{amsart}
\scrollmode
\newtheorem{theorem}{Theorem}[section]
\newtheorem{definition}[theorem]{Definition}
\usepackage{xcolor}
\usepackage{framed}
\usepackage{paracol}
\begin{document}
\title{Test File}

\begin{abstract}
In this paper I test shaded environment.
\end{abstract}
\maketitle

\newenvironment{Shaded}{%
\def\FrameCommand{\fboxsep3pt \colorbox{shadecolor}}%
  \MakeFramed {\FrameRestore}}%
 {\endMakeFramed}

\newenvironment{framedPage}[1][\hsize]
{\MakeFramed{\hsize#1\advance\hsize-\width \FrameRestore}}%
{\endMakeFramed}

\newenvironment{shadedPage}[1][\hsize]
{
\def\FrameCommand{\colorbox{shadecolor}}%
\MakeFramed{ \FrameRestore}}%
{\endMakeFramed}

\setlength{\columnseprule}{0.5pt}

\begin{paracol}{2}
According to the theorem
the product of automorphisms $a$ and $b$
has matrix $a*b$.
Therefore, automorphisms of left $A$-vector space of columns form
a right-side linear
GL-representation.
According to the theorem
the product of automorphisms $a$ and $b$
has matrix $a*b$.
Therefore, automorphisms of left $A$-vector space of columns form
a right-side linear
GL-representation.
According to the theorem
the product of automorphisms $a$ and $b$
has matrix $a*b$.
Therefore, automorphisms of left $A$-vector space of rows form
a right-side linear
GL-representation.
According to the theorem
the product of automorphisms $a$ and $b$
has matrix $a*b$.
Therefore, automorphisms of left $A$-vector space of columns form
a right-side linear
GL-representation.
According to the theorem
the product of automorphisms $a$ and $b$
has matrix $a*b$.
Therefore, automorphisms of left $A$-vector space of rows form
a right-side linear
GL-representation.
According to the theorem
the product of automorphisms $a$ and $b$
has matrix $a*b$.
Therefore, automorphisms of left $A$-vector space of columns form
a right-side linear
representation.
According to the theorem
the product of automorphisms $a$ and $b$
has matrix $a*b$.
Therefore, automorphisms of left $A$-vector space of rows form
a right-side linear
GL-representation.
According to the theorem
the product of automorphisms $a$ and $b$
has matrix $a*b$.
Therefore, automorphisms of left $A$-vector space of columns form
a right-side linear
representation.
Therefore, automorphisms of left $A$-vector space of columns form
a right-side linear
representation.
Therefore, automorphisms of left 

It remains to  prove that
the kernel of inefficiency consists only of identity.
Identity transformation
satisfies to equation
\[
v^i=v^ja_i^j
\]
Choosing values of coordinates as
$v^i=\delta^i_k$
where we selected $k$ we get
\begin{equation}
\label{identity col}
\delta^i_k=\delta^j_ka^i_j
\end{equation}
From \eqref{identity col} it follows
\[
\delta^i_k=a^i_k
\]
Since $k$ is arbitrary, we get the conclusion $a=\delta$.
\switchcolumn%
According to the theorem
the product of automorphisms $a$ and $b$
has matrix $a*b$.
Therefore, automorphisms of left $A$-vector space of rows form
a right-side linear
GL-representation.
According to the theorem
the product of automorphisms $a$ and $b$
has matrix $a*b$.
Therefore, automorphisms of left $A$-vector space of columns form
a right-side linear
GL-representation.
According to the theorem
the product of automorphisms $a$ and $b$
has matrix $a*b$.
Therefore, automorphisms of left $A$-vector space of rows form
a right-side linear
GL-representation.
According to the theorem
the product of automorphisms $a$ and $b$
has matrix $a*b$.
Therefore, automorphisms of left $A$-vector space of columns form
a right-side linear
representation.
According to the theorem
the product of automorphisms $a$ and $b$
has matrix $a*b$.
Therefore, automorphisms of left $A$-vector space of rows form
a right-side linear
GL-representation.
According to the theorem
the product of automorphisms $a$ and $b$
has matrix $a*b$.
Therefore, automorphisms of left $A$-vector space of columns form
a right-side linear
representation.
Therefore, automorphisms of left $A$-vector space of rows form
a right-side linear
GL-representation.
According to the theorem
the product of automorphisms $a$ and $b$
has matrix $a*b$.
Therefore, automorphisms of left $A$-vector space of columns form
a right-side linear
representation.
Therefore, automorphisms of left $A$-vector space of columns form
a right-side linear
representation.
Therefore, automorphisms of left 
Therefore, automorphisms of left $A$-vector space of columns form
a right-side linear
representation.
Therefore, automorphisms of left 

It remains to  prove that
the kernel of inefficiency consists only of identity.
Identity transformation
satisfies to equation
\[
v_i=v_ja^j_i
\]
Choosing values of coordinates as
$v_i=\delta^k_i$
where we selected $k$ we get
\begin{equation}
\label{identity row}
\delta^k_i=\delta^k_ja^j_i
\end{equation}
From \eqref{identity row} it follows
\[
\delta^k_i=a^k_i
\]
Since $k$ is arbitrary, we get the conclusion $a=\delta$.
\end{paracol}


\end{document}

相关内容