Skip to content
Snippets Groups Projects
Verified Commit 3639eb0a authored by GARION Christophe's avatar GARION Christophe
Browse files

[my-listings] add commands for ADT and algo inline

parent 1cbeb515
Branches main
No related tags found
No related merge requests found
%% personal config for listings %% personal config for listings
%% C. Garion, 2012-2017 %% C. Garion, 2012-2025
%% %%
\NeedsTeXFormat{LaTeX2e}[1995/12/01] \NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{my-listings}[2022/09/15 v1.0 \ProvidesPackage{my-listings}[2022/09/15 v1.0
...@@ -85,12 +85,17 @@ ...@@ -85,12 +85,17 @@
mathescape=true mathescape=true
} }
\newcommand{\salgo}[1]{\lstinline[language=algo]{#1}}
\lstdefinelanguage{ADT}{ \lstdefinelanguage{ADT}{
morekeywords={sorts, operations, equations, preconditions},, morekeywords={sorts, operations, equations, preconditions},,
identifierstyle=\color{black}, identifierstyle=\color{black},
mathescape=true mathescape=true
} }
\newcommand{\sadt}[1]{\lstinline[style=ADT,identifierstyle=\color{gray!70!black}]{#1}}
\newcommand{\sadtt}[1]{\lstinline[style=ADT,identifierstyle=\color{white}]{#1}}
\lstdefinelanguage{PrologInt}{ \lstdefinelanguage{PrologInt}{
morekeywords={Redo, Call, Fatal, Error, error, ERROR, yes, no, true, false}, morekeywords={Redo, Call, Fatal, Error, error, ERROR, yes, no, true, false},
keywordstyle=\color{black}\bfseries, keywordstyle=\color{black}\bfseries,
...@@ -278,4 +283,4 @@ ...@@ -278,4 +283,4 @@
\fi \fi
\makeatother \makeatother
\endinput \endinput
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment