Discussion:
[tex-live] Building the "TeX in Practice" format and saving it in a sensible location
Philip Taylor
2018-12-02 19:48:12 UTC
Permalink
<html>
<head>

<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
I am endeavouring to build Stephan von Bechtolsheim's <i>TeX in
Practice</i> format but having little success.  I tried initially
:<br>
<ul>
<li>XeTeX ^&amp;texip</li>
</ul>
<p>but was told :</p>
<p>
<blockquote type="cite">kpathsea: Running mktexfmt texip.fmt<br>
<br>
The command name is D:\TeX\Live\2018\Bin\win32\mktexfmt<br>
Running the command D:\TeX\Live\2018\Bin\win32\fmtutil-user.exe<br>
fmtutil: fmtutil is using the following fmtutil.cnf files (in
precedence order):<br>
<br>
fmtutil:   d:/tex/live/2018/texmf-dist/web2c/fmtutil.cnf<br>
fmtutil: fmtutil is using the following fmtutil.cnf file for
writing changes:<br>
fmtutil:   c:/users/philip
taylor.fujitsu-pc/.texlive2018/texmf-config/web2c/fmt<br>
util.cnf<br>
fmtutil [INFO]: writing formats under c:/users/philip
taylor.fujitsu-pc/.texlive<br>
2018/texmf-var/web2c<br>
fmtutil [INFO]: did not find entry for byfmt=texip, skipped<br>
fmtutil [INFO]: Disabled formats: 6<br>
fmtutil [INFO]: Not selected formats: 44<br>
fmtutil [INFO]: Total formats: 50<br>
fmtutil [INFO]: exiting with status 0<br>
Sorry, I can't find the format `texip.fmt'<br>
</blockquote>
</p>
<p>The last seemed reasonable, and "did not find entry for
byfmt=texip" quite possible, so I then tried :<br>
</p>
<ul>
<li>XeTeX -i \input texipexp \dump</li>
</ul>
<p>for all variants of "-i" of which I could think ("-initex", "/i",
"/initex" and so on ...).  None of these seemed able to tip XeTeX
into iniTeX mode, and the command "iniXeTeX" was not found. <br>
</p>
<p>How, please, should I build the "TeX in Practice" format ?  How
do I persuade the system to write the format into $TEXMFLOCAL
rather than c:/users/philip taylor.fujitsu-pc/.texlive2018/texmf-var/web2c
?  And how does one interrogate XeTeX (or another TeX Live engine
binary) to find out what command-line parameters and/or qualifiers
it will accept ?<br>
</p>
<div class="moz-signature">-- <br>
&lt;Signature&gt;<br>
Philip Taylor</div>
</body>
</html>
Joseph Wright
2018-12-02 19:50:12 UTC
Permalink
I am endeavouring to build Stephan von Bechtolsheim's /TeX in Practice/ format
* XeTeX ^&texip
Post by Philip Taylor
kpathsea: Running mktexfmt texip.fmt
The command name is D:\TeX\Live\2018\Bin\win32\mktexfmt
Running the command D:\TeX\Live\2018\Bin\win32\fmtutil-user.exe
fmtutil: d:/tex/live/2018/texmf-dist/web2c/fmtutil.cnf
fmtutil: c:/users/philip taylor.fujitsu-pc/.texlive2018/texmf-config/web2c/fmt
util.cnf
fmtutil [INFO]: writing formats under c:/users/philip taylor.fujitsu-pc/.texlive
2018/texmf-var/web2c
fmtutil [INFO]: did not find entry for byfmt=texip, skipped
fmtutil [INFO]: Disabled formats: 6
fmtutil [INFO]: Not selected formats: 44
fmtutil [INFO]: Total formats: 50
fmtutil [INFO]: exiting with status 0
Sorry, I can't find the format `texip.fmt'
The last seemed reasonable, and "did not find entry for byfmt=texip" quite
* XeTeX -i \input texipexp \dump
The switch is -ini

Joseph
David Carlisle
2018-12-02 19:51:16 UTC
Permalink
Phil

xetex --help

