From peter at gigamonkeys.com Mon Aug 14 22:35:47 2006 From: peter at gigamonkeys.com (Peter Seibel) Date: Mon, 14 Aug 2006 15:35:47 -0700 Subject: [cl-typesetting-devel] How to make some text flush leftandsomeflush right? In-Reply-To: <2D8978AF-3937-4F32-90C6-8E36817B1686@gigamonkeys.com> References: <000001c6abbe$5f7580f0$8100a8c0@digo><961B9143-2EFA-4BAF-AE00-19F475C1F8E3@gigamonkeys.com><0adb01c6ac26$42749870$1402a8c0@marcx2> <0b4a01c6ac2b$972feef0$1402a8c0@marcx2> <42CF691D-1281-4ED9-A58E-1F9F0C5081A2@gigamonkeys.com> <0b6201c6ac2d$6b9af120$1402a8c0@marcx2> <2D8978AF-3937-4F32-90C6-8E36817B1686@gigamonkeys.com> Message-ID: Just wondering if anyone had any ideas on the spacing issue I've been running into? Dimitry got me straightened out on getting draw-pages to render all my content but I still can't get my headers and footers to render quite right--the :hfill isn't actually pushing the following text to the right marign. -Peter On Jul 26, 2006, at 2:19 PM, Peter Seibel wrote: > On Jul 20, 2006, at 11:50 AM, Marc Battyani wrote: > >> "Peter Seibel" wrote: >>> On Jul 20, 2006, at 11:37 AM, Marc Battyani wrote: >>> >>>> "Peter Seibel" wrote: >>>>> On Jul 20, 2006, at 10:59 AM, Marc Battyani wrote: >>>> >>>> Weird. Maybe put 3 :hfill instead of just one ;-) >>> >>> That's a joke, right. >> >> Yes, but it can be interesting to try anyway as this will >> artificially increase the expandability of the hfill. >> >>>> Also can you disable the stream compression so that I can look >>>> inside the pdf. >>> >>> How? >> >> (setf *compress-streams* nil) or something like that. The >> generated pdf should be readable with emacs after that. > > Okay. Attached is a document generated with stream compression > turned of. Here's the call to draw-pages: > > (draw-pages content > :size :Letter > :margins '(72 72 72 72) ; left top right bottom > :header-top 36 > :footer-bottom 36 > :header #'(lambda (page) > (declare (ignore page)) > (compile-text (:font "Times-Italic" :font-size 10) > (paragraph (:h-align :fill) > ;; Not clear whether these should > ;; be VERBATIM or PUT-STRING. Get > ;; weird spacing with PUT-STRING. > (put-string (get-contextual-variable 'chapter-name)) > :hfill > (put-string (format nil "Page ~d of ~d" > pdf:*page-number* > (find-ref-point-page-number :the-end)))))) > :footer (compile-text (:font "Times-Italic" :font-size 10) > (paragraph (:h-align :fill) > (put-string > (format nil "Copyright ~c ~a" +copyright+ *copyright*)) > :hfill > (put-string (date-string))))) > > There are two problems with the output. First, the weird interword > spacing I mentioned before. That gets better if I use VERBATIM > rather than PUT-STRING but then the stuff that's supposed to be > flush right is even more to the left. The other problem, which I > just noticed, is that not all the content is rendered. FWIW, the > next thing that should appear is a table; dunno if that matters or > not. > > -Peter > > > > -- > Peter Seibel * peter at gigamonkeys.com > Gigamonkeys Consulting * http://www.gigamonkeys.com/ > Practical Common Lisp * http://www.gigamonkeys.com/book/ > > > _______________________________________________ > cl-typesetting-devel site list > cl-typesetting-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/cl-typesetting-devel -- Peter Seibel * peter at gigamonkeys.com Gigamonkeys Consulting * http://www.gigamonkeys.com/ Practical Common Lisp * http://www.gigamonkeys.com/book/ From peter at gigamonkeys.com Mon Aug 14 23:09:45 2006 From: peter at gigamonkeys.com (Peter Seibel) Date: Mon, 14 Aug 2006 16:09:45 -0700 Subject: [cl-typesetting-devel] hyperlinks in cl-typesetting? Message-ID: <8D188642-7B7D-4B78-96E8-DDBCC768C77F@gigamonkeys.com> I see that cl-pdf provides support for hyperlinks but it seems that they are applied to a region on the page, rather than to a particular piece of text. Is there anything in cl-typesetting to manage putting links on specific text? -Peter -- Peter Seibel * peter at gigamonkeys.com Gigamonkeys Consulting * http://www.gigamonkeys.com/ Practical Common Lisp * http://www.gigamonkeys.com/book/ From peter at gigamonkeys.com Tue Aug 15 19:33:15 2006 From: peter at gigamonkeys.com (Peter Seibel) Date: Tue, 15 Aug 2006 12:33:15 -0700 Subject: [cl-typesetting-devel] Finding out the margins programatically Message-ID: Is there any easy way to find out the margins that have been passed to draw-pages when in the dynamic extent of the call to draw-pages? -Peter -- Peter Seibel * peter at gigamonkeys.com Gigamonkeys Consulting * http://www.gigamonkeys.com/ Practical Common Lisp * http://www.gigamonkeys.com/book/ From divanov at aha.ru Wed Aug 16 06:39:06 2006 From: divanov at aha.ru (Dmitriy Ivanov) Date: Wed, 16 Aug 2006 10:39:06 +0400 Subject: [cl-typesetting-devel] Finding out the margins programatically References: Message-ID: <000201c6c0fe$aff31f10$8100a8c0@digo> Hello Peter, | Is there any easy way to find out the margins that have been passed | to draw-pages when in the dynamic extent of the call to draw-pages? AFAIK, (typeset::margins pdf:*page*) should provide them. -- Sincerely, Dmitriy Ivanov lisp.ystok.ru From divanov at aha.ru Wed Aug 16 06:35:40 2006 From: divanov at aha.ru (Dmitriy Ivanov) Date: Wed, 16 Aug 2006 10:35:40 +0400 Subject: [cl-typesetting-devel] hyperlinks in cl-typesetting? References: <8D188642-7B7D-4B78-96E8-DDBCC768C77F@gigamonkeys.com> Message-ID: <000101c6c0fe$afa6d3d0$8100a8c0@digo> Hello Peter, | I see that cl-pdf provides support for hyperlinks but it seems that | they are applied to a region on the page, rather than to a particular | piece of text. Is there anything in cl-typesetting to manage putting | links on specific text? No, there is no support of links just in cl-typesetting. My workaround is (my version of) pdf:add-link that put the link at thoroughly computed coordinates. -- Sincerely, Dmitriy Ivanov lisp.ystok.ru