配置 SCIM
Fri Aug 29, 2008
环境:Debian (3.1, sarge): Xorg (1:7.1.0-11); GNOME (1:2.14.3.5); SCIM (1.4.4-7)。
1. 设置 locale
# dpkg-reconfigure locales
选择 locales,如 en_US.UTF-8, zh_CN.UTF-8, zh_CN.GBK。
2. 安装 SCIM
# apt-get install scim scim-gtk2-immodule scim-modules-socket \
> scim-modules-table scim-pinyin scim-tables-zh
3. 修改 /etc/gtk-2.0/gtk.immodules
- "xim" "X Input Method" "gtk20" "/usr/share/locale" "ko:ja:th:zh"
+ "xim" "X Input Method" "gtk20" "/usr/share/locale" "ko:ja:th:zh:en"
- "scim" "SCIM Input Method" "scim" "/usr/share/locale" ""
+ "scim" "SCIM Input Method" "scim" "/usr/share/locale" "zh:en"
4. 重启 X
中、英文环境下都可以输入中文。
Category: /computer/debian
| Permalink
tabbing environment example
Fri Aug 29, 2008
\begin{tabbing}
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\= \= the longest span \kill
P. O. Box xxxx, Beijing, \>\` Phone: \>\` (xxx) xxx-xxx \\
1000xx P. R. China \>\` Email: \>\` {\tt xxx@xxx.xxx}
\end{tabbing}
Category: /computer/tex
| Permalink
epstopdf 90 rotate: a ghostscript bug
Fri Aug 29, 2008
The epstopdf command coming from your TeX distrubution can convert eps to pdf.
However, due to a bug in GhostScript, the image is rotated by 90 degrees
sometimes. Thus you should use this command to do the conversion. Of course
you want to replace my.eps and my.pdf with the file
name of your images.
egrep -v "^%%Orientation:" my.eps | epstopdf --filter --outfile=my.pdf
Category: /computer/tex
| Permalink
Sharing ADSL internet connection using wireless card
Fri Aug 29, 2008
Requires: ADSL modem (x 1); Wireless card (x 2).
1. Host computer
1.1 Sharing ADSL connection
"Control Panel" - "Network Connections" - your ADSL connection - "Properties" - "Advanced" - "Internet Connection Sharing" - "Allow other network users to connect through this computer's Internet connection" (Check the box)
1.2 Building wireless network
"Control Panel" - "Network Connections" - "Wireless Network Connection" - "Properties"
"General"(Tab) - "This connectin uses the following items:" - "Internet Protocol (TCP/IP)"
IP address: 192.168.0.1
Subnet mask: 255.255.255.0
Default gateway: _._._._ [1]
DNS server addresses: _._._._ [2]
Alternate DNS server: _._._._ [3]
Read more ...
Category: /computer
| Permalink
Generate letter size PostScript from DVI
Fri Aug 29, 2008
After using latex to get an dvi file, you should run these
commands:
dvips -Ppdf -G0 myfile.dvi
ps2pdf myfile.ps
If the generated pdf file has very small top margin, it means
dvips generated A4 size but you expected letter size. Thus you
should use dvips like this:
dvips -t letterSize -Ppdf -G0 myfile
Category: /computer/tex
| Permalink