我想克隆上面图片的节头样式。
但我不知道如何分别设置部分计数器和部分标题的样式。
主要挑战是:
- 柜台和标题必须分开并装箱。
- 标题框必须自动调整大小并且标题必须右对齐。
- 仅在节头中将节计数器显示为大写字母(在其他情况下必须是阿拉伯数字)。
- 如果标题有多行形式,则章节计数器必须固定在北方。
我的 MWE 在这里,但没有成功。
\documentclass{memoir}
\usepackage{xcolor}
\usepackage{multicol,enumitem}
%\usepackage{tabularray}
\usepackage{etoolbox,refcount}
\usepackage[most]{tcolorbox}
\usepackage{amsmath,amssymb}
\setstocksize{297mm}{210mm}\settrimmedsize{\stockheight}{\stockwidth}{*}
\setmarginnotes{6mm}{0mm}{0mm} %4.454mm %43.554mm %28.4 18.4 4.9
\setulmarginsandblock{35.28mm}{30mm}{*}
\setlrmarginsandblock{30mm}{30mm}{*}
\setheadfoot{20mm}{10mm}
\checkandfixthelayout
\newcommand{\wht}{\color{white}}
\newcommand{\cbcyan}{\colorbox{cyan}}
\setsecheadstyle{\huge\bfseries\sffamily\protect\cbcyan}
\renewcommand\thesection{\protect\cbcyan{\bfseries\protect\wht\Alph{section}}}
\setsechook{\setsecnumformat{\:\:\csname the##1\endcsname\:\:}}
\begin{document}
\section{DIFFERENTIAL EQUATIONS}
\begin{center}
\colorbox{cyan!15!white}{A \textbf{differential equation} is an equation involving a \textit{derivative} of a function.}
\end{center}
Suppose $y$ is a function of $x$, so $y=y(x)$. Examples of differential equations for this function are:
\section{EULER'S METHOD FOR NUMERICAL INTEGRATION}
In the book \textit{Institutionum calculi integralis}, \textbf{Leonhard Euler} (1707 - 1783) described a method which allows us to numerically approximate the solution curve to a differential equation where $\frac{d y}{d x}=f(x, y)$ with particular solution $\left(x_{0}, y_{0}\right)$.
\end{document}