4 Configuration

4.1 Intended use

There is a dialog based texconfig tool being devised. But it is not yet usable. I hope it will help in configuring various parts of the system. In the mean time, here are some piece of advice in making fpTeX more usable and easily upgradable.

4.2 Local stuff

If you want to store local stuff like additional style files, you may store them in the main texmf tree. But there are some reasons why this isn't a good idea. The most important is that it may cause problems if you make an update of your Web2C distribution since you will have to look properely what files were changed or added by you. The main texmf tree should not be clobbered by foreign files.

So, the best place to keep your additional stuff is the local texmf tree, which is <root>/texmf-local by default, and which value you can retrieve by typing in a command prompt:


  c:\>kpsewhich --expand-var $TEXMFLOCAL
  c:/Local/TeXLive/texmf-local

There are two conditions to fulfill :

  1. your files must be set up in a way that is TDS compliant. See the tds document for more details. If you want to add local LaTeX classes, you must put them under $TEXMF/tex/latex/myclasses/ because the default search path for LaTeX is set up this way. And please, do not edit the texmf.cnf file to change the search paths: it is risky business;
  2. you need to rebuild the ls-R databases, either by running mktexlsr on a command prompt, or by choosing the appropriate menu from Start->TeXLive->Maintenance.

If you have a look at the definition of $TEXMF, you will find something more or less like:


  TEXMF={$HOMETEXMF,!!$TEXMFVAR,!!$TEXMFLOCAL;!!$TEXMFMAIN}

This setting means, that Web2C will first look for files in your home texmf tree, then in your variable texmf tree, then in your local texmf tree and then in the main texmf tree. The exclamation marks (!!) indicate that Web2C will use the file database for this texmf tree to find files. For this reason, don't forget to run mktexlsr to update the file database if you install additional files in your local texmf tree.

4.3 Having multiple users

The best way is to have a home texmf tree for every user. Create a home texmf tree for the user, e.g. c:\donald\texmf for user Donald. Under Windows NT, it is assumed that c:\donald is user Donald's home directory. Windows 9x users usually do not have home directories.

Copy the file c:\Local\TeX\texmf\web2c\texmf.cnf into the web2c directory of the local texmf tree for the user, e.g. c:\donald\texmf\web2c.

Change this local copy of the file texmf.cnf to use the local texmf tree as explained in section 4.2. Uncomment the line setting the HOMETEXMF variable and set it to :


  HOMETEXMF=c:/donald/texmf

and modify TEXMF to reference it :


  TEXMF={$HOMETEXMF,!!TEXMFLOCAL,!!TEXMFMAIN}

It is not mandatory to put !! in front of HOMETEXMF, because you are not supposed to store thousands of files there. Would you require that only ls-R database be searched, you will need to build it using either the mktexlsr command or the shortcut in the fpTeX menu.

Set the environment variable TEXMFCNF to the local texmf tree of the user, e.g.:


  TEXMFCNF=c:\donald\texmf\web2c

4.4 Configure the way web2c generates fonts

Warning : this should not be needed anymore since then new default configuration should be suitable for most uses.
Web2C uses mktex programs to build missing fonts. The most important one is mktexpk that is called by the dvi drivers like windvi or dvips to generate pk files for missing fonts (see the mktexpk manpage for further informations about mktexpk).

Let us first discuss where generated pk files are stored. By default, mktexpk stores the font in


  c:\Local\TeX\texmf\fonts\pk\mfmode\supplier\typeface\fontname.xxxpk

where xxx is the resolution of the font and the values for supplier and typeface are taken from the path of the mf file that was used to generate the pk file.

Examples:

C:\TeX\texmf\fonts\source\public\cm\cmr10.mf
Supplier = public; typeface = cm

C:\TeX\texmf\fonts\source\jknappen\ec\ecrm1000.mf
Supplier = jknappen; typeface = ec

You can configure where the mktex programs will place the produced files by setting the MT_FEATURES variable in the file mktex.cnf. The following settings are allowed:

