2

Using \documentclass[titlepage, 12pt]{report}

by default when adding new chapter/part, what I get is:

PART 1

MyPARTName

I would like to get something like:

1. MyPARTName

I managed to remove PART text, but I am unable to remove newline there and for this I am using titlesec package. My code is following:

How can I remove ending newline after part number.

\documentclass[titlepage, 12pt]{report}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{titletoc}

\usepackage{titlesec}
\titleclass{\part}{top}

\titleformat{\part}[display]
{\normalfont\huge\bfseries}{\thepart.}{0pt}{\Huge}
\titlespacing*{\part} {0pt}{20pt}{40pt}

\renewcommand{\thepart}{\arabic{part}}

\title{Test title}

\begin{document}
\maketitle 
\part{Intro}
 asdf
\end{document}
1
  • 2
    Please provide a complete minimum working example (MWE), including the \documentclass, etc. Commented Dec 30, 2016 at 18:17

1 Answer 1

4

Use the block style of titlesec and redefine \thepart:

\documentclass[tiitlepage, 12pt]{report}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lipsum}

 \usepackage{titlesec}
 \renewcommand\thepart{\arabic{part}}
\titleclass{\part}{top}
\titleformat{\part}[block]
{\normalfont\Huge\bfseries}{\thepart.}{0.5em}{}
\titlespacing*{\part} {0pt}{20pt}{40pt}

\begin{document}

 \part{Introduction}
 \lipsum

\end{document} 

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .