Yes, in-line J code is specified by "backticks" (grave accents), for example:` +/@(*"1 _)` . The example also shows how I separate in-line J code followed by a narrative period, viz., trailing ` followed by a narrative space followed by narrative period. (The device also works for J code followed by a narrative comma, narrative semicolon, etc.)
In HTML, which affords more control than the J wiki mark-up, the device would be <tt> +/@(*"1 _)</tt> .<tt> </tt> where stands for "non-breaking space" and would prevent the infelicity of the narrative period going over to the next line. See http://www.jsoftware.com/papers/ratapl.htm for a document that uses this device. In the J wiki mark-up a block of J code is marked like this: {{{ inner_product=: +/@(*"1 _) }}} ----- Original Message ----- From: Ian Clark <[email protected]> Date: Wednesday, March 25, 2009 19:00 Subject: Re: [Jchat] At Play With J To: Chat forum <[email protected]> > I propose to do as Roger says, and as is already done in the existing > book (see 3493342.pdf in the reference pack/zip). I see that the > existing Wiki articles are identifying inline J (meaning J code > embedded in narrative) by surrounding it with backticks. This is good. > I'd prefer no explicit font to be specified and will only have to > strip out any such markup. I shall use the backticks to identify text > to set in the appropriate MSWord style. Probably by means of a MSWord > macro. > > Currently all code samples in the book, whether APL, J, or other > language like K or MAPLE, preformatted or inline, use the same font: > APL385 Unicode, which Vector has standardized upon. It is a > fixed-width font designed by Adrian Smith. > > I'm wondering if inline J needs yet more delineation in the printed > book, eg to show up clearly where two J phrases are shown > separated by > a (narrative) comma, or where a J phrase finishes a sentence and is > followed by a (narrative) period. This could be done (and was > done in > working drafts) by background colouring of the J style -- which > becomes light-grey on the printed page. Technically helpful, > IMO, but > not so pleasing. So we left it out. > > You can see the effect of my original code colouring in the > Playnnn.doc files in the reference pack/zip. It has come back after > doing the copy/paste to extract each chapter. It was suppressed in > AtPlayWithJ.BOOK.doc by a global change to the whole book, but is > still there latent in the code styles. > > IanClark > > > On Wed, Mar 25, 2009 at 11:45 PM, Roger Hui <[email protected]> > wrote:> There is a possible additional step which is beyond the > > scope of the project as defined below, but would > > (in my opinion) make the resultant text more pleasing > > to read. That additional step is: use a fixed-width font > > for any J code in the text. What does Ian Clark think > > of this? > > > > > > > > ----- Original Message ----- > > From: Chris Burke <[email protected]> > > Date: Wednesday, March 25, 2009 15:15 > > Subject: [Jchat] At Play With J > > To: Chat forum <[email protected]> > > > >> I think everything is set up now, and we can go ahead. > >> > >> Forum members: please take on responsibility for one or more > of the > >> articles. To do so, go to wiki page > >> http://www.jsoftware.com/jwiki/At%20Play%20With%20J and put > your name > >> down as owner of an article. > >> > >> This should not be much work, perhaps an hour or so per > article, and > >> essentially requires that you copy in the J code to a session > >> and ensure > >> that it works. At the same time, read the paper and fix any > formatting>> or obvious mistakes. There are guidelines on the > wiki as to what > >> to do, > >> but in any case, you can always ask Ian, the BAA editor. > >> > >> Let's show BAA and Eugene that we can do a good job on this. > >> > >> Thanks. ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
