Skip to content

Commit 21adf06

Browse files
committed
- line break tweaking (ugly)
1 parent 8f42e51 commit 21adf06

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

examples/sort.lp

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
set(1..4).
2-
next(X,Z) :-
3-
set(X), #false : X < Y, set(Y), Y < Z; set(Z), X < Z.
2+
next(X,Z) :- set(X), #false : X < Y, set(Y), Y < Z; set(Z), X < Z.

examples/toh_enc.lp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
% Generate
2-
{ move(D,P,T) : disk(D), peg(P) } = 1 :- moves(M), T = 1..M.
2+
{ move(D,P,T) : disk(D), peg(P) } = 1 :- moves(M), T = 1..M.
33
% Define
44
move(D,T) :- move(D,_,T).
55
on(D,P,0) :- init_on(D,P).
66
on(D,P,T) :- move(D,P,T).
7-
on(D,P,T+1) :- on(D,P,T), not move(D,T+1), not moves(T).
7+
on(D,P,T+1) :- on(D,P,T), not move(D,T+1), not moves(T).
88
blocked(D-1,P,T+1) :- on(D,P,T), not moves(T).
99
blocked(D-1,P,T) :- blocked(D,P,T), disk(D).
1010
% Test

language.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -890,7 +890,7 @@ \subsubsection{Conditions and Conditional Literals}\label{subsec:gringo:conditio
890890
The following program uses a literal with a composite condition in the middle of the rule body.
891891
Note the semicolon `\code{;}' after the condition:
892892
%
893-
\lstinputlisting{examples/sort.lp}
893+
\lstinputlisting[breaklines,breakatwhitespace]{examples/sort.lp}
894894
%
895895
The conditional literal in the second rule evaluates to false
896896
whenever there is an element~\code{Y} between~\code{X} and~\code{Z}.

quickstart.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ \subsection{Problem Encoding}
8585
We below explain how to run the saved files in order to
8686
solve our Towers of Hanoi puzzle.}%
8787
%
88-
\lstinputlisting[basicstyle=\small\ttfamily]{examples/toh_enc.lp}
88+
\lstinputlisting[breaklines]{examples/toh_enc.lp}
8989
%
9090
Note that the variables \var{D}, \var{P}, \var{T}, and \var{M} are used
9191
to refer to disks, pegs,

0 commit comments

Comments
 (0)