Re: Codice colorato

#75787
Up
0
Down
::


Potreste gentilmente un esempio 🙂

nel preambolo ho messo questo:

`

%%%%%%%%% Listati%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{listings}
\lstset{language= sql,%
basicstyle=\footnotesize\ttfamily,
breaklines=true,
captionpos=b,
commentstyle=
\footnotesize\ttfamily
}
\renewcommand{\lstlistlistingname}{Lista dei Sorgenti}
\renewcommand{\lstlistingname}{Listato}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

`

e ogni listato è circa cosi:

`

\begin{lstlisting}
CREATE TABLE ANNO
(
IDANNO INTEGER NOT NULL,
ANNOI INTEGER NULL,
ANNOF INTEGER NULL
)
/
CREATE UNIQUE INDEX XPKANNO ON ANNO
(
IDANNO ASC
)
/
ALTER TABLE ANNO
ADD CONSTRAINT XPKANNO PRIMARY KEY (IDANNO)
/
ALTER TABLE ANNO
ADD CONSTRAINT CK_ANNO UNIQUE (ANNOI, ANNOF)
/
\end{lstlisting}

`

Ora se io volessi che le parole CREATE, UNIQUE, INDEX, etc vengano blu e i numeri rossi cosa dovrei fare?

So che dovrei leggermi semplicemente la documentazione del pacchetto ma non ho tempo perché sono indietro e stretto con i tempi, per questo vi chiedo questa cortesia.

Grazie 1000000000

Go to top