From b3bb20cd17013ea2f93a275a2004ec3e1ea5f52c Mon Sep 17 00:00:00 2001 From: Ekaitz Zarraga Date: Sat, 3 Oct 2020 22:33:37 +0200 Subject: Printed --- src/Programming_in_Python | 2 +- src/What_is_Informatics | 2 +- utils/cover/cover.scm | 10 ++++++++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/Programming_in_Python b/src/Programming_in_Python index 7a30d57..fa04131 160000 --- a/src/Programming_in_Python +++ b/src/Programming_in_Python @@ -1 +1 @@ -Subproject commit 7a30d572b687760a05f4e700b6a5e1515e6aa5c6 +Subproject commit fa04131f8eea0a57bab493a8f34f0937501ed821 diff --git a/src/What_is_Informatics b/src/What_is_Informatics index 7244295..8658f13 160000 --- a/src/What_is_Informatics +++ b/src/What_is_Informatics @@ -1 +1 @@ -Subproject commit 7244295084ed9589befb95091d11bb6dd46757f3 +Subproject commit 8658f13ce3d1031baa332fb8aaa1a33776a89e6e diff --git a/utils/cover/cover.scm b/utils/cover/cover.scm index 8fea57c..915f42a 100644 --- a/utils/cover/cover.scm +++ b/utils/cover/cover.scm @@ -79,6 +79,11 @@ (if (pair? val) (vector->list (cdr val)) '()))) +(define (get-number key alist) + (let ((val (assoc key alist))) + (if (pair? val) + (cdr val) + 10))) (define (metadata->svg metadata outport) @@ -99,6 +104,7 @@ (book-authors (get-list 'author metadata)) (book-summary (get-string 'summary metadata)) (company-info (get-string 'company-info metadata)) + (spine-width (get-number 'spine-width metadata)) ;mm (main-title-size (let ((size (exact->inexact @@ -109,7 +115,7 @@ (exact->inexact (/ page-height 5)) size))) ;mm - (spine-width 10) ;mm TODO + (spine-title-margin-min (* 0.1 spine-width)) (spine-title-max-size 10) (spine-title-size @@ -121,7 +127,7 @@ (text-size (exact->inexact (/ page-height 70))); mm (category-size (* 1.5 text-size)); mm - (authors-size (* 1.8 text-size)) + (authors-size (* 1.8 text-size)); mm (title-size (* 2.5 text-size)); mm (main-subtitle-size (* 2 text-size)) -- cgit v1.2.3