From 3639eb0a0409b2e5eedbf544d29c6601b30d139c Mon Sep 17 00:00:00 2001 From: Christophe Garion <christophe.garion@isae-supaero.fr> Date: Thu, 12 Jun 2025 09:11:07 +0200 Subject: [PATCH] [my-listings] add commands for ADT and algo inline --- my-listings.sty | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/my-listings.sty b/my-listings.sty index 58156e5..de0b66c 100644 --- a/my-listings.sty +++ b/my-listings.sty @@ -1,5 +1,5 @@ %% personal config for listings -%% C. Garion, 2012-2017 +%% C. Garion, 2012-2025 %% \NeedsTeXFormat{LaTeX2e}[1995/12/01] \ProvidesPackage{my-listings}[2022/09/15 v1.0 @@ -85,12 +85,17 @@ mathescape=true } +\newcommand{\salgo}[1]{\lstinline[language=algo]{#1}} + \lstdefinelanguage{ADT}{ morekeywords={sorts, operations, equations, preconditions},, identifierstyle=\color{black}, 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}{ morekeywords={Redo, Call, Fatal, Error, error, ERROR, yes, no, true, false}, keywordstyle=\color{black}\bfseries, @@ -278,4 +283,4 @@ \fi \makeatother -\endinput \ No newline at end of file +\endinput -- GitLab