How to install font symbols' packages (like ifsym) in teTeX?

It's so easy to generate and set up a new .sty file.

But how can we install a font/symbol package like ifsym ?

Is this a general method ?

  1. create a directory $TEXMF/fonts/sources/public/ifsym
  2. copy all the *.mf *.gen to this directory
  3. create a directory $TEXMF/tex/latex/ifsym
  4. copy all the *sty *.fd to this directory
  5. Add the following lines to the file: $TEXMF/fontname/special.map
    ifsym public ifsym
    ifgeo public ifsym
    ifwea public ifsym
    ifclk public ifsym
  6. update the TeX file database by running texhash or whatever your Tex imprementation provides.
  7. create a document:
    \documentclass{article}
    \usepackage[geometry]{ifsym}
    \begin{document}
    \Circle
    \SquareShadowA
    \end{document}
  8. Run LaTeX, if everything is fine, you should see a dvi that has a big circle and a big square shaded with a simple line at bottom and right of the square.

(See: http://www.tug.org/pipermail/tugindia/2001-August/000056.html)

Category: /computer/tex | Permalink

`listings' conflicts with `CJK'

`listings' (v1.3) conflicts with `CJK' (v4.7.0) in teTeX 3.0.

The solution is to add

\lstset{extendchars=false}

to the preamble of your LaTeX source file.

See: Debian Bug report logs - #348636

Category: /computer/tex | Permalink

teTeX 3.0 的中文配置

以前一直用 CJK 宏包处理中文,基本够用,后来改用更符合中文用户使用习惯 的 CCT 宏包。下面这些内容源于以前配置 tetex-2.0 的步骤,改动后用 于tetex-3.0。现在不用了,放在这里留个纪念。

1. 建立 $TEXMFHOME 目录,拷贝 gbkfonts 二进制文件

$ mkdir ~/texmf
$ cp /your/path/gbkfonts ~/texmf/

2. copy truetype 中文字体

$ mkdir ~/texmf/fonts/truetype/chinese/
$ cp /your/path/sim*.ttf ~/texmf/fonts/truetype/chinese/

常用的有宋体、黑体、楷体。

3. 生成字体

$ cd ~/temxf/
$ ./gbkfonts ~/texmf/fonts/truetype/chinese/simsun.ttf song
$ ./gbkfonts ~/texmf/fonts/truetype/chinese/simhei.ttf hei
$ ./gbkfonts ~/texmf/fonts/truetype/chinese/simkai.ttf kai

4. 调整目录

标准 TeX 目录结构TDS)调整生成的文件:

$ mkdir -p  ~/texmf/fonts/{map/{dvipdfm,dvips,pdftex,ttf2pk},\
> enc/{dvips/chinese,pdftex/chinese}}
$ mv ~/texmf/dvips/cjk.map ~/temxf/fonts/map/dvips/
$ mv ~/texmf/pdftex/config/*.map ~/texmf/fonts/map/pdftex/
$ mv ~/texmf/dvipdfm/config/*.map ~/texmf/fonts/map/dvipdfm/
$ mv ~/texmf/ttf2pk/ttfonts.map ~/texmf/fonts/map/ttf2pk/
$ mv ~/texmf/dvips/chinese/* ~/texmf/fonts/enc/dvips/chinese/
$ mv ~/texmf/pdftex/enc/* ~/texmf/fonts/enc/pdftex/chinese/

5. dvips 的必要配置

$ mkdir ~/texmf/dvips/config/
$ cp /usr/share/texmf-tetex/dvips/config.ps ~/texmf/dvips/config/
$ cat "p +cjk.map" >> ~/texmf/dvips/config/config.ps

6. 刷新 TeX 文件名数据库

$ texhash

Category: /computer/tex | Permalink

Timezone

1. Set "UTC=no" in "/etc/default/rcS".

2. Set as your own location in "/etc/timezone".

3. Load hardware clock to system. ("hwclock -s")

$ man date
$ man hwclock

Category: /computer/debian | Permalink

tabbing environment example

\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

Acroread for Debian

Acroread is the linux branch of the Adobe Acrobat Reader. Anyone can get the tar ball from Adobe. The deb package (current version: 7.08) can be found here. The additional font packages can be downloaded via this page.

Category: /computer/debian | Permalink

Embed video into PDF

%% filename: embed-video.tex
%%
%% 1. Compile TeX source with pdflatex.
%% 2. Put a video file (e.g. sample.avi) in the same directory
%%    with the PDF file.
%% 3. View PDF with Acrobat Reader.

\documentclass{beamer}
\usepackage{multimedia}
\begin{document}

\begin{frame}
\frametitle{frame title}

text

\movie[label=s1,width=160pt,height=120pt,poster]{sample}{sample.avi}
\hyperlinkmovie[start=2s,duration=10s]{s1}{\beamerbutton{show 2--12s}}
\end{frame}

\end{document}

Category: /computer/tex | Permalink

配置 SCIM

环境: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

Abbreviated \today

\newcommand{\abbrtoday}{\ifcase\month\or%
Jan.\or Feb.\or Mar.\or Apr.\or May\or Jun.\or%
Jul.\or Aug.\or Sep.\or Oct.\or Nov.\or Dec.\fi%
\space\number\day, \number\year}

Category: /computer/tex | Permalink

Sharing ADSL internet connection using wireless card

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

Page 2 of 3: 1 2 3