On Thu, Jul 16, 2026 at 12:20:18PM +0000, Dimitris Papavasiliou wrote:
> Thanks for looking into this so quickly!  Please let me know if you
> merge this to master, or some other branch, so that I can try to build
> it and try it out.

Committed today, in git commit 83e09236dd.

> On Thursday, July 16th, 2026 at 1:26 PM, Patrice Dumas <[email protected]> 
> wrote:
> 
> > I do not know if we should document it, but one of the objectives of
> > having a LaTeX output is to be have support for any font/language
> > especially with utf-8 encoding.  Other than that, the LaTeX output is
> > likely to be less optimized than the Texinfo TeX output.
> 
> I used Tex output initially, but switched to Latex because of the
> (quoting from notes in my Git history) "unsatisfactory way with which
> Texinfo's plain Tex output handled figures, but the results are much
> better overall, particularly with respect to typesetting of program
> code."
> 
> In retrospect, I should have been more detailed in my commit message.
> I don't quite remember what issues I had with floating figures. I
> still use `@float` now, but perhaps the implementation in Latex output
> was more convenient for me, or perhaps I just didn't know how to get
> what I wanted in plain Tex.
> 
> The part about program code probably has to do with the fact that I
> was able to use the `listings` LaTex package to get syntax
> highlighting working.  I use Texinfo to produce both a user manual and
> a rendering of the source code as a book, somewhat in the style
> literate programming.

That's great!

We don't recommend one output format over another, as it's clear that
different output formats will be useful to different people in different
circumstances.


> I generally had excellent results with LaTex output, except a couple
> of issues that I brought to your attention and which you readily
> fixed.  The only other differnece I note, that might be considered an
> issue, is that the default page settings seem to differ, as can be
> seen from the example PDFs I attached.  The Tex output has overall
> larger fonts and better suited margins than LaTex, which has larger
> and assymetric margins typical for books that are to be printed.  I
> have mostly fixed this for myself with the `geometry` package, but
> perhaps I should start a new thread about it?  One could argue that
> Tex and LaTex output should match as closely as possible after all.


No.  The point of the LaTeX output is to produce output in a plain,
unsurprising, idiomatic LaTeX style.  This is to make it easier for
users to undersand the output and customise it to their needs using
various LaTeX features and packages.

In other terms, the LaTeX output file is an end in itself, and not
merely an intermediate step for creating a PDF.

Hence, we should not make changes to the LaTeX output that would
make it longer or more complicated, as long as the PDF output is
acceptable.

For comparison, we could imagine an alternative output path to PDF
where intermediate outputs are not intended to be user-modifiable.
(This would be far in the future as Texinfo development is absorbed by
other work at present.)  For example, we could output a TeX file with
many low-level formatting commands for input to pdftex.  Macros could
be all expanded at this point and there may not be any need for using
TeX features such as changing character category codes.  texi2any could
generate tables of contents and indices itself, then there would be no
need for "texi2any --pdf" to run texi2pdf.  If texi2any includes the
contents of texinfo.tex in this low-level TeX output, there would not
be any need for the user to install texinfo.tex separately to the rest
of Texinfo, as long as they use "texi2any --pdf" rather than texi2pdf.
There may even be other typesetting programs or libraries other than
TeX that could be used instead.

Reply via email to