Acroread for Debian
Fri Aug 29, 2008
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
Timezone
Fri Aug 29, 2008
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
teTeX 3.0 的中文配置
Fri Aug 29, 2008
以前一直用 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
`listings' conflicts with `CJK'
Fri Aug 29, 2008
`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
Embed video into PDF
Fri Aug 29, 2008
%% 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
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