%&latex \NeedsTeXFormat{LaTeX2e} % sorry, compatibility with 2.09 is too painful \documentclass[draft]{tdsguide} \chead{% \ifTdsDraft draft \fi % <-- space! \application{Web2c} for \abbr{Win32} } \begin{document} \section{\application{Web2c} under \abbr{Win32}} \label{Web2c under Win32} (Email \email|Fabrice.Popineau@supelec.fr| to contact the maintainer of this implementation.) First of all, many thanks to the following people for their patience and good will: \begin{itemize} \item Karl Berry, and now Olaf Weber, for their work on \application{Web2c}, and for accepting my \abbr{win32} patches \item Michael Basler, Michael C. Grant, Brian Ripley, Tobias Burnus, Daniel Courjeon and the long list of beta-testers for their helpful remarks, \item Sebastian Rahtz, also for intensive tests and for integrating this port into the \TeX-live CD, \item Phil Taylor, Bernd Raichle and the NTS team for e-\TeX{} which is included in this release, \item Joachim Schrod and Pehong Chen for \path|makeindex|, which I have adapted to kpathsea, \item Han The Thanh for PDF\TeX{} which is also included in this release, \item John Plaice and Yannis Haralambous for Omega, \item John Hobby for MetaPost, \item authors of the numerous tools that I have added to the distribution: makeinfo, ps2pk, t1tools, dtl, dviconcat, dvicopy, dvidvi ... \end{itemize} The description of the \abbr{Win32} port of \application{Web2c} follows: advocating for \application{Web2c}, binary distribution, installation, configuration, troubleshooting and compilation. \subsection{Why using \application{Web2c} under \abbr{Win32}} \label{Why using Web2c under Win32} The author of this port takes on it after leaving Linux for \abbr{NT}. \application{Web2c} is the most used \TeX{} distribution in the Unix world. \application{Web2c} takes you to a high level of {\TeX}nicity : latest versions of \TeX, \MF, \MP, use of the high speed search kpathsea library to name only some features. \application{Web2c} is highly configurable and should satisfy the most demanding users. Moreover, its wide use makes it well tested. \application{Web2c} has been already ported to a wide variety of OS apart from Unixes: \abbr{VMS}, \abbr{MVS}, Amiga, \abbr{OS/2}, \abbr{DOS}. \abbr{Win32} has everything of a high-tech OS, so there was no reason for \application{Web2c} not to be ported to it. It would make life easier for administrators who have \abbr{Unix}, Windows (and maybe others) \TeX{} distributions to maintain. So, the main goal of the port was compatibility with the reference platforms (Unixes): administration of TeX sites should be similar. For further details on the \abbr{Win32} adaptation, take look at Section~\ref{How to compile Web2c under Win32}. \subsection{What's in this port} \label{What's in this port} The the binary distribution is made of the following files: \begin{verbatim} Directory of e:\Local\TeX\bin\win32 [.] [..] a5bookle.bat access.exe afm2tfm.exe bibtex.exe dmp.exe doubside.bat dt2dv.exe dv2dt.exe dvibook.exe dviconcat.exe dvicopy.exe dvidvi.exe dvihp.exe dvilj.exe dvilj2p.exe dvilj4.exe dvilj4l.exe dvips.exe dviselect.exe dvitodvi.exe dvitomp.exe dvitype.exe elatex.exe etex.exe gftodvi.exe gftopk.exe gftype.exe gsftopk.exe inimf.exe inimpost.exe initex.exe install-info.exe kpathsea.dll kpsestat.exe kpsewhich.exe lacheck.exe lambda.exe latex.exe libpng.dll lnexe.exe mag.exe makeindex.exe makeinfo.exe makempx.exe mf.exe mft.exe mktex.exe mktexdir.exe mktexlsr.exe mktexmf.exe mktexnam.exe mktexpk.exe mktexpk.opt mktextfm.exe mktexupd.exe mltex.exe mpost.exe mpto.exe MSVCIRT.DLL msvcrt.dll msvcrt20.dll msvcrt40.dll musixflx.exe newer.exe odvicopy.exe odvips.exe odvitype.exe ofm2opl.exe omega.exe opl2ofm.exe otangle.exe otp2ocp.exe outocp.exe ovf2ovp.exe ovp2ovf.exe oxdviw32.exe patgen.exe pdflatex.exe pdftex.exe pfb2pfa.exe pk2bm.exe pktogf.exe pktype.exe pltotf.exe pooltype.exe ps2pk.exe t1ascii.exe t1asm.exe t1binary.exe t1disasm.exe tangle.exe tex.exe tex4ht.exe texindex.exe tftopl.exe tie.exe ttf2afm.exe unpost.exe vftovp.exe virmf.exe virmpost.exe virtex.exe vptovf.exe weave.exe xdviw32.exe zlib.dll 108 File(s) 4,947,459 bytes \end{verbatim} There are some DLLs : the ones that begin with msvc are the Microsoft C library targeted for multi-threaded applications and the kpathsea dynamic-linked library. There are also \path|zlib.dll| and \path|libpng.dll| for pdftex.exe. The Microsoft files may be removed if you already have them in your system directory. \subsection{Binary distribution} \label{Binary distribution} A precompiled distribution should be found on CTAN archives in the following directory: \CTAN:\path|systems/win32/web2c| My ftp site is at the following address \url|ftp://ftp.ese-metz.fr/pub/TeX/win32|, but is quite slow. Get the binary package \path|web2c-7.x.y-win32.tar.gz| (\texttt{x} and \texttt{y} being the highest ones), without forgetting to set binary mode. If you do not have Winzip, get also \path|tar.exe| and \path|gzip.exe|. Choose a directory \replaceable{prefix} (e.g.: \path|c:\TeX|) and do as follows, assuming that you have downloaded everything in \replaceable{tmpdir}: \begin{verbatim} cd gzip -dc /web2c-7.x.y-win32.tar.gz | tar xf - \end{verbatim} If you do not have a TDS conformant texmf tree (there is one in teTeX for Unix), get the minimal one in: \CTAN:\path|systems/web2c/texmflib-base.tar.gz| and unpack it with a similar command in \path|c:\TeX\share|. All implementation-dependent \TeX{} system files (\path|.pool|, \path|.fmt|, \path|.base|, \path|.mem|) are stored by default directly in \path|texmf/web2c|. The configuration file \path|texmf.cnf| is also stored there. All the binaries are in \path|.../bin/win32| for compatibility with other distributions. Given a root directory \replaceable{prefix} (\path|g:\Local\TeX| was my compile-time default), we have default locations as follows: \begin{tdsSummary} / installation root (\path|g:/Local/TeX| compile-time default) . bin/win32 executables . man/ man pages . info/ info files . lib/ libraries (\path|kpathsea.*|) . share/ architecture-independent files . . texmf/ \abbr{TDS} root . . . web2c/ implementation-dependent files (\path|.pool|, \path|.fmt|, \path|texmf.cnf|, etc.) \end{tdsSummary} This disposition is almost identical to the standard one for \application{Web2c} under Unix. \section{Specific \abbr{Win32} Configuration} \label{Configuration} I didn't make any configuration program. The only things to configure are: \begin{itemize} \item add the \path|...\TeX\bin\win32| directory to your PATH \item if the command \path|kpsewhich cmr10.tfm| gives you the location of \path|cmr10.tfm|, there are chances that it is finished. \item if you have multiple trees, or for any other reason, set \path|TEXMF| to anything relevant (I assume you do not use the standard and single \path|...\TeX\share\texmf| tree), by example you can do: \begin{verbatim} set TEXMF=c:/TeX/share/{texmf_fr;texmf} \end{verbatim} if you want to use two texmf trees. \item if \path|kpsewhich| is not able to locate your favorite files, see the Troubleshooting section. \end{itemize} You can play with all variables in \path|$TEXMF/web2c/texmf.cnf|, but \emph{only after a careful reading of the kpathsea manual}. The configuration through mktex.cnf is supported. The following variables may be changed in this file : \begin{tabular}{ll} \path|MT_FEATURES| & \path|appendonlydir:dosnames| (all features supported)\\ \path|MODE| & \path|ljfour| (any other valid mode) \\ \path|BDPI| & \path|600| (any other valid base dpi resolution) \\ \path|ps_to_pk| & \path|gsftopk| (ps2pk is untested) \end{tabular} Permissions on \abbr{Win32} do not have the same meaning as on Unix and I didn't think of a way to mimic them. There is a difference between \abbr{Win32} \path|mktexpk.exe| and the standard one. \abbr{Win32} \path|mktexpk| will try to put pk files in their right texmf trees if you have more than one. This is guessed by finding where the tfm file needed lies. The mktex*.exe programs should behave exactly the same way (except faster) as their shell scripts counterparts. \section{Troubleshooting} What to do if \path|kpsewhich| or \path|latex| do not find your files? \begin{itemize} \item kpsewhich is the tool of choice to debug any problem. Unfortunately, kpsewhich outputs debug information to stderr, and the Windows console does not know how to redirect stderr to a file. So you will need to play with the 'pause' key until someone provides me with a better approach. \item assuming the installation has been done in \path|c:/TeX|, check the following values: \\ \begin{tabular}{ll} \path|kpsewhich -expand-path $SELFAUTOPARENT| & \path|c:/TeX| \\ \path|kpsewhich -expand-path $TEXMF| & \path|c:/TeX/share/texmf| \\ \path|kpsewhich -expand-path $TEXMFCNF| & \parbox[t]{6cm}{ \path|.;c:/TeX/share/texmf/web2c;|\\ \path|c:/TeX/bin/win32;|\\ \path|c:/TeX/bin;|\\ \path|c:/TeX|}\\ \path|kpsewhich -expand-var $TEXINPUTS| & \path|.;c:/TeX/share/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:\\ \begin{tabular}{ll} \path|kpsewhich cmr10.tfm| & \path|c:/TeX/share/texmf/fonts/tfm/public/cm/cmr10.tfm|\\ \path|kpsewhich latex.fmt|& \path|c:/TeX/share/texmf/web2c/latex.fmt| \end{tabular} \item at this point, if everything is correct, \path|tex.exe| and co. 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} \section{Filesystems considerations} \label{Filesystems considerations} \abbr{Win32} supports multiple filesystems: \begin{itemize} \item DOS FAT, 8.3 and uppercase filenames \item Protected mode Fat, long filenames, but case-insensitive \item NTFS, long filenames and case-sensitive \item ISO9660 CDROM, 8.3 and uppercase filenames \end{itemize} Moreover, \abbr{Win32} calls which refer to filenames are case-insensitive. There are several other features in NTFS that \abbr{Win32} can't use for the moment. Another dimension is the use of different directory separators: \path|/| or \path|\|, but \abbr{Win32} calls accept both. So what difficulties may arise ? Most likely, you will have some style files with long filenames. If you are running on a filesystem which supports them, there is no problem and you have nothing to do. Otherwise, you will need to use the alias feature of kpathsea (See it in the kpathsea manual). Say for example you are trying to install texmf on a FAT partition and you have the style file named longtable.sty in you tree. The filename will be truncated to its 8.3 form : longtabl.sty. In this case, you will need to create a file named aliases along to the ls-R file in you texmf tree. This file should contain the following line: \begin{verbatim} longtabl.sty longtable.sty \end{verbatim} There is an example of aliases file in \texttt{\$TEXMF/aliases}. All references to longtable.sty will be redirected to longtabl.sty as long as the long filename is not found. Otherwise, if you think you have trouble with filenames, consider doing the following: \begin{itemize} \item pathes in config files and environment variables are preferred written with \path|/| rather than \path|\|; \item ls-R databases should be in lower case, even if you are running on FAT or CD-ROM; \item use the debug feature of \path|kpathsea| and \path|kpsewhich| to demonstrate you problem and email me the results of your investigations. \end{itemize} \section{How to compile \application{Web2c} under \abbr{Win32}} \label{How to compile Web2c under Win32} If you feel adventurous, you can try to get the package \path|web2c-7.x.y-win32-src.tar.gz| and unzip it. It contains everything to compile the whole thing \textbf{under Windows NT}, anf the proceed as follows~: \begin{verbatim} cd source perl ./configure.pl setvars nmake NODEBUG=1 install \end{verbatim} You need VC++5.x Generally speaking, I will not support this stuff at the source level. Unix uses \path|autoconf| and has only \path|Makefile.in|. I have to tweak these \path|Makefile.in| by hand to get them working. And I had to compile a lot of \abbr{GNU} stuff to make this running. I have taken the others (groff for example) from the Net. \end{document}