[OS X TeX] Question about the Multiple TeX Data Structure
Ghyslain Leclerc
ghleclerc at gmail.com
Thu Mar 30 15:19:15 CEST 2023
> On Mar 29, 2023, at 6:49 AM, Ghyslain Leclerc <ghleclerc at gmail.com <mailto: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
>>
>> Howdy,
>>
>> The (re)definitions for some variables used by TeX Live in MacTeX is found in /usr/local/texlive/2023/texmf.cnf:
>>
>> TEXMFHOME = ~/Library/texmf
>> TEXMFVAR = ~/Library/texlive/2023/texmf-var
>> TEXMFCONFIG = ~/Library/texlive/2023/texmf-config
>>
>> and the shell will expand ~ as the path to your HOME folder so it works for any user. Also doing anything within /Library/TeX can be ``dangerous'' without a full knowledge of exactly how things >> work since there are multiple indirect links involved.
>>
>> NOTE: Don't Edit /usr/local/texlive/2023/texmf.cnf it's sure to lead to problems!!!
>>
>> Good Luck,
>>
>> Herb Schulz
>> herbs2 at mac.com <mailto:herbs2 at mac.com>
>>
Hello.
Sorry (to everyone who reads the list I guess… 😕 ) for the late response and for (probably) the mess with the text of the answer. I had digest mode enabled and did not know how to properly respond to digest mail. I have disabled it now so I should be better with the responses starting tomorrow (it says it could still be in digest form today, sorry).
Thanks for the answer Herb, really appreciate you spending some time. I have been looking at TeX/LaTeX and texlive almost everynight for the past month or so now. Found out about kpsewhich and the environment variables. I have installed both via MacTeX and the vanilla TeXLive installer, multiple times, to multiple directories in ordre to test out switching the .DefaultTeX link. I have written a python program and a rust program to replicate what the postinsall script does (really interesting to understand better the various “levels/sources” of information TeX/LaTeX uses).
I agree with you that no matter what the links in the MTDS (my accronym for the MacTeX/Multiple TeX Data Structure) point to, TeX/LaTeX itself should not be affected. I was mainly trying to understand about the MTDS itself. If a GUI decides to somehow show me what the “User/Local” links in the MTDS point to instead of going through kpsewhich (or some other mechanism I might not be aware of yet), then I think it would simply not work for multiple users: links cannot point to two different locations. So the GUI might display the wrong directory and I think it could be very confusing to a user.
Sorry for seeming a little stubborn, but I really am trying to see if there is something I am missing and simply do not understand.
Again, thanks.
Ghyslain
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/macostex-archives/attachments/20230330/ea0b3b24/attachment.html>
-------------- next part --------------
----------- 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 macostex-archives
mailing list.