1

I want to change appearance of part and chapter titles in my report. I already found few examples here, but now I'm trying to combine them to get what I need. Let's start from what we have in Styling the \part page. I don't want full page just for part title, just to show it on top of the new page and after this to show chapter title. However, I would like to have part title as it is in example 14 on this page, that is to have "chapter 1" between lines. And yes, I would like to have a word "Chapter" although it comes from part command.

I tried to copy some parts from one example into another, but doesn't work. Will appreciate your help.

Effect I want to achieve, obtained by part command:

enter image description here

This is working example from accepted answer in mentioned question.

\documentclass{report}
\usepackage{lipsum}% for dummy text
\usepackage{titlesec}

\titleclass{\part}{top} % make part like a chapter
\titleformat{\part}
[display]
{\centering\normalfont\Huge\bfseries}
{\titlerule[5pt]\vspace{3pt}\titlerule[2pt]\vspace{3pt}\MakeUppercase{\partname} \thepart}
{0pt}
{\titlerule[2pt]\vspace{1pc}\huge\MakeUppercase}
%
\titlespacing*{\part}{0pt}{0pt}{20pt}
%
\titleclass{\chapter}{straight} % make chapter like a section (no newpage)
\titleformat{\chapter}
[display]
{\centering\normalfont\Huge\bfseries}
{\titlerule[5pt]\vspace{3pt}\titlerule[2pt]\vspace{3pt}\MakeUppercase{\chaptertitlename} \thechapter}
{0pt}
{\titlerule[2pt]\vspace{6pt}\huge\MakeUppercase}

\titlespacing*{\chapter}{0pt}{0pt}{40pt}



\begin{document}
\part{A part}
\chapter{A chapter}
\lipsum[1-2]
\end{document}
  • article does not provide chapters. – Johannes_B Feb 25 '17 at 13:50
  • @Johannes_B report*. My bad – Egan Wolf Feb 25 '17 at 14:03
  • Your reference to page 14 doesn't look like your example. Do you mean page 15? I think you should add a picture to your question. Do you really use report or scrreprt? – Marco Daniel Feb 25 '17 at 17:23
  • @MarcoDaniel I believe numbers of examples are at the top of example. However, I added a picture to question. I am using report, but maybe I messed up something in my question, as so far I was only basic LaTeX user. – Egan Wolf Feb 27 '17 at 7:36
5
+50

Ok, I tried some things and hope I got it right, but you will need to adjust it to your needs. It is basically a combination of the both examples you printed.

\makeatletter
\def\thickhrulefill{\leavevmode \leaders \hrule height .8ex \hfill \kern \z@}
\makeatother
\renewcommand{\partname}{Chapter}

\titleclass{\part}{top} % make part like a chapter
\titleformat{\part}
[display]
{\centering\normalfont\normalsize\bfseries}
{\thickhrulefill\hspace{.3cm}\MakeUppercase{\partname} \thepart\hspace{.3cm}\thickhrulefill\\*\titlerule[1pt]}
{-10pt}
{\huge\MakeUppercase}
[{\titlerule[2pt]}]
%
\titlespacing*{\part}{0pt}{0pt}{20pt}
%

Adjustments that are reasonable

  • The thickness of the first rule, defined in the \def part. I tried without this but failed, and you can probaly make it adjustable, but I guess there is no need. I copied this from your second example, by the way.
  • To get your wish with Chapter as part you will have to redefine \partname. I went for the simple method here, but be warned, in combination with babel this might be more complex. However, you probably know a (La)Tex help site which you can search for that.
  • {-10pt} as part of the \titelformat command. It defines the distance between the thin rule and the text "A PART". However, probably due to the \\* this is required to be negative, I found no way around this, but neither did I find a problem.
  • font sizes should be obvious, I tried to adjust to your example.

There are tons of stuff to change, but this is the basic construct.The result will be: enter image description here

  • Thanks a lot for your answer and all that detailed explanation! I'll implement it to my file and look how it's working. – Egan Wolf Mar 5 '17 at 9:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.