From c0152d256b48b17b4b51f7913214e1291e061070 Mon Sep 17 00:00:00 2001
From: Ludovic Courtès
Date: Sat, 7 Apr 2018 16:22:17 +0200
Subject: doc: Improve Lout style.

* doc/modules/skribilo/documentation/api.scm (le): Change 'initial-font
and 'initial-break.  Use 9p font in @SkribiloExample.  Add writer for
'prog.
---
 doc/modules/skribilo/documentation/api.scm | 17 +++++++++++++++--
 doc/user/lout/book-style.lout              |  2 +-
 2 files changed, 16 insertions(+), 3 deletions(-)

(limited to 'doc')

diff --git a/doc/modules/skribilo/documentation/api.scm b/doc/modules/skribilo/documentation/api.scm
index 46f1d14..73c8a43 100644
--- a/doc/modules/skribilo/documentation/api.scm
+++ b/doc/modules/skribilo/documentation/api.scm
@@ -2,7 +2,7 @@
 ;;; -*- coding: iso-8859-1 -*-
 ;;;
 ;;; Copyright 2005, 2006, 2007, 2008, 2009, 2012,
-;;;   2015 Ludovic Court�s <ludo@gnu.org>
+;;;   2015, 2018 Ludovic Court�s <ludo@gnu.org>
 ;;; Copyright 2003, 2004  Manuel Serrano
 ;;;
 ;;;
@@ -92,6 +92,13 @@
 ;*---------------------------------------------------------------------*/
 (let ((le (find-engine 'lout)))
 
+  (engine-custom-set! le 'initial-font "Palatino Base 11p")
+
+  ;; XXX: Adding 'marginkerning' makes Lout 3.40 segfault.
+  (engine-custom-set! le 'initial-break
+                      "unbreakablefirst unbreakablelast \
+hyphen adjust 1.3fx")
+
   (let ((defs (engine-custom le 'inline-definitions-proc)))
     (engine-custom-set! le 'inline-definitions-proc
                         (lambda (e)
@@ -115,13 +122,19 @@ def @SkribiloExample named @Title {} right x {
       @Diag { @CurveBox
                 outlinestyle { noline }
                 paint { rgb 0.95 0.95 0.87 }
-                font { 0.9f }
+                font { 9p }
 		break { 0.9fx }
               @HExpand @Body } }
   { x }
 }\n\n"
                            ))))
 
+  ;; Compared to the default 'prog' writer, this one uses a smaller font.
+  (markup-writer 'prog le
+     :options '(:line :mark)
+     :before "\n{ Courier Base 9p } @Font { lines nohyphen 0.9fx } @Break lout @Space {\n"
+     :after "\n} # @Break\n")
+
   (markup-writer 'doc-markup
     :action (lambda (n e)
               (let ((protos (markup-option n 'prototypes))
diff --git a/doc/user/lout/book-style.lout b/doc/user/lout/book-style.lout
index 46c4021..4d76759 100644
--- a/doc/user/lout/book-style.lout
+++ b/doc/user/lout/book-style.lout
@@ -89,7 +89,7 @@
   # and large margin is 2/9th.
 
   # `@TopMargin' is margin above headers.  We want a margin of 3.3c for
-  # the page _body� (i.e., excluding headers), so we have to choose
+  # the page _body_ (i.e., excluding headers), so we have to choose
   # `@TopMargin' = 3.3c - (`@MidGap' + 1.0f), since running headers are
   # typeset in 1.0f and followed by a `@MidGap' gap.  We take:
   # 1.0f = 10p = 0.35c and `@MidGap' = 0.75c.
-- 
cgit 1.4.1