我希望有一个替代这个练习环境的迷你页面设计的程序。我最近了解到迷你页面是无法跨越页面边界的。作为 TeX/LaTeX 编程系统的新手,我发现掌握它的内部结构有点困难。因此,我将不胜感激任何帮助 - 我查看了几个软件包,例如,adjustwidth 和 tcolorbox,但收效甚微。
我希望得到的最终结果是一种算法,可以帮助我的练习环境跨越页面边界。我还要说的是,我对这个小组和网站还很陌生,所以我不知道积分系统是如何运作的。这是一个 MWE
\documentclass{book}
\usepackage{enumitem,environ,calc}
\usepackage{amsmath,amsthm,amssymb,bm}
%\usepackage{showframe}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Redefining Section Command
%%------------------------------------------------------------------------------
\makeatletter
\renewcommand\section{\@startsection
{section}% %% name
{1}% %% level
{0pt}% %% no indent from left margin
{-1\baselineskip minus\parskip}% %% beforeskip
{0.4\baselineskip}% %% afterskip
{\normalfont\normalsize\bfseries\raggedright}}% %% style
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Redefining Subsection Command
%%-----------------------------------------------------------------------------
\renewcommand\subsection{\@startsection
{subsection}%
{2}%
{0pt}%
{-\baselineskip}%
{0.2\baselineskip}%
{\normalfont\normalsize\bfseries\raggedright}}%
\makeatother
%%==============================================================================
\theoremstyle{plain}
\newtheorem{exer}{Exercise}[section]
\numberwithin{exer}{chapter}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% following command definitions are used in the new exercise environments
%%------------------------------------------------------------------------------
\newcommand{\exername}{}
\newcommand{\sbast}{\ensuremath{^{\bm{\ast}}\mkern-1.1mu}}
\newcommand{\nbast}{\ensuremath{\phantom{\sbast}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% new theoremstyle for Exercises: asterisked/starred exercise) theoremstyle
%%-----------------------------------------------------------------------------
\newtheoremstyle{starredexercises} %% Name
{5pt plus1pt minus1pt} %% Space above (or before) the environment
{5pt plus1pt minus1pt} %% Space below (or after) the environment
{\normalfont} %% Style Body font
%{\normalfont\small} %% Style Body font
{0pt} %% Indentation of 1st Line of body text
{\normalfont} %% Style Head font
{} %% Head Punctuation after head Style
{0pt} %% Horizontal space after Head Style
{\sbast\thmnumber{#2.}~\thmname{#1}\thmnote{~{\normalfont(#3)}}}%% Custom Theorem Head SPEC
%%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\theoremstyle{starredexercises}
\newtheorem{sqfexercises}[exer]{\protect\exername}
%%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%%------------------------------------------------------------------------------
\environfinalcode{\ignorespacesafterend}
\NewEnviron{sexercise}[1][]%
{%
\begin{sqfexercises}
\hfill\begin{minipage}[t]{\dimexpr\textwidth-0.1\textwidth}%
\BODY%
\end{minipage}
\end{sqfexercises}
}
%%------------------------------------------------------------------------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% new theoremstyle for Exercises: (unstarred exercise) theoremstyle
%%------------------------------------------------------------------------------
\makeatletter
\newtheoremstyle{nostarexercises}
{5pt plus1pt minus1pt}
{5pt plus1pt minus1pt}
{\normalfont}
{0pt}
{\normalfont}
{}
{0pt}
{\nbast\thmnumber{#2.}~\thmname{#1}\thmnote{~{\normalfont(#3)}}}%% Custom Theorem Head SPEC
\makeatother
%%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\theoremstyle{nostarexercises}
\newtheorem{nexercises}[exer]{\protect\exername}
%%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%%------------------------------------------------------------------------------
\environfinalcode{\ignorespacesafterend}
\NewEnviron{nexercise}[1][]%
{%
\begin{nexercises}
\hfill\begin{minipage}[t]{\dimexpr\textwidth-0.1\textwidth}%
\BODY%
\end{minipage}
\end{nexercises}
}
%%==============================================================================
\newcommand*{\fmap}[1]{\ensuremath{#1\colon}}
\newcommand*{\zvert}[1]{\ensuremath{\mathrm{Vert}{(#1)}}}
\setcounter{chapter}{11}
%%==============================================================================
\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapter{Complexes}
%%------------------------------------------------------------------------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection*{\normalfont\scshape{Exercises}}\label{exer:SimplicialComplexes}
%%------------------------------------------------------------------------------
\begin{sexercise}
Define a relation $R$ on $\zvert{K}$ by $vRw$ if there exists an edge path in $K$ from $v$ to $w$.
\begin{enumerate}[leftmargin=*,label=(\roman*),widest=iii,font=\normalfont,topsep=0pt,partopsep=0pt]
\item\label{12SimComExer37i} Show that $R$ is an equivalence relation on $\zvert{K}$.
\item\label{12SimComExer37ii} For each $x\in \zvert{K}$, define the \textbf{component} of $K$ containing $x$ as the family of all simplexes $s\in K$ with $\zvert{s}$ contained in the $R$-equivalence class of $x$. Show that each component of $K$ is a connected subcomplex and that $K$ is their disjoint union.
\item\label{12SimComExer37iii} If $x\in \zvert{K}$ and $L$ is the component of $K$ containing $x$, then
\[
\pi(K,x) \cong \pi(L,x).
\]
\end{enumerate}
\label{12SimComExer37}
\end{sexercise}
%-------------------------------------------------------------------------------
\begin{nexercise}
Define a relation $R$ on $\zvert{K}$ by $vRw$ if there exists an edge path in $K$ from $v$ to $w$.
\begin{enumerate}[leftmargin=*,label=(\roman*),widest=iii,font=\normalfont,topsep=0pt,partopsep=0pt]
\item\label{12SimComExer38i} Show that $R$ is an equivalence relation on $\zvert{K}$.
\item\label{12SimComExer38ii} For each $x\in \zvert{K}$, define the \textbf{component} of $K$ containing $x$ as the family of all simplexes $s\in K$ with $\zvert{s}$ contained in the $R$-equivalence class of $x$. Show that each component of $K$ is a connected subcomplex and that $K$ is their disjoint union.
\item\label{12SimComExer38iii} If $x\in \zvert{K}$ and $L$ is the component of $K$ containing $x$, then
\[
\pi(K,x) \cong \pi(L,x).
\]
\end{enumerate}
\label{12SimComExer38}
\end{nexercise}
%-------------------------------------------------------------------------------
\end{document}
答案1
这是对所发布问题的一个可能的解决方案;非常感谢 David 的建议和建议。
\documentclass{amsbook}
\usepackage{enumitem,environ,calc}
\usepackage{amsmath,amsthm,amssymb,bm}
%\usepackage{layout}
%\usepackage{showframe}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Redefining Section Command
%%------------------------------------------------------------------------------
\makeatletter
\renewcommand\section{\@startsection
{section}% %% name
{1}% %% level
{0pt}% %% no indent from left margin
{-1\baselineskip minus\parskip}% %% beforeskip
{0.4\baselineskip}% %% afterskip
{\normalfont\normalsize\bfseries\raggedright}}% %% style
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Redefining Subsection Command
%%-----------------------------------------------------------------------------
\renewcommand\subsection{\@startsection
{subsection}%
{2}%
{0pt}%
{-\baselineskip}%
{0.2\baselineskip}%
{\normalfont\normalsize\bfseries\raggedright}}%
\makeatother
%%==============================================================================
\theoremstyle{plain}
\newtheorem{exer}{Exercise}[section]
\numberwithin{exer}{chapter}
%%==============================================================================
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% the following command definitions are used in the new exercise styles!
%%-----------------------------------------------------------------------------
\newsavebox{\nbox}
\newcommand{\sbast}{\ensuremath{^{\ast}\mkern-1.5mu}}
\sbox\nbox{$\sbast$}
\newcommand{\nbast}{\ensuremath{\hspace{\the\wd\nbox}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Non-starred Exercise environment nexercise
%%------------------------------------------------------------------------------
\environfinalcode{\ignorespacesafterend}
\NewEnviron{nexercise}[1][]%
{%%-----------------------------------------------------------------------------
\ignorespaces
%------------------------------------------------------------------------------
\begin{nExercises}
\nexercize{\BODY}%
\end{nExercises}
\par%
}
%%------------------------------------------------------------------------------
\newlist{nExercises}{enumerate}{2}%
%%----- list style parameters -----
\setlist[nExercises]{%
label=\nbast\theexer., % Label: Chapter.exercise number.
align=left, % Left align labels
leftmargin=0.10\textwidth, % Space between margin of list and following lines
labelwidth=*, % Auto computation of width of label
topsep=4pt plus0pt minus1pt, % Vertical space between preceding text and 1st item
itemsep=0pt, % Vertical space between pairs of items
before=\normalfont % changing font before start of enumeration
% before=\normalfont\small % changing font before start of enumeration
}
%-------------------------------------------------------------------------------
\newcommand{\nexercize}{%
\refstepcounter{exer} % Add 1 to exercise counter
\item\label{nlbl:\theexer.\arabic{nExercisesi}}% % Append label to item
%--------------------------------------------------
\setlist[enumerate, 1]{%
leftmargin=*,
label=(\roman*),
itemsep=0pt,
topsep=0pt
}% % Label for subexercises, but only within an exercise
}
%%==============================================================================
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Starred Exercise environment
%%------------------------------------------------------------------------------
\environfinalcode{\ignorespacesafterend}
\NewEnviron{sexercise}[1][]%
{%%-----------------------------------------------------------------------------
\ignorespaces
%-------------------------------------------------------------------------------
\begin{sExercises}
\sexercize{\BODY}%
\end{sExercises}
\par%
}
%%------------------------------------------------------------------------------
\newlist{sExercises}{enumerate}{2}%
%%----- list style parameters -----
\setlist[sExercises]{%
label=\sbast\theexer., % Label: Exercise Chapter.exercise
align=left, % Left align labels
leftmargin=0.10\textwidth, % Distance from Left edge of environ to left edge of list text
labelwidth=*, % Auto computation of width of label
topsep=4pt plus0pt minus1pt, % Vertical space between preceding text and 1st item
itemsep=0pt, % Vertical space between pairs of items
before=\normalfont % Changing font size before start of enumeration
}
%-------------------------------------------------------------------------------
\newcommand{\sexercize}{%
\refstepcounter{exer} % Add 1 to exercise counter
\item\label{slbl:\theexer.\arabic{sExercisesi}}% % Append label to item
%--------------------------------------------------
\setlist[enumerate, 1]{%
leftmargin=*,
label=(\roman*),
itemsep=0pt,
topsep=0pt
}% % Label for subexercises, but only within an exercise
}
%%==============================================================================
\newcommand*{\fmap}[1]{\ensuremath{#1\colon}}
\newcommand{\bast}{\ensuremath{\bm{\ast}}}
\newcommand*{\zvert}[1]{\ensuremath{\mathrm{Vert}{(#1)}}}
\setcounter{chapter}{11}
%%==============================================================================
\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapter{Complexes}
%%------------------------------------------------------------------------------
%\layout
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection*{\normalfont\scshape{Exercises}}\label{exer:SimplicialComplexes}
%%------------------------------------------------------------------------------
\begin{nexercise}
Define a relation $R$ on $\zvert{K}$ by $vRw$ if there exists an edge path in $K$ from $v$ to $w$.
\begin{enumerate}[align=left,leftmargin=*,label=(\roman*),widest=iii,font=\normalfont,topsep=0pt,nosep]
\item\label{12SimComExer37i} Show that $R$ is an equivalence relation on $\zvert{K}$.
\item\label{12SimComExer37ii} For each $x\in \zvert{K}$, define the \textbf{component} of $K$ containing $x$ as the family of all simplexes $s\in K$ with $\zvert{s}$ contained in the $R$-equivalence class of $x$. Show that each component of $K$ is a connected subcomplex and that $K$ is their disjoint union.
\item\label{12SimComExer37iii} If $x\in \zvert{K}$ and $L$ is the component of $K$ containing $x$, then
\[
\pi(K,x) \cong \pi(L,x).
\]
\end{enumerate}
\label{12SimComExer37}
\end{nexercise}
%------------------------------------------------------------------------------
\addtocounter{exer}{21}
%-------------------------------------------------------------------------------
\begin{sexercise}
Consider the set $[X,A]$, wher $A$ is a fixed space. Show that a continuous map $\fmap{f}X\to Y$ gives rise to a function $\fmap{f_{\bast}}[X,A]\to [Y,A]$ with the following properties.
\begin{enumerate}[align=left,leftmargin=*,label=(\roman*),widest=iii,font=\normalfont,topsep=0pt,nosep]
\item\label{12SimComExer39i} If $f\simeq g$, then $f_{\bast}=g_{\bast}$.
\item\label{12SimComExer39ii} If $\fmap{1}X\to X$ is the identity map, then $1_{\bast}$ is the identity function.
\item\label{12SimComExer39iii} If $\fmap{g}Y\to Z$ is another continuous map, then $(qf)_{\bast}=g_{\bast}f_{\bast}$.
\end{enumerate}
Deduce that if $X\simeq Y$ there is a $(1-1)$-correspondence between the sets $[X,A]$ and $[Y,A]$.\par
What are the corresponding results for the sets $[X,A]$, for a fixed space $A$?
\label{12SimComExer39}
\end{sexercise}
%-------------------------------------------------------------------------------
\end{document}