George N. White III gnwiii at gmail.com
Sun Mar 4 21:34:29 CET 2007

On 3/4/07, poti giannakouros <potiatpotisdotorg at yahoo.com> wrote:

> Hello Dmitrij,
> I don't exactly have an answer for you, but
> I am currently trying to do what Karl described.
> My current status is that I cannot view DVI files,
> and I cannot use packages. Very simple documents
> however, do work.
>
> In case it helps you, and in case you or someone else
> can help me, here is what I have done so far:
>
> tlmpgui installs material in C:\TexLive2007 and C:\texmf-var. TexLive2007
> contains the dvi viewer, ghostscript, and a temp directory, if I recall
> correctly
> (I am not at a PC). In my case, I also needed to change the default paper
> size
> so I clanged the files indicted at the end of this post and ran
> c:\localtexmf\dvipdfm\config>fmtutil.exe --all
> in texmf-var become 53 megabytes.
>
> I then moved texmf-var to the directory that would become the root of my
> DVD.
>
> I use TexLive through emacs, so I set my environment variables in
> site-lisp/site-start.el
> as follows (I am just starting to learn emacs lisp, so corrections are
> welcome):
>
> (setenv "PATH" (concat (getenv "PATH")
>
> ";D:\\bin\\win32\\gs\\gs8.54\\bin;D:\\bin\\win32\\dviout;D:\\bin\\win32"
> ))
> (setenv "GS_LIB" (concat ()
> "D:\\bin\\win32\\gs\\gs8.54\\lib" ))
> (setenv "TLroot" (concat () "D:\\" ))
> (setenv "TEXMFVAR" (concat () "D:\\texmf-var" ))
> (setenv "TEXMFTEMP" (concat () "C:\\WINDOWS\\Temp" ))
> (setenv "TEXMFCNF" (concat () "D:\\texmf-var\\web2c" ))
> (setenv "PERL5LIB" (concat ()
> "D:\\perlt\\lib;D:\\perltl\\site\\llib" ))
>
> (custom-set-variables
>   ;; custom-set-variables was added by Custom.
>   ;; If you edit it by hand, you could mess it up, so be careful.
>   ;; Your init file should contain only one such instance.
>   ;; If there is more than one, they won't work right.
>  '(exec-path (quote ( "." "D:/Emacs/bin" "D:/bin/win32/gs/gs8.54/bin"
> "D:/bin/win32" "D:/bin/win32/dviout"))))
>
> I edited out some things for readability but think I have all the TeXLive
> related things.
>
> As it stands, if I try to typeset
> texmf-doc/doc/english/guide-to-latex/demodoc.tex
> I get errors regarding latex.fmt not found. Output is produced if I remove
> the \usepackage lines
> in the header.  Possibly related is the  fact that I cannot used dviout. It
> looks for fonts on the C drive and the F drive, which was the MO disk on
> which I prepared the contents of my DVD. Windvi seems
> to work and produces a page that is narrower and taller than my text, making
> me think that my
> conversion to letter default worked and windvi might work when I fix the
> arguments with which emacs is calling it. Also,  I cannot get acrobat to
> launch as a pdf viewer from emacs.
>
> I hope this helps, and I will post more if I learn more before others can
> pitch in.

It sounds like you have a good start.  Emacs is helpful because you can
run commands in a *shell* window and capture many pages of output
for analysis.  There are several ways to debug tex file searching. In
my experience most problems are caused not by missing files, but by
tex finding the "wrong" file -- often an older version left in a
user's personal texmf tree or mixed in with the source files.

I have a couple concerns, however.  What happens if the DVD
reader isn't drive D:?  It should be possible to put a live tree on
DVD, a network drive, or a USB disk.  Do you have to burn a DVD in
order to test the setup?

There have been postings on configuring emacs to use the "pdfopen" and
"pdfclose" utilities to ensure that acroread doesn't keep a .pdf file
open while your are trying to write over it.  This didn't work
reliably for me a year ago -- emacs would randomly hang when launching
acroread.  Maybe things are better now (which version are you using?)

Dviout is normally independent of the TeX distribution, so the
configuration isn't tied to the changes you make for TL.

--
George N. White III <aa056 at chebucto.ns.ca>
Head of St. Margarets Bay, Nova Scotia