Environnement de liste grisée avec latex
Question
formulaire Cet atelier de latex , j'ai trouvé que je pouvais faire ce style de liste.
http://img441.imageshack.us/img441/2739/screenshot20100717AT112.png
En définissant un nouvel environnement.
\definecolor{mittelgrau}{gray}{0.85}% \lstdefinestyle{StyleCommand}{% style=StyleListingBasic, backgroundcolor=\color{mittelgrau}, prebreak=\mbox{\textbackslash{}}% } \lstnewenvironment{bevel}[1][1] {\lstset{style=StyleCommand,linewidth=#1\linewidth}} {}%
Exécution du code, je reçois ce message d'erreur.
ERROR: Package Listings Error: Couldn't load requested style.
Qu'est-ce qui pourrait être faux?
La solution
J'ai raté le \ lstDefintyle, et après une modification, je pourrais le faire fonctionner.
\documentclass{article} \usepackage{color} % Farben \usepackage{listings} % für Listings % Listingdefinitionen \lstdefinestyle{StyleListingBasic}{% basicstyle=\ttfamily, % Schriftstil frame=single, % einfacher Rahmen framesep=1pt, % Abstand des Rahmens framerule=0.8pt, % Linienstaerke des Rahmens rulecolor=\color{mittelgrau}, % Farbe der Rahmenlinie breaklines=true, % automatischen Umbruch aktivieren breakindent=0pt % Einrueckung nach Umbruch } \definecolor{mittelgrau}{gray}{0.85}% \lstdefinestyle{StyleCommand}{% style=StyleListingBasic, backgroundcolor=\color{mittelgrau}, prebreak=\mbox{\textbackslash{}}% } \lstnewenvironment{Befehl}[1][1] {\lstset{style=StyleCommand,linewidth=#1\linewidth}} {}% \begin{document} \begin{Befehl} ./robots-gui-helper \end{Befehl}% \end{document}
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow