2

I wanted to remove the word chapter when I do \chapter{title} I added the command 1, but I do not have anymore the numbering, I added the command 2 but when I do \ chapter*{Intro} he puts me 0. Intro

Main.Rmd

---
documentclass: report
output:
  pdf_document:
    includes:
      in_header: preambule.tex
  word_document: default
subparagraph: yes
---

\tableofcontents

\chapter*{Intro}
\addcontentsline{toc}{chapter}{Intro}

\chapter{Title}

preambule.tex

\usepackage{titlesec}

%\titleformat{\chapter}[display]{\normalfont\bfseries}{}{0pt}{\Huge} **command 1**
\titleformat{\chapter}[display]{\normalfont\bfseries}{}{0pt}{\Huge\thechapter.\ } **command 2**

1 Answers1

4

Just put the instruction

\let\chaptername\relax

in the preamble. \renewcommand\chaptername{} works too.

A full MWE (minimum working example):

\documentclass{report}
\let\chaptername\relax
\begin{document}
\tableofcontents

\chapter*{Intro}
\addcontentsline{toc}{chapter}{Intro}
bla bla bla

\chapter{Title}
more bla bla bla
\end{document}
Mico
  • 506,678
  • 1
    Hello, i have this now: line 1: 1, line 2: title – problème0123 Nov 10 '17 at 13:56
  • 1
    @problème0123 - The first sentence in your query is, "I wanted to remove the word chapter". That's exactly what my answer achieves, isn't it? However, if removing the word "Chapter" is not what you wish to achieve, please clarify what the real objective is. – Mico Nov 10 '17 at 14:06