diff --git a/build.xcvb b/build.xcvb index 063e0263262dd2a78ffb9ee8c8f34d7a7ca50fbd..105ee981f21e2ff4ac98101d4310793bbfa6095e 100644 --- a/build.xcvb +++ b/build.xcvb @@ -5,7 +5,7 @@ :nicknames ("exscribe") :supersedes-asdf ("exscribe") :build-depends-on - ("/cl-launch" "/fare-utils" + ("/cl-launch" "/xcvb/driver" "/fare-utils" "/fare-matcher" "/scribble" (:when (:featurep :exscribe-typeset) (:asdf "cl-typesetting"))) diff --git a/exscribe-data.lisp b/exscribe-data.lisp index abf022c519a84a8cd2c4028c9be04158f42eb284..4d8121f1f15c895651b46654939eb2d8125e42ba 100644 --- a/exscribe-data.lisp +++ b/exscribe-data.lisp @@ -94,7 +94,7 @@ h1 h2 h3 h4 h5 h6) (deftag body () (color bgcolor)) -(deftag p () (align)) +(deftag p () (align style)) (deftag font () (size face color bgcolor)) (deftag td () (align valign width height color bgcolor colspan rowspan)) (deftag th () (align valign width height color bgcolor colspan rowspan)) diff --git a/exscribe-html.lisp b/exscribe-html.lisp index 10076a9e6ccd8c0b7e74624bca51c61a7926f960..765d7cf44ecaee7c633455950ea57693ac96d13a 100644 --- a/exscribe-html.lisp +++ b/exscribe-html.lisp @@ -112,7 +112,7 @@ (defun make-subsection (options) (let ((number (getf options :number t))) (when (eq number t) - (setf number (format nil "~@{~A~}.~A" + (setf number (format nil "~@[~A.~]~A" *section-name* (incf *subsection-counter*)))) (setf *subsection-name* number *subsubsection-counter* 0) @@ -120,7 +120,7 @@ (defun make-subsubsection (options) (let ((number (getf options :number t))) (when (eq number t) - (setf number (format nil "~@{~A.~}~A" + (setf number (format nil "~@[~A.~]~A" *subsection-name* (incf *subsubsection-counter*)))) (setf *subsubsection-name* number) diff --git a/exscribe.asd b/exscribe.asd index feb8512cb5130e2a887eab245384808a9cd8043b..387df4dc2d75ffa756f7910be012b4ceb2958692 100644 --- a/exscribe.asd +++ b/exscribe.asd @@ -11,6 +11,7 @@ using a high-level syntax (Scribble) completely integrated with the CL syntax. It notably features proper support for footnotes, table-of-contents, bibliography." :depends-on (:cl-launch ;; Always put cl-launch first + :xcvb-driver :scribble :fare-matcher :fare-utils #+exscribe-typeset :cl-typesetting) :components ((:file "packages") diff --git a/exscribe.lisp b/exscribe.lisp index 2e4680eb5e955ab103228f4da5e3ab0254bcd3df..2e1badda07f4f7a47321e9bb128ece0fae70ce4c 100644 --- a/exscribe.lisp +++ b/exscribe.lisp @@ -14,7 +14,7 @@ ;;; pathname munging (defun add-exscribe-path (d) - (setf *exscribe-path* (append *exscribe-path* (list (ensure-directory-pathname d))))) + (append1f *exscribe-path* (ensure-directory-pathname d))) (defun maybe-error (user-default if-error) (flet ((f (x) @@ -34,11 +34,11 @@ ((or string pathname) (list types)))))) (if (absolute-pathname-p p) p (or - (loop for d in l - for x = (merge-pathnames p d) - thereis (or (probe-file x) - (loop for tx in tp - thereis (probe-file (merge-pathnames x tx))))) + (loop :for d :in l + :for x = (merge-pathnames* p d) + :thereis (or (probe-file* x) + (loop :for tx :in tp + :thereis (probe-file* (merge-pathnames* x tx))))) (on-error if-error (error "Cannot find file ~A in search path ~A" f l)))))) @@ -51,11 +51,9 @@ (defun read-eval-stream (s &key &allow-other-keys) (let ((forms (xxtime ("<== reading ~A~%" s) - (loop with eof = '#:eof - for i = (read s nil eof) until (eq i eof) - collect i)))) + (xcvb-driver:slurp-stream-forms s)))) (xxtime ("<== evaluating ~A~%" s) - (loop for i in forms do (eval i))))) + (map () #'eval forms)))) (defun do-load (s &key &allow-other-keys) (typecase s @@ -211,12 +209,6 @@ ) (exscribe-load-document input)))))) -(defparameter *wild-path* - (make-pathname :directory '(:relative :wild-inferiors) - :name :wild :type :wild :version :wild)) -(defun wilden (path) - (merge-pathnames *wild-path* path)) - (defun process-many (src dst &rest files) (add-exscribe-path src) (loop with source = (wilden (ensure-directory-pathname src)) diff --git a/packages.lisp b/packages.lisp index 78f022ea921e8180509ca0255d776a223a3a62eb..d9687128cb065e3335e8a4f80e5c038871899f9a 100644 --- a/packages.lisp +++ b/packages.lisp @@ -38,7 +38,7 @@ not to actually implement deep Scheme semantics.") (defpackage :exscribe (:documentation "core infrastructure for exscribe") - (:use :common-lisp :fare-utils :scribble) + (:use :common-lisp :fare-utils :scribble :asdf) #+exscribe-typeset (:import-from :typeset #:*paper-size* #:*page-margins* #:*twosided* #:*toc-depth* diff --git a/test.lisp b/test.lisp index f49f9d620761264f2143e4dbf57da34787aa83b3..ba5979e753e18d10e8f94eb7ec96a57d04254592 100644 --- a/test.lisp +++ b/test.lisp @@ -56,11 +56,7 @@ TODO: |# (defun slurp (f) - (let ((eof '#:eof)) - (with-open-file (s f :direction :input :if-does-not-exist :error) - (loop for i = (read s nil eof nil) - until (eq i eof) - collect i)))) + (xcvb-driver:slurp-file-lines f)) (defun scrulp (f) (reenable-scribble-syntax) @@ -69,7 +65,7 @@ TODO: (defvar *h* nil) (defun in-home (f) - (concatenate 'string (cl-launch:getenv "HOME") "/" f)) + (strcat (cl-launch:getenv "HOME") "/" f)) ;;(setq *h* (scrulp (in-home "fare/www/index.scr")))