2

I am drawing math images using TikZ and have recently realised that I want to build my own package/s (in the form of a .sty-file) which can be used for all new documents. In this I for example want to define certain colors and variables that are commonly used, in order to not have to repeat this in every document. Using the following on Mac OS (TeXShop as editor):

How to have local package override default package

I have managed to make my code run using a package I have created myself, that is put in /Users/MyAccount/Library/texmf/tex/latex/"package name"/"package name".sty

I created the texmf-directory myself. For clarity, lets call the relevant package file "Geometry.sty". The problem I have is that once I have uploaded Geometry.sty to /Users/MyAccount/Library/texmf/..., I cannot open it in TexShop and modify, since it says that the file does not exist when trying (although it as a non-zero file size). If I want to update it, I have to put the file somewhere where TeXShop can access it, and then move it back to the texmf-folder. This is very tedious, and when like this it kind of removes the point of me using my own package which is globally available (like other standard packages). I am sure there must exist ways to handle this.

I am no expert at computers so might have missed something obvious, but please let me know if you can help!

Thanks in advance!

  • Welcome to TeX.SE! – Mensch Oct 17 '21 at 09:24
  • Thanks, appreciate the welcome :) – MagmaBear Oct 17 '21 at 09:26
  • 3
    You could try to create a link to the file. Place your file somewhere where you can edit it, then run the following on the terminal in the same folder: ln -s <package-name>.sty ~/Library/texmf/tex/latex/<package-name>/<package-name>.sty with the folder <package-name> already existing inside your texmf. – Skillmon Oct 17 '21 at 11:04
  • What do you mean by “it says the file doesn’t exist”? What are the … in that path? – Herb Schulz Oct 17 '21 at 21:28
  • Thanks for your help. The suggestion of @Skillmon works. However, in some mysterious way, the original problem I had just disappeared, so now it works as intended. – MagmaBear Oct 18 '21 at 10:59

0 Answers0