答案1
第一个版本
\documentclass{memoir}
\usepackage{xcolor}
% chapter style %%%%%%%%%%%%%%%%
\renewcommand{\printchaptername}{}
\renewcommand{\printchapternum}{%
\makebox[0pt][l]{\chapnumfont \thechapter}%
\textcolor{gray}{\rule[7mm]{1.5cm}{4mm}}%
\hspace{-1.5cm}%
\rule[-3mm]{1.5cm}{2mm}%
}
\renewcommand{\afterchapternum}{}
\renewcommand{\chapnumfont}{\chaptitlefont}
\renewcommand{\chaptitlefont}{\normalfont\Huge\sffamily\bfseries}
% section style %%%%%%%%%%%
\setsecheadstyle{
\textcolor{gray}{\rule[4mm]{1.75cm}{2mm}}%
\hspace{-1.75cm}%
\rule[-2mm]{1.75cm}{1mm}%
\hspace{-1.75cm}%
\normalfont\Large\sffamily\bfseries
}
\begin{document}
\chapter{Noise in oscillators}
\section{Introduction}
\end{document}
第二版
\documentclass{memoir}
\usepackage{xcolor}
% chapter style %%%%%%%%%%%%%%%%
\renewcommand{\printchaptername}{}
\renewcommand{\printchapternum}{}
\renewcommand{\afterchapternum}{}
\renewcommand{\chapnumfont}{\chaptitlefont}
\renewcommand{\chaptitlefont}{\hfill\normalfont\Huge\sffamily\bfseries}
\renewcommand{\afterchaptertitle}{%
\makebox[0pt][l]{\chapnumfont \thechapter}%
\textcolor{gray}{\rule[7mm]{1.5cm}{4mm}}%
\hspace{-1.5cm}%
\rule[-3mm]{1.5cm}{2mm}
\par\nobreak\vskip \afterchapskip
}
% section style %%%%%%%%%%%
\setsecheadstyle{
\textcolor{gray}{\rule[4mm]{1.75cm}{2mm}}%
\hspace{-1.75cm}%
\rule[-2mm]{1.75cm}{1mm}%
\hspace{-1.75cm}%
\normalfont\Large\sffamily\bfseries
}
\begin{document}
\chapter{Noise in oscillators}
\section{Introduction}
\end{document}