Re: listings e commenti

#17669
DMW
    Up
    0
    Down
    ::


    Lorenzo,

    morecomment e more string non vanno usati in quel modo. Usa moredelim.

    Esempio:

    `
    \documentclass{article}
    \usepackage{listings}
    \usepackage[dvipsnames]{xcolor}

    \lstset{language=[LaTeX]Tex,%C++,
    keywordstyle=\color{RoyalBlue},%\bfseries,
    basicstyle=\small\ttfamily,
    %identifierstyle=\color{NavyBlue},
    commentstyle=\color{Green}\ttfamily,
    stringstyle=\rmfamily,
    numbers=none,%left,%
    numberstyle=\scriptsize,%\tiny
    stepnumber=5,
    numbersep=8pt,
    showstringspaces=false,
    breaklines=true,
    frameround=ftff,
    frame=single,
    moredelim={[is][\itshape]{/*}{*/}}
    %frame=L
    }
    \begin{document}
    \begin{lstlisting}
    \usepackage[/**/]{/*pacchetto*/}
    \end{lstlisting}
    \end{document}`

    Ciao

    Andrea

    Go to top