From ch-lisp at bobobeach.com Sat May 5 16:15:05 2007 From: ch-lisp at bobobeach.com (Cyrus Harmon) Date: Sat, 5 May 2007 09:15:05 -0700 Subject: [cl-typesetting-devel] paragraph macro Message-ID: <4B73ECB7-65C6-433B-BD9E-E78C4C380600@bobobeach.com> First of all, thanks for cl-typesetting and cl-pdf. After spending the last year or so wrangling my smarkup package into generating suitable latex for thinks like the UC thesis package and beamer, I've decided to bite the bullet and try to add a cl-typesetting backend to smarkup, noticing, of course, that Francois-Rene Rideau has done something similar for exscribe. What strikes me from playing with cl-typesetting is that the interface, or at least the parts of it I'm looking at, look more like a DSL than a library. What I mean by this that the macros for things like paragraph allow for the following: (paragraph (:h-align :center :font "Helvetica" :font-size 16 :color '(0.0 0 0.6)) "Table of content") Which is, of course, nice shorthand and saves the user from typing: (paragraph '(:h-align :center :font "Helvetica" :font-size 16 :color '(0.0 0 0.6)) "Table of content") which would allow (but certainly other reasons might prevent this from being the case) for paragraph to be a function instead of a macro. But the problem comes in when I try to do something like: (defparameter *default-paragraph-font* '(:font "Times-Roman" :font-size 12)) (defmethod %render-elt ((tag (eql :p)) contents) (tt::paragraph *default-paragraph-font* (tt:put-string (collect-elements contents)))) Now perhaps I'm just showing my lack of mad macro-skillz. I suppose I could rewrite my code as macros that generate the appropriate forms but then I start to get lost in nested backquotes. It would seem easier to have something like this: (defmacro paragraph2 (style &body body) (with-gensyms (top-margin bottom-margin first-line-indent new-style restore-style first-indent) `(let* ((,top-margin (getf ,style :top-margin 0)) (,bottom-margin (getf ,style :bottom-margin 0)) (,first-line-indent (getf ,style :first-line-indent 0)) (,new-style (apply #'make-instance 'text-style ,style)) (,restore-style (make-restore-style ,new-style)) (,first-indent ,first-line-indent)) (add-box ,new-style) (use-style ,new-style) (add-box (make-instance 'v-spacing :dy ,top-margin)) (unless (zerop ,first-indent) (add-box (make-instance 'h-spacing :dx ,first-indent))) ,@(mapcar 'insert-stuff body) (unless (eq (first (boxes-tail *content*)) :eol) (add-box :eol)) (add-box (make-instance 'v-spacing :dy ,bottom-margin)) (add-box ,restore-style) (use-style ,restore-style)))) but then perhaps I'm missing the point of why style is not evaluated in the paragraph macro. Anyway, I see the argument for the shorthand syntax, but it would be nice if there were an equivalent form that evaluated its arguments so that one can build functions that call the typesetting functionality. It's quite possible that I'm 1) completely missing the point here or that there are some simple macro tricks that render this point moot, but if so the point or the tricks are not obvious to me. Thanks again for cl-typesetting and cl-pdf. Cyrus From marc.battyani at fractalconcept.com Sat May 5 21:24:41 2007 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Sat, 5 May 2007 23:24:41 +0200 Subject: [cl-typesetting-devel] paragraph macro References: <4B73ECB7-65C6-433B-BD9E-E78C4C380600@bobobeach.com> Message-ID: <039401c78f5b$cb428a40$1402a8c0@marcx2> "Cyrus Harmon" wrote: > First of all, thanks for cl-typesetting and cl-pdf. After spending the > last year or so wrangling my smarkup package into generating suitable > latex for thinks like the UC thesis package and beamer, I've decided to > bite the bullet and try to add a cl-typesetting backend to smarkup, > noticing, of course, that Francois-Rene Rideau has done something similar > for exscribe. Great. The more user friendly syntaxes the better! > What strikes me from playing with cl-typesetting is that the interface, > or at least the parts of it I'm looking at, look more like a DSL than a > library. What I mean by this that the macros for things like paragraph > allow for the following: > > (paragraph (:h-align :center :font "Helvetica" :font-size 16 :color '(0.0 > 0 0.6)) > "Table of content") > > Which is, of course, nice shorthand and saves the user from typing: > > (paragraph '(:h-align :center :font "Helvetica" :font-size 16 :color > '(0.0 0 0.6)) > "Table of content") Looks like some sarcasm here... :) > which would allow (but certainly other reasons might prevent this from > being the case) for paragraph to be a function instead of a macro. There are 2 different issues here: Why is it a macro and why style is not evaluated at run-time. The reason why it's a macro is to be able to put arbitrary lisp code in the paragraph generation to write stuff like that: (paragraph ... (loop for ...) ... (if ...)) you can't do that with a function. Why style is used at compile time is to be able to make optimizations at compile time. (more on that at the end) > But the problem comes in when I try to do something like: > > (defparameter *default-paragraph-font* > '(:font "Times-Roman" :font-size 12)) > > (defmethod %render-elt ((tag (eql :p)) contents) > (tt::paragraph *default-paragraph-font* > (tt:put-string (collect-elements contents)))) > > Now perhaps I'm just showing my lack of mad macro-skillz. I suppose I > could rewrite my code as macros that generate the appropriate forms but > then I start to get lost in nested backquotes. It would seem easier to > have something like this: > > (defmacro paragraph2 (style &body body) > (with-gensyms (top-margin bottom-margin first-line-indent > new-style restore-style first-indent) > `(let* ((,top-margin (getf ,style :top-margin 0)) > (,bottom-margin (getf ,style :bottom-margin 0)) > (,first-line-indent (getf ,style :first-line-indent 0)) > (,new-style (apply #'make-instance 'text-style ,style)) > (,restore-style (make-restore-style ,new-style)) > (,first-indent ,first-line-indent)) > (add-box ,new-style) > (use-style ,new-style) > (add-box (make-instance 'v-spacing :dy ,top-margin)) > (unless (zerop ,first-indent) > (add-box (make-instance 'h-spacing :dx ,first-indent))) > ,@(mapcar 'insert-stuff body) > (unless (eq (first (boxes-tail *content*)) :eol) > (add-box :eol)) > (add-box (make-instance 'v-spacing :dy ,bottom-margin)) > (add-box ,restore-style) > (use-style ,restore-style)))) If you want to do something like that, you should at least evaluate style only once in case it's not just a constant plist. > but then perhaps I'm missing the point of why style is not evaluated in > the paragraph macro. > > Anyway, I see the argument for the shorthand syntax, but it would be nice > if there were an equivalent form that evaluated its arguments so that one > can build functions that call the typesetting functionality. > > It's quite possible that I'm 1) completely missing the point here or that > there are some simple macro tricks that render this point moot, but if so > the point or the tricks are not obvious to me. OK here is some information on why it is like that. When I started cl-typesetting I wanted to generate reports and documents in web applications. I tried to use TeX but it's almost impossible to do simple things like nested tables with TeX. Even with the help of a TeX guru! So I decided to make one that could be embedded into Lisp so that I would have the access to the full power of Common Lisp rather than some lame weird macro language. But then there are 2 possible uses of cl-typesetting. The first one which, for now is its primary use is to generate automated documents and reports in applications. For this you want to be able to compile a maximum of things at compile time so that the doc generation is fast. Hence the heavy use of macros, the use of style at compile time, etc. The second use which is probably what you want to do is to process a document description in some kind of markup language at run time and generally one time only. For this you should use the functional API. i.e. the functions that are called by the paragraph macro for instance (add-box, put-string, use-type, etc.). As I don't use cl-typesetting in that mode, there is probably the need for more high level functions. Of course, as life is too short to write documentation, all this is probably not obvious ;-) Also I didn't find the time to continue the compilation optimization so for instance constant strings should be converted to boxes at compile time instead of runtime like it is now. > Thanks again for cl-typesetting and cl-pdf. Thanks :) User friendly text markups are welcome! BTW there a lot of things I wanted to put in cl-typesetting but never found the time to do like named styles, finish the math mode (with a TeX compatible syntax), optimize the compilation, improve the typesetting engine, etc. So even if I'm not working on it at that moment, that does not mean it's finished ;-) (Right now, I'm still working more than 100% of my time on my FPGA based supercomputer project.) Marc From ch-lisp at bobobeach.com Mon May 7 02:11:22 2007 From: ch-lisp at bobobeach.com (Cyrus Harmon) Date: Sun, 6 May 2007 19:11:22 -0700 Subject: [cl-typesetting-devel] paragraph macro In-Reply-To: <039401c78f5b$cb428a40$1402a8c0@marcx2> References: <4B73ECB7-65C6-433B-BD9E-E78C4C380600@bobobeach.com> <039401c78f5b$cb428a40$1402a8c0@marcx2> Message-ID: <75AEA3F9-2DC4-4309-A5E8-CC5F5538DAEA@bobobeach.com> On May 5, 2007, at 2:24 PM, Marc Battyani wrote: > "Cyrus Harmon" wrote: >> Which is, of course, nice shorthand and saves the user from typing: >> >> (paragraph '(:h-align :center :font "Helvetica" :font-size >> 16 :color '(0.0 0 0.6)) >> "Table of content") > > Looks like some sarcasm here... :) Yeah, I wasn't sure why we weren't evaluating this. >> which would allow (but certainly other reasons might prevent this >> from being the case) for paragraph to be a function instead of a >> macro. > > There are 2 different issues here: Why is it a macro and why style > is not evaluated at run-time. > > The reason why it's a macro is to be able to put arbitrary lisp > code in the paragraph generation to write stuff like that: > (paragraph ... (loop for ...) ... (if ...)) you can't do that with > a function. Ah yes, this is one of the reasons lisp is so great. Sometimes it takes a while for me to wrap my head around things like this. > Why style is used at compile time is to be able to make > optimizations at compile time. (more on that at the end) > >> Now perhaps I'm just showing my lack of mad macro-skillz. I >> suppose I could rewrite my code as macros that generate the >> appropriate forms but then I start to get lost in nested >> backquotes. It would seem easier to have something like this: >> >> (defmacro paragraph2 (style &body body) >> (with-gensyms (top-margin bottom-margin first-line-indent >> new-style restore-style first-indent) >> `(let* ((,top-margin (getf ,style :top-margin 0)) >> (,bottom-margin (getf ,style :bottom-margin 0)) >> (,first-line-indent (getf ,style :first-line-indent 0)) >> (,new-style (apply #'make-instance 'text-style ,style)) >> (,restore-style (make-restore-style ,new-style)) >> (,first-indent ,first-line-indent)) >> (add-box ,new-style) >> (use-style ,new-style) >> (add-box (make-instance 'v-spacing :dy ,top-margin)) >> (unless (zerop ,first-indent) >> (add-box (make-instance 'h-spacing :dx ,first-indent))) >> ,@(mapcar 'insert-stuff body) >> (unless (eq (first (boxes-tail *content*)) :eol) >> (add-box :eol)) >> (add-box (make-instance 'v-spacing :dy ,bottom-margin)) >> (add-box ,restore-style) >> (use-style ,restore-style)))) > > If you want to do something like that, you should at least evaluate > style only once in case it's not just a constant plist. Good point. > When I started cl-typesetting I wanted to generate reports and > documents in web applications. I tried to use TeX but it's almost > impossible to do simple things like nested tables with TeX. Even > with the help of a TeX guru! So I decided to make one that could be > embedded into Lisp so that I would have the access to the full > power of Common Lisp rather than some lame weird macro language. > But then there are 2 possible uses of cl-typesetting. The first one > which, for now is its primary use is to generate automated > documents and reports in applications. For this you want to be able > to compile a maximum of things at compile time so that the doc > generation is fast. Hence the heavy use of macros, the use of style > at compile time, etc. The second use which is probably what you > want to do is to process a document description in some kind of > markup language at run time and generally one time only. For this > you should use the functional API. i.e. the functions that are > called by the paragraph macro for instance (add-box, put-string, > use-type, etc.). As I don't use cl-typesetting in that mode, there > is probably the need for more high level functions. Yes, but as you point it, it's nice to be able to wrap those calls in a macro to do nice initialization/cleanup stuff. > Of course, as life is too short to write documentation, all this is > probably not obvious ;-) Or to read it sometimes :) > Also I didn't find the time to continue the compilation > optimization so for instance constant strings should be converted > to boxes at compile time instead of runtime like it is now. Ah yes, I'm a bit confused why sometimes I can use a naked string and other times it seems I need a put-string. I guess insert-stuff is handling it sometimes. >> Thanks again for cl-typesetting and cl-pdf. > > Thanks :) > User friendly text markups are welcome! Working on it :) > BTW there a lot of things I wanted to put in cl-typesetting but > never found the time to do like named styles, finish the math mode > (with a TeX compatible syntax), optimize the compilation, improve > the typesetting engine, etc. So even if I'm not working on it at > that moment, that does not mean it's finished ;-) > (Right now, I'm still working more than 100% of my time on my FPGA > based supercomputer project.) Ok, so I'm working on my with-paragraph macro that evaluates the style argument, but I don't understand why we (use-style ,restore- style) when ,restore-style is (make-restore-style ,new-style). I guess a defgeneric and some docstrings for make-restore-style might clue me in. Thanks again, Cyrus From ch-lisp at bobobeach.com Mon May 7 03:06:35 2007 From: ch-lisp at bobobeach.com (Cyrus Harmon) Date: Sun, 6 May 2007 20:06:35 -0700 Subject: [cl-typesetting-devel] paragraph macro In-Reply-To: <039401c78f5b$cb428a40$1402a8c0@marcx2> References: <4B73ECB7-65C6-433B-BD9E-E78C4C380600@bobobeach.com> <039401c78f5b$cb428a40$1402a8c0@marcx2> Message-ID: <0FC47E68-4807-4AD2-8E23-289A563970EA@bobobeach.com> One more thing is confusing me. I find it a bit strange the way you use args like :top-margin and pass them along to the make-instance 'text-style and then just ignore them. Why not store those in the text-style object? Thanks again, Cyrus From ch-lisp at bobobeach.com Mon May 7 04:55:46 2007 From: ch-lisp at bobobeach.com (Cyrus Harmon) Date: Sun, 6 May 2007 21:55:46 -0700 Subject: [cl-typesetting-devel] paragraph macro In-Reply-To: <039401c78f5b$cb428a40$1402a8c0@marcx2> References: <4B73ECB7-65C6-433B-BD9E-E78C4C380600@bobobeach.com> <039401c78f5b$cb428a40$1402a8c0@marcx2> Message-ID: <0C48B823-AC46-4A34-995E-14C896640D2D@bobobeach.com> And yet another question... is there a way to make cl-typesetting/cl- pdf emit a non-breaking space? Thanks, Cyrus On May 5, 2007, at 2:24 PM, Marc Battyani wrote: > "Cyrus Harmon" wrote: > >> First of all, thanks for cl-typesetting and cl-pdf. After >> spending the last year or so wrangling my smarkup package into >> generating suitable latex for thinks like the UC thesis package >> and beamer, I've decided to bite the bullet and try to add a cl- >> typesetting backend to smarkup, noticing, of course, that >> Francois-Rene Rideau has done something similar for exscribe. > > Great. The more user friendly syntaxes the better! > >> What strikes me from playing with cl-typesetting is that the >> interface, or at least the parts of it I'm looking at, look more >> like a DSL than a library. What I mean by this that the macros >> for things like paragraph allow for the following: >> >> (paragraph (:h-align :center :font "Helvetica" :font-size >> 16 :color '(0.0 0 0.6)) >> "Table of content") >> >> Which is, of course, nice shorthand and saves the user from typing: >> >> (paragraph '(:h-align :center :font "Helvetica" :font-size >> 16 :color '(0.0 0 0.6)) >> "Table of content") > > Looks like some sarcasm here... :) > >> which would allow (but certainly other reasons might prevent this >> from being the case) for paragraph to be a function instead of a >> macro. > > There are 2 different issues here: Why is it a macro and why style > is not evaluated at run-time. > > The reason why it's a macro is to be able to put arbitrary lisp > code in the paragraph generation to write stuff like that: > (paragraph ... (loop for ...) ... (if ...)) you can't do that with > a function. > > Why style is used at compile time is to be able to make > optimizations at compile time. (more on that at the end) > >> But the problem comes in when I try to do something like: >> >> (defparameter *default-paragraph-font* >> '(:font "Times-Roman" :font-size 12)) >> >> (defmethod %render-elt ((tag (eql :p)) contents) >> (tt::paragraph *default-paragraph-font* >> (tt:put-string (collect-elements contents)))) >> >> Now perhaps I'm just showing my lack of mad macro-skillz. I >> suppose I could rewrite my code as macros that generate the >> appropriate forms but then I start to get lost in nested >> backquotes. It would seem easier to have something like this: >> >> (defmacro paragraph2 (style &body body) >> (with-gensyms (top-margin bottom-margin first-line-indent >> new-style restore-style first-indent) >> `(let* ((,top-margin (getf ,style :top-margin 0)) >> (,bottom-margin (getf ,style :bottom-margin 0)) >> (,first-line-indent (getf ,style :first-line-indent 0)) >> (,new-style (apply #'make-instance 'text-style ,style)) >> (,restore-style (make-restore-style ,new-style)) >> (,first-indent ,first-line-indent)) >> (add-box ,new-style) >> (use-style ,new-style) >> (add-box (make-instance 'v-spacing :dy ,top-margin)) >> (unless (zerop ,first-indent) >> (add-box (make-instance 'h-spacing :dx ,first-indent))) >> ,@(mapcar 'insert-stuff body) >> (unless (eq (first (boxes-tail *content*)) :eol) >> (add-box :eol)) >> (add-box (make-instance 'v-spacing :dy ,bottom-margin)) >> (add-box ,restore-style) >> (use-style ,restore-style)))) > > If you want to do something like that, you should at least evaluate > style only once in case it's not just a constant plist. > >> but then perhaps I'm missing the point of why style is not >> evaluated in the paragraph macro. >> >> Anyway, I see the argument for the shorthand syntax, but it would >> be nice if there were an equivalent form that evaluated its >> arguments so that one can build functions that call the >> typesetting functionality. >> >> It's quite possible that I'm 1) completely missing the point here >> or that there are some simple macro tricks that render this point >> moot, but if so the point or the tricks are not obvious to me. > > OK here is some information on why it is like that. > > When I started cl-typesetting I wanted to generate reports and > documents in web applications. I tried to use TeX but it's almost > impossible to do simple things like nested tables with TeX. Even > with the help of a TeX guru! So I decided to make one that could be > embedded into Lisp so that I would have the access to the full > power of Common Lisp rather than some lame weird macro language. > But then there are 2 possible uses of cl-typesetting. The first one > which, for now is its primary use is to generate automated > documents and reports in applications. For this you want to be able > to compile a maximum of things at compile time so that the doc > generation is fast. Hence the heavy use of macros, the use of style > at compile time, etc. The second use which is probably what you > want to do is to process a document description in some kind of > markup language at run time and generally one time only. For this > you should use the functional API. i.e. the functions that are > called by the paragraph macro for instance (add-box, put-string, > use-type, etc.). As I don't use cl-typesetting in that mode, there > is probably the need for more high level functions. > > Of course, as life is too short to write documentation, all this is > probably not obvious ;-) > > Also I didn't find the time to continue the compilation > optimization so for instance constant strings should be converted > to boxes at compile time instead of runtime like it is now. > >> Thanks again for cl-typesetting and cl-pdf. > > Thanks :) > User friendly text markups are welcome! > > BTW there a lot of things I wanted to put in cl-typesetting but > never found the time to do like named styles, finish the math mode > (with a TeX compatible syntax), optimize the compilation, improve > the typesetting engine, etc. So even if I'm not working on it at > that moment, that does not mean it's finished ;-) > (Right now, I'm still working more than 100% of my time on my FPGA > based supercomputer project.) > > Marc > > From divanov at aha.ru Mon May 7 06:17:26 2007 From: divanov at aha.ru (Dmitriy Ivanov) Date: Mon, 7 May 2007 10:17:26 +0400 Subject: [cl-typesetting-devel] paragraph macro References: <4B73ECB7-65C6-433B-BD9E-E78C4C380600@bobobeach.com><039401c78f5b$cb428a40$1402a8c0@marcx2> <0C48B823-AC46-4A34-995E-14C896640D2D@bobobeach.com> Message-ID: <000d01c79070$f4d0a5c0$8100a8c0@digo> Hello Cyrus, | And yet another question... is there a way to make cl-typesetting/cl- | pdf emit a non-breaking space? What is the problem with just embedding it in the string? For more obvious example on LispWork, (tt:format-string "street~cTowner " #\No-Break-Space) -- Sincerely, Dmitriy Ivanov lisp.ystok.ru From hmaseko at gmail.com Mon May 7 21:42:55 2007 From: hmaseko at gmail.com (Harrison Maseko) Date: Mon, 7 May 2007 23:42:55 +0200 Subject: [cl-typesetting-devel] Newbie needs In-Reply-To: <1177870699.4066.8.camel@melody.liberating> Message-ID: <463f9d96.1865568b.7888.3c0d@mx.google.com> Brian, Thanks for your help. I've downloaded the doc and I am reading it and trying the examples. I'll get back to you soon on some aspects for clarification. Meanwhile, it's an eye-opener and just what I needed. Once again, thanks. Harrison -----Original Message----- From: Brian Sorg [mailto:brian.sorg at liberatinginsight.com] Sent: Sunday, April 29, 2007 8:18 PM To: Harrison Maseko Cc: cl-typesetting-devel at common-lisp.net Subject: Re: [cl-typesetting-devel] Newbie needs Harrison - I am working on developing some introductory documentation to the cl-pdf and cl-typesetting systems. It is still pretty rough, but should help get you started. The initial sections are included in the cl-typesetting directory called documentation, which has a "Getting Started" chapter which should help. Also I am right in the middle of adding another chapter so I haven't updated the official release yet, but you can download the current version of the documentation from my website at http://www.liberatinginsight.com/cl-pdf/cl-pdf-doc.tar.gz (It has around 5 extra pages of new material. that is not yet released) Hope that helps and good luck. Brian Sorg On Sat, 2007-04-28 at 19:36 +0200, Harrison Maseko wrote: > Hello cl-typesetters, > > I am totally new here and just trying to learn cl-typesetting. A quick > question: How do I load cl-typesetting into my LispWorks personal > edition running on Windows? > > > > Harrison > > > > > > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.5.467 / Virus Database: 269.6.1/778 - Release Date: > 4/27/2007 1:39 PM > > > _______________________________________________ > cl-typesetting-devel site list > cl-typesetting-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/cl-typesetting-devel -- Brian Sorg Director & Founder Liberating Insight LLC brian.sorg at liberatinginsight.com Mobile: 260-602-1086 Office: 260-918-0490 No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.467 / Virus Database: 269.6.2/781 - Release Date: 4/30/2007 9:14 AM No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.467 / Virus Database: 269.6.5/793 - Release Date: 5/7/2007 2:55 PM From ch-lisp at bobobeach.com Thu May 17 20:38:17 2007 From: ch-lisp at bobobeach.com (Cyrus Harmon) Date: Thu, 17 May 2007 13:38:17 -0700 Subject: [cl-typesetting-devel] rotated/skewed text in cl-typesetting Message-ID: <97C6FB12-3FF6-4410-856B-B36E8B14566F@bobobeach.com> So I'm a bit unclear on how to get rotated/skewed text in cl- typesetting. I see the rotate and skew functions in cl-pdf, but when I call those, they seem to apply to the whole page. I see the draw- block function, but I'm not sure this fits in with the approach I'm trying to use which is: (tt:with-document (let ((content (tt:compile-text () (tt:pargraph ..))) (tt:draw-pages content ...) (tt:finalize-page pdf:*page*) (tt:write-document ...)) Of course that could be wrong too, but seemed to be working reasonably well. Thanks, Cyrus From jmckitrick at reedlarkeygroup.com Thu May 17 21:55:16 2007 From: jmckitrick at reedlarkeygroup.com (Jonathon McKitrick) Date: Thu, 17 May 2007 17:55:16 -0400 Subject: [cl-typesetting-devel] rotated/skewed text in cl-typesetting In-Reply-To: <97C6FB12-3FF6-4410-856B-B36E8B14566F@bobobeach.com> References: <97C6FB12-3FF6-4410-856B-B36E8B14566F@bobobeach.com> Message-ID: On May 17, 2007, at 4:38 PM, Cyrus Harmon wrote: > So I'm a bit unclear on how to get rotated/skewed text in cl- > typesetting. I see the rotate and skew functions in cl-pdf, but > when I call those, they seem to apply to the whole page. I see the > draw-block function, but I'm not sure this fits in with the > approach I'm trying to use which is: > > (tt:with-document > (let ((content > (tt:compile-text () > (tt:pargraph ..))) > (tt:draw-pages content ...) > (tt:finalize-page pdf:*page*) > (tt:write-document ...)) > > Of course that could be wrong too, but seemed to be working > reasonably well. Here's what I have learned: when you use the typesetting functions (collecting content then writing it out) it's all applied at once during the write-document, so transformations are applied across all the content, I think. OTOH, using straight per-page cl-pdf calls gives you more control over those transformations like skew and rotate, not to mention absolute coordinate control. But you don't have the flow management of cl-typesetting. Somewhere in between is adding a USER-DRAWN-BOX in the middle of the typesetting content, where the draw function called for the box then does the transformation and drawing with relative coordinates, but can do the transformations as well. Not sure if I'm explaining it correctly, but that's how I've got it in my head. -- Jonathon McKitrick jmckitrick at reedlarkeygroup.com -------------- next part -------------- An HTML attachment was scrubbed... URL: