I want to do a box like this
but the bold text doesn't appear.
Edited:
\documentclass{article}
\usepackage{listings,xcolor,etoolbox,lmodern}
\definecolor{verbgray}{gray}{0.9}
\newcommand*\prompt{}% empty default
\lstnewenvironment{sh}{%
% redefine bash prompt:
\def\prompt{user@linux:\textasciitilde\$\space}%
\lstset{backgroundcolor=\color{verbgray},
frame=single,
framerule=1pt,
basicstyle=\ttfamily,
columns=fullflexible,
escapechar=@
}%
}{}
\begin{document}
\begin{sh}
@\prompt\space\textbf{date}@
Thu Oct 25 13:51:54 EDT 2007
\end{sh}
\end{document}
Best Answer
Here's a slightly modified version of what you wrote:
You need fonts which will allow bold when creating
ttfamily
. Hence the loading of