Skip to content

Commit f2a3648

Browse files
authored
Beautify paper: cover page, indices, CLI args, page numbering (#1045)
* Enhance graph data handling and layout in KSatisfiability to TimetableDesign reduction - Introduced pre-indexing for graph edges and nodes to optimize lookups, reducing complexity from O(n) to O(1). - Updated the layout structure by removing unnecessary blocker pairs, simplifying the logic for handling blocked colors. - Adjusted the expected number of craftsmen and tasks in the test cases to reflect the new encoding scheme. - Improved documentation for the ellipse drawing function to clarify label positioning options. * Update document formatting and enhance problem indexing in reductions.typ - Adjusted page settings to include a footer with page numbers. - Updated the rendering of problem CLI arguments and improved table headers for clarity. - Added indices for problems and reduction rules, enhancing navigation within the document. - Revised comments and documentation for better understanding of the changes made. * Refactor page numbering and improve document structure in reductions.typ - Updated page settings to replace footer with appropriate numbering options. - Enhanced comments to clarify the purpose of page numbering in front and main matter. - Adjusted indices for problems and reduction rules to improve document navigation. - Standardized text link color for better visibility in the index sections.
1 parent d8a6168 commit f2a3648

4 files changed

Lines changed: 2873 additions & 1440 deletions

File tree

docs/paper/lib.typ

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@
117117
// Draw a set region as an ellipse enclosing given positions.
118118
// positions: array of (x, y) positions the set should enclose
119119
// pad: padding distance around the bounding box
120-
// label: set label (e.g., [$S_1$]), placed above the ellipse
120+
// label: set label (e.g., [$S_1$]), placed above the ellipse (or below if label-below)
121121
// fill: translucent fill color
122122
// stroke: border stroke
123123
#let sregion(
@@ -128,6 +128,7 @@
128128
stroke: 0.8pt + rgb("#4e79a7"),
129129
label-size: 8pt,
130130
label-anchor: "south",
131+
label-below: false,
131132
) = {
132133
if positions.len() == 0 { return }
133134

@@ -140,10 +141,18 @@
140141

141142
draw.circle((cx, cy), radius: (rx, ry), fill: fill, stroke: stroke)
142143
if label != none {
143-
draw.content(
144-
(cx, cy + ry + 0.15),
145-
text(label-size, label), anchor: label-anchor,
146-
)
144+
if label-below {
145+
draw.content(
146+
(cx, cy - ry - 0.15),
147+
text(label-size, label),
148+
anchor: "north",
149+
)
150+
} else {
151+
draw.content(
152+
(cx, cy + ry + 0.15),
153+
text(label-size, label), anchor: label-anchor,
154+
)
155+
}
147156
}
148157
}
149158

0 commit comments

Comments
 (0)