├── JSHOP.tex ├── HDDL.tex ├── README.md └── PDDL.tex /JSHOP.tex: -------------------------------------------------------------------------------- 1 | % This file is part of https://github.com/Maumagnaguagno/Planning_LaTeX 2 | \lstdefinelanguage{JSHOP} 3 | { 4 | sensitive=false, % not case-sensitive 5 | morecomment=[l]{;}, % line comment 6 | alsoletter={:,-}, % consider extra characters 7 | morekeywords={ 8 | defdomain,defproblem,not,and,or,imply,forall,assign,call,nil, 9 | :first,:sort-by,:immediate,:unordered,:operator,:method,:protection,:- 10 | } 11 | } -------------------------------------------------------------------------------- /HDDL.tex: -------------------------------------------------------------------------------- 1 | % This file is part of https://github.com/Maumagnaguagno/Planning_LaTeX 2 | \lstdefinelanguage{HDDL} 3 | { 4 | sensitive=false, % not case-sensitive 5 | morecomment=[l]{;}, % line comment 6 | alsoletter={:,-}, % consider extra characters 7 | morekeywords={ 8 | define,domain,problem,not,and,or,forall,exists, 9 | :domain,:requirements,:typing,:hierarchy,:equality,:negative-preconditions, 10 | :method-preconditions,:universal-preconditions,:universal-effects,:existential-preconditions, 11 | :types,:predicates,:action,:parameters,:precondition,:effect, 12 | :task,:method,:subtasks,:tasks,:ordered-subtasks,:ordered-tasks,:ordering,:constraints, 13 | :htn,:init,:goal,:objects 14 | } 15 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Planning LaTeX 2 | **Latex listing for planning formalisms** 3 | 4 | Add PDDL, JSHOP and HDDL snippets to your Tex files by making a copy of each listing configuration file to your LaTeX project. 5 | An example is available on [Overleaf](https://www.overleaf.com/read/dntpdgmtpwxr). 6 | 7 | ```tex 8 | \usepackage{listings} 9 | \input{PDDL} 10 | \input{JSHOP} 11 | \input{HDDL} 12 | 13 | \begin{lstlisting}[ 14 | float=!htb, 15 | caption={PDDL move operator.}, 16 | label={lst:pddl}, 17 | language=PDDL] 18 | (:action move 19 | :parameters ( 20 | ?agent - agent 21 | ?from ?to - hallway ; Both ?from and ?to are hallways 22 | ) 23 | :precondition (and 24 | (at ?agent ?from) 25 | (not (at ?agent ?to)) 26 | (adjacent ?from ?to) 27 | ) 28 | :effect (and 29 | (not (at ?agent ?from)) ; This line is usually forgotten 30 | (at ?agent ?to) 31 | ) 32 | ) 33 | \end{lstlisting} 34 | ``` -------------------------------------------------------------------------------- /PDDL.tex: -------------------------------------------------------------------------------- 1 | % This file is part of https://github.com/Maumagnaguagno/Planning_LaTeX 2 | \lstdefinelanguage{PDDL} 3 | { 4 | sensitive=false, % not case-sensitive 5 | morecomment=[l]{;}, % line comment 6 | alsoletter={:,-}, % consider extra characters 7 | morekeywords={ 8 | define,domain,problem,not,and,or,when,forall,exists,either, 9 | :domain,:requirements,:types,:objects,:constants, 10 | :predicates,:action,:parameters,:precondition,:effect, 11 | :fluents,:primary-effect,:side-effect,:init,:goal, 12 | :strips,:adl,:equality,:typing,:conditional-effects, 13 | :negative-preconditions,:disjunctive-preconditions, 14 | :existential-preconditions,:universal-preconditions,:quantified-preconditions, 15 | :functions,assign,increase,decrease,scale-up,scale-down, 16 | :metric,minimize,maximize, 17 | :durative-actions,:duration-inequalities,:continuous-effects, 18 | :durative-action,:duration,:condition 19 | } 20 | } --------------------------------------------------------------------------------