Graphics, Figures & Tables ⇒ Section headers - graphic with rounded borders..
Section headers - graphic with rounded borders..
I've been thinking about doing a section header - or even some macro or easy package to create a formatting like the one shown in the figure:
Any ideas on how to specify an image then have it formatted this way? Without me having to open up a drawing program and customize it each time?
Many thanx,
Ben
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
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Section headers - graphic with rounded borders..
If so, you can define a simple macro that takes two arguments, one for the picture/graphic, one for the text. Have a look at the following (remember, you can click on open in writelatex to test the output):
Code: Select all
\documentclass{article}
\usepackage{xcolor}
\usepackage{mwe}
\newcommand{\goalfont}{\sffamily\large}
\newcommand{\goalcolor}{red}
\newcommand{\goal}[2]{\bigbreak\noindent
\llap{\raisebox{-.3\baselineskip}{\includegraphics[height=1.2\baselineskip]{#1}}}
{{\goalfont\color{\goalcolor}#2}}\par\medbreak}
\begin{document}
\goal{example-image-a}{To grow our academic reputation, we will:}
\blindtext
\goal{example-image-b}{To deliver an excellent personalized
student experience, we will:}
\blindtext
\end{document}
Well, this looks ugly, i know, but the basic functionality is there. How to make it more pleasing to the eye? You can use TikZ for it.
Unfortunately, my TikZ foo is too limited to be of any help here. The manual (it is juge, because tikz can do sooo many things) has a nice and easy to understand tutorial. This can be a good starting point for you.
You can find nice examples at TeXample, a partner site of ours.
- Stefan Kottwitz
- Site Admin
- Posts: 10324
- Joined: Mon Mar 10, 2008 9:44 pm
Re: Section headers - graphic with rounded borders..
this is not so difficult to do. I would do it in TikZ, and it would not cost me much time. I just did not read an answer of you to Johannes, so I don't know if you would look again into this topic. If not, it may be wasted time.

Let us know if you still need it, and it would be great if you would add here a small code example with content to start, so we have something where we can insert the new headings. Also, simple graphics for the pictograms would be good as attachments. The can be normal rectangular images, I can use TikZ to make them round like a circle. Otherwise I would take the CTAN lion or a photo of my dog.

Stefan