[cl-typesetting-devel] Newbie questions

Mika Kuuskankare mkuuskan at siba.fi
Mon Jul 27 19:43:09 UTC 2009


Hi Dmitriy,

On 27.7.2009, at 18:10, Dmitriy Ivanov wrote:

> Hello Mika,
>
> | I recently started to experiment with a converter to convert from my
> | own "document description" format to cl-typesetting. My format has a
> | simple structure and quite simple vocabulary, e.g., 'section',
> | 'bodytext', 'code', 'figure', etc. We are using this format to make
> | the online documentation for a piece of software called PWGL
> | (www.siba.fi/PWGL) . I already have some converters (e.g., CAPI,  
> LaTeX,
> | DocBook) but I  was looking for something more stand-alone and  
> thought
> | that cl- typesetting could be a nice alternative.
> |
> | ( BTW, what I'm trying to accomplish (done using LaTeX for now)  
> can be
> | seen here: http://www2.siba.fi/PWGL/pwglbook1.pdf )
> |
> | I've managed to get things up to a good start already with  
> relatively
> | small amount of work. However, there are a couple of questions for
> | which I might need the advice of more experienced users:
> |
> | (1) How is it with characters such as ö,ä,é, etc?
>
> Are not those in *mac-roman-encoding* or *win-ansi-encoding*?
> | (2) Is it possible to draw pieces of text with some graphics in-
> | between, i.e., to write: "File -> Open", so that the "->" is drawn  
> as
> | graphics not text?
>
> That is not easy. CL-TYPESETTING needs explicit font information. E.g.
>
>   (let* ((symbol-font (pdf:get-font "Symbol" pdf::*symbol-encoding*))
>      (paragraph ()
>         "File"
>         (with-style (:font symbol-font)
>           (verbatim (string (code-char (gethash "arrowright"
>                                                     (pdf::char-codes
>
> pdf::*symbol-encoding*))))))
>          "Open"))

This example actually helps me a lot. Thanks!

>
>
> | (3) Is it possible to embed .eps images?
>
> No.

How about converting EPS to PDF first?

>
> | (4) When using jpg's is the original size of the image not known,
> | i.e., you always have to provide :dx/:dy?
>
> Calling the width and height accessors on the image instance can help.
>
> | (5) ZapfDingbats/Symbol fonts don't seem to work for me . Am I  
> missing
> | something obvious here?
>
> See above.
>
> | (6) I would like to convert my 'code' element as monospaced text  
> with
> | a frame and a light background. I did this quickly with the 'table'
> | element and it works nicely unless the code is so long that it
> | continues to the next page. To be fancy, I would also like this
> | element to have slightly rounded edges. Which parts of the cl-
> | typesetting source code should I be looking at to be able to  
> implement
> | this myself, i.e., a round-edged element with monospaced text that
> | automatically breaks into several pages?
>
> I guess your 'code' is similar to HTML 'pre'.
>
> First, try to make created the table-row with :splittable-p t.

I did and I get this error (the same as before):

Unable to fit object #<TYPESET::TEXT-STYLE 268E5237> even on a new page.

>
> Another solution could be to use paragraph with pre-decoration and
> post-decoration functions initialized and verbatim call inside.

I will study this, although my quick test to add :pre-decoration to  
paragraph adds the decoration to each character... there must be  
something I need to find out first.

Thank you for your help Dmitriy.

best,

Mika


> --
> Sincerely,
> Dmitriy Ivanov
> lisp.ystok.ru

Dr. Mika Kuuskankare
Composer, programmer and researcher
Centre for Music & Technology
Sibelius Academy

Henkilökohtainen postiosoite/Personal post address
PL 342 - PO Box 342
FIN-00121 Helsinki, FINLAND
Mobile: +358 (0)40 5415 233 (Finland)
Skype: mkuuskan
personal home page: www.siba.fi/~mkuuskan
project home page: www.siba.fi/PWGL











More information about the cl-typesetting-devel mailing list