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 Start -> Programs -> TeXLive -> Add TeX package menu) to run again TeXSetup.exe, but in maintenance mode this time. The steps you will go through are almost identical to the ones the first time you run it.
The only different step is about 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 your CD-ROM 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 ones of the 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 you want to add there the support
file for Maple (symbolic computation program) for example, 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\
Next, do not forget to rebuild the ls-R databases files, either by using the right menu (Start -> Programs -> TeXLive -> Maintenance), either by manually running the mktexlsr command.
The uninstall procedure is available either from the TeXLive.exe program, from the TeXLive menu or from the control panel (Start menu -> Control Panel, Add/Remove Programs option). 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 interesting 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:
Start this program from the Start menu or from the Desktop shortcut. Go to Options -> Program Calls.
Click OK.
Note that the install process sets all files with the .tex extension to open with WinShell. Unless you plan to use another editor (such as WinEdt or Emacs), this is appropriate.
Unfortunately, WinShell does not have a spell-checking feature. However, if you have installed the
tex-extrabin collection, your installation includes Ispell (a spell checking program found on most Unix
systems). The executable is in your PATH so ispell.exe will be found if you invoke it from a DOS window. If
you installed documentation, look at
C:\Program Files\TeXLive\texmf\doc\html\manpages\ispell.html
for information on Ispell. (Otherwise, you can find ispell.html on the CD.) If you rely on spell checking, you
may want to add an Ispell icon to WinShell. See subsection 5.9.4 of this document for how to do
that.
For an excellent commercial (but inexpensive) spelling checker, see http://www.microspell.com.
WinShell also has on-line help, which you can access via the ? on the menu bar.
Other information about using WinShell can be found in section 5.9 on p. 50.
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 (WinShell will do fine) and change some parameters:
Note: The current TeX Live distribution has implemented (for the first time!) the procedure of making always up-to-date fontmaps files for Dvips and Pdftex. This is done by 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.
You may want to change the papersize to US letter size. If so, open GSView from the Start menu.
From the Media menu, select Letter.
Also, there are menu settings that are supposed to give you the most readable screen image:
From Media -> Display Settings, set Text Alpha and Graphics Alpha both 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 5.8 below.
The TeXSetup.exe program takes care of associating the files with the .dvi extension with Windvi.
Open it from the Start menu (Programs -> TeXLive -> DVI Viewer). You can set it for US letter paper by going to View -> Options and next to Papertype, selecting US (8.5" x 11"). Click OK. Exit Windvi. You can change other parameters from there, like the ability to execute commands included in path\special{}. 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 the configuration for Windvi is stored in the $HOME/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.
You can test WinShell by opening the file sample2e.tex, found in C:\Local\TeX\texmf\tex\latex\base. The LaTeX source should appear on the screen. Process it by clicking on the LaTeX icon on the toolbar, then view it by clicking on the Preview (Windvi) icon.
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. Return to WinShell and try dvips, then GSView.
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 5.6.5), 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. To print from GSView, first select Print... from the File menu. A Print window will appear.
If you will be using a PostScript printer, be sure to select PostScript Printer. In the newer version 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 on your PC. 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.)
If you use WinShell and a PostScript printer, probably the most convenient way to print is to add an icon to the WinShell toolbar that invokes dvips in a way that sends the output directly to a default printer. For detailed instructions on how to do this, see 5.9.3 on p. 51 (More About WinShell).
WinShell’s author (Ingo de Boer, thanks to him) sometimes releases beta versions of the next WinShell version which are also bug fixes. You can grab them from http://www.winshell.de. Usually they are .zip files that only require to be unpacked in WinShell directory (c:\Program Files\WinShell by default), either using WinZip or a similar tool, or by using unzip on the command line. If you got some winshellbugfix.zip file and that you saved it in the WinShell directory, then you need to run:
Say ‘yes’ if you are asked if some files should be overwritten. The unzip.exe programme can be found in the support/gnu-utils package. If you do not have it on your machine, you can use any archiver tool like WinZip to achieve the same effect.
Note the icons on the toolbar for toggling the project space (on the left) and the log space (at the bottom). If you are not using the Project feature, you may want to toggle off the space on the left, using the full screen width to display your file.
The Dvips icon on the WinShell toolbar puts the PostScript output in a file, which you can then view with GSView and print from there if you choose. However, it’s convenient to add a WinShell “program call” to dvips which sends the output directly to a designated PostScript printer. The steps below show how to do this for the printer vclw; you should substitute the name of your most frequently-used printer for vclw.
Name: Print
exe file: dvips
cmd-line: -D600 %m -o vclw
Uncheck the box for “DVIPS first”
Now, to print a LaTeX document, just click on the Print icon to send to your selected printer. To use a different printer, you will need to click on the Dvips icon to print to a file. Then click on the GSView icon and use GSView to send to any printer you have installed on your PC.
Name: Ispell
exe file: ispell
cmd-line: -t -d american %c.tex
Uncheck the boxes for “LaTeX first” and “DVIPS first”
Now, when you have a LaTeX document open, you can click on Ispell to perform spell checking. Ispell will open another window and display the first misspelled word on the left with the filename on the right. Below that you will see the context in which the misspelling appears; often several suggestions for replacements are also displayed. To replace the word, enter the number corresponding to the desired replacement. Other possible responses are listed below; for example, you can press the space bar to ignore the misspelled word. For more information on Ispell, read the manual page: C:\Program Files\TeXLive\texmf\doc\html\manpages\ispell.html.
Note that when you replace a word, you will not see the correction in your WinShell window until you close the file (click the X in the upper right corner) and then open it again (use the File menu).
What we call Win32 is not an operating system by itself. It is a set of functions – and a large one5 – 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 will 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 not tied to GUI problems, and GUI tools can be designed to interface the command line tools. This is the case for TeX where you will interact with it most of the time through a GUI text editor – see section 5.6.1 for example.
However, you may need to use the command line prompt in a number of situations, by example in case of problems and you want to debug your setup – see section 5.11.
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 the / 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 worse feature of Win9x with regard to TeX is probably the so-called FAT file system. TeX uses many many small files, with size around 1kb – 3kb. The FAT file system is old, and predates by far the multi-gigabytes hard disks we have today. It means it can’t manage efficiently the 30000 TeX files found on the CD-ROM. The FAT file system will allocate 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 – namely FAT32 and NTFS – do not have this drawback. They manage clusters of 4kb only8.
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 under either W9x or NT/2K/XP, then just 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 |
There are several questions to ask about:
The TeX Live software is complex and made of more than 250 programs and around 40000 files from various sources. It is quite difficult to predict all possible causes for problems. Nevertheless, we will do our best to help you in every case.
You have the whole set of source files, comprised for Windows in the source/source.tar.bz2 archive available on the CD-ROM. 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 Win32 TeX distribution on the CD-ROM is also known as fpTeX. Only the packaging differs, but fpTeX is no more no less than the current TeX Live release for Windows.
The fpTeX home on the Web is at:
http://www.fptex.org/
The current fpTeX release is available from any CTAN site in the directory :
ftp://ctan.tug.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 the CTAN backbones in their systems/win32/fptex directory.
The TeX Users Group is kindly hosting a mailing-list dedicated to fpTeX. This is a very low volume one. It is used for announcements, bugs reports or as well to discuss about improvements or various users problems. To subscribe, read the page at http://www.tug.org/mailman/listinfo/fptex. The mailing list address is fptex@tug.org.