我需要我的文档看起来像下面的屏幕截图中的那样:
现在,我的看起来像是向右移动了。我正在使用书籍类。
梅威瑟:
\documentclass[a4paper,oneside]{book}
\usepackage{graphics}
\usepackage{geometry}
\geometry{hmargin={3cm, 6cm}}
\usepackage{xcolor}
\usepackage[pagestyles, explicit]{titlesec}
\titleformat{\chapter}[display]
{\normalfont\Large\raggedleft}
{\MakeUppercase{\chaptertitlename}%
\rlap{ \resizebox{!}{1.5cm}{\thechapter} \rule{5cm}{1.5cm}}}
{10pt}{\Huge#1}
\titleformat{name = \chapter, numberless}[block]
{\normalfont\Large\filleft}
{\MakeUppercase{\chaptertitle}
}%
{10pt}{\Huge#1\rlap{\hskip0.5em\color{lightgray!50!}\rule[-0.5cm]{6cm}{1.5cm}}}
\titlespacing*{\chapter}{0pt}{30pt}{20pt}
\usepackage{lipsum}
\begin{document}
\tableofcontents
\chapter*{Introduction}
\setcounter{chapter}{2}
\chapter{Implementation}
\lipsum[1-10]
\end{document}