From 2e605af67221531b0c94709cb98d247320fb43c8 Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Mon, 30 Dec 2019 14:25:03 -0800 Subject: [PATCH] finesse on heading --- quad/quadwriter/tags.rkt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/quad/quadwriter/tags.rkt b/quad/quadwriter/tags.rkt index fe18ca41..51aa714c 100644 --- a/quad/quadwriter/tags.rkt +++ b/quad/quadwriter/tags.rkt @@ -97,7 +97,7 @@ (define-syntax-rule (attr-list . attrs) 'attrs) -(define (heading-base font-size attrs exprs) +(define (heading-base font-size inset-top attrs exprs) (qexpr (append (list->attrs :font-family "heading" :first-line-indent "0" @@ -107,14 +107,14 @@ :border-width-top "0.5" :border-inset-top "9" :inset-bottom "-3" - :inset-top "6" + :inset-top (number->string inset-top) :keep-with-next "true") attrs) exprs)) (define-tag-function (h1 attrs exprs) - (qexpr null (list page-break (heading-base 20 attrs exprs)))) + (qexpr null (list page-break (heading-base 20 6 attrs exprs)))) -(define-tag-function (h2 attrs exprs) (heading-base 16 attrs exprs)) -(define-tag-function (h3 attrs exprs) (heading-base 14 attrs exprs)) +(define-tag-function (h2 attrs exprs) (heading-base 16 7 attrs exprs)) +(define-tag-function (h3 attrs exprs) (heading-base 14 8 attrs exprs)) (define h4 h3) (define h5 h3)