[OS X TeX] Question about the Multiple TeX Data Structure

Richard Koch koch at uoregon.edu
Wed Mar 29 12:02:08 EDT 2023


This question (understandably) mixes two items that should be considered separately.

The data structure is totally irrelevant for running TeX. TeX Live doesn't know that it is even there.
The purpose of the data structure is three-fold:

	a) Provide a link to the TeX binaries, so GUI apps can see them

	b) Make it easy to change where this link points, so it is easy to switch from
	one distribution to another, and all GUI apps are automatically
	reconfigured without doing anything

	c) Provide locations where GUI apps can find key parts of the active
	TeX distribution. For example, suppose you GUI app wants to display
	the documents in TL. It cannot point directly to TL, because if you
	switch to another distribution, this link would have to be changed.
	But instead, the GUI app can open the TeX Dist structure and
	essentially ask "in the currently active distribution, where are
	the documents?"

The items you list for TEXMFHOME, etc., are in the TeX distribution, and thus are
available in case a GUI app wants to know their values. To the best of my
knowledge, this facility has never actually been used!


However, as Herbert points out, TEXMFHOME, TEXMFCONFIG, and TEXMFVAR are also
terms used by TeX Live itself. They are set when you use the Unix install script. In you message,
it is unclear to me if you actually created another install of TL somewhere else using this
script. If you did, you'll see where the user determines their values. If not, it would be
instructive for you to run the Unix install script, maybe not all the way to installing a new
distribution, but just the initial steps where you answer a series of questions. You'll
see where you are asked to provide these three values.

Suppose you install TL in /usr/local/texlive, as we do. This location isn't owned by you. So
on rare occasions when TL needs to write configuration data, it needs to write it in a location
owned by the user. These three items say where to write.

The actual values we give are


Here, of course, ~ refers to the user's home directory. These values allow the distribution
to be used by all users, since these locations depend on who is running the machine and
thus on their home directory. The locations in ~/Library need not be created in advance;
TL will create them when needed.

Richard Koch

> On Mar 29, 2023, at 4:49 AM, Ghyslain Leclerc <ghleclerc at gmail.com> wrote:
> Hello.
> Sorry for the long mail.  I can be verbose.
> So, I have been trying to replicate the MacTeX "Multiple TeX / TeX data structure" initially developed by Gerben Wierda and Jerome Laurens, both to learn more about it and because I want an install location that is not /usr/local and that is not supported by the MacTeX installers (as far as I understand, sorry if I am wrong).
> I have a small program that will write the data structure (with slight modifications, but nothing major or that would affect what I am inquiring about here).  I used the program to create data structures (I have installed and created multiple in order to test and understand) and even "TeX Live Utility" seems to recognize the links as valid distributions.  So far so good.
> Then, my partner tried using LaTeX on my computer (we share for some things) and I realized there is something I don't understand.  In the data structure, there are these links (just an example for some hypothetical distribution):
>   ... /Distributions/TeXLive-2023-Basic/Contents/Local/TEXMFHOME -> /Users/me/Library/texmf
>   ... /Distributions/TeXLive-2023-Basic/Contents/Local/TEXMFCONFIG -> /Users/me/Library/texlive/2023basic/texmf-config
>   ... /Distributions/TeXLive-2023-Basic/Contents/Local/TEXMFVAR -> /Users/me/Library/texlive/2023basic/texmf-var
> and looking at it, I realized that if my partner wanted some custom things installed just for him (we tend to not have the same needs in terms of packages), it would not work because the links are pointing at my Library folder and not his.  And to my knowledge, there is not way to make links point to multiple places on macOS.
> So I am wondering if this is a limitation of the data structure or something I misunderstand?  Is the data structure OK for multiple TeX installations, but not really for multiple users?  Or is there something I am doing wrong with those links (I installed MacTeX itself after realizing this to confirm that the links are the same as those I was writing and they appear the same to me)?
> Hope my question makes sense and that someone might have insight into this.
> Thanks in any case.
> Ghyslain
> ----------- Please Consult the Following Before Posting -----------
> TeX FAQ: https://www.tug.org/mactex/faq/index.html
> List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/TeX/
> List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
>                https://email.esm.psu.edu/pipermail/macosx-tex/
> TeX on Mac OS X Website: https://www.tug.org/mactex/index.html
> List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex

More information about the MacOSX-TeX mailing list