LaTex学习 – 使用中文

我用的是CTEX套件,中文支持都配置好了。

CCT:

\documentclass[CJK]{cctart}
\begin{document}
\kaishu 这是中文楷体字。
\end{document}

CJK*:

\documentclass{article}
\usepackage{CJK}
\begin{document}
\begin{CJK*}{GBK}{kai}
这是中文楷体字。
\end{CJK*}
\end{document}

编译方法和英文文档一样:

> latex chinese
> dvips chinese
> ps2pdf chinese.ps chinese.pdf

搭建NEPL test network —— 内核编译

What is NEMO & NEPL?

  • NEMO - Network Mobility
  • NEPL - NEMO Platform for Linux

OS - Debian GNU/Linux 3.1

Ref:

下载所需的软件包:

# cd /usr/src/
# wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.15.tar.bz2
# wget http://www.mobile-ipv6.org/software/download/nemo-0.2-linux-2.6.15.patch.gz
# wget http://www.mobile-ipv6.org/software/download/nemo-0.2.tar.gz

安装编译内核需要的工具:

# apt-get install kernel-package ncurses-dev fakeroot wget bzip2
# apt-get install module-init-tools initrd-tools procps
# apt-get install autoconf automake1.8 byacc flex libssl-dev indent

解压缩:

# tar jxf linux-2.6.15.tar.bz2
# gunzip nemo-0.2-linux-2.6.15.patch.gz
# tar zxf nemo-0.2.tar.gz

打上Mobile IPv6的patch:

# mv nemo-0.2-linux-2.6.15.patch linux-2.6.15/
# cd linux-2.6.15/
# patch -p1 < nemo-0.2-linux-2.6.15.patch

配置内核参数,加上Mobile IPv6支持:

# make menuconfig

在下列选项前打*号,都在Networking->Networking options下面

  • PF_KEY sockets
    • PF_KEY migration interface (EXPERIMENTAL)
  • The IPv6 protocol
    • IPv6: Privacy Extensions (RFC 3041) support
    • IPv6: AH transformation
    • IPv6: ESP transformation
    • IPv6: IPComp transformation
    • IPv6: IPv6-in-IPv6 tunnel
    • IPv6: advanced router (EXPERIMENTAL)
      • IPv6: policy routing
      • IPv6: source address based routing
    • IPv6: Mobility (EXPERIMENTAL)
      • IPv6: Moblity Debug Message

用NEPL包里带的chkconf_kernel.sh脚本检查内核配置:

# /usr/src/nemo-0.2/chkconf_kernel.sh /usr/src/linux-2.6.15/

Checking kernel configuration...
Using /usr/src/linux-2.6.15/.config
All kernel options are as they should.

如果看不到任何warning,就可以编译内核了。

# make bzImage
# make modules
# make modules_install
# mkinitrd -o /boot/initrd-2.6.15.img 2.6.15

安装新内核:

# cp arch/i386/boot/bzImage /boot/bzImage-2.6.15
# cp System.map /boot/System.map-2.6.15
# ln -s /boot/System.map-2.6.15 /boot/System.map

配置LILO:
image=/boot/bzImage-2.6.15 label=NEPL read-only initrd=/boot/initrd-2.6.15.img

使lilo生效

# lilo -v -v -v

用新的内核boot后,编译nemo:

# uname -a
Linux nepl-demo 2.6.15 #1 Tue Mar 14 15:14:49 CST 2006 i686 GNU/Linux # cd /usr/src/nemo-0.2/
# CPPFLAGS='-isystem /usr/src/linux-2.6.15/include/' ./configure --enable-vt
# make
#make install

可以制作一个内核的deb安装包:

# cd /usr/src/linux-2.6.15
# make-kpkg clean
# fakeroot make-kpkg --revision=nemo.0.2 kernel_image

制作好文件可以在/usr/src下找到 kernel-image-2.6.15_nemo.0.2_i386.deb