lists its command line arguments, one of which is --ini
XeTeX ^&texip
kpathsea: Running mktexfmt texip.fmt
The command name is D:\TeX\Live\2018\Bin\win32\mktexfmt
Running the command D:\TeX\Live\2018\Bin\win32\fmtutil-user.exe
fmtutil: d:/tex/live/2018/texmf-dist/web2c/fmtutil.cnf
fmtutil: c:/users/philip taylor.fujitsu-pc/.texlive2018/texmf-config/web2c/fmt
util.cnf
fmtutil [INFO]: writing formats under c:/users/philip taylor.fujitsu-pc/.texlive
2018/texmf-var/web2c
fmtutil [INFO]: did not find entry for byfmt=texip, skipped
fmtutil [INFO]: Disabled formats: 6
fmtutil [INFO]: Not selected formats: 44
fmtutil [INFO]: Total formats: 50
fmtutil [INFO]: exiting with status 0
Sorry, I can't find the format `texip.fmt'
XeTeX -i \input texipexp \dump
for all variants of "-i" of which I could think ("-initex", "/i", "/initex" and so on ...). None of these seemed able to tip XeTeX into iniTeX mode, and the command "iniXeTeX" was not found.
How, please, should I build the "TeX in Practice" format ? How do I persuade the system to write the format into $TEXMFLOCAL rather than c:/users/philip taylor.fujitsu-pc/.texlive2018/texmf-var/web2c ? And how does one interrogate XeTeX (or another TeX Live engine binary) to find out what command-line parameters and/or qualifiers it will accept ?
--
<Signature>
Philip Taylor
Philip Taylor
2018-12-02 19:59:39 UTC
Permalink
Post by David Carlisle
Phil
xetex --help
lists its command line arguments, one of which is --ini
Ah, two consecutive hyphens — I rarely think of that.  I tried all four of "/?", "-?", "/h" and "-h", but none helped.  OK, so I can now build the format; how, please, do I persuade it to save the format file under TEXMFLOCAL and not the (very obscure, and somewhere I would never think to look) default location ?
Post by David Carlisle
The switch is -ini
Joseph
Thank you both.
** Phil.
--
<Signature>
Philip Taylor
David Carlisle
2018-12-02 20:12:17 UTC
Permalink
Post by Philip Taylor
not the (very obscure, and somewhere I would never think to look) default location ?
??? probably you can set the output direction but since the default
isn't obscure at all, it just uses the current directory, I'd just
move it afterwards.
David Carlisle
2018-12-02 20:13:23 UTC
Permalink
like all commandline arguments in web2c based texs you can use one or
two hyphens, --ini or -ini are the same thing.
Post by David Carlisle
Post by Philip Taylor
not the (very obscure, and somewhere I would never think to look) default location ?
??? probably you can set the output direction but since the default
isn't obscure at all, it just uses the current directory, I'd just
move it afterwards.
Philip Taylor
2018-12-02 20:24:50 UTC
Permalink
Post by David Carlisle
Post by Philip Taylor
not the (very obscure, and somewhere I would never think to look) default location ?
??? probably you can set the output direction but since the default
isn't obscure at all, it just uses the current directory, I'd just
move it afterwards.
But it wasn't the current directory at all :  it wanted to write to c:/users/philip taylor.fujitsu-pc/.texlive2018/texmf-var/web2c ! 
Post by David Carlisle
kpathsea: Running mktexfmt texip.fmt
The command name is D:\TeX\Live\2018\Bin\win32\mktexfmt
Running the command D:\TeX\Live\2018\Bin\win32\fmtutil-user.exe
fmtutil:   d:/tex/live/2018/texmf-dist/web2c/fmtutil.cnf
fmtutil:   c:/users/philip taylor.fujitsu-pc/.texlive2018/texmf-config/web2c/fmt
util.cnf
fmtutil [INFO]: writing formats under c:/users/philip taylor.fujitsu-pc/.texlive2018/texmf-var/web2c
** Phil.
Norbert Preining
2018-12-03 00:23:02 UTC
Permalink
Post by Philip Taylor
But it wasn't the current directory at all :  it wanted to write to c:/users/philip taylor.fujitsu-pc/.texlive2018/texmf-var/web2c ! 
This if fmtutil/mktexfmt which rightly writes to TEXMFVAR (or
TEXMFSYSVAR if you use the -sys (or --sys) switch).

