On Wed, Nov 18, 2026 at 09:42:59PM +0000, Gavin Smith wrote: > I just tried building ffmpeg.texi as Info, using files I downloaded > from https://github.com/FFmpeg/FFmpeg/tree/master/doc: > > ffmpeg.texi > fftools-common-opts.texi > ffmpeg.texi > > I also had to run "touch config.texi". > > Running "texi2any ffmpeg.texi" runs with no errors. The Info output > looks pretty usable. These files are notable for not using @node anywhere. > > I just noticed one minor glitch. The file has these lines: > > @anchor{Stream selection} > @chapter Stream selection > > The node produced for the @chapter is called "Stream selection [+1]", > which is ok, but the @anchor is in the previous node. Hence following > a reference to "Stream selection" actually puts you at the end of the > "Loopback decoders" section. > > One possibility is to make this equivalent to input with @node before > the @anchor command, rather than after it: > > @node Stream selection [+1+] > @anchor{Stream selection} > @chapter Stream selection > > That way @xref{Stream selection} would go to the right node.
I do not think that it is a good idea, because we do not know if the @anchor is for @chapter, or before @chapter, that is to say for the content being before @chapter. Here, we can assume that it is actually for @chapter, since it has the same name and @node is not used but this is not general. My advice would be not to change the association of anchor and @chapter. There are several possibilities to obtain the wanted effect, and a @node before the @anchor, set AUTO_SECTION_NODE=0 or remove the anchor and ensures that the sectioning command names are unique. We could, however, add a new command that can be associated to the following structuring command, like @node, but is not a delimiter of output units. This would also be kind of symmetric with @xrefname. @xrefname is a kind of "ghost" sectioning command for a @node, there could also be a kind of "ghost" node for sectioning commands to be associated to, which would only provide a target. > I know we have discussed @anchor position before. Indeed, and it was what I said at that time too. > I still have a private note to review the documentation of @anchor > (Arsen Arsenović emails 2026-06-19) although that was a slightly > different issue, with @anchor directly before @node in the input file. It is slightly different, indeed, because in that case it is clearer that we should leave the @anchor in the previous node because @node is the delimiter of output. But it is still similar. -- Pat
