Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Can I insert a graphic in-line in a sentence?

Use case: I'm writing a manual that involves navigating the Windows Start Menu. I would like to insert a little graphic of the start menu in-line in the text. I am aware of a sparklines package that does something similar, but have not been able to distill that to a simple example.

Is there a macro or command that can help with this?

In addition (and I hope this is a valid part of the question, but am happy to post it as a new question) I would like a shortcut or command to display the Windows Start Menu plus n steps of navigation, so I could write the following:

Some paragraph and then \WinMenu{Start}{Programs}{Foo}{Bar}{Baz.exe} and then more text.


Lorem ipsum \WinMenu{Programs,Foo,Bar,Baz.exe} and then more text.

or something similar, and the result in the PDF will be stylized somehow, with the little Start Menu box icon (shown as "GRAPHIC" below), and then, for example, in bold or \tttext fonts, GRAPHIC > Foo > Bar > Baz.exe as part of and embedded in the existing sentence.

share|improve this question

4 Answers 4

Here is one way to do it. I took the liberty to add some formatting, but feel free to change it as you wish:


\StartMenu %
\foreach \x in {#1} {%
    $\boldsymbol{\textcolor{\WineMenuColor}{>}}$ \texttt{\textcolor{\WineMenuColor}{\x}}%

Lorem ipsum \WinMenu{Programs,Foo,Bar,Baz.exe} and then more text.

enter image description here

share|improve this answer
Thanks. This is a good solution. I will post my version (based off an earlier version of yours) for reference. –  mankoff Sep 19 '11 at 14:49
Isn't it possible to define image size based on font size, just like in HTML? –  Tomáš Zato May 13 at 15:24
@TomášZato: I am not that familiar with HTML and think you should post separate question. –  Peter Grill May 13 at 19:02

Based on the selected answer by @Peter I implemented it like so. Please excuse (or edit!) formatting errors below:

   \foreach \x in {#1} {%

It looks better to have the word "Start" be in the same font as the rest of the text. I am also lazy and do not want to type "Start,Programs" each time, so they are hard coded. Use case is: Also, \WinMenu{Foo,Bar,Baz} and some text and result is:

Sample showing WinMenu command

The vertical alignment of the icon is off by a tiny bit, but it is good enough for my purposes.

share|improve this answer

Not really a solution: use \includegrapchis and play a bit with the picture size. But you have to do it for each font size.

Concerning menu: http://ctan.org/tex-archive/macros/latex/contrib/menu

Menu.sty define a command \menu{Programm!!Menu1!Command} and expand it to something like Programm=>Menu1->Command. You can use it for documentations of programs.

If you solved your main question (inline Micro-graphics) you may combine it with menu.sty.

share|improve this answer
up vote 1 down vote accepted

I just came across the menukeys package. It seems to be designed for this specific use case. Usage examples are also shown on the LaTeX Matters blog.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.