[comp.sys.mac] Looking for troff to word processor/page layout

blm@6sigma.UUCP (Brian Matthews) (07/10/89)

I've got a bunch of text in troff (actually eroff), using pic and tbl.  I
need to get this text into either Word, Word Perfect, or Ventura on the
PC, with as much formatting intact as possible.  So, if you have anything
that takes troff as input and spits out one of the above, or something
that can be converted to one of the above (for instance, Word on the Mac,
or MacWrite), I'd appreciate hearing from you.  Note that even if you
have a partial, hacked together solution, or even a pointer to a
solution, I'm still interested.  If I can't find anything, I'll have to
transfer just the text, and redo the formatting by hand, so any little
bit helps!

I don't have access to an Internet site, so I can't FTP things.  If what
you have is small, mail should work, otherwise I can call your site with
uucp to pick things up.

Thanks 
-- 
Brian L. Matthews +1 206 854 6578

jwi@lzfme.att.com (Jim Winer @ AT&T, Middletown, NJ) (07/11/89)

> Brian Matthews writes:
>
> I've got a bunch of text in troff (actually eroff), using pic and tbl.  I
> need to get this text into either Word, Word Perfect, or Ventura on the
> PC, with as much formatting intact as possible.  So, if you have anything
> that takes troff as input and spits out one of the above, or something
> that can be converted to one of the above (for instance, Word on the Mac,
> or MacWrite), I'd appreciate hearing from you.  Note that even if you
> have a partial, hacked together solution, or even a pointer to a
> solution, I'm still interested.  If I can't find anything, I'll have to
> transfer just the text, and redo the formatting by hand, so any little
> bit helps!

Translating from the MM macros to WordPerfect is a reasonable job in
awk (I expect to do it later this year). Each MM macro generates one
or more WP codes and a style on/off pair. EQN won't translate. TBL
won't translate to WP but may translate to Ventura Publisher,
Professional edition. PIC won't translate to WP and may or may not
translate to Ventura -- if you have actually written PIC, it should
translate okay, but if you have generated PIC from CIP it almost
certainly will be too complex. You should consider translating the
PIC stuff to HPGL or EPS and then including it in a WP figure box as
an external file (similarly for Ventura).

Note: You may want to translate MM to WordPerfect and then use
that as input to Ventura. MM won't translate to Ventura anywhere
near as well as it will translate to WP.

Note: You can probably handle some minor toff formatting in addition
to the MM macros, but if you are doing the full course (and in
particular, if you are using troff macros), you haven't got much of
a chance.

Jim Winer ..!lzfme!jwi (Usually unable to reply to email outside AT&T)

Those persons who advocate censorship offend my religion.

Upuaut:	a wolf-headed Egyptian deity | Voodoo: the art of sticking ideas
	assigned as Guidance System  |         into people and watching
	for the Barque of Ra.        |         them bleed.

The opinions expressed here are not necessarily  

gary@pbseps.UUCP (Gary Gallaher) (07/11/89)

In article <237@6sigma.UUCP> blm@6sigma.UUCP (Brian Matthews) writes:
>I've got a bunch of text in troff (actually eroff), using pic and tbl.  I
>need to get this text into either Word, Word Perfect, or Ventura on the
>PC, with as much formatting intact as possible.  So, if you have anything
>that takes troff as input and spits out one of the above, or something
.
I'd be interested in this type of information also.  I'd like to get a copy
of what is mailed.  Maybe if someone has a short reply it could be posted.
I suspect others are interested also.
  -- 


Gary G. Gallaher, 180 New Montgomery St., Room 602, San Francisco, CA, 94105
1 415 545-7590 || UUCP {ames,pyramid,sun,att,bellcore}!pacbell!pbseps!gary

wnp@attctc.DALLAS.TX.US (Wolf Paul) (07/12/89)

In article <237@6sigma.UUCP> blm@6sigma.UUCP (Brian Matthews) writes:

=I've got a bunch of text in troff (actually eroff), using pic and tbl.  I
=need to get this text into either Word, Word Perfect, or Ventura on the
=PC, with as much formatting intact as possible.  So, if you have anything
=that takes troff as input and spits out one of the above, or something
=that can be converted to one of the above (for instance, Word on the Mac,
=or MacWrite), I'd appreciate hearing from you.  Note that even if you
=have a partial, hacked together solution, or even a pointer to a
=solution, I'm still interested.  If I can't find anything, I'll have to
=transfer just the text, and redo the formatting by hand, so any little
=bit helps!


