[Home] [Linguistics:] [Fieldwork:] [Databases:] [Linux:] [Debian:] [Windows:] [Miscellaneous]

Windows Howtos

This page mainly shows settings for Emacs and LaTeX on Windows. You can also click here to see settings for Emacs on Linux.

LaTeX
Japanese TeX on Windows (Meadow, pTeX(W32TeX) and Dviout
Setting environmental and system variables for Meadow and pTeX (W32TeX)
Meadow
.emacs file for meadow
Font settings
sharing a diary file between emacs on linux and meadow on Windows under the Japanese language environment on dual-boot machines
pTeX (W32TeX)
Installing pTeX (W32TeX)
Tipa
Dviout
Source special (Dviout and Meadow)
TeX on Windows (Emacs, MiKTeX)
Setting environmental and system variables for Emacs and MikTeX
Emacs
Ispell
MiKTeX
eZula TopText iLookup problem with Yap
Updating pakcages on MikTeX and Yap
Adding texmf directories on MikTeX and Yap
Inverse search on MikTeX and Yap
Backslash key on English Keyboard on Japanese OS
AucTeX
K2Edidor
Unix/Linux related
Cygwin
Utilities
Adding Dock to Windows
Adding 'Copy To', 'Move To' etc to right-click menu
Browser settings
Sharing bookmarks
File encoding matters
Synergy and Zone Alarm

LaTeX

Japanese TeX on Windows -- Meadow, pTeX(W32TeX) and Dviout

I currently use Meadow, pTeX (W32TeX) and Dviout when I use Japanese on LaTeX on Windows

Setting environmental and system variables

Go to Start -> Control Panel -> System -> Detaled Settings tab -> Environmental Variable.
The followings are current settings of Variables and Values on my Windows machine. TEXMFMAIN and TEXMFCNF are not ncessary for Web2C-7.3.7 and later. My current pTeX directory is c:/usr/ which is default of w32tex.msi installer.


environmental and system variables
Variables Values
Emacs MeadowNT
GNUCLIENT -F
GNUDOIT -F
HOME c:\home\meadow
PATH C:\usr\bin;C:\gs\gs8.11\bin;C:\gs\gs8.11\lib;C:\dviout
RUNEMACS C:\meadow\2.10\bin\meadow.exe
TEXEDIT "C:\meadow\2.10\bin\meadow.exe" /i%d %s
TEXMFCNF c:\usr\share\texmf\web2c
TEXMFMAIN c:\usr\share\texmf;c:\texmf;c:\home\texmf


Meadow

Links:

Installation

Getting Netstall packages from the site above is the easiest.

dot emacs
Here is my .emacs file for meadow.

Font settings
Yatex will be autolatically loaded when opening *.tex file with the following settings. It is important that you should choose JIS shift for the kanji code to type set Japanese on Windows.

(setq auto-mode-alist
(cons (cons "\\.tex$" 'yatex-mode) auto-mode-alist))
(autoload 'yatex-mode "yatex" "Yet Another LaTeX mode" t)

;; Kanji code (Linux) 1. JIS shift 2. JIS 3.EUC
(setq YaTeX-kanji-code 1)

;; type-setter
(setq tex-command "c:usr/bin/platex.exe")

;; viewer
;(setq dvi2-command "xdvi -s 4")
;(setq dvi2-command "gs")
(setq dvi2-command "c:/dviout/dviout.exe")

You need to write your private-fontset in your .emacs file:

(create-fontset-from-request "private-fontset"
'((width . 8)
(height . 16)
(fixed . t)
(italic . nil))
'((family . "MS ゴシック")
(family . "Courier New")))


To use your private-fontset as the default settting, you need to add (font . "private-fontset") to setq default-frame-alist in the dot emacs file.

To share a diary file between meadow on Windows and emacs on linux under the Japanese language environment on dual-boot machines, click here.

PTeX (W32TeX)

Links:
Installation
Getting W32TeX installer from the sever above is the easiest way to install pTeX to Windows.

My current pTeX directory is c:/usr/
How to set a path to your texmf directory
Go to /usr/share/texmf/web2c/texmf(=texmf.cnf) and change the file like below. If you have more than one your texmf directory, use ;. :
TEXMFLOCAL = /path-to-your-texmf-directory1;path-to-your-texmf-directory2

Tipa

Installing tipa to W32Tex (pTeX):

Download tipa.zip from citan.org.

cp *.sty /texmf/tex/latex/tipa-sty/

cp *.mf /texmf/fonts/tipa/

mkdir /texmf/fonts/source/fkr/tipa

cp *.mf /texmf/fonts/source/fkr/tipa

Dviout

Links:
Dviout seems to be the only dvi viewer which can display Japanese on Windows.

Source special (Dviout and Meadow)

Add the following lines to .emacs:

(require 'gnuserv)
(gnuserv-start)

If you don't want a new instance to open when doing source special, add this:

(setq gnuserv-frame (selected-frame))

Usages

To do inverse search, double left-click the line which you want to jump to on the dvi screen, the cursor will jump to the line on Meadow.

To do forward search, to jump to the line 335 when type setting, do the followings in the mini-buffer:

dviout -1 foo.dvi "# 335 foo.tex"

If you have a particular word, Hello, on the line 335 to jump to:

dviout -1 foo.dvi "# 335/Hello foo.tex"

TeX on Windows (Emacs, MiKTeX)

Setting environmental and system variables
Go to Start -> Control Panel -> System -> Detaled Settings tab -> Environmental Variable.

environmental and system variables
Variables Values
HOME c:\home\yemacs
PATH C:\localtexmf\miktex\bin;c:\usr\local\emacs\bin;c:\user\local\ghostgum\ghostview\gsview\;c:\usr\local\bin


Emacs Get emacs-21.3-bin-i386.tar.gz from the link above, extract the tarball and put it to your emacs directory (c:/usr/local/ for my settings.).

Here is my .emacs file for emacs21.3 on Windows.

Setting your work directory using ObjectDock
I tried to set a work directory which I always go to when I C-x C-f by putting (cd "~") in my dot emacs file, but it doesn't work.

Right click on the emacs icon on ObejctDock on the screen. From Dock Entry Property open Dock Item Properties (Shortcut) and add the path to your desired directory to arguements. The directory will show up when you start emacs.

Ispell

Links: Go to Start -> Control Panel -> System -> Detaled Settings tab -> System Variable. Add the following paths to the system variable.

System variables
System Variables Values
PATH E:ispell/bin;E:/ispell;%PATH%;
ISPELLDICTDIR E:/ispell/dic

You may need the following if the above system variables are not enough:

DICTDIR c:/usr/local/lib


If using TexW32 (ptex for japanese), you need to copy all the files in ispell/dic to /usr/local/lib, which ptex will look for dictionary files to run ispell.

Execute M-x ispell followed by necessary commands in mini-buffer on emacs.

MiKTeX

Updating pakcages

execute c:texmf\miktex\bin\mo.exe. On the General tab click Refresh Now and Update Now.

Adding *\texmf directories

execute c:texmf\miktex\bin\mo.exe. Go to the Root tab.

Inverse search

Yap native settings

From Yap, go to View -> Options... -> Inverse Search tab. You may find that the Program list on the tab is empty. Add c:\usr\local\emacs-21.3\bin\emacs.exe +%l "%f" to the box Command line (c:\usr\local\emacs-21.3\bin\emacs.exe is the location where your emacs.exe is.). [if you add -q inbetween ~\emacs.exe and +%l, your .emacs file will not be read by the emacs when you do inserver search.]

Gnuserv

Yap native settings always open a new instance when doing inverse search. Gnuserv have an option not to open a new instance (gnuserv for dviout).

eZula TopText iLookup problem with Yap

Yap may show annoying behaviours if you have eZula TopText iLookup on your machine. Instead of using command prompt on Windows, I removed all eZula related items by using console of Linux on my dual-boot machine.

Items to be removed:
c:WINDOWS/system32/iLookup/ezstub22.exe
c:/WINDOWS/system32/*ezula*pf [<- ezula related files (I forget exact name of the file.]
c:/WINDOWS/system32/ezstub.exe
c:/Program Files/eZula [<- This is a directory.]
c:/Documents and Settings/owner/start/startup/TopText iLookup [<- This one is a directory too.]

How to enable backslash key on Australian Keyboard with Japanese Windows System

If your comupeter is on Windows Japanese version and using English keyboard. You may not find backslash keys when you use LaTeX since there is no YEN key on the English Keyboard. In order to use the backlash key on the English keyboard. I use the following settings:

AUCTeX

Links: My dot emacs file (April 2005) for Gnu Emacs, AUCTeX and MikTeX.

HOWTO change colours

K2Edidor

Links: K2Editor is a very simple and nice free editor. I often use it when I edit .emacs files.

Unix/Linux related

SFU

Cygwin

Links:
Go to Start -> Control Panel -> System -> Detaled Settings tab -> System Variable. Add a path to your cygwin directory

SAMPLES: environmental and system variables
System Variables Values
PATH E:/cygwin/bin


Add and modify your .emacs file as shown below:

(setq explicit-shell-file-name "bash.exe")
(setq shell-file-name "sh.exe")
(setq shell-command-switch "-c")
(modify-coding-system-alist 'process ".*sh\\.exe" '(undecided-dos . euc-japan))

The following lines are also neccesary to set up Meadow:

;; argument-editing の設定
(require 'mw32script)
(mw32script-init)
(setq exec-suffix-list '(".exe" ".sh" ".pl"))
(setq shell-file-name-chars "~/A-Za-z0-9_^$!#%&{}@`'.:()-")

In order to check whether cygwin works with Meadow, type M-! which find. If the mini-buffer shows, /usr/bin/find, your installation is successful. If it does not, put the system variable for PATH, E:/cygwin/bin, before all other variables.

Utilities

Adding Dock to Windows Adding 'Copy To', 'Move To' etc to right-click menu

Security

Firewall Anti virus

Browser settings

Sharing bookmarks
// Specify which bookmarks file to use:
user_pref("browser.bookmarks.file", "C:\\Document and Settings\\YOUR DIRECTORY\\Application Data\\Mozilla\\Firefox\\Profiles\\XXXXXXXX.default\\bookmarks.html");
[This line should be in one line.(no line break).]

Vmware player

Newworking

Choose NAT when under ethernet in uni.

File encoding matters

When you try to save tex files using Meadow, you may get messages like:

*******************************
These default coding systems were tried:
shift_jis-dos iso-2022-jp
However, none of them safely encodes the target text.

Select one of the following safe coding systems:
utf-8 raw-text emacs-mule no-conversion

******************************

When you get messages like above, do not save the files with any of utf-8, raw-text, emacs-mule,and no-conversion as shown above! Meadow uses SHIFT-JIS encoding. But your files are very likely to include letters in non-SHIFT-JIS encoding for some reasons. Thus, you need to change the non-SHIPT-JIS letters back into SHIFT-JIS ones. You can fix these problems by using the linux command nkf.

Synergy and Firewalls

Windows Firewall settings

After installing Synergy, your firewalls need settings so your client computer can communicate with your host one. Go to Exceptions tab and add(=open) the following ports. 137 and 138 may not necessary: If your click on Zone Alarm window does not work on a client machine, Do the followings:


TOP