ops and thanks but where i put the code?!?! format, label, sep, before?
i'd want that near of the title, there are something
Text Formatting ⇒ titlestyle of chapter
- Stefan Kottwitz
- Site Admin
- Posts: 10290
- Joined: Mon Mar 10, 2008 9:44 pm
titlestyle of chapter
Try some places ... here for example in before:
Stefan
Code: Select all
Code, edit and compile here:
\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}
LaTeX.org admin
Re: titlestyle of chapter
depending by i want?!?!
the last question: the sep is the parameter for... what? is the space between "chapter .." and title? is right?!?
the last question: the sep is the parameter for... what? is the space between "chapter .." and title? is right?!?
- Stefan Kottwitz
- Site Admin
- Posts: 10290
- Joined: Mon Mar 10, 2008 9:44 pm
Re: titlestyle of chapter
Yes, it's the space between label ("Chapter X") and title, in case of framed title it's the space between frame and title (the frame contains "Chapter X").
Stefan
Stefan
LaTeX.org admin
Re: titlestyle of chapter
ok thanks for your patience
titlestyle of chapter
hi !!
i'm returned ...
in after i'd like put a image or line, but this code generate an error:
why?!?!
the error is this:
i'm returned ...
in after i'd like put a image or line, but this code generate an error:
Code: Select all
Code, edit and compile here:
\titleformat{\chapter}{\center}{\chaptername }{.5em}{}[\begin{figure}\includegraphics[scale=0.1]{lion}\end{figure}]
the error is this:
Code: Select all
Code, edit and compile here:
! 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]{lion}
- Stefan Kottwitz
- Site Admin
- Posts: 10290
- Joined: Mon Mar 10, 2008 9:44 pm
titlestyle of chapter
Hi Allevo,
there are two problems:
Stefan
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
Code, edit and compile here:
\titleformat{\chapter}{\center}{\chaptername }{.5em}{}[{\includegraphics[scale=0.1]{lion}}]
LaTeX.org admin