[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [help-texinfo] deftypefn breaking table of contents
From: |
Gavin Smith |
Subject: |
Re: [help-texinfo] deftypefn breaking table of contents |
Date: |
Fri, 7 Jul 2017 19:47:19 +0100 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Thu, Jul 06, 2017 at 02:23:35PM -0400, address@hidden wrote:
> Hello, all. I am a heavy user of TeX and have recently been trying out
> Texinfo.
> Hence I'm probably missing something basic here, but I can't figure out what
> it is.
>
> I have a texi file which compiles just fine in html. But when I try to
> compile to
> a pdf, I get the following:
>
> ./menus.texi:140: Missing number, treated as zero.
> <to be read again>
> \fnindfile
Do you know what version of texinfo.tex is being used? When you run
TeX, a message should be printed like:
Loading texinfo [version 2017-07-04.16]: pdf, fonts, markup, glyphs,
which shows which version it is.
If you have an older version, you can get the newest version from
http://ftp.gnu.org/gnu/texinfo/texinfo.tex
I tried using @deftypefn as in your example:
> @deftypefn category type function(@var{input})
> Does something on @var{input}
> @end deftypefn
but didn't get any errors.
test.texi:
\input texinfo
@contents
@node One
@chapter One
@deftypefn category type function(@var{input})
Does something on @var{input}
@end deftypefn
@node Two
@chapter Two
@printindex fn
@bye
test.toc:
@numchapentry{One}{1}{One}{1}
@numchapentry{Two}{2}{Two}{2}
test.fn:
\entry{function(input)}{1}{\code {function(\var {input})}}
> If I look in my file.toc, I see the following:
>
> ...
> @numsecentry{Some Section}{1.4}{Some Section}{2}
> @numsubsecentry{Some Subsection{1.4.1}{Some Subsection}{2}
> \entry{First deftypefn}{2}{\code {First deftypefn}}
> \entry{Second deftypefn{2}{\code {Second Deftypefn}}
> ...
>
> This code makes me think that the function generating table
> of contents entries for deftypefn is the problem.
What has happened here is that file.toc has file handle 0 when it is
open in TeX. \fnindfile as mentioned in the error message should have
the file handle number of file.fn, another output file, and the \entry
lines should be written to that file instead, not file.toc. That is
why the table of contents is a mess.