If you run the xetex -ini (or --ini) manually, you get the format in the
current working directory.

You might want to read the man page (yes, as in "man page") of fmtutil.

There, the switch
-fmtdir (or --fmtdir)
is mentioned, which describes where the format is saved.

Best

Norbert

--
PREINING Norbert http://www.preining.info
Accelia Inc. + JAIST + TeX Live + Debian Developer
GPG: 0x860CDC13 fp: F7D8 A928 26E3 16A1 9FA0 ACF0 6CAC A448 860C DC13
Philip Taylor
2018-12-03 00:27:02 UTC
Permalink
Post by Norbert Preining
Post by Philip Taylor
But it wasn't the current directory at all :  it wanted to write to c:/users/philip taylor.fujitsu-pc/.texlive2018/texmf-var/web2c ! 
This if fmtutil/mktexfmt which rightly writes to TEXMFVAR (or
TEXMFSYSVAR if you use the -sys (or --sys) switch).
I really need to get rid of TEXMFVAR; the last thing I want TeX doing is writing things under c:/users/philip taylor.fujitsu-pc/.texlive2018 ...
Post by Norbert Preining
If you run the xetex -ini (or --ini) manually, you get the format in the
current working directory.
True, as David has kindly pointed out, and as I have confirmed in practice.
Post by Norbert Preining
You might want to read the man page (yes, as in "man page") of fmtutil.
There, the switch
-fmtdir (or --fmtdir)
is mentioned, which describes where the format is saved.
Hmmm, "man" :  no such command under Windows !
Many thanks Norbert.
** Phil.
Norbert Preining
2018-12-03 00:54:48 UTC
Permalink
Post by Philip Taylor
I really need to get rid of TEXMFVAR; the last thing I want TeX doing is writing things under c:/users/philip taylor.fujitsu-pc/.texlive2018 ...
put a file texmf.cnf into your TL root, and add there
TEXMFVAR = /wherever/you/want/it
and at the same time do this also for
TEXMFCONFIG = ...
Post by Philip Taylor
Hmmm, "man" :  no such command under Windows !
texmf-dist/doc/man/man1/fmtutil.man1.pdf


Best

Norbert

--
PREINING Norbert http://www.preining.info
Accelia Inc. + JAIST + TeX Live + Debian Developer
GPG: 0x860CDC13 fp: F7D8 A928 26E3 16A1 9FA0 ACF0 6CAC A448 860C DC13
Reinhard Kotucha
2018-12-03 01:00:25 UTC
Permalink
Post by Philip Taylor
Post by Norbert Preining
You might want to read the man page (yes, as in "man page") of fmtutil.
There, the switch
-fmtdir (or --fmtdir)
is mentioned, which describes where the format is saved.
Hmmm, "man" :  no such command under Windows !
It's a pity. However, all Unix manual pages shipped with TeX Live are
available as PDF as well and accessible by texdoc.

In this particular case:

texdoc fmtutil

You should always try texdoc first.

