Section K.1 Setup
In this section, we do some initial setup, establish notation, and issue warnings. Some of the steps in this process are dangerous. Typos could lead to an unstable system, or possibly even to unrecoverable system errors. Double-check everything.
Subsection K.1.1 Notation
Strings enclosed in
<angle brackets>are variables whose values you should substitute in typed expressions.
<username>, for example, should be replaced with your Windows username (e.g., mine is
drosoff). Throughout this installation process it is very important to pay attention to the direction of slashes
Subsection K.1.2 Initial Windows setup
It is easier to see what is happening if your Windows file browser is not set up to hide file extensions from you. Disable the “hide file extensions” behavior before proceeding. In Windows 7/8, this can be done through the Control Panel. In Windows 10, there is a checkbox somewhere in the ribbon for it.
Subsection K.1.3 A word on path names
An appallingly large fraction of the difficulties of using GNU/Linux-based utilities with Windows come from the differences in formatting path names. Windows path names begin with a drive letter (usually “C”) and a colon. Like all path names, they describe a path in a rooted tree. The root directory (folder) in Windows is called
\, a backslash. Note the direction carefully. Children of the root node are either subdirectories or files in the root directory (leaves). The path to my downloads folder is:
The trailing backslash is often unnecessary, but it is an easy way to see immediately whether a path name refers to a file or to a directory. Windows path names are not case-sensitive.
Linux/Mac OS X path names are quite similar, but lack drive letters, start with an explicit reference to the root, use forward slashes, and are case-sensitive (more or less so, in Mac's case). A path to a typical Linux user's download folder might be
Again, Linux pathnames are case-sensitive and Mac OS X pathnames are typically ‘case-preserving’. The Git Bash shell for Windows is an emulation of a Linux environment, and the utilities within it expect path names that follow Linux conventions. So we conform to this expectation as follows.
- Remove the colon, but keep the drive letter.
- All backslashes
- Add an initial slash preceding the drive letter.
The path name to my Windows download folder becomes
Even though Git Bash is pretending to be a Linux shell, path names are still the underlying Windows path names, and therefore are not case sensitive. You can verify this using tab-completion.
Path names that begin with the drive letter (Windows) or the root
/(Linux/Mac OS X) are called absolute path names. Their referents do not depend on the location from which the path name is invoked. Relative path names, on the other hand, begin in the so-called current working directory. A relative pathname might look something like this:
..is a shortcut for the parent of the current directory. Thus, the relative path name above means from where we are, ascend two levels, then descend into the
sample-articlesubdirectories, and find the file
Path names that contain spaces are evil, and should be avoided in many cases. Unfortunately, all Windows default program installation locations contain at least one space (directory name “Program Files”). This does not appear to cause problems, except when installing ImageMagick (Section K.5). To be extra careful, you could always choose an installation location that is free of space characters.
Subsection K.1.4 Do I have 64-bit Windows?
Find out on Windows 7:
- Open the start menu and type “Computer”. Right-click the
Computeritem in the popup menu.
Propertiesfrom the drop-down menu.
- Read in the right-hand side of the pane to find the “System” heading.
- From the “System type” entry, read whether you have a 32- or a 64-bit OS.
Now you are ready to begin installing the various pieces of the PreTeXt puzzle. The first one,
xsltproc(Section K.2), is the most annoying. You might want to go get a snack or another cup of coffee.