Domanda

Modulo Questo lattice-workshop , ho trovato che potrei fare questo stile di elenco.

http://img441.imageshack.us/img441/2739/screenshot20100717at112.png

Definendo un nuovo ambiente.

\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}} {}%
.

Esecuzione del codice, ottengo questo messaggio di errore.

ERROR: Package Listings Error: Couldn't load requested style.
.

Cosa potrebbe essere sbagliato?

È stato utile?

Soluzione

Ho perso il \ Lstdefinestyle, e dopo alcune modifiche, potrei farlo funzionare.

\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}
.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top