I wanna include a bash script in a black box in a pdf using latex. I achieved everything I want, except bold commands in the script using the following code:

\documentclass[11pt,a4paper,DIV=15]{scrartcl} \usepackage[ngerman]{babel} 




pdflatex  $1
echo Anstatt  dieses  Skriptes  haettest  Du  pdflatex
echo auch  einfach  direkt  aufrufen  koennen  ...


I dont get why listing automatically writes my comments italic, but doesnt recognize echo as an command. As commands should be written bold when using language=bash.


Simply add \usepackage{lmodern}and get bold "echo". It will be a little bit hard to discover because of the background in lightgray.


IF you remove basicstyle=\ttfamily then you should be set, it looks like setting typewriter style for strings is removing the bold formatting for key words.

Removing that gives me this. enter image description here