Regards,
Reinhard
--
------------------------------------------------------------------
Reinhard Kotucha Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover mailto:***@web.de
------------------------------------------------------------------
Philip Taylor
2018-12-03 10:36:39 UTC
Permalink
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<br>
David, Joseph, Norbert, Reinhard — Thank you all for your
suggestions, all of which are helpful/noted.  A brief reply to some
points that are perhaps of interest :<br>
<br>
<blockquote type="cite">
<pre wrap="">[NP] This if fmtutil/mktexfmt [is used] which rightly writes to TEXMFVAR (or
TEXMFSYSVAR if you use the -sys (or --sys) switch).</pre>
</blockquote>
<br>
OK, I  used neither of fmtutil/mktexfmt explicitly, but simply typed
:<br>
<ul>
<li>XeTeX ^&amp;texip</li>
</ul>
<p>I have now tried using the "-sys" qualifier with XeTeX and see
that it is not recognised, and therefore "fmtutil" still tries to
create a format under c:/users/philip
taylor.fujitsu-pc/.texlive2018/<br> <br> </p> <p> <blockquote type="cite">D:\TeX\Live\2018&gt;xetex -sys
^&amp;texipexp<br>
xetex: unrecognized option `-sys'<br>
fmtutil [INFO]: writing formats under c:/users/philip
taylor.fujitsu-pc/.texlive<br>
2018/texmf-var/web2c<br>
</blockquote>
<br>
so it does not look (to me) as if on-the-fly format creation can
be instructed to save its results in a TEXMFSYS... tree.<br>
<br>
</p>
<p>
<blockquote type="cite">
<pre wrap="">[RK] I'm wondering whether a format file is required at all. Isn't it
possible to just load the TeX source of the format file instead of the
format file itself? You can state more than one TeX file on the
command line iff none but the last one contains \end, \endinput, or
\bye.</pre>
</blockquote>
<br>
Perhaps, but I am still waiting for my copy of T-i-P Volume I to
arrive (I have only II 7 IV so far), so was just guessing based on
comments in "texipexp.tex".<br>
<br>
<blockquote type="cite">
<pre wrap="">Does this work, Phil? I suppose that you don't intend to change the
contents of the book but maybe you want to change papersize to A4.
Format files only make sense if you use a huge macro package
frequently.</pre>
</blockquote>
<br>
I was thinking of possibly adopting T-i-P as my default format,
since SvB appears to have already solved a large number of
problems which I have until now regularly addressed by hand.  But
I would dearly <i>love</i> to be able to re-typeset the book : 
the content is superb (outstanding, blows DS's "Advanced TeX" out
of the water) but SvB's use of "Shouting in his Section Titles"
(e.g., "Repeat Use of Table Entries") drives me to distraction.  I
had thought until now that this was a nasty 21st-century/American
phenomenon which has (sadly) been adopted by some British writers,
but SvB wrote T-i-P in 1993, so the practice (which I abhor) must
have been reasonably common even at that time ...<br>
<br>
</p>
<p>
<blockquote type="cite">
<pre wrap="">[NP] put a file texmf.cnf into your TL root, and add there
TEXMFVAR = /wherever/you/want/it
and at the same time do this also for
TEXMFCONFIG = ...</pre>
</blockquote>
<br>
Thank you, will do.<br> <br> </p> <p> <blockquote type="cite"> <pre wrap="">[RK] &gt; Hmmm, "man" :  no such command under Windows !

It's a pity. </pre>
</blockquote>
<br>
Well, I think I might reasonably reply that "it's a pity" that
Unix systems don't have a "HELP" command !  And how is it, in
these days of Political Correctness Gone Mad, that Unix systems
have not moved with the times and replaced "man" by "person" ?!<br>
</p>
<p>** Phil.<br>
</p>
<p><br>
</p>
<br>
</body>
</html>
Zdenek Wagner
2018-12-03 10:57:58 UTC
Permalink
Post by Philip Taylor
[NP] This if fmtutil/mktexfmt [is used] which rightly writes to TEXMFVAR (or
TEXMFSYSVAR if you use the -sys (or --sys) switch).
XeTeX ^&texip
I have now tried using the "-sys" qualifier with XeTeX and see that it is not recognised, and therefore "fmtutil" still tries to create a format under c:/users/philip taylor.fujitsu-pc/.texlive2018/
D:\TeX\Live\2018>xetex -sys ^&texipexp
xetex: unrecognized option `-sys'
fmtutil [INFO]: writing formats under c:/users/philip taylor.fujitsu-pc/.texlive
2018/texmf-var/web2c
xetex -help does not offer -sys at least on my computer. Anyway, the
binary .fmt files are not generally portable and are not portable from
one year to another (they may be portable but you cannot rely on it).
this is the reason why you should have a specific .fmt for a specific
binary.
Post by Philip Taylor
so it does not look (to me) as if on-the-fly format creation can be instructed to save its results in a TEXMFSYS... tree.
[RK] > Hmmm, "man" : no such command under Windows !
It's a pity.
Well, I think I might reasonably reply that "it's a pity" that Unix systems don't have a "HELP" command ! And how is it, in these days of Political Correctness Gone Mad, that Unix systems have not moved with the times and replaced "man" by "person" ?!
** Phil.
In fact, after alias person=man you have person as an alias, you can
also define alias woman=man and alias help=man and store it in your
profile so you can have whatever you like.

