Thanks for your comments Bob.  

If you use   
Z =. ?. 4 5 $ 200  as a test array,  Copying  a display of z to Word leads to 
an array which is like a ;ist of four vectors.  The columns are no longer 
aligned.   You can do better with using the display of  <”0 z  after having 
chosen to toggle ascii box characters in the view menu, but it still does not 
give clean box shapes by default even with a monospaced font like Courier New.  
For latex inserting the J session selection  within a verbatim section often 
gives a satisfactory output but not always.. 

Script sections for programs do provide accurate detail in Word even with some 
loss of formatting.  For Latex you need to use the verbatim control to avoid a 
range of problems.

It is relatively simple to write a program to format the data in an array for 
latex.  If there is a box for each item in the array, both numeric and 
character items can be entered in the Latex table and the formatting rules of 
Latex used to format the table and generate all lines required.  We need to add 
some tidy capabilities to our packages to make it easy to transfer results to 
whatever document forms are required.  They are essential if we want to see 
wider use of J.

Fraser
Sent from Mail for Windows 10

From: 'robert therriault' via General
Sent: Tuesday, April 21, 2020 12:45 PM
To: General forum
Subject: Re: [Jgeneral] Transferring J output to other documents

Hi Fraser,

For Word Documents I was able to just select the code on either the jQT or JHS 
interfaces and then use Edit|Paste Special... in the Word document. I use html 
format as my choice, but there are times that the unformatted provides a 
cleaner look. For boxed information I think that you will want to use html to 
retain spacing and linefeeds. I would guess that Latex has something similar, 
although I am not a user of it.

If I have misread what it is that you are attempting, my apologies for the 
noise.

Cheers, bob

> On Apr 20, 2020, at 16:48, bill lam <[email protected]> wrote:
> 
> Not really but does print to pdf printer work?
> 
> On Tue, Apr 21, 2020, 7:28 AM Fraser Jackson <[email protected]>
> wrote:
> 
>> Does anyone have a simple way of copying formatted J session output
>> to a Word or Latex document
>> .
>> It needs to preserve Ascii formatted boxes as well, but a means of also
>> transferring an item using line drawing characters would be very usefuf.
>> 
>> Any suggestions would be most helpful.
>> 
>> For Latex I have some simple functions for constructing a latex input for
>> tables for numeric cases, but intend to develop functions to create latex
>> input  to display a boxed table for a  wider range of simple cases.
>> 
>> Fraser
>> 
>> Sent from Mail for Windows 10
>> 
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
>> 
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to