[luatex] how many bytes for fontdimens?

Reinhard Kotucha reinhard.kotucha at web.de
Fri Aug 6 03:23:04 CEST 2021


On 2021-08-05 at 10:01:18 +0200, jfbu wrote:

 > I had accidentally TEXMFCNF set in my environment (from previous tests).
 > 
 > Testing some more with this environment variable of TeXLive unset, I
 > get completely different results.

Hello Jean-François,
as Hans already pointed out, the size of the texmf tree matters.  IMO
it's not a good idea to change TeX Live's configuration.  You can't
achieve a significant improvement this way.  And please avoid
TeX-related environment variables whenever possible.

If you run

  svn co https://svnrepo.ddns.net/tinytex

and copy the file ./tinytex/trunk/tinytex to /usr/local/bin then you
can precede the command line with tinytex, for instance

  tinytex luatex somefile.tex

This will create a directory tinytex.d in your current working
directory containing a minimal TeX Live installation which contains
only the files needed in order to compile your document.

tinytex is cumulative.  This means that if you run

  tinytex bibtex ...

the required files will be added to the tinytex.d directory.

Only files installed within the current TeX Live tree (that one which
is found in PATH) are copied to tinytex.d.

If you run

  tinytex --shell

a shell script tinytex.sh is created in your working directory which
starts a new shell with ./tinytex.d/bin/<platform> prepended to PATH.
You can leave this enviromnent with exit as usual.

Please note that any TeX Live related environment variable can confuse
tinytex too.  It's always best to avoid them.

I wrote this script about ten years ago and used it for several
projects.  There is no other documentation than --help.

tinytex is based on strace(1) and thus runs only on Unix.  But it's
possible to add binaries for other platforms, even Windows, if you
create a configuration file.  The binaries for all desired platforms
must be installed on your system.  If some are missing, run

  tlmgr platform add ...

Windows is a bit problematic.  Because there are no symlinks the
*tex.exe files are only stubs which load shared libraries containing
the actual code.  In order to locate these libraries I examine the
.exe files with strings(1).  It always worked for me so far but I
can't guarantee that it always works.

Regarding kpathsea and the creation of hashes, as mentioned by Hans,
it makes a difference whether there are 20 or 200,000 files.  If only
a few files are present it doesn't matter which algorithm is used to
locate them.  And tinytex creates the smallest possible TeX Live
system for a particular project.


Other things to consider are format files.  When I've set up

  http://metar.ddns.net

I noticed that the plain TeX format file contained all the stuff from
unicode.org which is currently only used by LaTeX3, AFAIK.  So I
created my own format file with the unicode stuff omitted and a few
things added which otherwise had to be done at runtime.

It's sufficient to create a customized format file in the current
working directory.  

Especially if you are using LaTeX it makes sense to to put as much as
possible into the format file instead of loading all the files at
runtime.

Regards,
  Reinhard

-- 
------------------------------------------------------------------
Reinhard Kotucha                            Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover                    mailto:reinhard.kotucha at web.de
------------------------------------------------------------------



More information about the luatex mailing list.