groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Groff] Groff editor.


From: Meg McRoberts
Subject: RE: [Groff] Groff editor.
Date: Mon, 20 Aug 2007 11:38:49 -0700 (PDT)

Why do you need to maintain this as a groff file?  Perhaps if we understood
that we could help you find a better solution.

I happen to love groff and I can code it very quickly.  What I have done in
this situation is give the user the formatted ASCII file and tell them to
edit it, sticking some string like "SRINI START" and "SRINI END" before and
after any changes they make.  Then I manually make their changes to the groff
source, inserting the appropriate codings.  It's basically the same procedure
as if they hand-wrote comments on a formatted draft...

I think that converting the file to Docbook/XML would preserve the bold/italic
fonts and probably most of the tables unless the tables were coded by someone
who went crazy with the coding.  And it gives you a text source file which is
very nice for source code control.  So you get a lot of the benefits of groff
with a format for which there are tools like you want.

I haven't worked with the any PDF editing software but, theoretically,
it should retain all the formatting for you. I just googled "edit PDF file"
and got some interesting hits -- software that converts PDF to XML (it's
shaded at the top of the list and that site seems to allow you to submit a
test file for conversion for free to see the results).

Those of us on this list love groff and so I certainly don't mean to discourage
you from learning it and joining us ;-)  However, the learning curve is fairly
significant...   XML has many of the advantages of groff but editors such as
XMetal (and others, and I haven't actually worked with any of them so this is
not an endorsement -- google "XML editors" if you want to investigate) give you
the ability to maintain the text-based source with visible formatting and yet
have a WYSIWYG editor as an alternative to manual coding...

meg

--- "Karee, Srinivas" <address@hidden> wrote:

> This file does not contain any pics, it has some tables, I can covert it
> to ascii (-Tascii) and show to the users. But my requirement is for user
> to edit the file and I should able to save it back in groff format and
> use user edited (groff file) file for printing on the PS printer and
> sending fax.
> 
> Basically I cannot lose bold/italic/font and other stuff. I am new to
> groff, so I thought there could be some tools which I could buy and
> workout this requirement, but looks like there are no tools out there
> which I can use.
> 
> Srini.
> 
> 
> -----Original Message-----
> From: Meg McRoberts [mailto:address@hidden 
> Sent: Monday, August 20, 2007 2:03 PM
> To: Karee, Srinivas; Clarke Echols
> Cc: address@hidden
> Subject: RE: [Groff] Groff editor.
> 
> What sort of document is this?  Is it mostly text or are there
> a lot of tables, graphics, and such?
> 
> I can think of a few ways that one might get the content into
> some sort of WYSIWYG editor, but the fancier the formatting,
> the less satisfactory these will be:
> 
> - Run the text into formatted ASCII then import the formatted text
>   into Word or some other editor.  A command similar to the following
>   might work:
> 
>   groff -mandoc -stC -Tascii <filename>| col -b > <filename>.txt
> 
>   This is for man page source -- replace -mandoc with the appropriate
>   string if the document is using a different set of macros.
> 
>   You will loose all bold/italic and lots of other stuff but it will
>   get you text that does not show the formatting characters.
> 
> - Run the text into PDF and then try a PDF editor.  I know that
> Broderbund
>   is selling such an editor but I haven't used it.  The following
> commands
>   will create PDF from a groff file (these are the commands I use --
> perhaps
>   someone will have a more elegant method) -- note that you have to
> create
>   a PostScript file and then convert the ps file to PDF:
> 
>   groff -mandoc -st <filename> > <filename>.ps
>   ps2pdf <filename>.ps <filename>.pdf
> 
> - Convert the groff code to Docbook/XML; editors like you want are
> available
>   for XML.  Here is some information about a tool that does this:
> 
>   http://www.xmlhack.com/read.php?item=1749
> 
> These are not perfect solutions but would allow you to capture the text
> into a format that can be maintained without learning groff.  
> 
> meg
> 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]