On Wed, Jul 16, 2025 at 02:27:25PM -0700, Raymond Toy wrote:
> I'm experimenting with HIGHLIGHT_SYNTAX=source-highligit. It works fine with
> --no-split and produces pretty nice highlighting.
> 
> However, when I don't use --no-split, I get an error. An example error
> message:
> 
> |makeinfo: warning: highlight_syntax.pm: could not open
> cmu-user_html/cmu-user_highlight_c_input.c: No such file or directory |
> 
> The file cmu-user_highlight_c_input.c is actually in the current directory,
> not in the subdirectory cmu-user_html.
> 
> Note that pygments works fine when the HTML output is split. I'm just
> playing around to see which one does a better job.
> 
> ​

I was hoping somebody else would reply as I have limited knowledge about
this feature.

I've installed the 'source-highlight' program and tested this with
texi2any 7.2.  (Building from the git repository has been broken for a
few days.)  It appears to work fine, both with and without --no-split.
Highlighting appears in the output file.  Can you produce a minimum
failing example?


$ cat src-hl.texi 
\input texinfo

@node Top
@top

@example C
#include <stdio.h>

int
main (void)
@{
  printf ("Hello world!\n");
@}
@end example

@example C
@include src-hl.c
@end example

@bye
$ cat src-hl.c
#include <stdio.h>

int
main (void)
@{
  printf ("Hello world!\n");
@}
$ texi2any --html src-hl.texi -c HIGHLIGHT_SYNTAX='source-highlight'
src-hl.texi: warning: must specify a title with a title command or @top
$ texi2any --html src-hl.texi -c HIGHLIGHT_SYNTAX='source-highlight' --no-split
src-hl.texi: warning: must specify a title with a title command or @top
$ 

Reply via email to