Cun Zhang’s Blog

August 26, 2008

TexLive Installation via install-tl

Filed under: latex — Tags: , , , , — Cun Zhang @ 20:52

Recently The new version of TexLive has supported net installation.It’s Great!

This is a simple installation tutorial fro TexLive installation under Windows:

1. download install-tl.zip(OR install-tl-unx.tar.gz if you use Unix/Linux).

it is under the directory CTAN/systems/texlive/tlnet/tldev/  of CTAN mirror.

2.use 7-zip unzip this file, and enter that direatory.

3. Run install-tl.bat, and change these packages which you hope to install.Then All’s OK.

What I need to mention is : Default,install-tl.bat will choose a mirror randomly.For me,it is so slow.

To use custom mirror, just need to run

install-tl -location ftp://ftp.tsinghua.edu.cn/mirror/CTAN/systems/texlive/tlnet/tldev

For more information,please run

 install-tl -help

OR visit

http://tug.org/texlive/doc/install-tl.html

So I edit install-tl.pm,change the CTAN mirror to a fast mirror for me.And it is easy, just open it under a text editor,

replace

$TeXLiveURL = $location = TeXLive::TLUtils::give_ctan_mirror();

by

    #$TeXLiveURL = $location = TeXLive::TLUtils::give_ctan_mirror();
$TeXLiveURL = $location =”ftp://ftp.tsinghua.edu.cn/mirror/CTAN/systems/texlive/tlnet/tldev“;

you can change ftp://ftp.tsinghua.edu.cn/mirror/CTAN/ to your favorit CTAN mirror.

That’s ALL!

June 9, 2008

save plot into tex format in Octave

Filed under: Math, latex — Tags: , , — Cun Zhang @ 17:17

The print command in Octave is so useful! It can save plot into so many format, especially tex which can be used into these articles which are written by tex.

Another use for me is to make  program(mfile,which plot so many plots)  automatization become true.

e.g.

for i=0:2

x=[i:0.01:i+2]*pi;

plot(x,sin(x));

file=[num2str(i) '.jpg'];

print(file, ‘-djpeg’ );

end

close

Save these code into a mfile(e.g, a.m) ,then at the console,run the command:

octave a.m

Another way is to run a.m in Octave console.

Is it amazing? If it be useful for you, please tell me :)

May 7, 2008

The New Tex Compiler:XeTeX

Filed under: latex — Tags: — Cun Zhang @ 21:26

XeTeX (pronounced /ˈziːtɛx/) is a TeX typesetting engine using Unicode and supporting modern font technologies such as OpenType or Apple Advanced Typography. It is written and maintained by Jonathan Kew and distributed under the X11 free software license.[1]

Initially developed for Mac OS X only, it is now available for all major platforms. It natively supports Unicode and the input file is assumed to be in UTF-8 encoding by default.

XeTeX has simple font installation and can use any installed fonts in the operating system without configuring TeX font metrics. XeTeX uses AAT when working on Mac OS X using the xdv2pdf driver, or FreeType using dvipdfmx (which is the default on Windows or Linux). As a result, XeTeX can access font features such as alternative glyphs, special ligatures, swashes and variable font weights.

Examples of special alternate glyphs include the long s (ſ), as found in Hoefler Text font, and end-of-word swashes, which are normally inaccessible unless an application enables certain font options.

XeTeX works well with both LaTeX and ConTeXt. Its LaTeX counterpart is invoked as XeLaTeX. It is usually used with the xltxtra package. It is currently bundled with the TeX Live, MacTeX and MiKTeX distributions.

From: http://en.wikipedia.org/wiki/XeTeX

April 24, 2008

SSH login without password

Filed under: latex — Cun Zhang @ 17:16

I have a debian cluster with 10 nodes(from node17 to node 26). And we need to login ether of them wihout password. Here is my configuration.

1. ssh installation

node26#apt-get install ssh

2. Generate a pair of authentication keys.

node26:~# ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in id_ras.
Your public key has been saved in id_ras.pub.
The key fingerprint is:
fd:c9:22:7d:a4:08:4d:04:b1:c2:89:73:4b:93:61:e2 root@node26

3. generate authorized keys

node26:~#cd .ssh

node26:~#cat id_rsa.pub>>authorized_keys

node26:~#scp .ssh/* node17:~/.ssh/

root@node17’s password:

After inputting password, it works. Now I can log in node17 from node26 or in node26 from node17 without password.

Writing a  shell script can easily to copy .ssh to every node.

Now it’s done.

 

January 12, 2008

Wordpress LaTeX test

Filed under: latex — Cun Zhang @ 1:20

f(x)=\int_0^1 e^{-t^2}dt

\sin^2 x+\cos^2 x =1

Older Posts »

Powered by WordPress