consider my header and first section
---
title: "asdf"
author: "asdf"
date: "13 Januar 2018"
documentclass: report
output:
bookdown::pdf_book:
citation_package: biblatex
latex_engine: pdflatex
number_sections: yes
fig_caption: yes
---
# Introduction
Here begins my introduction
I want to remove the automatic "Chapter 1" part, thats sits in front of the actual chapter title (in this case Introduction) This does not work
header-includes:
\renewcommand{\chaptername}{}
Also using another documentclass does not work, because I need the number of my sections/chapters be represented in the figure captions (e.g Figure 3.1) What I would like is to end up with a Title 1 Introduction , than 2 Methods and so on. Should not be to hard, but I can't figure it out. Thanks Greg
You can use
subparagraph: true
output:
bookdown::pdf_book:
includes:
in_header: preamble.tex
together with
\usepackage{titlesec}
\titleformat{\chapter}
{\normalfont\LARGE\bfseries}{\thechapter}{1em}{}
\titlespacing*{\chapter}{0pt}{3.5ex plus 1ex minus .2ex}{2.3ex plus .2ex}
in preamble.tex
(c.f. https://tex.stackexchange.com/questions/10326/how-to-set-the-chapter-style-in-report-class). You have to make sure that the LaTeX package titlesec
is installed in your TeX system.
At the time of writing subparagraph: true
was needed since the used pandoc LaTeX template redefined \paragraph
and \subparagraph
in a way interfering with titlesec
. This has changed since then. at least with rmarkdown
version 2.1 one no longer needs subparagraph: true
. thanks @MarkNeal for noticing this!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With