The Windows version of Web2C has some specific features that should be pointed out.
The kpsecheck command will also report the status of shared memory: in use or not used. That might be useful to know because if the status reported is ‘in use’, that means one or several processes are working, and the effect of any mktexlsr command will be delayed until the next time where no Kpathsea linked process will be running.
Last, this same command will report about the location it thinks Ghostscript can be found. Under Win32, for many programs, it is easier to use the Ghostscript dll, and find it by using the Ghostscript registry key than to change the PATH, which has a limited length anyway.
You will find an option in the TeXLive menu (or go to StartPrograms
TeXLive
Add TeX package
menu) to run TeXSetup.exe in maintenance mode. The steps are almost the same as in the initial
installation.
We’ll discuss differences below, but first, whatever changes you make, do not forget to rebuild
the ls-R database files. Otherwise, your new files will not be found. You can do this either via the
GUI (StartPrograms
TeXLive
Maintenance
Rebuild ls-R), or manually running the mktexlsr
command.
The main difference is in the packages selection page. In maintenance mode, the list of installed packages is compared to the list of packages available from your source directories. Packages that are not installed will be displayed in green, out of date packages will be displayed in red and up-to-date, installed packages are displayed in black.
This way, you can choose to add or upgrade components, either from TeX Live or from the Internet, where you are likely to find some more recent version of your packages.
It is up to you to select which packages you want to install. The rest of the process is similar to the first installation.
If you want to add files that are not provided by the TeX Live (or fpTeX) distribution, it is recommended to put them in the $TEXMFLOCAL directory. This way, you will be safe against upgrades of the TeX Live software.
The directory pointed to by $TEXMFLOCAL is initially empty. If, for example, you want to add
the support file for the Maple symbolic computation program, you will have to put the style files
in:
c:\Program Files\TeXLive\texmf-local\tex\latex\maple\
and the documentation files in:
c:\Program Files\TeXLive\texmf-local\doc\latex\maple\
The uninstall procedure is available either from the TeXLive.exe program, from the TeXLive menu or from the
control panel (StartControl Panel, Add/Remove Programs). This procedure will cleanup your hard disk of most
of the TeX Live files. However, TeX is a system that is creating files and there is no mechanism to keep
track of all of them. Moreover, Win32 support packages have their own uninstall procedure, which
you will have to run separately (provided you want to get rid of them). Last, the files you may have
stored in $TEXMFLOCAL won’t be removed. So, even if the vast majority of files are automatically
removed by the uninstall procedure, you will have to do some manual cleanup to actually remove all of
them.
The TeXSetup.exe program has a number of other useful options. You can get the list by running:
Here is the description:
Kpathsea knows about UNC names, so you can use them to get your TEXMF tree from the network. But there is better than this. All the support files and configuration 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 an NT server to a Unix workstation or the converse. Several strategies are possible:
The configuration file for dvips can be found in
C:\Program Files\TeXLive\texmf-var\dvips\config\config.ps
You may open it with any editor and change some parameters:
The current TeX Live distribution implements the procedure of making always up-to-date fontmaps files for Dvips and Pdftex. This is done by the updmap program during installation, as well as during any font package addition. If you add new packages by hand, edit the file updmap.cfg in $VARTEXMF/web2c.
If you use the program pdflatex to write PDF format directly, and you are using US letter-size paper, edit the file C:\Program Files\TeXLive\texmf-var\pdftex\config\pdftex.cfg and change ‘page_width’ and ‘page_height’. These entries should read:
GSView is now distributed under the Aladdin License, and therefore is no longer included in TeX Live.
If you may want to change the page size to US letter size. If so, open GSView from the Start menu, and select
MediaLetter.
Also, there are menu settings that are supposed to give you the most readable screen image. On MediaDisplay
Settings, set both Text Alpha and Graphics Alpha to 4 bits.
Note that the installation process has set all .ps and .eps files to automatically open with GSView.
For printing instructions, see section 7.8 below.
The TeXSetup.exe program takes care of associating the files with the .dvi extension with Windvi.
Open it with StartPrograms
TeXLive
DVI Viewer.
You can set it for US letter-size paper by going to ViewOptions
Papertype and selecting US (8.5" x 11")
(and then OK. Exit windvi.
You can change other parameters from there as well, such as the ability to execute system commands specified by the document (disabled by default for security reasons). Also, the first time you view any .dvi file, you may find the magnification too large. Zoom out until you get an appropriate size.
All configuration settings for Windvi are stored in a file named windvi.cnf file. You can find it by running this command at the prompt:
Should you have problems with Windvi, please remove the configuration file and test your problem against a vanilla configuration.
For generic verification procedures, see section 4.2 on p. 30. This section describes Windows-specific tests.
Open the file sample2e.tex in your editor (Xemacs, WinShell), found in C:\Local\TeX\texmf\tex\latex\base.
The LaTeX source should appear on the screen. Process it by clicking on the CommandLaTeX menu (XEmacs)
or LaTeX icon on the toolbar (WinShell), then view it by clicking on the Command
View DVI menu (XEmacs) or
Preview (Windvi) icon (WinShell).
At first, when you preview files with Windvi, it will create fonts because screen fonts were not installed. After a while, you will have created most of the fonts you use, and you will rarely see the font-creation window.
Hint for the future: If a LaTeX run stops because LaTeX cannot find a file, you can press Ctrl-z to quit.
It is possible to print from Windvi. In this case, printing will be done using the Windows unified printer driver. By definition, it is compatible with all printers. However, there is some drawback: it can generate some huge spool files, and some (older) versions of Windows just don’t like them. The advantage is that you can use features like embedding BMP or WMF images. You also need to make sure that the printer parameters are correctly set (subsection 7.6.4), else you will get scaled printing (printing at 600dpi on a 300dpi printer will give you only one quadrant of your page).
Printing is faster and more reliable if you run dvips to make a .ps file and then print from GSView. In GSview,
select FilePrint. . . . A Print window will appear.
If you are using a PostScript printer, be sure to select PostScript Printer. This is done in the Print Method box at the bottom left of the Print window. You can then select any of the printers that you have previously installed. If you fail to check the box for PostScript Printer, printing will not work.
If you will be using your own non-PostScript printer, select Ghostscript device in the Print Method box, then click on the button to the right labelled djet500 and select your printer type from the list that pops up. (In the older version of GSView, make sure PostScript Printer is not selected, then select your printer type from the Device list.)
What we call Win32 is not an operating system by itself. It is a large set of functions (around 12,000 in the header files of the Microsoft SDK) that you can use to write programs for different operating systems of the Windows family.
Windows comes in different flavors:
Win9x are able to run 32 bits programs and 16 bits programs concurrently. But the operating system by itself is not entirely written in 32 bits mode, and does not support memory protection: 16bits applications can overwrite parts of the operating system memory! Some parts of the system like the GDI (Graphical Device Interface) manage limited resources like bitmaps, fonts, pens and so on for the set of all programs that run concurrently. All the bitmaps headers available at the same time can’t amount for more than 64kB. This explains the performance tool and the fact that you can put your system on his knees by making intensive use of graphic objects for example.
NT, 2K and XP do not suffer from these limitations, and neither from other Win9x limitations. They are true multitasking environments, with protected memory. They are much more responsive than Win9x because of better memory management, better file system and so on.
You may wonder, “Why would I need to use a command line prompt when I have Windows?”
Good question. The problem is of very general nature. Not all operations can be done easily using only a GUI. Command line gives you programming power — assuming a clever command interpreter.
But the problem here is more fundamental: TeX is a batch tool. Not an interactive one. TeX needs to compute the best layout for each page, resolve cross-references and so on. This can be done only by a global processing of the document. It is not (yet) a task that can be done interactively.
This means that you should use TeX from a command line. In fact the situation is not so bad. There is an advantage to write command line tools for complex processing: they are better debugged, because they are independent of any GUI problems, and GUI tools can be designed to interface to the command line tools. This is the case for TeX, where you will mostly interact with it through a GUI text editor.
However, you may need to use the command line prompt in a number of situations. One is when you are having difficulties and want to debug your setup.
These locations may change across different Windows versions.
The Win32 API understands both / and \ characters as PATH separators. But the command interpreters do not! So whenever a path name is used programmatically, you can use both separators, and even mix them up in the same path name. But on the command line, you must type \ as path separator. The reason is compatibility: the command processor used ‘/’ to introduce arguments to commands.
All this to say: do not be surprised to read path names written using the Unix convention; fpTeX is a port of Web2C, and aims to be compatible across platforms. For this reason, all the configuration files that need to specify path names use the Unix convention.
The worst feature of Win9x with regard to TeX is probably the so-called FAT file system. TeX uses very many small files, with size around 1–3kB. The FAT file system is old, and predates by decades the multi-gigabytes hard disks we have today. As a result, it cannot manage efficiently the tens of thousands of TeX files found in TeX Live. The FAT file system allocates a minimum of 32kB for any file on a huge partition. It means that TeX will use much more disk space than it actually needs.
The other, more modern, file systems available, FAT32 and NTFS, do not have this drawback. They manage clusters of 4kB only. (You can lower the limit to 512 bytes on NTFS.)
There are pairs of variables and values which behave much like global variables inside your programs. The set of those variables is called the environment. Each program is initialized with a copy of the environment when it is run. It can request and change the value of any variable. The changes happen in the copy of the environment, and is not at all propagated to the other running programs.
Your PATH is a special environment variable used to search for programs you want to run. There is a different procedure to change it for Win9x, WinME and NT/2K/XP:
If there is already a PATH setting for your user account, left click on PATH. In the field Variable appears PATH while the field Value shows the current setting of PATH as a list of directories separated by ;. Add the directory where the executables are located (e.g. c:\Program Files\TeXLive\bin\win32). If there isn’t a PATH variable for your user account, simply click in the field Variable and type in PATH, click in the field Value and type in the directory with the executables. Important: Click on the Apply button before clicking Ok, otherwise the changes to PATH won’t apply to your system. Be careful when changing the environment settings.
The best way to be sure that a variable has been properly set is to open a console and type:
which should return the corresponding value.
If you have a look at the Web2C documentation, you will read that all the various TeX derived programs use the same base engine. For example, tex.exe and latex.exe are exact copies of the same program, but each one will use a different format file, based on its calling name.
Under Unix, this feature is implemented through symbolic links. It saves up a bit of disk space, because some engines are used with many different format files.
The Win32 API does not know about file links. So to save up almost the same amount of memory, all the TeX base engines have been put in DLLs (Dynamic Linked Library). This means that you will have the following layout:
In fact, a generic tool called lnexe.exe is provided to build the equivalent of Unix hard links for executable files only under Win32.
You can also set the debug level:
If you want to redirect stderr to stdout, which is not possible Windows, then do:
This way you can capture both stdout and stderr in the same file.
kpsewhich -expand-path $SELFAUTOPARENT | c:/Program Files/TeXLive |
kpsewhich -expand-path $TEXMF | c:/Program Files/TeXLive/texmf |
kpsewhich -expand-path $TEXMFCNF | .;c:/Program Files/TeXLive/texmf/web2c; |
c:/Program Files/TeXLive/bin/win32; | |
c:/Program Files/TeXLive/bin; | |
c:/Program Files/TeXLive | |
kpsewhich -expand-var $TEXINPUTS | .;c:/Program Files/TeXLive/texmf/tex// |
kpsewhich cmr10.tfm | c:/Program Files/TeXLive/texmf/fonts/tfm/public/cm/cmr10.tfm |
kpsewhich latex.fmt | c:/Program Files/TeXLive/texmf/web2c/latex.fmt |
Here are several questions to investigate:
The TeX Live software consists of hundreds and programs and tens of thousands of files, all from varying sources. So it is quite difficult to predict all possible causes for problems. Nevertheless, we will do our best to help you. (see section 1.2 on p. 8.)
You have the whole set of source files, in the source/source.tar.bz2 archive available in the distribution together with a patch file for Win32. To be able to compile the whole distribution for Windows, you will need:
There is a lot of work to do to make this process easier and cleaner.
The Windows TeX system included on TeX Live is also known as fpTeX. The packaging differs, but fpTeX is no more no less than the current TeX Live release for Windows.
The fpTeX home page is http://www.fptex.org.
The current fpTeX release is available from any CTAN site in htp://www.ctan.org/tex-archive/systems/win32/fptex.
The main ftp site for fpTeX is ftp://ftp.dante.de/pub/fptex/ from where beta versions of fpTeX and additionnal tools are available. This main site is (partially) mirrored daily by all CTAN sites at systems/win32/fptex.
The TeX Users Group is kindly hosting a mailing list dedicated to fpTeX. It is used for announcements, bug reports, enhancement requests, and general discussion about fpTeX. To subscribe, visit http://tug.org/mailman/listinfo/fptex. The mailing list address is fptex@tug.org.