将页面拆分为两个相互独立的内容

将页面拆分为两个相互独立的内容

我想比较两门考试,因此我尝试将页面分成两个相互独立的内容,以显示 2014 年考试与 2015 年考试之间的差异。为此,我编写了以下代码,但我可以做得更进一步,如能得到任何帮助我将不胜感激。

\documentclass{article}


\usepackage{amsmath,amsfonts,amssymb}
\usepackage[svgnames]{xcolor}
\usepackage[most]{tcolorbox}

\usepackage[left=1cm,right=2cm,top=2.5cm,bottom=2.5cm,footnotesep=0.5cm]{geometry}

\tcbset{
    lemmastyle/.style={enhanced, colback=white, colframe=blue!20, arc=0pt, 
                       fonttitle=\bfseries, description color=Maroon,  
                       colbacktitle=white, coltitle=DarkOliveGreen,    
                       top=\tcboxedtitleheight,
                       boxed title style={arc=0pt},
                       attach boxed title to top left={yshift=-\tcboxedtitleheight/3, 
                                                                                                            xshift=-2mm}%
                      },
}

\newtcbtheorem{myLemma1}{Exercise}{lemmastyle}{thm}


\tcbset{
    lemmastyle/.style={enhanced, colback=white, colframe=blue!20, arc=0pt, 
                       fonttitle=\bfseries, description color=Maroon,  
                       colbacktitle=white, coltitle=DarkOliveGreen,    
                       top=\tcboxedtitleheight,
                       boxed title style={arc=0pt},
                       attach boxed title to top left={yshift=-\tcboxedtitleheight/3, 
                                                                                                            xshift=-2mm}%
                      },
}

\newtcbtheorem{myLemma2}{Exercise}{lemmastyle}{thm}

\usepackage{pifont}
\usepackage{fancybox}

\begin{document}
\begin{center}
\shadowbox{
\begin{minipage}{0.5\textwidth}
\begin{description}
\item[The differences between 2014 Exam VS 2015  :] 
\end{description}
\end{minipage}%
}
\end{center}

\begin{minipage}{0.5\textwidth}
\begin{description}
\item[Exam 1:] 
\end{description}
\begin{myLemma1}{}{}
\end{myLemma1}
\begin{myLemma1}{}{}
\end{myLemma1}
\begin{myLemma1}{}{}
\end{myLemma1}
\begin{myLemma1}{}{}
\end{myLemma1}
\begin{myLemma1}{}{}
\end{myLemma1}
\begin{myLemma1}{}{}
\end{myLemma1}
\begin{myLemma1}{}{}
\end{myLemma1}
\begin{myLemma1}{}{}
\end{myLemma1}
\end{minipage}%
\hfill
\hfill
\begin{minipage}{0.5\textwidth}
\begin{description}
\item[Exam 2:] 
\end{description}
\begin{myLemma2}{}{}
\end{myLemma2}
\begin{myLemma2}{}{}
\end{myLemma2}
\begin{myLemma2}{}{}
\end{myLemma2}
\begin{myLemma2}{}{}
\end{myLemma2}
\begin{myLemma2}{}{}
\end{myLemma2}
\begin{myLemma2}{}{}
\end{myLemma2}
\begin{myLemma2}{}{}
\end{myLemma2}
\begin{myLemma2}{}{}
\end{myLemma2}
\end{minipage}%
\end{document}

在此处输入图片描述

答案1

该请求看上去适合tcbraster-的功能tcolorbox

请查看tcolorbox文档以了解更多配置选项。

\documentclass{article}


\usepackage{amsmath,amsfonts,amssymb}
\usepackage[svgnames]{xcolor}
\usepackage[most]{tcolorbox}

\usepackage[left=1cm,right=2cm,top=2.5cm,bottom=2.5cm,footnotesep=0.5cm]{geometry}

