[cl-typesetting-devel] Calling functions within 'compile-text'

Marc Battyani marc.battyani at fractalconcept.com
Mon Mar 5 22:08:29 UTC 2007


"Jonathon McKitrick" <jmckitrick at reedlarkeygroup.com> wrote:

>Question: if I am building a rather large document and the code within
>'compile-text' is becoming long and unwieldy, is there a way that I can
>break this into functions whose results are returned and appended to the
>content compile-text is building?  Until now, I've been using function
>calls inside a with-document block and each function calls with-page.  But
>since I've moved to more of a typesetting approach, the entire document is
>build inside compile-text, and it's becoming a very long, involved piece
>of code.
>
>Is there a simple way to call functions within compile-text such that each
>will add content by accessing the lexical environment being built within
>the compile-text block and without having to be a macro ?

Yes, it's the with-text-compilation macro.

Example:

(defun flux-otfr2-from-search (flux)
  (with-text-compilation
      (table (:col-widths '(80 80 80 70 70 80 70) :border 0.2 :padding 0)
    (row (:background-color *ref-ent-tab-chain*)
...

Marc





More information about the cl-typesetting-devel mailing list