[cl-typesetting-devel] Newbie questions

Dmitriy Ivanov divanov at aha.ru
Mon Jul 27 16:10:22 UTC 2009


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"))


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

No.

| (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.

Another solution could be to use paragraph with pre-decoration and
post-decoration functions initialized and verbatim call inside.
--
Sincerely,
Dmitriy Ivanov
lisp.ystok.ru





More information about the cl-typesetting-devel mailing list