[cl-typesetting-devel] Re: cl-pdf vs the fasl cache
Faré
fahree at gmail.com
Fri Aug 26 06:49:32 UTC 2005
Oh, and while I'm there, I similarly had to change
cl-typesetting/hyphenation-fp.lisp with
(defvar *cl-typesetting-base-directory*
(make-pathname :name nil :type nil :version nil :defaults #.*load-truename*))
And I propagated this kind of thing to cl-pdf/config.lisp:
(defvar *cl-pdf-base-directory*
(make-pathname :name nil :type nil :version nil :defaults #.*load-truename*))
(defparameter *afm-files-directories*
(list (merge-pathnames #P"afm/*.afm" *cl-pdf-base-directory*))
"The directory containing the Adobe Font Metrics files for the 14
predefined fonts")
And since it is an error to evaluate defconstant twice with values
that are not EQ, and lists are not EQ between compilation and loading
from a fasl, I put the following in specials.lisp:
(defmacro defconstant* (name value &optional doc)
`(eval-when (:compile-toplevel :load-toplevel :execute)
(unless (boundp ',name)
(defconstant ,name ,value ,@(when doc (list doc))))))
and changed top-level.lisp to use defconstant* with +paper-sizes+.
All in all, I used cl-launch to create scripts that would test cl-pdf
and cl-typesetting:
http://www.cliki.net/cl-launch
cd /home/fare/src/cl-pdf/
cl-launch.sh -o cl-pdf.sh -a cl-pdf -n fare -s /home/fare -i '
(progn
(setf *default-pathname-defaults*
(merge-pathnames #p"examples/" *default-pathname-defaults*))
(load "examples.lisp")
(example1)
(example2)
(example3)
(example4)
(example5 40 40)
(example6)
(example7)
(example8))
'
./cl-pdf.sh
for i in /tmp/*.pdf ; do xpdf $i ; done
cd /home/fare/src/cl-typesetting/
cl-launch.sh -o cl-typesetting-test.sh -a cl-typesetting-test -n fare
-s /home/fare -i '
(progn
(typeset::hello "hello.pdf")
(typeset::multi-page-hello "multi-page-hello.pdf")
(typeset::multi-page-example "/tmp/multi-page.pdf")
(pdf:load-t1-font "./files-for-example/cmex10.afm"
"./files-for-example/cmex10.pfb")
(pdf:load-t1-font "./files-for-example/cmti10.afm"
"./files-for-example/cmti10.pfb")
(typeset::full-example "ex.pdf" "./files-for-example/banner.jpg"
"./files-for-example/fractal.jpg"))
'
./cl-typesetting-test.sh
Note that I feel that the -s and -n options to cl-launch are being
used in a funny way. I think I'll just burn into cl-launch the
equivalent of -s / -n ""...
[ François-René ÐVB Rideau | Reflection&Cybernethics | http://fare.tunes.org ]
To make war requires the will to act. But to be at war, it suffices to
suffer the aggression. Refusing to fight will not bring you peace.
On 26/08/05, Faré <fahree at gmail.com> wrote:
> The dreaded day when scribe ceased to work in debian has arrived at
> last, and I've decided that my upgrade path would be cl-typesetting,
> not skribe.
>
> Trying to compile the latest cl-typesetting, I find this error when compiling
> cl-pdf/chart.lisp: helvetica font not found. That's because I'm using
> a common-lisp-controller kind of trick (actually, cl-launch) whereby
> fasl's are stored in a different directory from the source code, and
> so *load-pathname* is not the right place where to look for the afm
> directory.
>
> The trick I use is to capture the compile-time value of
> *load-pathname* with #. (I previously tried with eval-when, but
> couldn't get it right). Thus, in cl-pdf/config.lisp:
>
> (defparameter *afm-files-directories*
> (when #.*load-pathname*
> (list (merge-pathnames #P"afm/*.afm" #.*load-pathname*)))
> "The directory containing the Adobe Font Metrics files for the 14
> predefined fonts")
>
> PS: does anyone generate HTML and PDF from Lisp using cl-typesetting
> and some other backend? What do you use to generate both HTML and PDF
> from the same source?
>
> [ François-René ÐVB Rideau | Reflection&Cybernethics | http://fare.tunes.org ]
> So you think you know how to translate French into English? Now what if the
> French meant something completely different than what the English understood,
> only neither the French, nor the English, could figure out the difference?
More information about the cl-typesetting-devel
mailing list