如何让part和chapter在同一页?

2019-09-26 21:24发布

如何让`\chapter`紧跟`\part`(不分页) MWE如下: ```tex \documentclass[openany]{book} \usepackage{lipsum} \begin{d...

如何让`\chapter`紧跟`\part`(不分页) MWE如下: ```tex \documentclass[openany]{book} \usepackage{lipsum} \begin{document} \part{The first part} \chapter{The first chapter} \lipsum[1] \end{document} ```
2条回答
```tex \documentclass[openany]{book} \usepackage{titlesec} \titleclass{\part}{top} \titleformat{\part}[display]{\normalfont\huge\bfseries}{\centering\partname\ \thepart}{20pt}{\Huge\centering} \titlespacing*{\part}{0pt}{50pt}{40pt} \titleclass{\chapter}{straight} \titleformat{\chapter}[display] {\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter}{20pt}{\Huge} \titlespacing*{\chapter} {0pt}{50pt}{40pt} \usepackage{lipsum} \begin{document} \part{The first part} \chapter{The first chapter} \lipsum[1] \end{document} ``` 见 [tex.stackexchange.com](https://tex.stackexchange.com/questions/42526/how-to-remove-page-break-after-part-in-report-book)

一周热门 更多>

相关问答