[tex-live] Running Live - no access to C drive (emacs approach)

poti giannakouros potiatpotisdotorg at yahoo.com
Fri Mar 30 01:35:52 CEST 2007


Siep Kroonenberg <siepo at cybercomm.nl> wrote:
Here is the script in-line:

' Prepare a Windows system for running TeX Live from dvd.
' This involves adding or changing some user environment variables
' and placing some files under %USERPROFILE%.

(snip)


' generate files

Set oFile = oFS.CreateTextFile( sTLmain & "\temp\tl_generate.bat" )
oFile.WriteLine( "@echo off" )
oFile.WriteLine( "path %path%;" & sTLrootSl & "bin\win32" )
oFile.WriteLine( "set TEXMFCNF=" & sTLmain & "\texmf-var\web2c" )
oFile.WriteLine( "set TEXMFTEMP=" & sTLmain & "\temp" )
oFile.WriteLine( "set TEXMFVAR=" & sTLmain & "\texmf-var" )
oFile.WriteLine( "set TEXMFLOCAL=" & sTLocal )
oFile.WriteLine( "set TLroot=" & sTLmain )
oFile.WriteLine( "mktexlsr" )
oFile.WriteLine( "updmap" )
oFile.WriteLine( "fmtutil --byfmt latex" )
'oFile.WriteLine( "fmtutil --all" )
oFile.WriteLine( "echo Done. Please re-login." )

This script requires a reboot. On some lab Macs I have used,
a reboot reset all user settings. I don't know if this is a likely
scenario in a Windows lab, and it does not apply to our NT lab
so this is an approach I can use for some things.



oFile.WriteLine( "pause" )
oFile.close
oWsh.run """" & sTLmain & "\temp\tl_generate.bat" & """", 1, true
'oFS.deletefile( sTLmain & "\temp\tl_generate.bat" )



Your extensive script was very helpful to me in thinking about my own 
 project and as a reference for things I may need to do in Windows in the future.
 I got some re-writable DVDs and will give it a try this weekend. 

I am including my emacs based solution, for those who might be interested in using 
it or in commenting on it. While it is not as comprehensive as  yours, it does not 
require a reboot and omits some steps that, as far as I understand, are not necessary 
in the case of my limited pre-configured dvd. 

I should do the tests for conflicting binaries, but I have not yet learned if I can send 
commands to Windows and get the results back to emacs for use in a script. 



I am still working on figuring out how to view output, but I have included my custom 
set variables in case someone can see an obvious problem. In windvi, I get a preview, 
but on an A4 background. After configuring for a letter default, dviout looks in non-existing
directories for fonts, so dviout does not work at all.

------------------------------------------site-start.el--------------------------------------------------------------------------------
;;Startup file for emacs on a DVD including TeX Live configured to run entirely from DVD 
;;through emacs for North America. 
(setq TL_DRIVE (substring (getenv "EMACSPATH") 0 2))
;;Some elements of PATH are redundant with exec-path. 
;;There may be a better way to do this. 
(setenv "PATH" (concat (getenv "PATH") 
               ";" TL_DRIVE "\\bin\\win32\\gs\\gs8.54\\bin;" TL_DRIVE "\\bin\\win32" ))
(setenv "GS_LIB" (concat TL_DRIVE "\\bin\\win32\\gs\\gs8.54\\lib" ))
(setenv "PERL5LIB" (concat TL_DRIVE "\\pertl\\lib;" TL_DRIVE "\\perltl\\site\\llib" ))
(setenv "TEXMFCNF" (concat TL_DRIVE "\\texmf-var\\web2c" ))
(setenv "TEXMFTEMP" (concat (getenv "USERPROFILE") "\\Temp" ))
(setenv "TEXMFVAR" (concat TL_DRIVE "\\texmf-var" ))
(setenv "TLroot" (concat TL_DRIVE "\\" ))
;;add to exec-path
(let* ((emacsbin (concat TL_DRIVE "/Emacs/bin"))
       (gsbin (concat TL_DRIVE "/bin/win32/gs/gs8.54/bin"))
       (tlbin (concat TL_DRIVE "/bin/win32"))
       (tlpath (list emacsbin gsbin tlbin))
  (setq exec-path (append exec-path tlpath)))
;;Enable features.
(setq reftex-plug-into-AUCTeX t)
(add-hook 'LaTeX-mode-hook 'LaTeX-math-mode)
;;The following part does not quite work.
(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.
 '(TeX-output-view-style (quote (("^dvi$" ("^landscape$" "^pstricks$\\|^pst-\\|^psfrag$") "%(o?)dvips -t landscape %d -o && gv %f") ("^dvi$" "^pstricks$\\|^pst-\\|^psfrag$" "%(o?)dvips %d -o && gv %f") ("^dvi$" ("^a4\\(?:dutch\\|paper\\|wide\\)\\|sem-a4$" "^landscape$") "%(o?)windvi %dS -paper a4r -s 0 %d") ("^dvi$" "^a4\\(?:dutch\\|paper\\|wide\\)\\|sem-a4$" "%(o?)windvi %dS -paper a4 %d") ("^dvi$" ("^a5\\(?:comb\\|paper\\)$" "^landscape$") "%(o?)windvi %dS -paper a5r -s 0 %d") ("^dvi$" "^a5\\(?:comb\\|paper\\)$" "%(o?)windvi %dS -paper a5 %d") ("^dvi$" "^b5paper$" "%(o?)windvi %dS -paper b5 %d") ("^dvi$" "^letterpaper$" "%(o?)windvi %dS -paper us %d") ("^dvi$" "^legalpaper$" "%(o?)windvi %dS -paper legal %d") ("^dvi$" "^executivepaper$" "%(o?)windvi %dS -paper 7.25x10.5in %d") ("^dvi$" "." "%(o?)windvi %dS %d") ("^pdf$" "." "AcroRd32 %s") ("^html?$" "." "netscape %o"))))

 '(TeX-view-style (quote (("^a4\\(?:dutch\\|paper\\|wide\\)\\|sem-a4$" "%(o?)windvi.exe %dS -paper a4 %d") ("^a5\\(?:comb\\|paper\\)$" "%(o?)windvi.exe %dS -paper a5 %d") ("^b5paper$" "%(o?)windvi.exe %dS -paper b5 %d") ("^letterpaper$" "%(o?)windvi %dS -paper us %d") ("^legalpaper$" "%(o?)windvi %dS -paper legal %d") ("^executivepaper$" "%(o?)windvi %dS -paper 7.25x10.5in %d") ("^landscape$" "%(o?)windvi %dS -paper a4r -s 0 %d") ("." "%(o?)windvi %dS %d"))))
)
;;Loads AUCTeX related files.
;; Load files in `site-start.d' directory. 
(dolist (file (directory-files 
           (concat (file-name-directory load-file-name) "site-start.d") 
           t "\\.el\\'")) 
  (load file nil t t))
----------------------------------------end site-start.el----------------------------------------------------------------

 
---------------------------------
Expecting? Get great news right away with email Auto-Check.
Try the Yahoo! Mail Beta.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/tex-live/attachments/20070329/1f9e2c52/attachment.html 


More information about the tex-live mailing list