2

I am a newbie using TeXStudio - and trying to set TEXINPUTS so that LaTeX can recursively search for my figures. I've run

setenv TEXINPUTS :FIGURES//:

at the command line, and then run LaTeX, which worked fine. However, when I try this in TexStudio, it bombs. It looks like setting TEXINPUTS at the command line is not good for TeXStudio. I looked through the TeXStudio documentation, but I can't seem to find how to do this. Any help is greatly appreciated.

jub0bs
  • 58,916
spy123
  • 31

2 Answers2

1

OK, here is what worked. I am using OS X 10.7.5 (Lion). Apparently, launchctl adds the environment variables without having to log out

launchctl setenv TEXINPUTS :FIGURES//:

To load this on startup create a .launchd.conf file with

setenv TEXINPUTS :FIGURES//:

spy123
  • 31
  • Note that launchd.conf won't work on all versions of OS X. For Yosemite, in particular, http://stackoverflow.com/questions/25385934/setting-environment-variables-via-launchd-conf-no-longer-works-in-os-x-yosemite is relevant (but Yosemite has other bugs in environment variables; see http://tex.stackexchange.com/questions/208181/why-did-my-tex-related-gui-program-stop-working-in-mac-os-x-yosemite). – Adam Maxwell Jan 15 '15 at 20:11
1

Given that Apple are discouraging system wide environment variables, it would probably be best to place symbolic links to your folders in your TEXMFHOME which would usually be ~/Library/texmf

You can create symbolic links with packages such as Path Finder or in Terminal with the ln command — see Create symbolic link — Ask Different

    ln -s originalFile symlink
  

You have the follow the TeX Directory Structure (say texdoc tds in Terminal for documentation)

  • Place LaTeX files in TEXMFHOME/tex/latex/
  • Place BibTeX source files in TEXMFHOME/bibtex/bib/
  • Place BibTeX style files in TEXMFHOME/bibtex/bst/

There is (at least) one obscure point to watch out for. If a directory, d, being searched for subdirectories contains plain files and symbolic links to other directories, but no true subdirectories, d will be considered a leaf directory, that is, the symbolic links will not be followed (from page 39, section 8.5.1 of the Kpathsea manual version 6.2.0, May 2014; page 22 of the Kpathsea manual version 6.0.1, April 2011). Workaround: create an empty dummy subdirectory in d