[comp.emacs] texi2roff for elisp manual

mike@octel.UUCP (Michael D. Crawford) (06/24/89)

The emacs programmer's manual has some extra macros in it.  Is there a
new version of texi2roff to support them?  I don't think there is, so I
attempting to add them to your table.  My additions cause some
trouble.  Here is the input file:

@example
(progn (print 'foo) (print 'bar))
@arrow foo
@arrow bar
@Arrow bar
@end example

here is what texinfo-format-buffer produces:

     (progn (print 'foo) (print 'bar))
     -> foo
     -> bar
     => bar

@arrow and @Arrow are not yet defined.  Texi2roff's stdout:

.ND

.PP
.DS
.ft CW
(progn (print 'foo) (print 'bar))
 foo
 bar
 bar
.DE
.ft R

... and stderr:

bar.tex line 4 : unrecognized Texinfo command @arrow
bar.tex line 5 : unrecognized Texinfo command @arrow
bar.tex line 6 : unrecognized Texinfo command @Arrow

Now I add table entries for @arrow and @Arrow:

*** tablems.h	Fri Jun 23 12:18:24 1989
--- tablems.h-dist	Thu Jun 22 17:36:02 1989
***************
*** 35,47 ****
      "@.",		"",	"\\&.",		"",		ESCAPED,
      "@:",		"",	"",		"",		ESCAPED,
      "@@",		"",	"@",		"",		ESCAPED,
-     "@Arrow",		"",	"=>",		"",		INPARA,
      "@TeX{",		"}",	"TeX",		"",		INPARA,
      "@appendix",	"\n",	"\n.bp\n.SH\n", "\n.br\n",	HEADING,
      "@appendixsec",	"\n",	"\n.SH\n",	"\n.br\n",	HEADING,
      "@appendixsubsec",	"\n",	"\n.SH\n",	"\n.br\n",	HEADING,
      "@appendixsubsubsec","\n",	"\n.SH\n",	"\n.br\n",	HEADING,
-     "@arrow",		"",	"->",		"",		INPARA,  
      "@asis",		"\n",	"",		"",		PARAGRAPH,
      "@asis{",		"}",	"",		"",		INPARA,
      "@br",		"\n",	"\n.br\n.sp\n", "",		PARAGRAPH,
--- 35,45 ----

(I think INPARA is the right thing to use here).

Now we get stderr:

bar.tex line 7 : probably @end for unrecognized Texinfo cmd @example

and stdout:

.ND

.PP
.DS
.ft CW
(progn (print 'foo) (print 'bar))
-> foo
-> bar
=> bar

I am not sure I understand the logic of your program, but I believe
that when an @end-able token starts, it is supposed to see the
argument to @end and throw it away.  Instead, it does not recognize
it.

If I can get it working right I will post diff's to the net.  I should
be able to fix the -me table as well.  I do not have the -ms macros.
The new macros needed are:

@Arrow, @arrow, @defcmd, @defconst, @defmac, @defopt, and @defun

Many thanks,

-- 
Michael David Crawford			Consulting for:
Oddball Enterprises			Octel Communications Corp
694 Nobel Drive				890 Tasman Drive
Santa Cruz, CA 95060			Milpitas CA 95035
{pyramid!vsi1,aeras,uunet}!octel!mike
CI$ 72377,623

sac@conrad.UUCP (Steven A. Conrad) (07/04/89)

In article <23@octel.UUCP> mike@octel.UUCP (Michael D. Crawford) writes:

>If I can get it working right I will post diff's to the net.  I should
>be able to fix the -me table as well.  I do not have the -ms macros.
>The new macros needed are:
>
>@Arrow, @arrow, @defcmd, @defconst, @defmac, @defopt, and @defun

I too have have been unable to get texi2roff to format the elisp manual
as you describe.  While  Beverly Erlebacher has done a commendable job,
my first attempts at correction failed, and I didn't have the time to
really analyze her code to get the changes to work.

I don't like to make announcements too early, but I am working on a
texinfo -> troff converter using lex and yacc.  It might be a little
bulkier, but I think the advantages of working with these tools might
allow easier understanding and maintainability of the code.  (Another
reason I am doing it is to advance my familiarity with lex/yacc).  The
lexical analyzer is written (and includes the above macros), and the
grammar is under construction.  I also plan to have the program use
native troff or a specially constructed macro package, distributed
with the program, to avoid the problems of having to support several
macro packages.

My schedule is hectic, so no projections on a completion date.  If
it performs well, it will be posted to the net.  Since I've worked
little with texinfo (but a lot with troff),  I would like to get
a couple of names of those intererested in testing an alpha version
in their environment.  I am working strictly from the Texinfo manual.

	-Steve
-- 
Steven A. Conrad,  Department of Medicine (Critical Care)
Louisiana State University Medical Center, Shreveport, LA
UUCP: sac@conrad.UUCP,   Internet: conrad@manta.pha.pa.us