\tcbset{
    lemmastyle/.style={enhanced, colback=white, colframe=blue!20, arc=0pt, 
                       fonttitle=\bfseries, description color=Maroon,  
                       colbacktitle=white, coltitle=DarkOliveGreen,    
                       top=\tcboxedtitleheight,
                       boxed title style={arc=0pt},
                       attach boxed title to top left={yshift=-\tcboxedtitleheight/3, 
                                                                                                            xshift=-2mm}%
                      },
}

\newtcbtheorem{myLemma1}{Exercise}{lemmastyle}{thm}


\tcbset{
    lemmastyle/.style={enhanced, colback=white, colframe=blue!20, arc=0pt, 
                       fonttitle=\bfseries, description color=Maroon,  
                       colbacktitle=white, coltitle=DarkOliveGreen,    
                       top=\tcboxedtitleheight,
                       boxed title style={arc=0pt},
                       attach boxed title to top left={yshift=-\tcboxedtitleheight/3, 
                                                                                                            xshift=-2mm}%
                      },
}

\newtcbtheorem{myLemma2}{Exercise}{lemmastyle}{thm}

\usepackage{pifont}

\begin{document}

\begin{tcolorbox}[before={\begin{center}},after={\end{center}},width=0.5\textwidth,enhanced jigsaw,drop shadow,halign=center,valign=center,colback=white!40!yellow,sharp corners]
The differences between 2014 Exam VS 2015 
\end{tcolorbox}

\begin{tcbraster}[raster columns=2,raster equal height=rows,raster valign=top,raster column skip=5mm]

\begin{myLemma1}{}{}
Foo
\end{myLemma1}
\begin{myLemma2}{}{}
\end{myLemma2}
\begin{myLemma1}{}{}
\end{myLemma1}
\begin{myLemma2}{}{}
\end{myLemma2}
\begin{myLemma1}{}{}
\end{myLemma1}
\begin{myLemma2}{}{}
\end{myLemma2}
\begin{myLemma1}{}{}
\end{myLemma1}
\begin{myLemma2}{}{}
\end{myLemma2}
\begin{myLemma1}{}{}
\end{myLemma1}
\begin{myLemma2}{}{}
\end{myLemma2}
\begin{myLemma1}{}{}
\end{myLemma1}
\begin{myLemma2}{}{}
\end{myLemma2}
\begin{myLemma1}{}{}
\end{myLemma1}
\begin{myLemma2}{}{}
\end{myLemma2}
\begin{myLemma1}{}{}
\end{myLemma1}
\begin{myLemma2}{}{}
\end{myLemma2}
\begin{myLemma1}{}{}
\end{myLemma1}
\begin{myLemma2}{}{}
\end{myLemma2}
\begin{myLemma1}{}{}
\end{myLemma1}
\begin{myLemma2}{}{}
\end{myLemma2}
\begin{myLemma1}{}{}
\end{myLemma1}
\begin{myLemma2}{}{}
\end{myLemma2}
\begin{myLemma1}{}{}
\end{myLemma1}
\begin{myLemma2}{}{}
\end{myLemma2}
\begin{myLemma1}{}{}
\end{myLemma1}
\begin{myLemma2}{}{}
\end{myLemma2}
\begin{myLemma1}{}{}
\end{myLemma1}
\begin{myLemma2}{}{}
\end{myLemma2}
\begin{myLemma1}{}{}
\end{myLemma1}
\begin{myLemma2}{}{}
\end{myLemma2}
\begin{myLemma1}{}{}
\end{myLemma1}
\begin{myLemma2}{}{}
\end{myLemma2}
\begin{myLemma1}{}{}
\end{myLemma1}
\begin{myLemma2}{}{}
\end{myLemma2}
\begin{myLemma1}{}{}
\end{myLemma1}
\begin{myLemma2}{}{}
\end{myLemma2}

\end{tcbraster}

\end{document}

在此处输入图片描述

相关内容