Skip to content

Commit aa9f170

Browse files
committed
test: broken indent guides with small inset
1 parent 38e89f6 commit aa9f170

File tree

2 files changed

+59
-0
lines changed

2 files changed

+59
-0
lines changed

test/test.pdf

6.72 KB
Binary file not shown.

test/test.typ

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -825,3 +825,62 @@ def floyd_warshall(G):
825825
return dist
826826
```
827827
]
828+
829+
== Broken indent guides with small inset
830+
831+
#table(
832+
columns: 2,
833+
stroke: none,
834+
align: (x, _) => (right, left).at(x),
835+
"row-gutter:", "15pt",
836+
"inset:", "3pt",
837+
"indent-guides:", "1pt + black",
838+
"breakable:", "true"
839+
)
840+
841+
#v(380pt)
842+
#algo(
843+
title: "Floyd-Warshall",
844+
parameters: ("V", "E", "w"),
845+
row-gutter: 15pt,
846+
inset: 3pt,
847+
indent-guides: 1pt + black,
848+
breakable: true,
849+
)[
850+
Let $"dist"[u,v] <- infinity$ for $u,v$ in $V$\
851+
For $(u,v)$ in $E$:#i\
852+
$"dist"[u,v] <- w(u,v)$ #comment[edge weights] #d\
853+
For $v$ in $V$:#i\
854+
$"dist"[v,v] <- 0$ #comment[base case] #d\
855+
\
856+
For $k <- 1$ to $|V|$:#i\
857+
For $i <- 1$ to $|V|$:#i\
858+
For $j <- 1$ to $|V|$:#i\
859+
#comment(inline: true)[if new path is shorter, reduce distance]\
860+
If $"dist"[i,j] > "dist"[i,k] + "dist"[k,j]$:#i\
861+
$"dist"[i,j] <- "dist"[i,k] + "dist"[k,j]$#d#d#d#d\
862+
\
863+
Return $"dist"$
864+
]
865+
866+
#v(420pt)
867+
#code(
868+
row-gutter: 15pt,
869+
inset: 3pt,
870+
indent-guides: 1pt + black,
871+
breakable: true,
872+
)[
873+
```py
874+
def floyd_warshall(G):
875+
# let G be an adjacency matrix
876+
dist = G
877+
878+
for k in range(len(G)):
879+
for i in range(len(G)):
880+
for j in range(len(G)):
881+
if dist[i][j] > dist[i][k] + dist[k][j]:
882+
dist[i][j] = dist[i][k] + dist[k][j]
883+
884+
return dist
885+
```
886+
]

0 commit comments

Comments
 (0)