From marc.battyani at fractalconcept.com Tue May 11 12:33:57 2004 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Tue, 11 May 2004 14:33:57 +0200 Subject: [cl-typesetting-devel] Oslo workshop References: <0eb301c42b9b$2dca62a0$0a02a8c0@marcxp> <109901c42bc3$a5a86470$0a02a8c0@marcxp> Message-ID: <089201c43754$3c0f6940$0a02a8c0@marcxp> Arthur Lemmens wrote: > P.S. Are you, or anyone else on this list, planning to go to the > Lisp workshop in Oslo? Finally yes. I got my tickets to Oslo today :) Anyone else going there (http://www.cs.uni-bonn.de/~costanza/lisp-ecoop/) ? Marc From james at unlambda.com Tue May 11 12:45:34 2004 From: james at unlambda.com (James A. Crippen) Date: Tue, 11 May 2004 12:45:34 -0000 Subject: [cl-typesetting-devel] Problem with svn? Message-ID: I can't seem to find anything at http://www.fractalconcept.com:8000/svn/public/ for either cl-typesetting or cl-pdf. Has something happened to the Subversion server? -- James A. Crippen Lambda Unlimited 61.2204N, 149.8964W Recursion 'R' Us Anchorage, Alaska, USA, Earth Y = \f.(\x.f(xx))(\x.f(xx)) From marc.battyani at fractalconcept.com Tue May 11 12:59:59 2004 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Tue, 11 May 2004 14:59:59 +0200 Subject: [cl-typesetting-devel] Problem with svn? References: Message-ID: <08d601c43757$de9dea30$0a02a8c0@marcxp> James A. Crippen wrote: > I can't seem to find anything at > http://www.fractalconcept.com:8000/svn/public/ > for either cl-typesetting or cl-pdf. Has something happened to the > Subversion server? You probably missed the following message ;-) (BTW the URL were wrong. Here are the correct ones) > As cl-typesetting depends heavily on cl-pdf, I merged the cl-pdf and > cl-typesetting repositories into a single repository. > > The full repository is here: > http://www.fractalconcept.com:8000/public/open-source/ > > The cl-pdf part: > http://www.fractalconcept.com:8000/public/open-source/cl-pdf/ > > The cl-typesetting part: > http://www.fractalconcept.com:8000/public/open-source/cl-typesetting/ > > It's a subversion 1.0 repository. They should work better. Marc From marc.battyani at fractalconcept.com Tue May 11 13:57:12 2004 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Tue, 11 May 2004 15:57:12 +0200 Subject: [cl-typesetting-devel] cl-pdf, cl-tpesetting and mod_lisp repositories and tarballs Message-ID: <091c01c4375f$dce93bb0$0a02a8c0@marcxp> In my previous announce of the merging of the cl-pdf and cl-typesetting repositories, the URL I gave were wrong. Here are the correct ones: The full repository is here: http://www.fractalconcept.com:8000/public/open-source/ The cl-pdf part: http://www.fractalconcept.com:8000/public/open-source/cl-pdf/ The cl-typesetting part: http://www.fractalconcept.com:8000/public/open-source/cl-typesetting/ The mod_lisp part: http://www.fractalconcept.com:8000/public/open-source/mod_lisp/ It's a subversion 1.0 repository. There are also tarballs for cl-pdf and cl-typesetting: http://www.fractalconcept.com/download/cl-pdf-current.tgz http://www.fractalconcept.com/download/cl-typesetting-current.tgz BTW the (somewhat outdated) home pages for these projects are here: http://www.fractalconcept.com/asp/html/cl-pdf.html http://www.fractalconcept.com/asp/html/cl-typesetting.html http://www.fractalconcept.com/asp/html/mod_lisp.html Marc From erik at nittin.net Tue May 11 14:44:03 2004 From: erik at nittin.net (Erik Enge) Date: Tue, 11 May 2004 10:44:03 -0400 Subject: [cl-typesetting-devel] Drawing multiple pages woes. Message-ID: (defun draw-page (content &key (width *letter-width*) (height *letter-height*)) (let ((x 0) (y height) (dx width) (dy height)) (pdf:with-page () (pdf:with-saved-state (pdf:translate x y) (let ((box (typeset::make-filled-vbox content dx dy))) (when box (typeset::stroke box 0 0))))))) I use it like this: (pdf:with-document () (let ((content (typeset::compile-text () ...))) (dolist (box (typeset::boxes content)) (declare (ignore box)) (draw-page content))) ... write document to stream ... For documents with one page, this works great. For documents with more than one page I consistently get 204 empty pages (except that the first page has my logo and some headers... perhaps the first box or somesuch?). I tried using (loop while (typeset::boxes content) do ...) as one suggested but that ends up in what seems to be an infinite loop. Any clues as to what I'm doing wrong? Thanks, Erik. From marc.battyani at fractalconcept.com Tue May 11 15:49:36 2004 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Tue, 11 May 2004 17:49:36 +0200 Subject: [cl-typesetting-devel] Drawing multiple pages woes. References: Message-ID: <0a1401c4376f$90df7e40$0a02a8c0@marcxp> Erik Enge wrote: > (defun draw-page (content &key (width *letter-width*) (height > *letter-height*)) > (let ((x 0) > (y height) > (dx width) > (dy height)) > (pdf:with-page () > (pdf:with-saved-state > (pdf:translate x y) > (let ((box (typeset::make-filled-vbox content dx dy))) > (when box > (typeset::stroke box 0 0))))))) > > I use it like this: > > (pdf:with-document () > (let ((content (typeset::compile-text () ...))) > (dolist (box (typeset::boxes content)) > (declare (ignore box)) > (draw-page content))) > ... write document to stream ... This looks suspicious to me :) dolist takes the list of the boxes once and uses it after so this should not even work for one page IMO. Something like this should work: (pdf:with-document () (let ((content (typeset::compile-text () ...))) (loop while (typeset::boxes content) do (draw-page content)))) ... write document to stream ... Marc From erik at nittin.net Tue May 11 16:31:29 2004 From: erik at nittin.net (Erik Enge) Date: Tue, 11 May 2004 12:31:29 -0400 Subject: [cl-typesetting-devel] Drawing multiple pages woes. In-Reply-To: <0a1401c4376f$90df7e40$0a02a8c0@marcxp> References: <0a1401c4376f$90df7e40$0a02a8c0@marcxp> Message-ID: On May 11, 2004, at 11:49 AM, Marc Battyani wrote: > Something like this should work: > > (pdf:with-document () > (let ((content (typeset::compile-text () ...))) > (loop while (typeset::boxes content) do > (draw-page content)))) > ... write document to stream ... It doesn't, it enters what seems to be an infinite loop. How can I debug this? Erik. From marc.battyani at fractalconcept.com Tue May 11 16:57:15 2004 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Tue, 11 May 2004 18:57:15 +0200 Subject: [cl-typesetting-devel] Drawing multiple pages woes. References: <0a1401c4376f$90df7e40$0a02a8c0@marcxp> Message-ID: <0a5801c43779$04119c50$0a02a8c0@marcxp> Erik Enge wrote: > On May 11, 2004, at 11:49 AM, Marc Battyani wrote: > > > Something like this should work: > > > > (pdf:with-document () > > (let ((content (typeset::compile-text () ...))) > > (loop while (typeset::boxes content) do > > (draw-page content)))) > > ... write document to stream ... > > It doesn't, it enters what seems to be an infinite loop. How can I > debug this? Maybe you should try to print the first boxes to see if they change. When you break the loop, where is it stuck ? Have you traced make-filled-vbox or v-split ? Does the test examples of cl-typesetting work ? Marc From erik at nittin.net Tue May 11 18:23:21 2004 From: erik at nittin.net (Erik Enge) Date: Tue, 11 May 2004 14:23:21 -0400 Subject: [cl-typesetting-devel] Drawing multiple pages woes. In-Reply-To: <0a5801c43779$04119c50$0a02a8c0@marcxp> References: <0a1401c4376f$90df7e40$0a02a8c0@marcxp> <0a5801c43779$04119c50$0a02a8c0@marcxp> Message-ID: <483A50B2-A378-11D8-AF18-000A95CEC334@nittin.net> On May 11, 2004, at 12:57 PM, Marc Battyani wrote: > Maybe you should try to print the first boxes to see if they change. I have one box: MYPACK 23 > (typeset::boxes *pdf-document*) (#) I printed (typeset::boxes *pdf-document*) and it went like this: (#) (#) (#) (#) (#) (#) (#) (#) (#) (#) (#) (#) (#) (#) (#) It changes three times and the last one just keeps on going for minutes and minutes until I break it. > When you break the loop, where is it stuck ? draw-page, but it doesn't tell me exactly where in draw-page (LW for Mac) > Have you traced make-filled-vbox or v-split ? 0 TYPESET:MAKE-FILLED-VBOX > ... >> TYPESET::CONTENT : # >> TYPESET::DX : 612 >> TYPESET::DY : 792 0 TYPESET:MAKE-FILLED-VBOX < ... << VALUE-0 : # Can't find a v-split symbol in the typeset package. I believe I have version 0.7. > Does the test examples of cl-typesetting work ? Yes, and in particular, the multi-page-hello works just fine. Creates seven pages with text. My document is composed of some pretty big tables, a few paragraphs and image and not much else. Hm, I just got this funny feeling that I've been told that tables won't work well over multiple-pages. Have I run into a wall here? Erik. From marc.battyani at fractalconcept.com Tue May 11 18:56:51 2004 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Tue, 11 May 2004 20:56:51 +0200 Subject: [cl-typesetting-devel] Drawing multiple pages woes. References: <0a1401c4376f$90df7e40$0a02a8c0@marcxp><0a5801c43779$04119c50$0a02a8c0@marcxp> <483A50B2-A378-11D8-AF18-000A95CEC334@nittin.net> Message-ID: <0ad501c43789$b95ccb10$0a02a8c0@marcxp> Erik Enge wrote: > My document is composed of some pretty big tables, a few paragraphs and > image > and not much else. Hm, I just got this funny feeling that I've been > told that tables won't > work well over multiple-pages. Have I run into a wall here? Yes, in those early cl-typesetting days, there was no support for multipage (splittable) tables. But thanks to Dmitri, they are supported now. :) So you should get the latest cl-typesetting and look at the multi-page-example in test. Or you can make one table for each row. This was what I used before. Marc From erik at nittin.net Tue May 11 19:07:33 2004 From: erik at nittin.net (Erik Enge) Date: Tue, 11 May 2004 15:07:33 -0400 Subject: [cl-typesetting-devel] Drawing multiple pages woes. In-Reply-To: <0ad501c43789$b95ccb10$0a02a8c0@marcxp> References: <0a1401c4376f$90df7e40$0a02a8c0@marcxp><0a5801c43779$04119c50$0a02a8c0@marcxp> <483A50B2-A378-11D8-AF18-000A95CEC334@nittin.net> <0ad501c43789$b95ccb10$0a02a8c0@marcxp> Message-ID: <75198333-A37E-11D8-AF18-000A95CEC334@nittin.net> On May 11, 2004, at 2:56 PM, Marc Battyani wrote: > But thanks to Dmitri, they are supported now. :) (Thanks Dmitri!) > So you should get the latest cl-typesetting and look at the Would that be the SVN version or the one on the website? I looked in the change-log file from the one on the website and it looks like that's the version I have but I want to make sure there's not another version lurking somewhere. http://www.fractalconcept.com/download/cl-typesetting-current.tgz > Or you can make one table for each row. Nah, they won't line up properly then. Erik. From marc.battyani at fractalconcept.com Tue May 11 19:20:43 2004 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Tue, 11 May 2004 21:20:43 +0200 Subject: [cl-typesetting-devel] Drawing multiple pages woes. References: <0a1401c4376f$90df7e40$0a02a8c0@marcxp><0a5801c43779$04119c50$0a02a8c0@marcxp> <483A50B2-A378-11D8-AF18-000A95CEC334@nittin.net> <0ad501c43789$b95ccb10$0a02a8c0@marcxp> <75198333-A37E-11D8-AF18-000A95CEC334@nittin.net> Message-ID: <0b0701c4378d$0f116090$0a02a8c0@marcxp> Erik Enge wrote: > Would that be the SVN version or the one on the website? I looked in > the > change-log file from the one on the website and it looks like that's > the version > I have but I want to make sure there's not another version lurking > somewhere. > > http://www.fractalconcept.com/download/cl-typesetting-current.tgz This is the same as the one in the repository. It is generated when I publish the repository. If you want to see the commit logs then you have to use subversion, I fill the change log file only when I release an official version. BTW this reminds me that I have to change the old repository URL which is obsolete on the web site Marc From erik at nittin.net Tue May 11 20:16:37 2004 From: erik at nittin.net (Erik Enge) Date: Tue, 11 May 2004 16:16:37 -0400 Subject: [cl-typesetting-devel] Drawing multiple pages woes. In-Reply-To: <0b0701c4378d$0f116090$0a02a8c0@marcxp> References: <0a1401c4376f$90df7e40$0a02a8c0@marcxp><0a5801c43779$04119c50$0a02a8c0@marcxp> <483A50B2-A378-11D8-AF18-000A95CEC334@nittin.net> <0ad501c43789$b95ccb10$0a02a8c0@marcxp> <75198333-A37E-11D8-AF18-000A95CEC334@nittin.net> <0b0701c4378d$0f116090$0a02a8c0@marcxp> Message-ID: <1B2C9418-A388-11D8-AF18-000A95CEC334@nittin.net> On May 11, 2004, at 3:20 PM, Marc Battyani wrote: > This is the same as the one in the repository. Ok. I installed it. Upgraded cl-pdf and installed iterate. No difference, (loop while (boxes content) do (draw-page content)) still just runs and runs with no end in sight. Will I need to change my code to use the code that renders tables across pages? I tried messing a bit with the cl-typesetting-current/test.lisp file. I changed the multi-page-hello example to include a table: (defun multi-page-hello (&optional (file #P"/tmp/hello.pdf")) (pdf:with-document () (let ((content (compile-text () (vspace 100) (table (:col-widths '(100 200)) ;;; start Erik changes (dotimes (time 35) (row () (cell () (paragraph () (put-string "test")))))) ;;; end Erik changes (paragraph (:h-align :center :font "Helvetica-Bold" :font-size 50 :color '(0.0 0 0.8)) "cl-typesetting" :eol (vspace 2) (hrule :dy 1) (with-style (:font "Times-Italic" :font-size 26) "The cool Common Lisp typesetting system") (vspace 50) (with-style (:font "Times-Italic" :font-size 36 :color '(0.0 0 0.8)) (dotimes (i 100) (put-string "Hello World!")(new-line))))))) (loop while (boxes content) do (pdf:with-page () (pdf:set-line-width 0.1) (draw-block content 20 800 545 700)))) (pdf:write-document file))) This one will make a PDF when run. Try changing that 35 to 36. It will never (well, maybe sometime, I usually give up waiting after five minutes) create a PDF and I have to break it. I bet 36 makes it flow over into a second page. Is this reproducible on your end? Is there something extra I need to do for Dmitri's multi-page tables to work? Thanks for all the help, Erik. From kw at w-m-p.com Tue May 11 20:22:53 2004 From: kw at w-m-p.com (Klaus Weidner) Date: Tue, 11 May 2004 15:22:53 -0500 Subject: [cl-typesetting-devel] Drawing multiple pages woes. In-Reply-To: <1B2C9418-A388-11D8-AF18-000A95CEC334@nittin.net> References: <483A50B2-A378-11D8-AF18-000A95CEC334@nittin.net> <0ad501c43789$b95ccb10$0a02a8c0@marcxp> <75198333-A37E-11D8-AF18-000A95CEC334@nittin.net> <0b0701c4378d$0f116090$0a02a8c0@marcxp> <1B2C9418-A388-11D8-AF18-000A95CEC334@nittin.net> Message-ID: <20040511202253.GA11608@w-m-p.com> On Tue, May 11, 2004 at 04:16:37PM -0400, Erik Enge wrote: > (table (:col-widths '(100 200)) ;;; start Erik changes You need to specify that the rows may be split among pages. The default is to keep the table on a single page. (table (:col-widths '(100 200) :splittable-p t) -Klaus From erik at nittin.net Tue May 11 20:30:03 2004 From: erik at nittin.net (Erik Enge) Date: Tue, 11 May 2004 16:30:03 -0400 Subject: [cl-typesetting-devel] Drawing multiple pages woes. In-Reply-To: <20040511202253.GA11608@w-m-p.com> References: <483A50B2-A378-11D8-AF18-000A95CEC334@nittin.net> <0ad501c43789$b95ccb10$0a02a8c0@marcxp> <75198333-A37E-11D8-AF18-000A95CEC334@nittin.net> <0b0701c4378d$0f116090$0a02a8c0@marcxp> <1B2C9418-A388-11D8-AF18-000A95CEC334@nittin.net> <20040511202253.GA11608@w-m-p.com> Message-ID: On May 11, 2004, at 4:22 PM, Klaus Weidner wrote: > You need to specify that the rows may be split among pages. The default > is to keep the table on a single page. Aha! > (table (:col-widths '(100 200) :splittable-p t) I tried this with 36 in the dotimes form. It's still running and doesn't look like it's planning to end. This works for you? Are you using the same versions as I am? I have the current version of cl-pdf, cl-typesetting and iterate. Erik. From marc.battyani at fractalconcept.com Tue May 11 20:57:56 2004 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Tue, 11 May 2004 22:57:56 +0200 Subject: [cl-typesetting-devel] Drawing multiple pages woes. References: <483A50B2-A378-11D8-AF18-000A95CEC334@nittin.net><0ad501c43789$b95ccb10$0a02a8c0@marcxp><75198333-A37E-11D8-AF18-000A95CEC334@nittin.net><0b0701c4378d$0f116090$0a02a8c0@marcxp><1B2C9418-A388-11D8-AF18-000A95CEC334@nittin.net><20040511202253.GA11608@w-m-p.com> Message-ID: <0b5701c4379a$b4ae0050$0a02a8c0@marcxp> Erik Enge wrote: > On May 11, 2004, at 4:22 PM, Klaus Weidner wrote: > > > You need to specify that the rows may be split among pages. The default > > is to keep the table on a single page. > > Aha! > > > (table (:col-widths '(100 200) :splittable-p t) > > I tried this with 36 in the dotimes form. It's still running and > doesn't look like > it's planning to end. This works for you? Are you using the same > versions as I am? >From the example it's: splittable-p 1 not :splittable-p t A volunteer is needed for the doc ;-) Have you tried the multi-page-example ? Also can you try with smaller tables so that we can see if it's a table problem or another one. Marc From kw at w-m-p.com Wed May 12 01:00:22 2004 From: kw at w-m-p.com (Klaus Weidner) Date: Tue, 11 May 2004 20:00:22 -0500 Subject: [cl-typesetting-devel] Drawing multiple pages woes. In-Reply-To: <1B2C9418-A388-11D8-AF18-000A95CEC334@nittin.net> References: <483A50B2-A378-11D8-AF18-000A95CEC334@nittin.net> <0ad501c43789$b95ccb10$0a02a8c0@marcxp> <75198333-A37E-11D8-AF18-000A95CEC334@nittin.net> <0b0701c4378d$0f116090$0a02a8c0@marcxp> <1B2C9418-A388-11D8-AF18-000A95CEC334@nittin.net> Message-ID: <20040512010021.GA16839@w-m-p.com> Hello, I found the problem. The table was nested inside a "compile-text", which does not handle the needed splitting. You need to run "draw-pages" directly on the table. Yes, this is ugly and should be changed. Also, I strongly recommend using the higher-level "draw-pages" functions, that at least would have raised a condition to indicate that it can't fit the content on the current page. I'd really like to take a shot at redoing the table logic, but am badly out of time at the moment. -Klaus (defun multi-page-hello-erik (&optional (file #P"/tmp/hello.pdf")) (with-document () (let ((margins '(72 72 72 72)) (content-1 (compile-text () "This is before the table.")) (content-2 (table (:col-widths '(100 200) :splittable-p t) (header-row (:background-color :gray) (cell () "table header")) (footer-row (:background-color :gray) (cell () "table footer")) (dotimes (time 60) (row () (cell () (paragraph () "test")))))) (content-3 (compile-text () "And this is after the table."))) (draw-pages content-1 :margins margins) (draw-pages content-2 :margins margins) (draw-pages content-3 :margins margins)) (when pdf:*page* (finalize-page pdf:*page*)) (pdf:write-document file))) From marc.battyani at fractalconcept.com Wed May 12 08:29:43 2004 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Wed, 12 May 2004 10:29:43 +0200 Subject: [cl-typesetting-devel] Drawing multiple pages woes. References: <483A50B2-A378-11D8-AF18-000A95CEC334@nittin.net><0ad501c43789$b95ccb10$0a02a8c0@marcxp><75198333-A37E-11D8-AF18-000A95CEC334@nittin.net><0b0701c4378d$0f116090$0a02a8c0@marcxp><1B2C9418-A388-11D8-AF18-000A95CEC334@nittin.net> <20040512010021.GA16839@w-m-p.com> Message-ID: <0c7301c437fb$47ab3ca0$0a02a8c0@marcxp> [I'm sorry but yesterday, I missed Erik's message with the example, so my advice to try with the example was out of sync :( I take this example as the test base now.] Klaus Weidner wrote: > I found the problem. The table was nested inside a "compile-text", > which does not handle the needed splitting. You need to run "draw-pages" > directly on the table. Yes, this is ugly and should be changed. In fact the problem is related to the fact that the table was not inline. When a table is not inline, it is put in an hbox and the v-split function will not split it. So with (table (:col-widths '(100 200) :splittable-p 1 :inline t) the table is split and there is no infinite loop. The problem is that the split is not correct. (defun multi-page-hello (&optional (file #P"/tmp/hello.pdf")) (pdf:with-document () (let ((content (compile-text () (vspace 100) (table (:col-widths '(100 200) :splittable-p 1 :inline t) ;;; start Erik changes (dotimes (time 50) (row () (cell () (paragraph () (put-string (format nil "test ~d" time))))))) ;;; end Erik changes :eol (paragraph (:h-align :center :font "Helvetica-Bold" :font-size 50 :color '(0.0 0 0.8)) "cl-typesetting" :eol (vspace 2) (hrule :dy 1) (with-style (:font "Times-Italic" :font-size 26) "The cool Common Lisp typesetting system") (vspace 50) (with-style (:font "Times-Italic" :font-size 36 :color '(0.0 0 0.8)) (dotimes (i 100) (put-string "Hello World!")(new-line))))))) (loop while (boxes content) do (pdf:with-page () (pdf:set-line-width 0.1) (draw-block content 20 800 545 700)))) (pdf:write-document file))) In the multi-page-example the table is correctly splitted though. > Also, I strongly recommend using the higher-level "draw-pages" functions, > that at least would have raised a condition to indicate that it can't fit > the content on the current page. > > I'd really like to take a shot at redoing the table logic, but am badly > out of time at the moment. Yes the lack of time is the major problem :( Have you advanced the HTML renderer ? Marc From erik at nittin.net Wed May 12 12:10:40 2004 From: erik at nittin.net (Erik Enge) Date: Wed, 12 May 2004 08:10:40 -0400 Subject: [cl-typesetting-devel] Drawing multiple pages woes. In-Reply-To: <0c7301c437fb$47ab3ca0$0a02a8c0@marcxp> References: <483A50B2-A378-11D8-AF18-000A95CEC334@nittin.net><0ad501c43789$b95ccb10$0a02a8c0@marcxp><75198333-A37E-11D8-AF18-000A95CEC334@nittin.net><0b0701c4378d$0f116090$0a02a8c0@marcxp><1B2C9418-A388-11D8-AF18-000A95CEC334@nittin.net> <20040512010021.GA16839@w-m-p.com> <0c7301c437fb$47ab3ca0$0a02a8c0@marcxp> Message-ID: <629C956A-A40D-11D8-AF18-000A95CEC334@nittin.net> On May 12, 2004, at 4:29 AM, Marc Battyani wrote: > So with (table (:col-widths '(100 200) :splittable-p 1 :inline t) the > table > is split and there is no infinite loop. This works well and as your described. Thanks for all your time and help! Erik. From erik at nittin.net Wed May 12 12:55:07 2004 From: erik at nittin.net (Erik Enge) Date: Wed, 12 May 2004 08:55:07 -0400 Subject: [cl-typesetting-devel] Layout differences between version 0.7 and the current. Message-ID: <983ED682-A413-11D8-AF18-000A95CEC334@nittin.net> Observe the differences in the layout between the two attachments: -------------- next part -------------- A non-text attachment was scrubbed... Name: Sysadm Contacts - funny layout.pdf Type: application/pdf Size: 3977 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Sysadm Contacts- good layout.pdf Type: application/pdf Size: 5549 bytes Desc: not available URL: -------------- next part -------------- The funny layout one is the current cl-typesetting version. The good layout is the 0.7 version. The only changes, besides the versions being different, is the :splittable-p 1 :inline t options to the table operator. I've tried everything I can think of to make the funny layout more like the \ good layout but I'm lost. Got a clue? The text in the funny layout version seems to be align to the table below whereas in the good layout version it seems to honor my :h-align :centered option to the paragraph operator. The code is basically an image in a paragraph, some plain paragraphs, vspaces and then the hrule and finally a table. Thanks in advance, Erik. From marc.battyani at fractalconcept.com Wed May 12 13:38:22 2004 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Wed, 12 May 2004 15:38:22 +0200 Subject: [cl-typesetting-devel] Layout differences between version 0.7 andthe current. References: <983ED682-A413-11D8-AF18-000A95CEC334@nittin.net> Message-ID: <0dc401c43826$67dd0ff0$0a02a8c0@marcxp> > to the table below whereas in the good layout version it seems to honor > my :h-align :centered > option to the paragraph operator. :centered has been renamed to :center for consistency. Tell me if it's better. Marc From erik at nittin.net Wed May 12 13:51:58 2004 From: erik at nittin.net (Erik Enge) Date: Wed, 12 May 2004 09:51:58 -0400 Subject: [cl-typesetting-devel] Layout differences between version 0.7 andthe current. In-Reply-To: <0dc401c43826$67dd0ff0$0a02a8c0@marcxp> References: <983ED682-A413-11D8-AF18-000A95CEC334@nittin.net> <0dc401c43826$67dd0ff0$0a02a8c0@marcxp> Message-ID: <895DECA5-A41B-11D8-AF18-000A95CEC334@nittin.net> On May 12, 2004, at 9:38 AM, Marc Battyani wrote: > :centered has been renamed to :center for consistency. > > Tell me if it's better. Yep, that works great. Thanks! Erik. From kw at w-m-p.com Wed May 12 14:36:30 2004 From: kw at w-m-p.com (Klaus Weidner) Date: Wed, 12 May 2004 09:36:30 -0500 Subject: [cl-typesetting-devel] Drawing multiple pages woes. In-Reply-To: <0c7301c437fb$47ab3ca0$0a02a8c0@marcxp> References: <20040512010021.GA16839@w-m-p.com> <0c7301c437fb$47ab3ca0$0a02a8c0@marcxp> Message-ID: <20040512143630.GA27169@w-m-p.com> On Wed, May 12, 2004 at 10:29:43AM +0200, Marc Battyani wrote: > In fact the problem is related to the fact that the table was not inline. > When a table is not inline, it is put in an hbox and the v-split function > will not split it. > So with (table (:col-widths '(100 200) :splittable-p 1 :inline t) the table > is split and there is no infinite loop. > > The problem is that the split is not correct. Ah, that explains it. I'll try to take a look at what's happening with the split. > Yes the lack of time is the major problem :( > Have you advanced the HTML renderer ? Not really - I made some crude hacks to generate the change bars, but this was initially based on wdiff and Perl glue, and needs to be rewritten. Maybe on the next rainy weekend I'll be able to make some progress on it... -Klaus From marc.battyani at fractalconcept.com Wed May 12 14:56:09 2004 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Wed, 12 May 2004 16:56:09 +0200 Subject: [cl-typesetting-devel] Drawing multiple pages woes. References: <20040512010021.GA16839@w-m-p.com><0c7301c437fb$47ab3ca0$0a02a8c0@marcxp> <20040512143630.GA27169@w-m-p.com> Message-ID: <0e2f01c43831$44004d80$0a02a8c0@marcxp> Klaus Weinder wrote: > > The problem is that the split is not correct. > > Ah, that explains it. I'll try to take a look at what's happening with > the split. IIRC it was the huge loops that was not handled properly by CLISP. It's time to use ITERATE :) > > Yes the lack of time is the major problem :( > > Have you advanced the HTML renderer ? > > Not really - I made some crude hacks to generate the change bars, but > this was initially based on wdiff and Perl glue, and needs to be > rewritten. Maybe on the next rainy weekend I'll be able to make some > progress on it... OK what weather forcast do you have for the next WE ? ;-) Marc From alemmens at xs4all.nl Thu May 13 11:36:33 2004 From: alemmens at xs4all.nl (Arthur Lemmens) Date: Thu, 13 May 2004 13:36:33 +0200 Subject: [cl-typesetting-devel] Re: Oslo workshop In-Reply-To: <089201c43754$3c0f6940$0a02a8c0@marcxp> References: <0eb301c42b9b$2dca62a0$0a02a8c0@marcxp> <109901c42bc3$a5a86470$0a02a8c0@marcxp> <089201c43754$3c0f6940$0a02a8c0@marcxp> Message-ID: Marc Battyani wrote: > Arthur Lemmens wrote: > >> P.S. Are you, or anyone else on this list, planning to go to the >> Lisp workshop in Oslo? > > Finally yes. I got my tickets to Oslo today :) > > Anyone else going there (http://www.cs.uni-bonn.de/~costanza/lisp-ecoop/) ? I'm going to order my tickets tomorrow. I'm looking forward to meeting you. Regards, Arthur Lemmens From brian.sorg at liberatinginsight.com Sun May 16 21:40:50 2004 From: brian.sorg at liberatinginsight.com (Brian Sorg) Date: Sun, 16 May 2004 16:40:50 -0500 Subject: [cl-typesetting-devel] Cl typesetting and cl-pdf documentation creation Message-ID: <40A7DFE2.8050707@liberatinginsight.com> Hello everyone, I hope you are having an enjoyable weekend. I am fairly new to the cl-pdf and cl-typesetting software and have decided that as I learn how to use it, I would take the time to document what I discover so that others could benefit as well. On Marc Battyani's suggestion I am contacting the entire group to see if others have recommendations on the structure/format/method of creation that the documentation should take. Ultimately, I feel that the documentation should be published as a cl-typesetting and an html document. The challenge is finding an agreeable method so that anyone can contribute to the documentation easiliy. I look forward to hearing your ideas. Brian Sorg Liberating Insight LLC www.LiberatingInsight.com From alemmens at xs4all.nl Mon May 17 07:42:26 2004 From: alemmens at xs4all.nl (Arthur Lemmens) Date: Mon, 17 May 2004 09:42:26 +0200 Subject: [cl-typesetting-devel] Re: [cl-pdf-devel] Cl typesetting and cl-pdf documentation creation In-Reply-To: <40A7DFE2.8050707@liberatinginsight.com> References: <40A7DFE2.8050707@liberatinginsight.com> Message-ID: Brian Sorg wrote: > I am fairly new to the cl-pdf and cl-typesetting software and have > decided that as I learn how to use it, I would take the time to > document what I discover so that others could benefit as well. Great. > On Marc Battyani's suggestion I am contacting the entire group to see > if others have recommendations on the structure/format/method of creation > that the documentation should take. My recommendation would be not to bother with "structure/format/method of creation" at all and just get started. Any documentation, even if it's just a plain old text file, is better than no documentation at all. Once you have written down enough documentation that meta-issues like structure and format become relevant, you'll be in a much better position to make an informed decision about such issues. Arthur Lemmens From marc.battyani at fractalconcept.com Mon May 17 07:56:48 2004 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Mon, 17 May 2004 09:56:48 +0200 Subject: [cl-typesetting-devel] Re: [cl-pdf-devel] Cl typesetting and cl-pdfdocumentation creation References: <40A7DFE2.8050707@liberatinginsight.com> Message-ID: <1f5001c43be4$84db18b0$0a02a8c0@marcxp> Arthur Lemmens wrote: > Brian Sorg wrote: > > > I am fairly new to the cl-pdf and cl-typesetting software and have > > decided that as I learn how to use it, I would take the time to > > document what I discover so that others could benefit as well. > > Great. > > > On Marc Battyani's suggestion I am contacting the entire group to see > > if others have recommendations on the structure/format/method of creation > > that the documentation should take. > > My recommendation would be not to bother with "structure/format/method > of creation" at all and just get started. Any documentation, even if it's > just a plain old text file, is better than no documentation at all. Once > you have written down enough documentation that meta-issues like structure > and format become relevant, you'll be in a much better position to make > an informed decision about such issues. I agree with that. A documentation in a bad format is better than no docs in a nice format ;-) Though of course it would be better to use a format that can be converted to/processed by cl-typesetting. So if anybody already have some kind of user friendly syntax that could be used please raise your hand! Marc From erik at nittin.net Mon May 17 13:59:43 2004 From: erik at nittin.net (Erik Enge) Date: Mon, 17 May 2004 09:59:43 -0400 Subject: [cl-typesetting-devel] Tables repeat. Message-ID: <72DBE9D2-A80A-11D8-B465-000A95CEC334@nittin.net> Funny thing is happening. I'm using draw-page (defun draw-page (content &key (width *letter-width*) (height *letter-height*)) (let ((x 0) (y height) (dx width) (dy height)) (loop while (typeset::boxes content) do (pdf:with-page () (pdf:with-saved-state (pdf:translate x y) (let ((box (typeset::make-filled-vbox content dx dy))) (when box (typeset::stroke box 0 0)))))))) to make my document. It's basically a few paragraphs at top and then one big table (four or five pages long). Here's what's happening: the document is only three pages long and page 1 is repeated on page 3 (minus the paragraph parts; only the table is repeated) and then the document ends. Anything I can do to debug this? I'm using the :splittable-p 1 :inline t arguments to the table operator as suggested. Thanks, Erik. From kw at w-m-p.com Mon May 17 16:58:21 2004 From: kw at w-m-p.com (Klaus Weidner) Date: Mon, 17 May 2004 11:58:21 -0500 Subject: [cl-typesetting-devel] Re: [cl-pdf-devel] Cl typesetting and cl-pdfdocumentation creation In-Reply-To: <1f5001c43be4$84db18b0$0a02a8c0@marcxp> References: <40A7DFE2.8050707@liberatinginsight.com> <1f5001c43be4$84db18b0$0a02a8c0@marcxp> Message-ID: <20040517165821.GA26376@w-m-p.com> On Mon, May 17, 2004 at 09:56:48AM +0200, Marc Battyani wrote: > I agree with that. A documentation in a bad format is better than no docs in > a nice format ;-) > Though of course it would be better to use a format that can be converted > to/processed by cl-typesetting. So if anybody already have some kind of user > friendly syntax that could be used please raise your hand! I think the XHTML to cl-typesetting converter I've been working on would be an option for this. The table support is still a bit rudimentary, but this could be extended fairly easily. However, if you want the documentation to directly demonstrate advanced formatting tricks and features, it would probably need to be done directly in low-level cl-typesetting code. Personally, I quite like the Perl Plain Old Documentation (POD) format, since that has very non-intrusive markup and is pleasant to edit. POD supports formatter specific sections, so with a bit of hacking you could do this: =head3 Another example Here's a more complex example: (... fancy Lisp code ...) for which the rendered output looks like this: =begin cl-typesetting (... fancy Lisp code ...) =end cl-typesetting Normal text follows I'll try to get the XHTML converter into releasable state this week (nothing major, just some dead code removal and maybe a few docstrings), and send it to the list. I'm also planning to write a native Lisp POD parser to remove the Perl dependency (also, pod2html is rather braindead, and I usually use the detour pod2latex -> latex2html). -Klaus From marc.battyani at fractalconcept.com Mon May 17 21:54:41 2004 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Mon, 17 May 2004 23:54:41 +0200 Subject: [cl-typesetting-devel] Tables repeat. References: <72DBE9D2-A80A-11D8-B465-000A95CEC334@nittin.net> Message-ID: <004a01c43c59$90a45060$0a02a8c0@marcxp> Erik Enge wrote: > Funny thing is happening. I'm using draw-page > > (defun draw-page (content &key (width *letter-width*) (height > *letter-height*)) > (let ((x 0) > (y height) > (dx width) > (dy height)) > (loop while (typeset::boxes content) do > (pdf:with-page () > (pdf:with-saved-state > (pdf:translate x y) > (let ((box (typeset::make-filled-vbox content dx dy))) > (when box > (typeset::stroke box 0 0)))))))) > > to make my document. It's basically a few paragraphs at top and then > one > big table (four or five pages long). Here's what's happening: the > document > is only three pages long and page 1 is repeated on page 3 (minus the > paragraph parts; only the table is repeated) and then the document ends. > > Anything I can do to debug this? I'm using the :splittable-p 1 :inline > t > arguments to the table operator as suggested. It looks like the table splitting is broken. IIRC I mentionned this in the last emails on the subject. I want to find some time to look at all this but it's very very unlikely before the end of the month. :( Why don't you use one table per row for now ? This is what I do in my web applications as I have not yet converted them to splittable tables. Splittable tables are better but at least this works now. Marc From marc.battyani at fractalconcept.com Mon May 17 21:59:28 2004 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Mon, 17 May 2004 23:59:28 +0200 Subject: [cl-typesetting-devel] Re: [cl-pdf-devel] Cl typesetting and cl-pdfdocumentation creation References: <40A7DFE2.8050707@liberatinginsight.com> <1f5001c43be4$84db18b0$0a02a8c0@marcxp> <20040517165821.GA26376@w-m-p.com> Message-ID: <005d01c43c5a$3cb19250$0a02a8c0@marcxp> Klaus Weidner wrote: > On Mon, May 17, 2004 at 09:56:48AM +0200, Marc Battyani wrote: > > I agree with that. A documentation in a bad format is better than no docs in > > a nice format ;-) > > Though of course it would be better to use a format that can be converted > > to/processed by cl-typesetting. So if anybody already have some kind of user > > friendly syntax that could be used please raise your hand! > > I think the XHTML to cl-typesetting converter I've been working on would > be an option for this. The table support is still a bit rudimentary, but > this could be extended fairly easily. Tables you said? > However, if you want the documentation to directly demonstrate advanced > formatting tricks and features, it would probably need to be done > directly in low-level cl-typesetting code. > > Personally, I quite like the Perl Plain Old Documentation (POD) format, > since that has very non-intrusive markup and is pleasant to edit. POD > supports formatter specific sections, so with a bit of hacking you could > do this: > > =head3 Another example > > Here's a more complex example: > > (... fancy Lisp code ...) > > for which the rendered output looks like this: > > =begin cl-typesetting > > (... fancy Lisp code ...) > > =end cl-typesetting > > Normal text follows > > I'll try to get the XHTML converter into releasable state this week > (nothing major, just some dead code removal and maybe a few docstrings), > and send it to the list. I'm also planning to write a native Lisp POD > parser to remove the Perl dependency (also, pod2html is rather braindead, > and I usually use the detour pod2latex -> latex2html). A format allowing to mix text with the cl-typesetting raw-syntax is a good idea. Marc From kw at w-m-p.com Mon May 17 22:17:52 2004 From: kw at w-m-p.com (Klaus Weidner) Date: Mon, 17 May 2004 17:17:52 -0500 Subject: [cl-typesetting-devel] Re: [cl-pdf-devel] Cl typesetting and cl-pdfdocumentation creation In-Reply-To: <005d01c43c5a$3cb19250$0a02a8c0@marcxp> References: <40A7DFE2.8050707@liberatinginsight.com> <1f5001c43be4$84db18b0$0a02a8c0@marcxp> <20040517165821.GA26376@w-m-p.com> <005d01c43c5a$3cb19250$0a02a8c0@marcxp> Message-ID: <20040517221752.GB27985@w-m-p.com> On Mon, May 17, 2004 at 11:59:28PM +0200, Marc Battyani wrote: > Klaus Weidner wrote: > > > > I think the XHTML to cl-typesetting converter I've been working on would > > be an option for this. The table support is still a bit rudimentary, but > > this could be extended fairly easily. > > Tables you said? It uses the cl-typesetting table engine as a back end, and will need column widths to be statically defined. Also, it will of course inherit any breakage. My time situation isn't looking that good either, but I'll try to look at the problems Erik is having. This is unlikely to work in a useful way for printing web pages that use tables for multicolumn document layout or similar purposes, but should at least be useful for simple cases. > A format allowing to mix text with the cl-typesetting raw-syntax is a good > idea. One problem here is that POD does not directly support tables. I'm thinking about stealing (I mean re-using) code from the "table" Emacs mode, which allows interactive editing of ASCII-delimited tables, including resizing, cell joining, various justifications, content fill and other neat features. It is able to automatically parse such tables in text input, and print the internal representation in various formats. Here's an example of a table created in Emacs with just a few keystrokes: +-----+-----+-----+ |h1 | h2 | h3| +-----+-----+-----+ |a | b | c| | +-----+-----+ |x | y z | +-----+-----------+ Then, the POD output modes that don't understand tables would just output the verbatim ASCII table, and those that do could print a proper table instead. For more complex tables, the POD code could contain either HTML or cl-typesetting tables. -Klaus From peter at javamonkey.com Wed May 26 20:36:42 2004 From: peter at javamonkey.com (Peter Seibel) Date: Wed, 26 May 2004 13:36:42 -0700 Subject: [cl-typesetting-devel] Spaces at beginnings of lines following periods Message-ID: In my typesetting of my book it seems that whenever I have a line break immediately after a period, the first character of the next line is indented a bit. I.e. it seems like the first character of the next line is in fact a space. I haven't tried to track this down or even reduce it to a simple test case because I'm hoping that someone will just know what the problem is. Any ideas? -Peter -- Peter Seibel peter at javamonkey.com Lisp is the red pill. -- John Fraser, comp.lang.lisp