我想列出许多反应,并且我创建了一个环境(我发现这很好,但如果你有更好的想法......不要犹豫^^)
\newsavebox{\mybox}
\newenvironment{reactions}
{\begin{lrbox}{\mybox}
\newcommand{\reaction}[2]{ \item [- ##1] : ##2 }
\begin{minipage}{\linewidth - 2\fboxsep - 2\fboxrule}
\begin{enumdescript}}
{\end{enumdescript}
\end{minipage}
\end{lrbox}\fbox{\usebox{\mybox}}}
enumdescript 是枚举和描述环境(见下文)
感谢那些通过帮助别人而帮助过我的人,我想投票支持答案,但我的声誉不够......
但是我有很多反应。太多了,一个小页面是不够的。我知道我可以创建第二个反应环境,但这不切实际,而且第二个数字会从一开始。
\begin{reactions}
first reactions
\end{reactions}
\begin{reactions}
last reactions
\end{reactions}
但我想知道是否可以自动完成此操作......
谢谢
西尔
PS1:抱歉,如有错误,请随时纠正我
PS2:如果您需要的话,这里有带有虚假反应的完整代码。
\documentclass[a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{multirow}
\usepackage{pdfpages}
\usepackage{array}
\usepackage{longtable}
\usepackage{enumitem}
%Liste enumerate et description
\newcounter{descriptcount}
\newlist{enumdescript}{description}{2}
\setlist[enumdescript,1]{%
before={\setcounter{descriptcount}{0}%
\renewcommand*\thedescriptcount{\arabic{descriptcount}}}
,font=\bfseries\stepcounter{descriptcount}\thedescriptcount~
}
\setlist[enumdescript,2]{%
before={\setcounter{descriptcount}{0}%
\renewcommand*\thedescriptcount{\roman{descriptcount}}}
,font=\bfseries\stepcounter{descriptcount}\thedescriptcount~
}
%Fleches rev irrev
\newcommand\irrev{\(\rightarrow \ \)}
\newcommand\rev{\(\leftrightarrow \ \)}
%Environnement reactions
\newsavebox{\mybox}
\newenvironment{reactions}
{\begin{lrbox}{\mybox}
\newcommand{\reaction}[2]{ \item [- ##1] : ##2 }
\begin{minipage}{\linewidth - 2\fboxsep - 2\fboxrule}
\begin{enumdescript}}
{\end{enumdescript}
\end{minipage}
\end{lrbox}\fbox{\usebox{\mybox}}}
\begin{document}
\section{Les réactions}
\begin{reactions}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\end{reactions}
\end{document}
答案1
使用breakable
tcolorbox
你可以做到:
\documentclass[a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{multirow}
\usepackage{pdfpages}
\usepackage{array}
\usepackage{longtable}
\usepackage{enumitem}
\usepackage[most]{tcolorbox}
%Liste enumerate et description
\newcounter{descriptcount}
\newlist{enumdescript}{description}{2}
\setlist[enumdescript,1]{%
before={\setcounter{descriptcount}{0}%
\renewcommand*\thedescriptcount{\arabic{descriptcount}}}
,font=\bfseries\stepcounter{descriptcount}\thedescriptcount~
}
\setlist[enumdescript,2]{%
before={\setcounter{descriptcount}{0}%
\renewcommand*\thedescriptcount{\roman{descriptcount}}}
,font=\bfseries\stepcounter{descriptcount}\thedescriptcount~
}
%Fleches rev irrev
\newcommand\irrev{\(\rightarrow \ \)}
\newcommand\rev{\(\leftrightarrow \ \)}
%Environnement reactions
%\newsavebox{\mybox}
%\newenvironment{reactions}
%{\begin{lrbox}{\mybox}
%\begin{minipage}{\linewidth - 2\fboxsep - 2\fboxrule}
%\begin{enumdescript}}
%{\end{enumdescript}
%\end{minipage}
%\end{lrbox}\fbox{\usebox{\mybox}}}
\newtcolorbox{reactions}{breakable,
colback=white, sharp corners,
before upper={\begin{enumdescript}},
after upper={\end{enumdescript}}}
\newcommand{\reaction}[2]{ \item [- #1] : #2 }
\begin{document}
\section{Les réactions}
\begin{reactions}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\reaction{name}{A + B + C + D + E \irrev F + G + H + I + J}
\end{reactions}
\end{document}