On Sun, Sep 14, 2025 at 07:04:48PM +0100, Gavin Smith wrote:
> On Sun, Sep 14, 2025 at 04:47:40PM +0200, Patrice Dumas wrote:
> > Right now, with the development sources, you could call texi2any like:
> > 
> > ./texi2any.pl --html -c HIGHLIGHT_SYNTAX='pygmentize -f html -l ' 
> > maxima.texi
> > 
> > to get the output you want (if I understood well).
> > 
> > Subject to change until an agreement is reached on the interface.
>
> Is the language name automatically appended to the value of HIGHLIGHT_SYNTAX?

Yes.

> I think we should use a placeholder like %s so it would look like
> 
> -c HIGHLIGHT_SYNTAX='pygmentize -f html -l %s'

I find the appendend language simpler, but that could be ok too.  We
probably would also need a way to escape %, or % followed by s.

> I checked all three of the highlighting programs we support and they all
> accept input from stdin and print output to stdout so there shouldn't
> be a need for placeholders for input and output files.

Indeed, that's a requirement for this mode.

> We could use %l instead of %s although I slightly prefer %s.
> 
> Are there any other programs we could imitate the interface of?  The only
> one I know about is the "less" pager program, which uses %s in the values
> of LESSOPEN and LESSCLOSE.

Another option is to use shell like variables, but in this context (a
command-line) it would not be a good idea.

-- 
Pat

Reply via email to