[Cin] Creating AppImage

Georgy Salnikov sge at nmr.nioch.nsc.ru
Fri Feb 11 07:56:37 CET 2022

On Thu, 10 Feb 2022 mnieuw at zap.a2000.nl wrote:

> > 1) As the manual is absolutely architecture-independent, nothing is
> > against building it under some most convenient platform (that, for
> > example, where all the necessary latex/html tools are
> > installed/configured) and then populating the resulting manual over
> > all the other needed platforms.
> Unless you want to build the complete AppImage inclusive the nice
> built-in help. Then the manual needs to be built too.

I meant the following. The built-in context help engine is, of course,
architecture dependent. As it is actually part of the CGG binary, it is
built from the sources of CGG itself (not from the sources of the manual)
and then comes into AppImage inside the CGG binary executable.

The perl script which performs searching for the proper html page to display
on pressing Alt/H resides also in the CGG (not manual's) source tree and is
installed together with the whole CGG.

The context help pages are nothing else than the html form of the manual.
These html pages are platform independent, and technically even CGG-version
independent. Nothing prevents from translating these pages on some most
convenient computer (with good configured TeX system and latex2html)
followed by the addition of them to different CGG binary installations.

The context help engine, technically, takes no assumption about any
correspondence between itself and the contents of the html manual pages,
except that there should exist a file with the name 'Contents.html'.
Technically it is possible to put there some html files produced for some
other version of CGG, nothing will crash, context help will still work and
even often yield reasonable pages for displaying. So one needs to ensure
only logical (not binary) correspondence between CGG and its manual to get
the consistent information of the help pages.

> In the "translate_manual" script, I selected the option for png images
> for the HTML version.
> On Fedora_35, the build goes fine but has one page more than the
> January download from CinGG. I installed packages one by one until it

There can be more or less html pages in the manual, depending on the number
of LaTeX sections. If Andrea adds a section to the LaTeX manual, probably it
will lead to one more html file in the result.

> completed, because I wanted to know which packages are really needed.
> I was thinking of making something like the "blds/bld_prepare.sh" script
> in the CinGG source, which installs needed packages for the distro.
> In any case for Fedora I had to install:
> texlive texlive-subsitutefont texlive-mathdesign texlive-t2
> texlive-multirow texlive-was texlive-wrapfig texlive-nomencl latex2html
> and maybe texlive-tex4ht too (not sure).
> No "error:" in the log, quite a few "warning:" . And the HTML front
> page has some color indicating texts, like "CinBlue" just before "The"
> On Mint 19.3, the PDF is only 701 pages instead of 728 on

The correctly installed TeX system MUST unconditionally produce IDENTICALLY
typeset pdf pages on ANY computer/OS. If you get different number of pages,
it means you have some quirks (incompleteness) in your TeX installation. For
example, if you have not installed the 'makeindex' program, you will get
neither Index nor Glossary sections in pdf. Also, to get the complete pdf
result, it is necessary to run at least 3 times pdflatex and 3 times
makeindex in that sequence, as in the translate_manual script.

> Fedora (same source). I cannot remember which packages I installed,
> likely I used "texlive-full", which pulls in far too much. This is not
> available on Fedora.
> No "error:" in the log, quite a few "warning:" , among which
> Label 'sub:how_it_works:  multiply defined .

You can grep '\label{sub:how_it_works}' through the .tex files to check if
it was not a mistake in the latex-sources of the manual.

> On Mint 20.3, the PDF is 730 pages. here I also installed texlive-full .
> There is a difference in the messages in the terminal at the end of a
> build (the html build).
> Compared to Mint 20.3, on Mint 19.3, there are 4 extra lines like:
> No number for "Infowindowswiththe"Detail"box"
> plus some differences in the line of "Unknown commands:"

Latex2html prints a lot of messages while translation. Usually the warnings
like "Unknown command" are not critical, as long as the html result looks
acceptable. Latex2html expects that it can encounter some LaTeX commands
which it does not support natively. If so, latex2html either tries to feed
the proper part of LaTeX text to pdflatex itself to convert it into a
generated image (so are the math expression except the simplest ones), or to
output the argument of the command assuming the command can be ignored. In
any case you will see the message "Unknown command".

> Compared to Mint 20.3, on Fedora_35 there are more differences, such as:
> no implementation found for class 'memoir'
> which is strange because texlive-memoir is installed.

Mat, check your latex2html version:

latex2html -version

If the version is older than something like 2021.2, then the class 'memoir'
is not yet supported, you have to upgrade (or patch) latex2html to translate
CGG manual.


Georgy Salnikov
NMR Group
Novosibirsk Institute of Organic Chemistry
Lavrentjeva, 9, 630090 Novosibirsk, Russia
Phone   +7-383-3307864
Email   sge at nmr.nioch.nsc.ru

More information about the Cin mailing list