Hi,
How can I use an image on the same page as the part (\part{Test}) is?
lg
Page Layout ⇒ Image on Part Page
- localghost
- Site Moderator
- Posts: 9201
- Joined: Fri Feb 02, 2007 12:06 pm
Image on Part Page
A combination of the epigraph and titlesec package will do.
Thorsten
Code: Select all
\documentclass[11pt]{report}
\usepackage[T1]{fontenc}
\usepackage{titlesec}
\usepackage{epigraph}
\setlength{\epigraphwidth}{\textwidth}
\titleformat{\part}[display]
{\normalfont\huge\filcenter\bfseries\thispagestyle{epigraph}}
{\partname\ \thepart}
{20pt}
{\Huge}
\titlespacing*{\part}{0pt}{0pt}{40pt}
\begin{document}
\epigraphhead[200]{\hfil\rule{6.4cm}{3.6cm}\hfil} % replace \rule command with the image
\part{Foo}
\end{document}
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]
¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
Board Rules
Avoidable Mistakes[/size]
¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
Re: Image on Part Page
Ok, this works. But if I include the image, it appears on the part-page and on the tableofcontents-page.
And how can I assign the whole width of the page (= no margin) to the image?
And how can I assign the whole width of the page (= no margin) to the image?
- localghost
- Site Moderator
- Posts: 9201
- Joined: Fri Feb 02, 2007 12:06 pm
Image on Part Page
Forget the last example I provided. It is much easier without any package. Instead you can use the optional argument for the \part command to get a proper entry in the ToC.
For an external graphics file replace the \rule command with your image scaled to the paper width.
Code: Select all
\documentclass[11pt]{report}
\usepackage[T1]{fontenc}
\begin{document}
\tableofcontents
\part[Foo]{Foo\\[2ex]\makebox[0pt]{\rule{\paperwidth}{0.25\paperwidth}}}
\end{document}
Code: Select all
\includegraphics[width=\paperwidth]{filename}
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]
¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
Board Rules
Avoidable Mistakes[/size]
¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
Image on Part Page
hmmm... Is it possible like that http://kofler.info/uploads/pdf/userver2-sample.pdf, Page 15/19?