Microsoft will send you upon request a copy of their RTF format which
troff text can easily be converted to using sed scripts.

Word 4.0 and later contain a utility to convert RTF files to Word files.

Hope this helps!
-- 
Wolf N. Paul * 3387 Sam Rayburn Run * Carrollton TX 75007 * (214) 306-9101
UUCP:   {texbell, attctc, dalsqnt}!dcs!wnp
DOMAIN: wnp@attctc.dallas.tx.us or wnp%dcs@texbell.swbt.com
        NOTICE: As of July 3, 1989, "killer" has become "attctc".

frank@mnetor.UUCP (Frank Kolnick) (07/12/89)

In article <562@pbseps.UUCP> gary@pbseps.PacBell.COM (Gary Gallaher) writes:
>In article <237@6sigma.UUCP> blm@6sigma.UUCP (Brian Matthews) writes:
>>I've got a bunch of text in troff (actually eroff), using pic and tbl.  I
>>need to get this text into either Word, Word Perfect, or Ventura on the
>>PC, with as much formatting intact as possible.  So, if you have anything
>>that takes troff as input and spits out one of the above, or something
>.
>I'd be interested in this type of information also.  I'd like to get a copy
>of what is mailed.  Maybe if someone has a short reply it could be posted.
>I suspect others are interested also.

I pulled this off the net a while ago. Perhaps Avatar provides drivers to
perform the reverse operation.

In article <6903@ihlpl.ATT.COM> nala@ihlpl.ATT.COM (A. Flora-Holmquist) writes:

    > I would like to include MAC drawings in troff documents and would 
    > appreciate a few pointers from anyone who has already solved this
    > problem.

Avatar currently offers a number of Macintosh printer drivers, one of which
accomplishes exactly what "nala" seeks.  MDPIC produces Unix "pic" files from
almost any Mac application (including MacDraw, Cricket Draw, Excel, MacWrite,
MS Word, Fullwrite, Chemintosh, etc.).  The "pic" files are fed through Unix
pic and troff to produce Unix troff documents with included pictures.

For further information, call Avatar at 412/422-9509, or write at Avatar at
5606 Northumberland, Pittsburgh PA  15217-1238.  Product information and demo
packages are available.

-- 
Frank Kolnick,
consulting for, and therefore expressing opinions independent of, Computer X
UUCP: {allegra, linus}!utzoo!mnetor!frank

bmartin@uhccux.uhcc.hawaii.edu (Brian Martin) (07/14/89)

In article <237@6sigma.UUCP> blm@6sigma.UUCP (Brian Matthews) writes:
>I've got a bunch of text in troff (actually eroff), using pic and tbl.  I
>need to get this text into either Word, Word Perfect, or Ventura on the
>PC, with as much formatting intact as possible.
>Brian L. Matthews +1 206 854 6578

What I've done in the past is to format the document with something like

     nroff -TEpson my_troff.src | awk -f my_translator > output.doc

or whatever output driver is available (look in /usr/lib/term). This approach
formats your text with embedded style changes for the target output device,
and the awk filter translates the printer codes to RTF format. In your
troff source, you'll need to turn headers and footers off, set the page length
to 66 so that there are no page breaks, and set paragraph spacing to one line
so that your filter can differentiate between line breaks which are word wrap
and line breaks which are for paragraphs.

To handle pic and eqn, you probably want to generate postscript with the ditroff
driver.


-- Brian
====
    Brian K. Martin, M.D.
    Department of Psychiatry
    John A. Burns School of Medicine
    University of Hawaii
      and
    Martin Information Systems, Ltd.
    1103 9th Ave., Suite 203
    Honolulu, Hawai`i 96816-2403
    Voice (808) 733-2003
    Fax (808) 733-2011

ARPA: uhccux!bmartin@nosc.MIL
UUCP: {uunet,dcdwest,ucbvax}!ucsd!nosc!uhccux!bmartin
INTERNET: bmartin@uhccux.uhcc.hawaii.edu