From 65a56aa68d9f3a95b97a8ff3b68697b9e2758699 Mon Sep 17 00:00:00 2001 From: Simon Tournier <simon.tournier@u-paris.fr> Date: Thu, 13 Feb 2025 00:06:02 +0100 Subject: [PATCH] doc/build: Define editors as variable. * doc/build.scm (markdown->latex)<build>[%editors]: New variable. --- doc/build.scm | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/doc/build.scm b/doc/build.scm index 1367fac..fb7d2a0 100644 --- a/doc/build.scm +++ b/doc/build.scm @@ -126,6 +126,12 @@ directory containing LaTeX files." (skribilo module) (ice-9 match)) + ;;; Update and/or replace the names. + (define %editors + ;; TODO: Automatically sort the list + (list "Konrad Hinsen" + "Simon Tournier")) + (define commonmark-reader (make-reader 'commonmark)) @@ -261,7 +267,15 @@ directory containing LaTeX files." (map (lambda (author) (markup-option author #:name)) (markup-option document #:author)) - ", "))) + ", ")) + (editors (match %editors + ((one) one) + ((one two) (string-append one " and " two)) + ((one two rest ...) + (fold (lambda (name res) + (string-append name ", " res)) + (string-append two " and " one) + rest))))) (engine-custom-set! latex-engine 'postdocument (string-append " \\includepdf[fitpaper=true, pages=-]{front.pdf} @@ -277,7 +291,7 @@ directory containing LaTeX files." \\vspace{1cm} \\begin{flushleft} \\noindent -Edited by Konrad Hinsen and Simon Tournier. +Edited by " editors ". \\par \\vspace{5mm} \\noindent -- GitLab