Text Formatting ⇒ titlestyle of chapter
Re: titlestyle of chapter
i'd want that near of the title, there are something
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- Stefan Kottwitz
- Site Admin
- Posts: 10348
- Joined: Mon Mar 10, 2008 9:44 pm
titlestyle of chapter
Code: Select all
\documentclass[a4paper,10pt]{book}
\usepackage{titlesec}
\usepackage[demo]{graphicx}
\titleformat{\chapter}[frame]{\normalfont\huge\bfseries}
{\chaptertitlename\ \thechapter}{20pt}{\Huge\includegraphics{test}}
\begin{document}
\chapter{Test}
\end{document}
Re: titlestyle of chapter
the last question: the sep is the parameter for... what? is the space between "chapter .." and title? is right?!?
- Stefan Kottwitz
- Site Admin
- Posts: 10348
- Joined: Mon Mar 10, 2008 9:44 pm
Re: titlestyle of chapter
Stefan
Re: titlestyle of chapter
titlestyle of chapter
i'm returned ...
in after i'd like put a image or line, but this code generate an error:
Code: Select all
\titleformat
{\chapter}
{\center}
{\chaptername }
{.5em}
{}
[\begin{figure}
\includegraphics[scale=0.1]{lion}
\end{figure}]
the error is this:
Code: Select all
! LaTeX Error: Missing \begin{document}.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.20 \includegraphics[scale=0.1]{l
ion}
- Stefan Kottwitz
- Site Admin
- Posts: 10348
- Joined: Mon Mar 10, 2008 9:44 pm
titlestyle of chapter
there are two problems:
- don't use the figure environment, this is intended for floating/moveable graphics, it's not needed here,
- the brackets [] of the optional scaling parameter are causing a problem here, because they cannot be nested inside other brackets. You can protect them by additional braces {} around the complete command.
Code: Select all
\titleformat
{\chapter}
{\center}
{\chaptername }
{.5em}
{}
[{\includegraphics[scale=0.1]{lion}}]