4

I searched the doc, but didn't find this... What is the path in which context searches the environment files ? I'd like to add a personal folder to this path (in my .bashrc), in order to not explicit the absolute path in the source file...

  • I am just guessing but is it not the same as for LaTeX and TeX? – wilx Sep 22 '16 at 8:44
  • By default ConTeXt searches TEXMF and all directories above the current directory, i.e. if you have nested/path/to/file.tex then you can place your environment file in e.g. nested/env.tex and it will still be found. – Henri Menke Sep 22 '16 at 8:52
  • See also 6.11 of the ConTeXt Reference Manual – Henri Menke Sep 22 '16 at 8:55
  • Maybe I just don't understand some things, but I don't see how it may be logical to find this information in the "Getting started" section about the fonts in the manual. I admit I am still not very efficient when searching an information in it... and I try to RTFM before posting. On the plus side, I managed to make my configuration work, thank you for pointing out TEXMF ; if someone writes a "real" answer with explanations, I'll mark it as accepted. – A. Licari Sep 22 '16 at 9:05
  • 1
    @HenriMenke: ConTeXt doesn't search all directories above the current directory, but only two levels up. – Aditya Sep 22 '16 at 17:41
3

ConTeXt searches the \environment files in the following order:

  1. The current directory ($PWD from where context is run; not the PWD of main tex file)
  2. The parent directory ../
  3. Grandparent directory ../../
  4. Subdirectories in $TEXMF/tex/context//

If you want to store your local environment files somewhere were context can find them, store then in $TEXMFHOME/tex/context/<sub-directory>/. On Mac/Linux, the default value of $TEXMFHOME is $HOME/.texmf.

  • The $TEXMFHOME possibility is perfect. I don't understand why it isn't mentioned in the manual around section 2.4, when environments are explained... – A. Licari Sep 22 '16 at 21:51
  • ConTeXt follows TeX Directory Structure (TDS, for short). TDS is a beast due to the fact that it has to work on complicated multi-user setups. The most comprehensive source is the TDS manual: tug.org/tds/tds.html (Note, I said comprehensive, not easy to read). – Aditya Sep 22 '16 at 23:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.