<div dir="ltr"><div>Thanks for the input Herbert!</div><div><br></div><div>tlmgr --version provides the info I was looking for; I didn't know about that program and it looks useful for other operations too.</div><div><br></div><div>As a bit of context, I'm approaching texlive software from a systems engineering perspective with the following precepts; users know best their requirements, they should have ultimate control of their env, and they should not have root. Likewise, management of $HOME, /usr/local/, and /usr have distinct and specific management protocols. Many tex users may use root to manage their environment, which is fine. However, in environments where there are separate authorizations for system vs user changes, it is expedient to empower users to meet their needs, according to the policy which applies to them.</div><div><br></div><div>That is a somewhat long way of saying, the use of multiple prefixes enables simultaneous installation of multiple software versions from which users can select or extend according to their needs.</div><div><br></div><div>Hopefully, we still have consensus. Developing my doc for user-installed true type fonts, TTF files, my path discovery effort (no pun) was convoluted. Initially I discovered ~/Library/texlive/2023/texmf-config/ and
presumed the versioned path was required, according to the TexLive prefix in use. Then LLM convinced me ~/Library/texlive/texmf would be better, I have since confirmed the year must be included in the texlive path, and contrary to the pdf section Installing fonts in the Personal Tree, which indicates $HOME/Library/texmf/texmf-config/web2c for the updmap.cfg file (and contrary for reasons that are not immediately obvious to me). For system-installed TeX Live distributions, I believe this is correct (not all regressions tested):<br><br>Mac:<br>User's personal TeX tree: ~/Library/texmf<br>User's config for system TeX Live: ~/Library/texlive/{version}/texmf-config<br><br>Linux:<br>User's personal TeX tree: ~/texmf<br>User's config for system TeX Live: ~/.texlive/{version}/texmf-config<br></div><div><br></div><div>This is my guidance for user installed TTF files (Mac confirmed):</div> h3: "True Type Fonts in TexLive"<br> p: |<br> Adding True Type Fonts to a Latex user environment is easy with the autoinst program,<br> from <a href="https://ctan.org/tex-archive/fonts/utilities/fontools/">https://ctan.org/tex-archive/fonts/utilities/fontools/</a> and bundled with TexLive,<br> only a few manual steps are required. These instructions are for a<br> user env install (and the sudo root averse). The steps are<br> 1) populating a directory with the (.ttf) font files,<br> 2) running the autoinst command on the font files,<br> 3) creating map config data,<br> 4) running texhash and updmap, and<br> 5) confirming available fonts, weights, and shapes, with a demo tex file.<br> p: |<br> Obtain your TTF files, typically distributed within a zip file.<br> Create a directory `{FontName}` and extract the TTF files into it.<br> p: |<br> A TeX and Metafont directory `texmf` is used to store fonts and styles.<br> On Darwin, `mkdir -p ~/Library/texmf/fonts/truetype`<br> other posix systems, use `mkdir -p ~/texmf/fonts/truetype`<br> Throughout this document the `./texmf` directory refers to the path on your system.<br> Move the `{FontName}` directory with the ttf files into the `./texmf/fonts/truetype` directory.<br> p: |<br> Use the autoinst command to install the font, there are many options but you are probably<br> only interested in -serif/-sanserif/-typewriter, group your fonts in these categories,<br> then use wildcards to install each group together with the corresponding option, eg<br> <pre><br> autoinst -serif ./texmf/fonts/truetype/{FontName}/*{serif}*.ttf<br> autoinst -sanserif ./texmf/fonts/truetype/{FontName2}/*{sanserif}*.ttf<br> autoinst -typewriter ./texmf/fonts/truetype/{FontName3}/*{mono}*.ttf<br> </pre><br> If you don't use this option autoinst may incorrectly guess the font type.<br> p: |<br> The next step is difficult to explain, but the script should take care of it.<br> Set the paths and create the dir, before writing a updmap.cfg file<br> with the map files created by autoinst.<br> <pre><br> v="$(tlmgr --version | sed -e '/version/!d' -e 's/.*version //')"<br> case $(uname) in<br> Darwin) a="$HOME/Library/texmf/fonts/map" b="$HOME/Library/texlive/$v/texmf-config/web2c" ;;<br> Linux) a="$HOME/texmf/fonts/map" b="$HOME/.texlive/$v/texmf-config/web2c" ;;<br> esac<br> [ -d "$a" ] && { mkdir -p "$b"<br> find "$a" -type f -name \*map -exec basename \{\} \; \<br> | sed 's/^/Map /' >"$b/updmap.cfg" ;}<br> </pre><br> p: |<br> Rebuild the ls-R filename databases with texhash, and<br> configure the user env fonts (and administratively installed fonts)<br> with the updmap command, this step may take tens of seconds<br> (repeat this step in the future to add new administratively installed fonts).<br> <pre><br> texhash ./texmf (Mac: texhash ~/Library/texmf)<br> updmap --user<br> </pre><br> p: |<br> Use the font in your document, reference the style package file<br> (.sty) and use the respective font commands. For package name hints,<br> <pre><br> find ./texmf/tex/latex/ -mtime -1 -name \*sty -exec grep ProvidesPackage \{\} \;<br> </pre><br><br><div><br></div><div>It is unclear why tex has difficulty scanning both user and administratively installed styles at runtime, but in my world the simple solution is letting users run 'texhash ./texmf && updmap --user' when they install new fonts, or want to uplift to administratively installed styles. Maybe in 2025 we will be able to use $HOME/Library/texmf/texmf-config/web2c/...</div><br><div>For completeness, I'll add some comments on TexLive MacTex symlinks, which have been less than intuitive:<br></div><div>/Library/TeX/Distributions/.DefaultTeX/Contents/Programs/universal@
-> ../../../../../../../usr/local/texlive/2024/bin/universal-darwin</div><div><br></div><div>I found the simplest way to prevent unsettling of users, is to have them adjust their path, remove the "current" symlink and replace it with their specific version of choice, eg<br></div><br><div>PATH=$(echo "$PATH" | sed 's=\(/Library/TeX/texbin\)=x\1=')<br></div><div>texlive=/usr/local/texlive/2024/bin/universal-darwin</div><div>test -d "$texlive" && PATH="$texlive:$PATH"</div><div><br></div><div>I know there have been problems in the past handing off texlive releases and updates to other OS package managers, and I wish I could devote time to smoothing that out. For now, this hopefully will simplify installing latex true type fonts, for some.</div><div><br></div><div>-George<br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Jul 7, 2024 at 2:11 PM Herbert Schulz <<a href="mailto:herbs2@mac.com" target="_blank">herbs2@mac.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br>
> On Jul 7, 2024, at 2:14 PM, George Georgalis <<a href="mailto:george@galis.org" target="_blank">george@galis.org</a>> wrote:<br>
> <br>
> Hello!<br>
> <br>
> I have over 20 years experience using latex, generally just preparing<br>
> basic documents, but lately I've been trying AI LLM, with mixed<br>
> results for macro development of various tasks. Anyone reading this is<br>
> probably already aware of the challenge, there are more shortsighted<br>
> solutions for a rendering task than optimal ones, and the multitude of<br>
> solution options muddle the question of which is best, in the sea of<br>
> first working vs non-working options.<br>
> <br>
> Recently, I decided to revisit the task of installing fonts and<br>
> documenting the process for users who are not necessarily able to<br>
> become root. While the updmap step can be confusing if your<br>
> documentation does not align with site practice; I have found the<br>
> steps are not complicated, if the site process is established before<br>
> the documentation.<br>
> <br>
> When I completed a careful explanation of the steps with my MacTex<br>
> 2023 install, and using a shell function for managing the step users<br>
> don't need to understand (creating and enabling map cfg files), I<br>
> decided to test the guidance with a fresh MacTex 2024 install. But, it<br>
> seems some critical path management has changed?<br>
> <br>
> The symlinks relating to the support of multiple texlive installs<br>
> seems overly complicated, but I don't have an opinion about changing<br>
> that. What I am concerned with is: 1) How should a user determine<br>
> which texlive version they are using? 2) How should a user configure<br>
> the use of a different installed version? 3) What is the best way to<br>
> determine the texmf-config/web2c/updmap.cfg path (eg<br>
> ~/Library/texlive/2023/texmf-config/web2c/updmap.cfg)?<br>
> <br>
> It would seem `/Library/TeX/Distributions/.DefaultTeX/Contents` is the<br>
> pivot, but I am looking for a more deterministic way to identify the<br>
> appropriate placement of web2c/updmap.cfg, I had been using the<br>
> command `which autoinst` but that no longer provides the needful info.<br>
> Please copy me on replies, I'm not subscribed to the list.<br>
> <br>
> -George<br>
> <br>
> <br>
> --<br>
> George Georgalis, (415) 894-2710, <a href="http://www.galis.org/" rel="noreferrer" target="_blank">http://www.galis.org/</a><br>
<br>
Howdy,<br>
<br>
Assuming the installation is MacTeX, you should have TeX Live Utility (TLU), a gui interface to tlmgr and other things MacTeX. Under the Configure menu in (TLU) you can choose the `Change Default Live Version…' which will bring up a window showing the versions that have been detected and the present active version shown. You can change the active version there but you'll need admin privileges. Simple pressing the Done button dismisses the window.<br>
<br>
You should NOT chnage anything is the distribution itself. There are two placess to add fonts.<br>
<br>
The first is in the texmf-local tree which allows you to add fonts to be be used by all users of the system. You need admin privileges to this but this is the much preferred location to add fonts. You can get to texmf-locat via the /Library/TeX/Local symlink (no need to to go though that complex structure).<br>
<br>
The second and less preferred method is to use the user's personal tree located in ~/Library/texmf (this tree is not created at install time so you need to create texmf (and internal paths) in ~/Library yourself. Fonts installed in the personal tree can only be used by that user. The only advantage (and there are real disadvantages to doing this) is that you don't need admin privileges to do things there since the user owns those files<br>
<br>
I enclose a short document that contains information about thw two install locations and what changes in dealing with them are needed.<br>
<br>
<br>
<br>
I hope this helps.<br>
<br>
Good Luck,<br>
<br>
Herb Schulz<br>
<a href="mailto:herbs2@mac.com" target="_blank">herbs2@mac.com</a><br>
<br>
<br>
</blockquote></div><br clear="all"><br><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature">George Georgalis, (415) 894-2710, <a href="http://www.galis.org/" target="_blank">http://www.galis.org/</a><br><br></div>