;;;;
;;;;
;;;; adoc-lib.stk         -- Library for Stklos documentation
;;;;
;;;; Copyright © 2022-2023 Erick Gallesio <eg@stklos.net>
;;;;
;;;;
;;;; This program is free software; you can redistribute it and/or modify
;;;; it under the terms of the GNU General Public License as published by
;;;; the Free Software Foundation; either version 2 of the License, or
;;;; (at your option) any later version.
;;;;
;;;; This program is distributed in the hope that it will be useful,
;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;;; GNU General Public License for more details.
;;;;
;;;; You should have received a copy of the GNU General Public License
;;;; along with this program; if not, write to the Free Software
;;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
;;;; USA.
;;;;
;;;;           Author: Erick Gallesio [eg@unice.fr]
;;;;    Creation date:  7-Jan-2022 08:49
;;;;

(import (stklos preproc))


(define *stderr* (current-error-port))
(define *verbose* (getenv "DEBUG"))

(define (stklos)     "*_STklos_*")
(define (stk)        "*_STk_*")
(define (rfour)      "R^4^RS")
(define (rfive)      "R^5^RS")
(define (rsix)       "R^6^RS")
(define (rseven)     "R^7^RS")
(define (sharp)      "&#35;")
(define (true)       "`&#35;t`")
(define (false)      "`&#35;f`")


;;;
;;; Helpers
;;;
(define (empty-line n)
  (if (zero? n)
      ""
      (string-append (empty-line (- n 1))
                     "+++ +++ +\n")))      ;; Quite hacky, but seems to work

(define (chapter title)
  (string-append "== " title "\n\n"))   ;; empty lines are now in config files




