Difference between revisions of "Custom Configuration"

From Wiki
Jump to navigation Jump to search
m (Created page with "== Overview == This page describes how to apply and persist custom configuration settings for changing default directories. For the purposes of this wiki page, it is assumed tha...")
 
m
Line 19: Line 19:
 
Modify a variable as follows:
 
Modify a variable as follows:
  
1. Change to the location of `setuptex` (e.g., `/opt/context/tex/`).
+
1. Change to the location of `setuptex` (e.g., `/opt/context/tex/`).
1. Create a new file called `texmfcnf.lua` (or `texmf.cnf`).
+
1. Create a new file called `texmfcnf.lua` (or `texmf.cnf`).
1. Set only the required variables.
+
1. Set only the required variables.
  
 
For example, to change the cache directory, use:
 
For example, to change the cache directory, use:

Revision as of 06:47, 25 February 2014

Overview

This page describes how to apply and persist custom configuration settings for changing default directories. For the purposes of this wiki page, it is assumed that ConTeXt is installed at:

   /opt/context

Default Variables

The file /opt/context/tex/texmf/web2c/texmfcnf.lua contains a number of variables, including:

   TEXMFCACHE
   TEXMFOS
   TEXMFCONTEXT

Do not change this file as upgrading ConTeXt overwrites these files.

Custom Variables

Modify a variable as follows:

1. Change to the location of setuptex (e.g., /opt/context/tex/).
1. Create a new file called texmfcnf.lua (or texmf.cnf).
1. Set only the required variables.

For example, to change the cache directory, use:

   return {
     content = {
       variables = {
         TEXMFCACHE = "/var/cache/context/texmf-cache",
       },
     },
   }

Save the file.

The allowed locations for texmfcnf.lua are determined by the variable TEXMFCNF being set in texk/kpathsea/texmf.cnf in luatex sources.