dosnames
The pk files are stored as dpixxx\fontname.pk instead of fontname.xxxpk. This setting is valuable on systems that have problems with long filenames or if you are using a DVI previewer that expects filenames in DOS like 8+3 syntax (e.g. dviwin) stripsupplier
striptypeface
Suppress the storage of the fonts in a subdirectory with the name of the supplier or the typeface, respectively.
varfonts
The pk files will be stored in the directory tree defined by the VARTEXFONTS setting in the file texmf.cnf instead of the texmf tree. This is the default if the font directory in the texmf tree is write protected.

Important note: Be sure to set the VARTEXFONTS variable to a proper setting if you use this feature. For this edit the file texmf.cnf (you can use kpsewhichtexmf.cnf to find out where it is located, normaly in ...\texmf\web2c), find the line where VARTEXFONTS is defined (VARTEXFONTS=...) and set it to the proper directory. One interesting directory to set VARTEXFONTS to is $TEXMFLOCAL/fonts. This way, all users at your site will share generated fonts files.

To change the MT_FEATURES setting proceed as follows.

  1. Edit the file mktex.cnf (normally located in texmf-var/texmf/web2c, otherwise use
    kpsewhich mktex.cnf). The syntax for the MT_FEATURES setting is

        : ${MT_FEATURES=setting1:setting2:setting3}

    The line must begin with :.

  2. Create a dummy file named mktexnam.opt. Open a command prompt window, change the current directory to c:\Local\TeX\texmf\web2c and type

      c:\Local\TeX\texmf\web2c> copy con mktexnam.opt
      ^Z

    Here the term ^Z means typing <Control>+Z.

  3. Don't forget to rerun mktexlsr to update the file database.

4.5 Configure dvips

Dvips is configured using the file config.ps. You will find it in ...\dvips\base (if you change this file, it may be a good idea to store it in a local texmf tree—see section 4.2—so that the changed file isn't replaced by the default config.ps if whenever you update the distribution. Don't forget to rerun mktexlsr if you do this).

You should perform the following setting in config.ps:

Set up the METAFONT mode and the resolution of the default printer:


  M mfmode
  D resolution

Just find these two lines in config.ps and set them to proper values.

Note: If you are using different printers you can simply create a file config.printer for each printer including the definition of METAFONT mode and resolution and call dvips by


  dvips -Pprinter

what tells dvips to use the configuration file config.printer.

Find the line


  o

This line means that dvips will generate a Postscript file by default. You can here specify UNC names for your printer in the form of


  o \\server\printername

config.ps contains several definitions for paper sizes. For example, the definition for A4 reads as follows:


  @ A4 210mm 297mm
  @+ ! %%DocumentPaperSizes: A4
  @+ %%BeginPaperSize: A4
  @+ a4
  @+ %%EndPaperSize

Dvips uses the first defined papersize as default (after unpacking the distribution files this will be letter). If you want to use A4 as default you have to move the definition for A4 before the definition of letter. If you want to add other papersizes you can do this by following the scheme given above. Note: You can dvips to use another papersize as the default by


  dvips -tpapersize

(where papersize is the name of one of the papersizes defined in config.ps). You can also use


  dvips -tlandscape

to switch to landscape mode.

You can also control which fontmaps are used by dvips. If dvips converts a DVI file to Postscript, it has to decide wether a font is a PS Type 1 font or not. If yes, dvips has to translate the name of the font used by TeX to the Postscript name–and to include the outline of the font (normally a pfb file) unless the font is resident to the printer as for various Adobe standard fonts; if not, dvips has to include a pk file for the font (this is why you should define the correct METAFONT mode and resolution for your printer in config.ps). To decide, wether a font is a PS Type 1 font, it will use by default the fontmap psfonts.map. If a font is included in psfonts.map, dvips knows that the font is a PS Type 1 font, if not it will use a pk file for the font–and call mktexpk to generate one from the METAFONT source, if it doesn't exist.

You can configure dvips to use another fontmap foo.map instead of psfonts.map by including the line


  p foo.map

in config.map or to use foo.map additionally to config.ps by the line


  p +foo.map

4.6 Network installation

Applying the previous hints, you can devise your own network installation quite easily.

All the support files, everything except the files in the bin/win32 are shareable with a teTeX or Unix TeX-Live installation. That means you can use samba either to mount from a Windows NT server to a Unix workstation or the converse. Several strategies are possible:

These schemes should have been handled by the InstallShield installer. But so many problems rose up with this installer that these features have been delayed to the next version of the setup program.