I'm trying to custom my part style, how could I customize it like below picture?
Asked
Active
Viewed 1,532 times
0
-
What is the graphic part? Some barcode? – Bernard Aug 25 '15 at 14:47
-
First, figure out how to generate the desired page (I would use tikz). Second, figure out how to get \part to use your format. Basically this means replacing @part (see base.sty), or at least parts of it. There is also @spart which probably handles \part*. – John Kormylo Aug 26 '15 at 02:33
1 Answers
1
Here an approach with report class, as mentioned by @JohnKormylo the better is replacing \@part but i expect the code below enough in your case.
The command \topleft indicate the distance of vertical lines from left edge of paper you can change it as you like.
\documentclass{report}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{lipsum}
\makeatletter
\@addtoreset{chapter}{part}
\makeatother
\renewcommand{\thepart}{\arabic{part}}
\def\topleft{4}
\newcommand{\cpart}[1]{
\clearpage
\stepcounter{part}
\pagestyle{empty}
\begin{tikzpicture}[overlay,remember picture]
\coordinate(ptopleft) at ($(current page.north west)+(\topleft,0)$);
\foreach \i in{0,.1,.2,.3,.5,.6,.9,1.1,1.2,1.3,1.5,1.6,1.8,1.9,2}
\draw[gray!70]($(ptopleft)+(\i,0)$)--+(0,-\paperheight);
\node[white,fill=black,minimum size=1.5cm](A) at ($(ptopleft)+(1,-2)$){\huge\thepart};
\node [anchor=south,ultra thick,yshift=-1mm]at(A.north){\Large PART};
\node [fill=white,anchor=north,very thick,right=-2mm,inner sep=5mm]at($(ptopleft)+(0,-0.5\paperheight)$){\Huge #1};
\end{tikzpicture}
\addcontentsline{toc}{part}{\thepart\hspace{1em}#1}
\clearpage
\pagestyle{plain}
}
\begin{document}
\pagestyle{empty}
\tableofcontents
\thispagestyle{empty}
\cpart{Part title title title}
\chapter{chapter one}
\lipsum[1-3]
\chapter{chapter two}
\lipsum[1-3]
\end{document}
Salim Bou
- 17,021
- 2
- 31
- 76
-
Thank you! Very nice! Is it possible to include the design with \titleformat{\part}[display]? – lom Aug 27 '15 at 09:23
