From jdcal at yahoo.com Fri Aug 12 12:48:14 2005 From: jdcal at yahoo.com (Jeff Caldwell) Date: Fri, 12 Aug 2005 05:48:14 -0700 (PDT) Subject: [cl-typesetting-devel] Versions etc. for Graphviz for cl-typegraph? Message-ID: <20050812124814.90160.qmail@web50612.mail.yahoo.com> Hi, I used subversion (svn) and retrieved the latest cl-pdf and cl-typesetting. On my Debian machine, "apt-get install graphviz" resulted in version 2.2. The 'rank=' line written by gen-graph-dot-data in graph.lisp, called by (full-example), caused "dot" to have a segmentation violation, preventing the generation of ex.pdf. I removed graphviz using apt-get. From the graphviz website, I downloaded the source for v2.4. I couldn't make it because I didn't have some Xaw header files, e.g. Text.h and AsciiText.h. The configure process had detected that Xaw was not installed, so that looks like a graphviz config bug. Using dselect, I chose libxaw7 and downloaded and installed 598Mb of archives, which installed properly, more or less. (OK, I was out of date. :) After another ./configure of graphviz, it almost compiled. I had to ln -s /usr/lib/libperl.so.5 /usr/lib/libperl.so and then graphviz built cleanly. Now (full-example) works OK. That's OK for my development machine but not for an X-less server machine. Before I dive into trying to make this work on headless remote servers, can you offer any suggestions? What versions/configuration options of graphviz etc. seem to work? Thanks, Jeff Caldwell ____________________________________________________ Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs From marc.battyani at fractalconcept.com Wed Aug 17 20:25:38 2005 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Wed, 17 Aug 2005 22:25:38 +0200 Subject: [cl-typesetting-devel] Versions etc. for Graphviz for cl-typegraph? References: <20050812124814.90160.qmail@web50612.mail.yahoo.com> Message-ID: <018501c5a369$d5d72ef0$0a02a8c0@marcxp> "Jeff Caldwell" wrote: >I used subversion (svn) and retrieved the latest cl-pdf and cl-typesetting. >On my Debian machine, "apt-get install graphviz" resulted in version 2.2. The >'rank=' line written by gen-graph-dot-data in graph.lisp, called by >(full-example), caused "dot" to have a segmentation violation, preventing the >generation of ex.pdf. > >I removed graphviz using apt-get. From the graphviz website, I downloaded the >source for v2.4. I couldn't make it because I didn't have some Xaw header >files, e.g. Text.h and AsciiText.h. The configure process had detected that >Xaw was not installed, so that looks like a graphviz config bug. Using >dselect, I chose libxaw7 and downloaded and installed 598Mb of archives, >which installed properly, more or less. (OK, I was out of date. :) > >After another ./configure of graphviz, it almost compiled. I had to ln -s >/usr/lib/libperl.so.5 /usr/lib/libperl.so and then graphviz built cleanly. > >Now (full-example) works OK. > >That's OK for my development machine but not for an X-less server machine. >Before I dive into trying to make this work on headless remote servers, can >you offer any suggestions? What versions/configuration options of graphviz >etc. seem to work? Have you found something ? I don't see why dot needs X libraries. Maybe to get some font metrics ? In that case maybe you could remove the code that uses this from dot as the text handling is done by cl-typesetting. Let's rewrite dot in Lisp! ;-) Marc From jdcal at yahoo.com Thu Aug 18 00:18:34 2005 From: jdcal at yahoo.com (Jeff Caldwell) Date: Wed, 17 Aug 2005 17:18:34 -0700 (PDT) Subject: [cl-typesetting-devel] Versions etc. for Graphviz for cl-typegraph? In-Reply-To: <018501c5a369$d5d72ef0$0a02a8c0@marcxp> Message-ID: <20050818001834.53643.qmail@web50610.mail.yahoo.com> --- Marc Battyani wrote: > "Jeff Caldwell" wrote: ... > The > >'rank=' line written by gen-graph-dot-data in graph.lisp, called by > >(full-example), caused "dot" to have a segmentation violation, preventing > the > >generation of ex.pdf. >... From the graphviz website, I downloaded > the > >source for v2.4. I couldn't make it because I didn't have some Xaw header > >files, e.g. Text.h and AsciiText.h. ... > Have you found something ? I don't see why dot needs X libraries. Maybe to > get some font metrics ? In that case maybe you could remove the code that > uses this from dot as the text handling is done by cl-typesetting. I found somewhere on the net a report of a dot bug in the config process that needlessly called out an X library. I think I stumbled across another one of those bugs. What version of Graphviz do you use? Does the machine you use it on run X? > > Let's rewrite dot in Lisp! ;-) > > Marc Hey, I only just got the typesetting full example working! Now I'm going to look at the pprint you showed Pascal. One step at a time for me :-) Jeff ____________________________________________________ Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs From fahree at gmail.com Fri Aug 26 06:49:32 2005 From: fahree at gmail.com (=?ISO-8859-1?Q?Far=E9?=) Date: Fri, 26 Aug 2005 02:49:32 -0400 Subject: [cl-typesetting-devel] Re: cl-pdf vs the fasl cache In-Reply-To: <653bea16050825221261c16b57@mail.gmail.com> References: <653bea16050825221261c16b57@mail.gmail.com> Message-ID: <653bea16050825234936084c5d@mail.gmail.com> 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? 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? From fahree at gmail.com Fri Aug 26 05:12:21 2005 From: fahree at gmail.com (=?ISO-8859-1?Q?Far=E9?=) Date: Fri, 26 Aug 2005 01:12:21 -0400 Subject: [cl-typesetting-devel] cl-pdf vs the fasl cache Message-ID: <653bea16050825221261c16b57@mail.gmail.com> 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? From marc.battyani at fractalconcept.com Sun Aug 28 21:55:02 2005 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Sun, 28 Aug 2005 23:55:02 +0200 Subject: [cl-typesetting-devel] cl-pdf vs the fasl cache References: <653bea16050825221261c16b57@mail.gmail.com> Message-ID: <007701c5ac1b$258dc670$0a02a8c0@marcxp> Far? 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. Cool. So now I'm waiting for the scribe syntax front-end for cl-typesetting. ;-) >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") OK why not. At first glance, I don't see any problem with this. So I will put this unless somebody has a reason not to. >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? When I generate some documents both in HTML and pdf, I generally use 2 rather different kind of layouts styles. So I write 2 sets of functions. This reminds me that I should commit the changes and fix I've got to the cl-pdf and cl-typesetting repositories. I will try to do it in the next few days :) Marc From marc.battyani at fractalconcept.com Sun Aug 28 21:56:51 2005 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Sun, 28 Aug 2005 23:56:51 +0200 Subject: [cl-typesetting-devel] Re: cl-pdf vs the fasl cache References: <653bea16050825221261c16b57@mail.gmail.com> <653bea16050825234936084c5d@mail.gmail.com> Message-ID: <007f01c5ac1b$69011420$0a02a8c0@marcxp> Far? wrote: >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+. OK, is this SBCL compliant? ;-) Marc From fahree at gmail.com Mon Aug 29 00:25:48 2005 From: fahree at gmail.com (=?ISO-8859-1?Q?Far=E9?=) Date: Sun, 28 Aug 2005 17:25:48 -0700 Subject: [cl-typesetting-devel] Re: cl-pdf vs the fasl cache In-Reply-To: <007701c5ac1b$258dc670$0a02a8c0@marcxp> References: <653bea16050825221261c16b57@mail.gmail.com> <007701c5ac1b$258dc670$0a02a8c0@marcxp> Message-ID: <653bea160508281725239b0b3c@mail.gmail.com> On 8/28/05, Marc Battyani 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. > > Cool. So now I'm waiting for the scribe syntax front-end for > cl-typesetting. > ;-) > Hey, hopefully :-) Though my goal is not 100% backward compatibility with the original scribe syntax (Skribe doesn't have it either), only a way to integrate all my scribe files into a new CL-based setting -- I expect I'll have to update my files a bit. >>(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") > > OK why not. At first glance, I don't see any problem with this. So I will > put this unless somebody has a reason not to. > Thanks! > When I generate some documents both in HTML and pdf, I generally use 2 > rather different kind of layouts styles. So I write 2 sets of functions. Sure. And Scribe was precisely but a big switch around several sets of functions that would dump html, text or buggy latex from a same document. Still, do you have something published or publishable regarding a functional interface to generating either HTML or PDF from a same document? > This reminds me that I should commit the changes and fix I've got to the > cl-pdf and cl-typesetting repositories. I will try to do it in the next few > days :) Great! [ Fran?ois-Ren? ?VB Rideau | Reflection&Cybernethics | http://fare.tunes.org ] Les ?lections qui garantissent une soci?t? libre ne se votent pas avec des voix, mais avec les pieds, les mains et les dollars. -- Far? From fahree at gmail.com Mon Aug 29 00:33:50 2005 From: fahree at gmail.com (=?ISO-8859-1?Q?Far=E9?=) Date: Sun, 28 Aug 2005 17:33:50 -0700 Subject: [cl-typesetting-devel] Re: cl-pdf vs the fasl cache In-Reply-To: <007f01c5ac1b$69011420$0a02a8c0@marcxp> References: <653bea16050825221261c16b57@mail.gmail.com> <653bea16050825234936084c5d@mail.gmail.com> <007f01c5ac1b$69011420$0a02a8c0@marcxp> Message-ID: <653bea160508281733c633d31@mail.gmail.com> On 8/28/05, Marc Battyani wrote: >>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+. > > OK, is this SBCL compliant? ;-) > Yes, precisely. My main platforms are SBCL (on x86 and x86_64) and clisp (on ARM). SBCL is very anal and refuses to do things that are not guaranteed to work in the standard. This is sometimes very frustrating, but ultimately leads to more portable, more reliable software. There are many workarounds to the limitation on defconstant, but this one is my favorite (you could also wrap things in a SBCL-specific handler-case, or fallback to using defparameter -- this solution has the advantage of being portable and future-proof, unless some implementation gets specifically bitchy about the use of non-EQ stuff in compile-file'd defconstant's). [ Fran?ois-Ren? ?VB Rideau | Reflection&Cybernethics | http://fare.tunes.org ] Freedom is strangely ephemeral. It is something like breathing; one only becomes acutely aware of its importance when one is choking. -- William E. Simon From adejneka at comail.ru Mon Aug 29 02:30:37 2005 From: adejneka at comail.ru (Alexey Dejneka) Date: Mon, 29 Aug 2005 06:30:37 +0400 Subject: [cl-typesetting-devel] Re: cl-pdf vs the fasl cache In-Reply-To: <007f01c5ac1b$69011420$0a02a8c0@marcxp> (Marc Battyani's message of "Sun, 28 Aug 2005 23:56:51 +0200") References: <653bea16050825221261c16b57@mail.gmail.com> <653bea16050825234936084c5d@mail.gmail.com> <007f01c5ac1b$69011420$0a02a8c0@marcxp> Message-ID: <87oe7h4gsj.fsf@comail.ru> "Marc Battyani" writes: > Far? wrote: [...] >>(defmacro defconstant* (name value &optional doc) >> `(eval-when (:compile-toplevel :load-toplevel :execute) >> (unless (boundp ',name) >> (defconstant ,name ,value ,@(when doc (list doc)))))) This version preserves top-levelness of DEFCONSTANT: (defmacro defconstant* (name value &optional doc) `(defconstant ,name (if (boundp ',name) (symbol-value ',name) ,value) ,@(when doc (list doc)))) -- Regards, Alexey Dejneka "Alas, the spheres of truth are less transparent than those of illusion." -- L.E.J. Brouwer From marc.battyani at fractalconcept.com Mon Aug 29 10:17:30 2005 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Mon, 29 Aug 2005 12:17:30 +0200 Subject: [cl-typesetting-devel] Re: cl-pdf vs the fasl cache References: <653bea16050825221261c16b57@mail.gmail.com><653bea16050825234936084c5d@mail.gmail.com><007f01c5ac1b$69011420$0a02a8c0@marcxp> <87oe7h4gsj.fsf@comail.ru> Message-ID: <018301c5ac82$de86f680$0a02a8c0@marcxp> Alexey Dejneka wrote: "Marc Battyani" writes: >> Far? wrote: >[...] >>>(defmacro defconstant* (name value &optional doc) >>> `(eval-when (:compile-toplevel :load-toplevel :execute) >>> (unless (boundp ',name) >>> (defconstant ,name ,value ,@(when doc (list doc)))))) > >This version preserves top-levelness of DEFCONSTANT: > >(defmacro defconstant* (name value &optional doc) > `(defconstant ,name > (if (boundp ',name) (symbol-value ',name) ,value) > ,@(when doc (list doc)))) OK I will use this version. Thanks, Marc From marc.battyani at fractalconcept.com Mon Aug 29 10:23:21 2005 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Mon, 29 Aug 2005 12:23:21 +0200 Subject: [cl-typesetting-devel] Re: cl-pdf vs the fasl cache References: <653bea16050825221261c16b57@mail.gmail.com> <007701c5ac1b$258dc670$0a02a8c0@marcxp> <653bea160508281725239b0b3c@mail.gmail.com> Message-ID: <018901c5ac83$af039cf0$0a02a8c0@marcxp> Far? wrote: On 8/28/05, Marc Battyani wrote: >> >> Cool. So now I'm waiting for the scribe syntax front-end for >> cl-typesetting. >> ;-) >> >Hey, hopefully :-) Though my goal is not 100% backward compatibility with >the original scribe syntax (Skribe doesn't have it either), only a way to >integrate all my scribe files into a new CL-based setting -- I expect I'll >have to update my files a bit. OK. > When I generate some documents both in HTML and pdf, I generally use 2 > rather different kind of layouts styles. So I write 2 sets of functions. >Sure. And Scribe was precisely but a big switch around several sets of >functions that would dump html, text or buggy latex from a same document. >Still, do you have something published or publishable regarding a functional >interface to generating either HTML or PDF from a same document? Sorry no. There is an HTML to cl-typesetting converter in the contrib directory. It's not what you want but maybe it can be a starting point, at least to see the equivalent constructs. Marc