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

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10335
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