From mkuuskan at siba.fi Mon Jul 27 07:04:56 2009 From: mkuuskan at siba.fi (Mika Kuuskankare) Date: Mon, 27 Jul 2009 09:04:56 +0200 Subject: [cl-typesetting-devel] Newbie questions Message-ID: <9F45D5DD-BAB9-41D0-8084-A418B3CF11FB@siba.fi> Hi, I'm *very* new to cl-typesetting :) 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? (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? (3) Is it possible to embed .eps images? (4) When using jpg's is the original size of the image not known, i.e., you always have to provide :dx/:dy? (5) ZapfDingbats/Symbol fonts don't seem to work for me . Am I missing something obvious here? (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? Trying things out on OS X Leopard. best regards, Mika Kuuskankare 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 From divanov at aha.ru Mon Jul 27 16:10:22 2009 From: divanov at aha.ru (Dmitriy Ivanov) Date: Mon, 27 Jul 2009 20:10:22 +0400 Subject: [cl-typesetting-devel] Newbie questions References: <9F45D5DD-BAB9-41D0-8084-A418B3CF11FB@siba.fi> Message-ID: <002601ca0ed4$c286f300$8100a8c0@digo> 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 From mkuuskan at siba.fi Mon Jul 27 19:43:09 2009 From: mkuuskan at siba.fi (Mika Kuuskankare) Date: Mon, 27 Jul 2009 21:43:09 +0200 Subject: [cl-typesetting-devel] Newbie questions In-Reply-To: <002601ca0ed4$c286f300$8100a8c0@digo> References: <9F45D5DD-BAB9-41D0-8084-A418B3CF11FB@siba.fi> <002601ca0ed4$c286f300$8100a8c0@digo> Message-ID: 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 # 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 From divanov at aha.ru Tue Jul 28 07:03:34 2009 From: divanov at aha.ru (Dmitriy Ivanov) Date: Tue, 28 Jul 2009 11:03:34 +0400 Subject: [cl-typesetting-devel] Newbie questions References: <9F45D5DD-BAB9-41D0-8084-A418B3CF11FB@siba.fi><002601ca0ed4$c286f300$8100a8c0@digo> Message-ID: <000201ca0f51$8d634020$8100a8c0@digo> Hello Mika, | How about converting EPS to PDF first? AFAIK, this in not supported by CL-PDF. |> 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 # even on a new | page. I would suggest splitting the whole string on reasonable parts and call verbatim piecemeal. -- Sincerely, Dmitriy Ivanov lisp.ystok.ru