Generalincludegraphics in headlines ?

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
Smaren
Posts: 2
Joined: Wed Apr 02, 2008 11:39 am

includegraphics in headlines ?

Post by Smaren »

We are currently designing a programming language, and we have therefore made a nice little logo for it... This logo is a picture in pdf-format... It's easily included in the text, but when i comes to captions, sections, subsections, whatever the following error springs out!
TeX capacity exceeded, sorry [input stack size=5000]
Any ways of incorporating a figure in a section headline ?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

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

User avatar
Stefan Kottwitz
Site Admin
Posts: 10360
Joined: Mon Mar 10, 2008 9:44 pm

includegraphics in headlines ?

Post by Stefan Kottwitz »

Hi Smaren,

if you showed us the code producing this error we probably could provide better help.

In generall including graphics in section headline is possible. I reckon you want to show the logo inside the section headline in the document body, not in the table of contents. Therefore you may use the optional parameter of \section etc., for example:

Code: Select all

\section[Text]{Text\includegraphics{filename}}
Stefan
Smaren
Posts: 2
Joined: Wed Apr 02, 2008 11:39 am

Re: includegraphics in headlines ?

Post by Smaren »

Thanks dood!

It's working now... After all the trouble i went through all you had to do was insert [] after section...
Post Reply