diff options
-rw-r--r-- | conf/margins/10mm.yaml | 2 | ||||
-rw-r--r-- | conf/settings/graph-paper/2mm.yaml | 8 | ||||
-rw-r--r-- | designs/graph-paper-2mm-a4.yaml | 2 | ||||
-rw-r--r-- | src/graph-paper.ps.j2 (renamed from src/graph-paper.ps) | 22 |
4 files changed, 22 insertions, 12 deletions
diff --git a/conf/margins/10mm.yaml b/conf/margins/10mm.yaml index c5db32a..3ff91a9 100644 --- a/conf/margins/10mm.yaml +++ b/conf/margins/10mm.yaml @@ -2,3 +2,5 @@ margin_top: '10 mm' margin_bottom: '10 mm' margin_left: '10 mm' margin_right: '10 mm' + +border: 1 diff --git a/conf/settings/graph-paper/2mm.yaml b/conf/settings/graph-paper/2mm.yaml new file mode 100644 index 0000000..256c096 --- /dev/null +++ b/conf/settings/graph-paper/2mm.yaml @@ -0,0 +1,8 @@ +x_len: 2 mm +y_len: 2 mm + +x_count: 5 +y_count: 5 + +x_trasl: 0 mm +y_trasl: 0 mm diff --git a/designs/graph-paper-2mm-a4.yaml b/designs/graph-paper-2mm-a4.yaml index 433bca4..8e30e94 100644 --- a/designs/graph-paper-2mm-a4.yaml +++ b/designs/graph-paper-2mm-a4.yaml @@ -1,4 +1,4 @@ paper: a4 margins: 10mm theme: thin_lines -custom: 5mm +settings: 2mm diff --git a/src/graph-paper.ps b/src/graph-paper.ps.j2 index 3383341..d888a5b 100644 --- a/src/graph-paper.ps +++ b/src/graph-paper.ps.j2 @@ -52,11 +52,11 @@ % ------ Basic settings -/SquaXLen 4 mm def % hor spacing between lines -/SquaYLen 4 mm def % ver spacing between lines +/SquaXLen {{ x_len }} def % hor spacing between lines +/SquaYLen {{ y_len }} def % ver spacing between lines -/SquaXStr 5 def % hor number of thin lines between strong ones -/SquaYStr 5 def % ver number of thin lines between strong ones +/SquaXStr {{ x_count }} def % hor number of thin lines between strong ones +/SquaYStr {{ y_count }} def % ver number of thin lines between strong ones % line width and color for thin lines /LineSizeThin {{ thin_line_size }} def @@ -76,21 +76,21 @@ /PageHeight {{ page_height }} def % white margins -/BorderTop 10 mm def -/BorderBottom 10 mm def -/BorderLeft 10 mm def -/BorderRight 10 mm def +/BorderTop {{ margin_top }} def +/BorderBottom {{ margin_bottom }} def +/BorderLeft {{ margin_left }} def +/BorderRight {{ margin_right }} def % ------ Advanced settings % translation of the starting point of the pattern -/PattTrasX 00 mm def -/PattTrasY 02 mm def +/PattTrasX {{ x_trasl }} def +/PattTrasY {{ y_trasl }} def % ------ Behaviour % Whether to print a line around the margins (1) or not (0) -/WillPrintBorder 1 def +/WillPrintBorder {{ 1 if border else 0 }} def % From here on you shouldn't worry about changing or configuring anything % ------ Variables ------------------------------------------------------------ |