Monday, October 11, 2010

Regular Expression to remember


^ matches beginning of line

$ matches end of line
. matches any single character
* matches zero or more occurrences
[...] matches any one of characters in ...
[^...] matches any signle character not in ...

-
Kernighan and Pike, "The UNIX Programming Environment", 1984

How to install ko.tex after installing texlive2010 on Ubuntu 10.04

I finished installing texlive 2010 and imhangul.  Now, it's time to install ko.tex. Referring to http://www.ktug.or.kr/xe/?mid=KTUG_open_board&document_srl=11332, there is a trial kotex collection for texlive 2010. Let's try to install the collection.

$ tlmgr --repository=http://ftp.ktug.or.kr/KTUG/texlive/2010 install collection-kotex

It will take some time. Be patient, get a coffee or whatever you want. After the installation, run texworks "Edit" -> "Preferences" -> "Typesetting" -> "Paths for TeX and related programs"

put the below two lines on top of the paths:
/home/sajang/texlive/2010/bin/i386-linux
/home/sajang/texlive/2010/texmf-dist/tex/latex/kotex

Enjoy TeXing!

10-11-2010

Sunday, October 10, 2010

Return to ibus to type in Hangul

KTUG 게시판에 올렸던 질문

제가 우분투 10.04/texlive2010/kotex/texworks/imhangul을 새로 인스톨하였습니다. 다른 어플리케이션에서는 한글 쓰는 데 문제가 없는 데요. 지금 이 글도 Firefox에서 imhangul로 쓰고 있는 데 전혀 문제가 없습니다. 그런데 어쩐 일 인 지, texworks에서만 한글이 안 써지는 데요. 아예 한글키로 전환이 되지 않습니다. 답변에 미리 감사드립니다.

likesam: 나비를 써보세요.

나비도 똑같은 현상이 있어서 ibus로 바꿨습니다. 별로 마음에 들지는 않지만 texworks에서 제대로 써지네요. 중간에 ibus를 모두 지웠다가 다시 인스톨했었는 데, 그게 도움이 된 건지... 원인을 알아낼 때까지 우선 ibus로 버텨보겠습니다. 감사합니다.

아참! 한 가지, ibus가 예전보다 좀 편해졌습니다. 예전에는 한글 한 자 한 자마다 애로우키를 누르지 않으면 못 알아볼 정도로 깨졌었는 데요. 사실 그것 때문에 nabi나 imhangul을 사용했었거든요. 근데, 새로 인스톨한 ibus는 영/한 변환 시에만 애로우 키를(아예 스페이스 키를 누르는 게 더 편할 것 같습니다.) 눌러주면 됩니다. 예전 ibus 사용할 때 하도 답답한 기억이 있어서 imhangul이나 nabi로 바꾸려고 기를 썼는 데, 이 정도면 그냥 ibus를 써도 괜찮을 것 같습니다.

답변 주신 분께 감사드립니다.

Just in case, how to reinstall ibus:

$sudo apt-get remove ibus
$sudo apt-get install ibus-*

10-11-2010

How to install texlive2010 from .iso image without burning DVD

Download texlive2010.iso image from http://ctan.math.utah.edu/ctan/tex-archive/systems/texlive/Images/

sajang@yang:/mnt$ sudo mkdir texlive2010
sajang@yang:/mnt$ sudo mount -t iso9660 -o ro,loop,noauto ~/Downloads/texlive2010.iso /mnt/texlive2010
sajang@yang:/mnt$ cd texlive2010

Follow the procedure starting from "install-tl --gui" on my post http://sajangyang.blogspot.com/2010/09/ubuntu-1004-and-vanilla-texlive2010.html

Just in case when your GUI installer could not find the perltk, then install perl-tk package as below:

sajang@yang:/mnt/texlive2010$ sudo apt-get install perl-tk

Enjoy TeXing!

10-10-2010

How to install imhangul on Ubuntu 10.04

This post is a little outdated, and I think that ibus is better than imhangul or nabi.
See my post http://sajangyang.blogspot.com/2010/10/return-to-ibus-to-type-in-hangul.html to get how to install ibus (and ibus-hangul). 08-31-2011

================================================

I tried to use ibus that is the default input method from Ubuntu, but, as for me, it's too hard to to write Korean. After that, I tried nabi, and I failed again. I think, as a Korean, Imhangul is a lot easier to install and type in than nabi and ibus.

Anyway, first of all, let's install imhangul using Synaptic Package Manager or

sajang@yang:~$ sudo apt-get install imhangul

After the installation run the below command:

sajang@yang:~$ im-switch -c imhangul

There are 9 candidates which provide IM for /home/sajang/.xinput.d/en_US:

  Selection    Alternative
  -----------------------------------------------
 +    1        default
      2        default-xim
      3        ibus
      4        imhangul
      5        lo-gtk
      6        nabi
      7        none
      8        th-gtk
      9        th-xim
System wide default for en_US (or all_ALL) locale is marked with [+].
Press enter to keep the current selection[*], or type selection number: 4

sajang@yang:~$

Or, you can select the above from "System" -> "Administration" -> "Language Support" ->"Keyboard input method system", and choose "imhangul" there.

Now, restart.

After that, you may want to display the input status on the status bar (launch panel). Put the mouse pointer on the launch panel(status bar), and press the right button, and select "Add to Panel", and select "imhangul status applet"


You may want to change the applet's theme. I have changed the "Mac" style for the theme as above.

Enjoy.
10-10-2010