Zdeněk Wagner
http://ttsm.icpf.cas.cz/team/wagner.shtml
http://icebearsoft.euweb.cz
Norbert Preining
2018-12-03 13:11:08 UTC
Permalink
Hi Philip,
Post by Philip Taylor
[NP] This if fmtutil/mktexfmt [is used] which rightly writes to TEXMFVAR (or
TEXMFSYSVAR if you use the -sys (or --sys) switch).
* XeTeX ^&texip
Yes, which calls mktexfmt which is an instance of fmtutil.
Automatic format generation is putting files in TEXMFVAR, that has to be
like this since TEXMFSYSVAR might be not writable, even on Windows with
admin install.
Post by Philip Taylor
I have now tried using the "-sys" qualifier with XeTeX and see that it
Nobody told you so. The -sys works only for fmtutil and updmap.
Post by Philip Taylor
is not recognised, and therefore "fmtutil" still tries to create a
format under c:/users/philip taylor.fujitsu-pc/.texlive2018/
Yes, this is correct and expected behaviour, and unchanged since Thomas
Esser introduced this distinction about 20+ years ago.
Post by Philip Taylor
so it does not look (to me) as if on-the-fly format creation can be
instructed to save its results in a TEXMFSYS... tree.
Yes, it can, by setting
TEXMFVAR
to the value of TEXMFSYSVAR or your preferred value in the texmf.cnf I
Post by Philip Taylor
[NP] put a file texmf.cnf into your TL root, and add there
TEXMFVAR = /wherever/you/want/it
and at the same time do this also for
TEXMFCONFIG = ...
Well, I think I might reasonably reply that "it's a pity" that Unix
systems don't have a "HELP" command ! And how is it, in these days of
$ help what
bash: help: no help topics match `what'. Try `help help' or `man -k what' or `info what'.
$
Post by Philip Taylor
Political Correctness Gone Mad, that Unix systems have not moved with
the times and replaced "man" by "person" ?!
I never heard that "personalual" is an English word.

Best

Norbert

--
PREINING Norbert http://www.preining.info
Accelia Inc. + JAIST + TeX Live + Debian Developer
GPG: 0x860CDC13 fp: F7D8 A928 26E3 16A1 9FA0 ACF0 6CAC A448 860C DC13
Reinhard Kotucha
2018-12-03 00:35:07 UTC
Permalink
Post by Philip Taylor
Post by David Carlisle
Post by Philip Taylor
not the (very obscure, and somewhere I would never think to
look) default location ?
??? probably you can set the output direction but since the default
isn't obscure at all, it just uses the current directory, I'd just
move it afterwards.
But it wasn't the current directory at all :  it wanted to write to
c:/users/philip taylor.fujitsu-pc/.texlive2018/texmf-var/web2c ! 
This is the directory (among others) where where kpathsea looks for
format files. This directory is used when format files are created by
fmtutil/mktexfmt and in particular when format files are created
on-the-fly.

If you say

xetex &texip

then kpathsea notices that there is no file "texip.fmt" on your system
and calls fmtutil/mktexfmt which installs generated format files in
either TEXMFVAR or TEXMFSYSVAR. This is the appropriate place because
people don't want to copy the format files to every directory where
they need them.

However, if you say

xetex -ini ...

the format file will be created in the current directory because
fmtutil and mktexfmt are not involved.

I'm wondering whether a format file is required at all. Isn't it
possible to just load the TeX source of the format file instead of the
format file itself? You can state more than one TeX file on the
command line iff none but the last one contains \end, \endinput, or
\bye.

Does this work, Phil? I suppose that you don't intend to change the
contents of the book but maybe you want to change papersize to A4.
Format files only make sense if you use a huge macro package
frequently.

Regards,
Reinhard
--
------------------------------------------------------------------
Reinhard Kotucha Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover mailto:***@web.de
------------------------------------------------------------------
Loading...