summaryrefslogtreecommitdiff
path: root/Master/texmf-doc/source/english/texlive-en/windows.tex
blob: 0fc9722841f9aa5e0b95b529dd2970cdcb4e07a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
\section{Windows installation}
\label{sec:win-install}

In this release of \TL{}, the same installer should work under
Windows as Unix, except that it defaults to GUI mode\footnote{The
  Windows \TeX{} system included in \TL{} is based on binaries from
  the \acro{W32TEX} distribution by Akira Kakuto.  It also includes
  some older (but still working) tools made by Fabrice Popineau, and
  also the \cmdname{dviout} previewer for \texttt{dvi} files, by
  Toshio Oshima.}.

\TL{} can be installed on systems running \acro{2K}, \acro{XP} or
Vista.  Older versions of Windows (\acro{ME}, 9\textit{x}, \acro{NT}
Windows (3.1x) and \acro{MS-DOS}) are not supported.

The necessary environment settings are created without user
intervention. The installer also creates menu entries and an
uninstaller.


% 
\subsection{Portable \protect\TL{} on DVD and USB (Windows)}

\runlive

Then, view the \DVD{} contents and double-click
\filename{tl-portable.bat}.  (Alternatively, start a `Command Prompt'
and run it that way.)  The first time this batch script runs, some files
will be generated in a folder \dirname{C:/Documents and
Settings/<username>/.texlive2008}.  On subsequent runs, though, the
script will start almost instantaneously.

You will be left in a `Command Prompt' window in which you can run \TeX.

For information about running \TL{} from a \acro{USB} stick, see
section~\ref{sec:portable-unix}.


% 
\subsection{Starting the installer}

Beschrijf ook net installer, met screenshot

%http://www.tug.org/texlive/acquire.html

\subsection{Installing \protect\TeX\protect\ Live to disk}

After inserting the \TL{} \acro{CD} into the \acro{CD} drive,
Windows' autostart feature should
activate \cmdname{install-tl}. If it does not, click \guiseq{Start\arw Run},
then type \verb|<drive letter>:\install-tl.bat| (or
\verb|<drive letter>:\texlive\install-tl.bat| if you are
installing from the \TeX\ Collection \acro{DVD}), where \verb|<drive letter>|
is the drive letter with the \TeX\ Live \acro{CD} (or TeX Collection
\acro{DVD}), and then click \acro{OK}.

\subsubsection{Selecting what to install}

\TL\ contains a lot of packages, and you probably don't want to go
through the entire list to decide what to install and what not. If
you have the space, there is nothing wrong with selecting
`full'. Otherwise, choose `basic', `medium' or `teTeX', or one of
the specialized schemes. Then you can click on the `Change' buttons
of `Standard Collections' and of `Language Collections' and make
some more fine-grained choices. But you can also add or remove
packages afterwards; see ...

\subsubsection{Selecting where to install}

The \TL\ installer proposes a standard directory layout in a
standard location. You can simply change its root `TEXDIR' and other
directories will be modified accordingly. You can also customize the
layout itself.

The installer will warn you if a directory isn't
writable or cannot be created. E.g. if you don't have write
permissions for Program Files, you can choose
%\texttt{\~/texlive/2008} for TEXDIR. `\~' is shorthand for
% using \verb instead of \texttt prevents generating png for tilde
\verb|~/texlive/2008| for TEXDIR. `\verb|~|' is shorthand for
\verb|%USERPROFILE%|, which is usually
\verb|c:\Documents and Settings\<user>|. This is Windows' analogue
to \verb|$HOME| under Unix.

The installation window titled
\guiseq{TeX Live installation and maintenance utility} should
open. It contains the following sections: \guiseq{Main
  customization}, \guiseq{Install}, \guiseq{Select a scheme},
\guiseq{Select systems}, \guiseq{Directories} and \guiseq{Options}.

By default, \cmdname{tlpmgui} tries to detect if \TeX{} is already
installed and depending on the result starts either in fresh
installation or maintenance mode.  If you have \TeX{} already installed
but want to install the new version nevertheless, you can use
\texttt{tlpmgui~--install-mode} to force installation mode; but you
should know what you are doing, as the new \TL{} installation will
override the environment variables and other settings of the existing
installation; reverting to your old installation is not automatically
supported.

Diagnostic information is collected by \cmdname{tlpmgui} in a log file
which is deleted at the end of the run, along with any other temporary
files.  Invoking with \texttt{--debug} displays the names and contents
of all \cmdname{tlpmgui} temporary files in a separate window.

In the \guiseq{Directories} section the installation drive (directory)
next to the \guiseq{CD/DVD} button should be displayed (e.g.,
\texttt{F:/} or \texttt{F:/texlive/} for the \acro{DVD}), but if it is not,
then click the \guiseq{CD/DVD} button and select the \acro{CD/DVD}
drive, with the \TL{} \acro{CD} (or \TeX\ Collection \acro{DVD}).

The directory in which you wish to install the software can be set by
clicking the \guiseq{TLroot} button. This directory will be set as
\path|TLroot| environment variable for later usage.

In the \guiseq{Select a scheme} section the desired \TL{} installation scheme
should be chosen by clicking the radio button labelled with the installation
scheme name (e.g., \guiseq{scheme-gust}). Each scheme is accompanied by an
\guiseq{Info} button which, when clicked, displays a short description of the
relevant scheme.

A scheme is a large set of files targeted at some kind of usage. There are
generic schemes for basic, medium and full installations. The remaining ones
are either targeted  at certain LUGs (i.e., what GUST or GUTenberg propose
for their members) or application targeted (e.g., for XML and \TeX{}
cooperation).  A preselected scheme can be refined. This is done in the
\guiseq{Main customization} section by choosing additional collections from
\guiseq{Standard collections} or \guiseq{Language collections}. For example,
by clicking the \guiseq{Select} button labelled \guiseq{Standard
collections}, additional collections like Metapost, Omega or documentation
in different languages can be selected.

\guiseq{Wintools} collection is selected by default as it contains many small
programs, usually absent in Windows, which can be handy, like graphics
converters: \cmdname{sam2p}, \cmdname{jpeg2ps}, \cmdname{tiff2png};
(de)compression programs: \cmdname{bzip2}, \cmdname{gzip}, \cmdname{unzip},
and \cmdname{wget} which is needed for \cmdname{getnonfreefonts} (new)
utility.

Next, clicking the \guiseq{Select} button labelled \guiseq{Language
Collections} in the \guiseq{Main customization} section opens the
\guiseq{Language collections} window in which the installation language can
be chosen by ticking the box next to the language.

Next, click the \guiseq{Install} button in the \guiseq{Install} section to
start the installation proper process.

\textbf{Note:} The \guiseq{Perl} and \guiseq{Ghostscript} are installed only
on demand. They should be installed unless they are already installed and you
really know what you are doing. Both programs are required by many important
tools. The \verb|PERL5LIB| and \verb|GS_LIB| environment variables will be
set too, as well the path to Ghostscript binaries will be added to the
\verb|PATH| variable.

The \TL{} system  needs some post-processing  steps (format files
generation,  ls-R  databases generation, environment variables, etc.). All
these operations are done there, some of them can be lengthy. So please wait
until you see a statement about the successfully finished installation.

The shortcut for \cmdname{tlpmgui} (and also \cmdname{dviout}, if installed)
will be added to the menu \guiseq{Start\arw Programs\arw TeXLive2007}.

If it is needed (Win9x/WinME), you will be asked to reboot your computer.

\subsection{Support packages for Windows}
\label{sec:win-xemtex}

To be complete, a \TL installation needs support packages that are not
commonly found on a Windows machine.  Many scripts are written using the Perl
language. Some important tools require the Ghostscript \PS{} interpreter to
render or to convert files. A graphic file toolbox is also needed in some
cases. Last but not least, a \TeX-oriented editor makes it easy to type in
your \TeX{} files.

All these tools are quite easy to find for Windows, but in order to try to
make your life even easier, we have put such a set of tools on \TL:
\begin{itemize*}
\item GNU \cmdname{Ghostscript} 8.54
\item a minimal \cmdname{Perl} 5.8, sufficient to run all the \TL{}
 Perl scripts.
\item win-tools is a set of small programs (bzip2, gzip, jpeg2ps
 and tiff2png)
%\item a subset of \cmdname{ImageMagick} 5.5.6
%\item the \cmdname{ISpell} checker
%\item \cmdname{XEmacs} 21.5.14 with a selection of packages to support
%\TeX{} typesetting.
\end{itemize*}

Perl and Ghostscript are installed upon request; you may explicitly
deselect them during installation if you already have them.

If you don't want to install this bundle, then you are on your own to
install the required tools to complete your \TL{} system. Here is a
list of places to get those tools:

\begin{description}
\item[Ghostscript] \url{http://www.cs.wisc.edu/~ghost/}
\item[Perl] \url{http://www.activestate.com/} (but you might need some
      supplementary packages from CPAN: \url{http://www.cpan.org/})
\item[ImageMagick] \url{http://www.imagemagick.com}
\item[NetPBM] alternatively, you could use NetPBM instead of ImageMagick to
      process or convert your graphic files. NetPBM home page is
      \url{http://netpbm.sourceforge.net/}
\item[\TeX-oriented editors] There is a wide choice, and it is a matter of the
      user's taste. Here is a selection:
      \begin{itemize*}
  \item \cmdname{GNU Emacs} is available natively under Windows, see
        \url{http://www.gnu.org/software/emacs/windows/ntemacs.html}
  \item \cmdname{Emacs} with AucTeX is available natively under Windows, see
        \url{ftp://alpha.gnu.org/gnu/auctex}
  \item \cmdname{WinShell} is available on \TL in the \path|support|
        directory, see \url{http://www.winshell.de}
  \item \cmdname{WinEdt} is shareware available from \url{http://www.winedt.com}
  \item \cmdname{Vim} is available from \url{http://www.vim.org}
  \item TeXnicCenter is free software, available from
          \url{http://www.toolscenter.org} and in the proTeXt distribution.
  \item \cmdname{LEd} is available from \url{http://www.ctan.org/support/LEd}
  \item \cmdname{SciTE} is available from \url{http://www.scintilla.org/SciTE.html}
      \end{itemize*}
\end{description}

You might want to install other tools that are not free (free as in
freedom, that is; you can acquire these and many other tools for no
money) and therefore not included on \TL{}, such as \cmdname{GSView},
the \cmdname{Ghostscript} companion to more conveniently view PS/PDF
files. \cmdname{GSView} is available from
\url{http://www.cs.wisc.edu/~ghost/gsview/} or any \acro{CTAN} site.

\section{Maintenance of the installation in Windows}

If you have \TeX\ Live installed, you can use \cmdname{tlpmgui} again
for modifying and maintaining your installation.

\subsection{Adding/removing packages}

As the \cmdname{tlpmgui} shortcut is available in the \guiseq{Start\arw
Programs\arw TeXLive2007} menu, start it from here. The maintenance window
titled \guiseq{TeX Live installation and maintenance utility} shows. It
contains several tabs: \guiseq{Add Packages}, \guiseq{Remove packages},
\guiseq{Manage installation}, \guiseq{Remove installation}.

Click the tab labelled \guiseq{Add packages} or \guiseq{Remove packages}
to enter the relevant functionality and then:

\begin{itemize}
\item In the first tab select the proper \CD{} drive (or \DVD with
  \texttt{texlive} directory) by pressing the \guiseq{CD/DVD} button.
\item Click the \guiseq{Search} button in the \guiseq{Buttons} section to
display or refresh in the \guiseq{Select packages to\dots} section the
list of packages to install or remove.

When adding packages, the list of installed packages is compared to the list
of packages available from your \CD/\DVD. Only packages not already installed are
displayed. It is up to you to select which packages you want to
install.

When removing individual packages, only a list of installed packages
will be displayed.

Please note that for both \guiseq{Add packages} and \guiseq{Remove packages}
the collections are listed first.

\item Select a package by clicking on the name of the package. Clicking the
\guiseq{Info} button in the \guiseq{Buttons} section displays a short
description of the selected package in the window located in the \guiseq{Info
about the selected item} section. To select several packages at once hold
down one of the Ctrl or Shift keys at your keyboard while holding down the
left mouse button or drag the mouse pointer while holding down the left mouse
button.

\item Click the \guiseq{Install} or \guiseq{Remove} button in the
\guiseq{Buttons} section to perform the appropriate action.
\end{itemize}

\subsection{Configuring and other management tasks}

The functions available in the tab labelled \guiseq{Manage the installation}
are helpful in performing actions needed when you want to add support for a
language which was not selected during the installation, or add/regenerate a
format which was not selected during the installation or was modified after
the installation.

The following actions can be performed:

\begin{itemize}
\item Refresh the \filename{ls-R} database
\item Create formats (All or Missing)
\item Edit \filename{language.dat}
\item Edit \filename{fmtutil.cnf}
\item Edit \filename{updmap.cfg}
\end{itemize}

Note: you can close the Edit\dots{} window with the \guiseq{Cancel} or
\guiseq{Done} button; the latter will start rebuilding the format files
(or the fontmap files if you have edited \filename{updmap.cfg}), followed by a
\filename{ls-R} database files refresh.

For more information about the configuration see section~\ref{sec:persconf},
\p.\pageref{sec:persconf}.

\subsection{Uninstalling \protect\TL{}}

The tab labelled \guiseq{Remove the TeX Live installation} opens a window
which contains functionality not worth describing and we do not know who would
need it and what it is for\dots :-)

Anyway, if you have the \path|texmf-local| directory for your local additions,
the removal procedure will not wipe it out or delete things in it. However,
it will be done only if you select it explicitly. The \path|setuptl|
directory containing \cmdname{tlpmgui} and related files will not be deleted.
You will have to do some manual cleanup to actually remove them.

\subsection{Adding your own packages to the installation}

First, whatever changes you make, \textbf{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 \cmdname{tlpmgui} run and selection of the appropriate action
from the \guiseq{Manage the installation} tab, or manually running the
\file{mktexlsr} command.

If you want to add files that are not provided by the \TL{} distribution,
it is recommended to put them in the \path|$TEXMFLOCAL| directory. This
way, you will be safe against upgrades of the \TL{} software.

The directory pointed to by \path|$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:\\
\path|c:\TeXLive2007\texmf-local\tex\latex\maple\|\\ and the
documentation files in:\\ \path|c:\TeXLive2007\texmf-local\doc\latex\maple\|

\subsection{Running \texttt{tlmp.exe} from the command line}
The \cmdname{tlpm.exe} program which is used as engine by \cmdname{tlpmgui}
has a number of other useful options. You can get the list by running:
\begin{verbatim}
tlpm --help
\end{verbatim}

More information and examples of use can be found in \path|tlpm.readme|.

\subsection{Network installation}

\KPS{} 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
\path|bin/win32| are shareable with a \teTeX{} or Unix \TL{} 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:
\begin{itemize}
\item Put everything on the server. Just add each set of files for the OS and
architecture you want to use in the \path|bin| directory. That means
for example \path|bin/win32| and \path|bin/i386-linux|. Next configure
your main variables. You can use UNC names to
point to the right directories under Win32.
\item Install a local copy for the binaries and format files. In this
  case, assign \path|$TEXMFMAIN| to the main \path|texmf| tree that
  will be accessed remotely. Set \path|$TEXMFVAR| to be a local
  directory which will hold local configuration files and on-the-fly
  generated files.
\end{itemize}

\subsection{What's different in Windows?}

The Windows version of \Webc{} has some specific features that should be
pointed out.

\begin{description}
\item[\cmdname{kpsecheck}] This command provides some options that did
  not fit well into \cmdname{kpsewhich}. It will allow you to list all
  the files that occur multiple times across your texmf trees. This
  could be handy, but most of the time you will also get unwanted
  output (like dozens of \path|README| files).  It is noticeable
    that all these files result in clashes inside the \KPS{}-hashing
    mechanism; fortunately, \KPS{} never looks for these files. For
  this reason, you can combine the \path|-multiple-occurrences| with 2
  other options for including or excluding any filename that match
  some pattern (you can request for several patterns).

  The \cmdname{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 \samp{in use}, that means one or several
  processes are working, and the effect of any \cmdname{mktexlsr}
  command will be delayed until the next time where no \KPS{} 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|PATH|, which has a
  limited length anyway.
\item[\Webc{}] The engines have one more option than in Unix \Webc:
  \begin{itemize}
  \item \path|-proctimes| print statistics about the job run
    time. It is to be noted that Win9x not being a true multitasking
    operating system, it has no reliable timer for short periods, so
    the value printed is an approximation. Under NT/2K/XP, the result
    is quite accurate with user time and system time values allocated
    for this run. For Unix
    users: the \path|time| command is not usually available to Windows
    users.
  \end{itemize}
\end{description}

\subsection{Personal configurations}
\label{sec:persconf}

\subsubsection{Dvips}

The configuration file for dvips can be found in\\
\verb+C:\TeXLive2007\texmf-var\dvips\config\config.ps+\\
You may open  it with any editor
 %(\cmdname{WinShell}  will do fine)
 and change some parameters:

\begin{description}
\item [fonts] you can change the default printer \MF{} mode or printer
  resolution in case \cmdname{dvips} needs to generate PK fonts. By default it
  is configured to use Type~1 versions of the CM fonts, so it should
  not call \cmdname{mktexpk} too often;
\item[printer] you can tell dvips where you want to print by default. If
  the \optname{o} option is not followed by a printer name, then a
  \file{.ps} \PS{} file is written. You can give dvips a printer
  name such as:
\begin{verbatim}
o lpt1:
% o | lpr -S server -P myprinter
% o \\server\myprinter
\end{verbatim}
\item[paper] Next, you might want
  to change the paper size from European (A4) to US letter
  by making the US letter the first paper size mentioned in the file.
  Scroll to the group of lines beginning with \code{@}. Move
  the appropriate lines so that this section begins with the lines:\\
\hspace*{1em}    @ letterSize 8.5in 11in\\
\hspace*{1em}    @ letter 8.5in 11in\\
\hspace*{1em}    @+ \%\%BeginPaperSize: Letter\\
\hspace*{1em}    @+ letter\\
\hspace*{1em}    @+ \%\%EndPaperSize
\end{description}

The current \TL{} distribution implements the procedure of making always
up-to-date fontmaps files for Dvips and Pdftex. This is done by the
\cmdname{updmap} program during installation.
If you add new font packages using the installation program or by hand,
edit the file \verb+updmap.cfg+ in \path|$TEXMFVAR/web2c|.

\subsubsection{PdfTeX}

If you use the program pdf{}latex to write \acro{PDF} format directly,
and you are using \acro{US} letter-size paper, edit the file
\verb+C:\TeXLive2007\texmf-var\tex\generic\config\pdftexconfig.tex+ and
change \samp{\bs pdfpagewidth} and \samp{\bs pdfpageheight}. These entries
should read:
\begin{alltt}
\bs{}pdfpagewidth=8.5 true in
\bs{}pdfpageheight=11 true in
\end{alltt}
Save the file and exit the editor.

\subsubsection{Xe\TeX}
Xe\TeX{} for Windows is linked statically with fontconfig 2.4.2.
A configuration file for fontconfig is \verb+fonts.conf+.  For details,
see the file \verb+fonts.conf+ itself which is in a directory shown by
the command \texttt{kpsewhich --var-value=FONTCONFIG\_PATH}.

\subsubsection{GSView}
GSView is distributed under the AFPL (which is not a free software
license), and therefore is not included in \TL{}.

You may want to change the page size to US letter size. If so, open
GSView from the \guiseq{Start} menu, and select \guiseq{Media\arw Letter}.

Also, there are menu settings that are supposed to give you the most
readable screen image. On \guiseq{Media \arw Display Settings}, set both
\optname{Text Alpha} and \optname{Graphics Alpha} to 4~bits.

Note that the installation process has set all \code{.ps} and
\code{.eps} files to automatically open with \cmdname{GSView}.

For printing instructions, see section~\ref{printing} below.


\subsection{Testing}

For generic verification procedures, see section~\ref{sec:test-install}
(\p.\pageref{sec:test-install}).  This section describes
Windows-specific tests.

Open the file \verb+sample2e.tex+ in your editor (Xemacs, WinShell),
found in \path|C:\TeXLive2007\texmf-dist\tex\latex\base|. The \LaTeX\ source
should appear on the screen. Process it by clicking on the
\guiseq{Command\arw LaTeX} menu (XEmacs) or \LaTeX\ icon on the toolbar
(WinShell), then view it by clicking on the \guiseq{Command\arw View DVI}
menu (XEmacs) or Preview (dviout) icon (WinShell).

At first, when you preview files with \cmdname{dviout}, 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.

\textbf{Hint for the future:} If a \LaTeX\ run stops because \LaTeX\
cannot find a file, you can press Ctrl-z to quit.


\subsection{Printing}
\label{printing}

It is possible to print from \cmdname{dviout}. 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, else you
will get scaled printing (printing at 600\dpi{} on a 300\dpi{} printer
will give you only one quadrant of your page).

Printing is faster and more reliable if you run \cmdname{dvips} to make
a \filename{.ps} file and then print from \cmdname{GSView}. In
\cmdname{GSview}, select \guiseq{File\arw Print\ldots}. A \guiseq{Print}
window will appear.

If you are using a \PS{} printer, \textit{be sure to select
\guiseq{\PS{} Printer}}.  This is done in the \guiseq{Print Method} box
at the bottom left of the \guiseq{Print} window. You can then select any
of the printers that you have previously installed.  If you fail to
check the box for \optname{\PS{} Printer}, printing will not work.

If you will be using your own non-\PS{} printer, select
\guiseq{Ghostscript device} in the \guiseq{Print Method} box, then click
on the button to the right labelled \guiseq{djet500} and select your
printer type from the list that pops up. (In the older version of
\cmdname{GSView}, make sure \optname{\PS{} Printer} is \textit{not}
selected, then select your printer type from the \guiseq{Device} list.)

\subsection{Tips and tricks for Win32}

\subsubsection{Different flavors of Win32}

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
\acro{SDK}) that you can use to write programs for different operating
systems of the Windows family.

Windows comes in different flavors:
\begin{itemize}
\item Win95, Win98 and Win\acro{ME}, which \emph{are not true multitasking,
  multithreading} environments, but rather updated incarnations of
  \acro{DOS}. This can be more or less proven by the fact that when
  booting, the PC will load the \path|command.com| interpreter, and if
  you stop the boot process at this point, you can ask for the current
  (\acro{DOS}) version and it will answer something like \samp{MS-DOS
  7.0} (at least for the old versions of Win9x).
\item Windows \acro{NT}, which is a new operating system  written from
  scratch, capable of true multitasking behavior, and including many
  high level features.
\item Windows 2000, based on \acro{NT}, with all the bells and
  whistles of Win98.
\item Windows \acro{XP}, which comes with Personal and Pro flavors. This is
  the last step in merging both lines of products (Win9x based and
  \acro{NT} based). \acro{XP} is based on \acro{NT}.
\end{itemize}

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 \acro{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.

\subsubsection{Command line prompt}

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 \acro{GUI}. Command line gives you
programming power\Dash assuming a clever command interpreter.

But the problem here is more fundamental: \TeX{} is \emph{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 \acro{GUI} problems, and \acro{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 \acro{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.

\begin{description}
  \item[Win9x] You can open a command line prompt by looking either for
    the \acro{MS-DOS} icon in the \guiseq{Start\arw Programs} menu,
    or by choosing \guiseq{Start\arw Run} menu typing in
    \path|command.com| as the program name.
  \item[NT, 2K, XP] You can open a command line prompt by looking for
    \guiseq{Command Prompt} in the \guiseq{Start\arw Accessories} menu.
    You can also choose \guiseq{Start\arw Run} and type in
    \path|cmd.exe|, which is the name of the brand new command
    interpreter for \acro{NT} (thus, it is untrue to call this a
    \emph{DOS} box!).
\end{description}

These locations may change across different Windows versions.

\subsubsection{Path separators}

The Win32 API understands both \path|/| and \path|\| 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
\path|\| as path separator. The reason is compatibility: the command
processor used \samp{/} to introduce arguments to commands.

All this to say: do not be surprised to read path names written using
the Unix convention; Windows-\TL{} is a port of \Webc, and aims to be
compatible across platforms. For this reason, all the configuration files
that need to specify path names use the Unix convention.

\subsubsection{File systems}
\label{sec:clusters}

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 \acro{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
\TL{}. The \acro{FAT} file system allocates a minimum of 32kB for
\emph{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, \acro{FAT32} and
\acro{NTFS}, do not have this drawback. They manage clusters of 4kB
only.  (You can lower the limit to 512 bytes on \acro{NTFS}.)

\subsubsection{How to add some directory to your PATH}

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:

\begin{description}
\item[Windows 95/98] Edit your \path|autoexec.bat|. In this file should be a line
  starting with \texttt{PATH=} and followed by a list of directories separated
  by \path|;|. Please add the directory with the executables in this line.
  After this, this line could look as follows:
\begin{verbatim}
PATH=c:\windows;c:\windows\system;c:\TeXLive2007\bin\win32
\end{verbatim}
\item[Windows ME] You need to run the special program
  \path|c:\windows\system\msconfig.exe| to be able to change any
  environment variable. From this program, select the `Environment'
  tab, and then add or modify the  variable you want. You will be asked to reboot the
  machine upon any change.
\item[Windows NT/2K/XP]
  Click left on \guiseq{Start \arw Settings \arw Control Panel}. Now the
  window with the control panel icons opens. Double click on System. The
  System Properties window opens. Click on the tab \textsf{Environment}
  or look for a button named \guiseq{Environment Variables} among the
  dialog boxes. Now you can change the environment variables for your
  user account. Note: There are also displayed the environment settings
  for the system.  Normally, you can't change the system variables
  unless you have administrator rights on your machine. If you want to
  change the \texttt{PATH} for all users, you will have to contact your
  system administrator or be the system administrator yourself\Dash in
  the latter case you should know what you are doing.

  If there  is already a \texttt{PATH}  setting for your user account,
  left click on \texttt{PATH}.  In the field \textsf{Variable} appears
  \texttt{PATH}  while  the field  Value  shows the current setting of
  \texttt{PATH} as  a list of directories  separated  by \path|;|. Add
  the   directory   where   the   executables   are    located   (e.g.
  \path|c:\TeXLive2007\bin\win32|).  If  there isn't  a \texttt{PATH} variable
  for your user  account, simply click  in the field Variable and type
  in  \texttt{PATH}, click in the field \textsf{Value}
  and type in the directory with the executables.  Important: Click on
  the \textsf{Apply} button before clicking \textsf{Ok}, otherwise the
  changes to \texttt{PATH} won't apply to your system. Be careful when
  changing the environment settings.
\end{description}

The best way to be sure that a variable has been properly set is to
open a console and type:
\begin{verbatim}
set VARIABLE
\end{verbatim}
which should return the corresponding value.

\subsubsection{\TeX{} engines}

If you have a look at the \Webc{} documentation,  you will read that all
the various \TeX{}  derived programs  use the  same base  engine.  For
example, \path|tex.exe| and \path|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 \emph{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 (\emph{Dynamic Linked Library}). This means that you will have
the following layout:
\begin{alltt}
2006-11-23  07:06             2 560 latex.exe
2007-01-06  23:54         1 073 664 pdftex.dll
2006-01-28  08:05             2 560 pdftex.exe
\end{alltt}
and the \path|latex.exe| file is nothing but a rough copy of
\path|pdftex.exe| using the same core \path|pdftex.dll|.
The same trick has been used for the \path|mktex*.exe| family of programs
which are linked to the \path|mktex.dll| library.

In fact, a generic tool called \path|irun.exe| is provided to build the
equivalent of Unix hard links for executable files only under Win32.

\subsection{In case of problems}
\label{sec:troubleshooting}

\subsubsection{What to do if \texttt{latex} does not find your files?}

\begin{itemize}

\item \cmdname{kpsewhich} is the tool of choice to debug any
problem.  However, \cmdname{kpsewhich} outputs debug information to
stderr, and the older Windows consoles do not know how to redirect
stderr to a file.  (Windows NT and later do support redirections, but
the trick below will work for any console.)  For diagnostic purposes you
can temporarily set an environment variable (in a \acro{DOS}/\acro{cmd} box):

\begin{verbatim}
SET KPATHSEA_DEBUG_OUTPUT=err.log
\end{verbatim}
You can also set the debug level:
\begin{verbatim}
SET KPATHSEA_DEBUG=-1
\end{verbatim}

Similarly, to redirect stderr to stdout:
\begin{verbatim}
SET KPATHSEA_DEBUG_OUTPUT=con:
\end{verbatim}
This way you can capture both stdout and stderr in the same file.
\item Assuming the installation has been done in \path|c:/TeX|, check
  the following values: \\
  {\small
  \begin{tabular}{ll}
    \path|kpsewhich -expand-path $SELFAUTOPARENT| &  \path|c:/TeX| \\
    \path|kpsewhich -expand-path $TEXMF| & \path|c:/TeX/texmf....| \\
    \path|kpsewhich -expand-path $TEXMFCNF| &
                        \path|.;c:/TeX/texmf-var/web2c;| \\
    \path|kpsewhich -expand-var $TEXINPUTS| & \path|.;c:/TeX/texmf/tex//|
  \end{tabular}
}
\item If you have other \TeX{}-related values already set in your
  environment, please, remove them. They are overriding the ones in
  texmf.cnf.
\item Check the values from:\\
{\small
  \begin{tabular}{ll}
    \texttt{kpsewhich cmr10.tfm} & \path|c:/TeX/texmf-dist/fonts/tfm/public/cm/cmr10.tfm|\\
    \texttt{kpsewhich latex.fmt}& \path|c:/TeX/texmf-var/web2c/latex.fmt|
  \end{tabular}
}
\item At this point, if everything is correct, \TeX{} and friends
  should work. If it is not the case, you will need to play with
  the \path|-debug=n| option from \path|kpsewhich|, and check back all
  the values. Try to identify and report the problem.
\end{itemize}

\subsubsection{What to do if your setup still does not work as expected?}

Here are several questions to investigate:

\begin{enumerate}
\item Is \file{tex.exe} in my \path|PATH|?

\item Is the \path|TEXMFCNF| variable correctly set to
\path|c:/TeXLive2007/texmf-var/web2c| (default value)?

\item Are there any errors in the log file generated by the
\file{tlmpgui.exe} program?
\file{tlmpgui.log} can be found in your
\file{TEMP} directory. You can find this by searching for the
string \samp{Error}. Hint: the log file can show some errors after
building all format files. Please do not panic: perhaps some formats
weren't already installed.

\item Are there any relevant bug fixes at \url{http://tug.org/texlive/}?
(Unlikely, but it doesn't hurt to check.)

\end{enumerate}

The \TL{} software consists of hundreds of 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~\ref{sec:help}, \p.\pageref{sec:help}.)

% don't use \Webc so the \uppercase in the headline works.