![我如何获得本章节的页面样式?](https://linux22.com/image/446129/%E6%88%91%E5%A6%82%E4%BD%95%E8%8E%B7%E5%BE%97%E6%9C%AC%E7%AB%A0%E8%8A%82%E7%9A%84%E9%A1%B5%E9%9D%A2%E6%A0%B7%E5%BC%8F%EF%BC%9F.png)
答案1
我向您推荐这个最小的工作示例。
\documentclass{report}
\usepackage[Bjornstrup]{fncychap}
\usepackage{algpseudocode}
\usepackage{algorithm}
\makeatletter \renewcommand\thealgorithm{\thechapter.\arabic{algorithm}} \@addtoreset{algorithm}{chapter} \makeatother
\begin{document}
\chapter{Sonny}
\begin{algorithm}
\caption{Pseudocode}\label{alg:cap}
\begin{algorithmic}
\State $i \gets 10$
\If{$i\geq 5$}
\State $i \gets i-1$
\Else
\If{$i\leq 3$}
\State $i \gets i+2$
\EndIf
\EndIf
\end{algorithmic}
\end{algorithm}
\end{document}
答案2
以下是使用和的可能解决方案xcolor
:titlesec
array
\documentclass{book}
\setcounter{chapter}{1}
\usepackage{graphicx}
\usepackage[svgnames]{xcolor}
\usepackage{titlesec}
\titleformat{\chapter}[display]{\filleft\huge\bfseries}{\selectfont\color{FireBrick}\scalebox{4}{\thechapter}}{1em}{}
\begin{document}
\chapter{Dataset}
\end{document}