2008년 11월 5일 수요일

ubuntu (8.04) Wacom 설정하기

HOWTO: Wacom in 8.04 Hardy

Wacom on 8.04 Hardy

These are the steps I took to make my Wacom Bamboo Fun work in Ubuntu 8.04 Hardy. These instructions should work for most Wacom tablets.

0. Make sure you have a couple hours available. This will take a while. Also, print off a copy of this post because you will need to restart your computer a couple of times. If something goes wrong, see the troubleshooting section at the end of this post.

1. Plug in your tablet and open a terminal (Applications > Accessories > Terminal). Enter the commands in the following steps line by line into the terminal, pressing enter after each command. If you are prompted for a password, type your password then press enter.

2.
Code:
lsusb | grep -i wacom
Mine is a "056a:0017". Most models beginning with "056a" should work.

3.
Code:
mkdir wacom
cd wacom
4.
Code:
sudo apt-get update
sudo apt-get install linux-headers-`uname -r` build-essential x11proto-core-dev libxau-dev libxdmcp-dev x11proto-input-dev x11proto-kb-dev xtrans-dev libx11-dev x11proto-xext-dev libxext-dev libxi-dev linux-libc-dev libc6-dev libncurses5-dev xserver-xorg-dev tk-dev tcl-dev -y
5.
Code:
wget http://prdownloads.sourceforge.net/linuxwacom/linuxwacom-0.8.0-3.tar.bz2
tar xjf linuxwacom-0.8.0-3.tar.bz2
cd linuxwacom-0.8.0-3
6.
Code:
sudo ln -s /usr/include/pixman-1/pixman.h /usr/include/pixman.h
sudo ln -s /usr/include/pixman-1/pixman-version.h /usr/include/pixman-version.h
7.
Code:
./configure --enable-wacom
sudo make
sudo make install
8.
Code:
cd ..
cp /etc/X11/xorg.conf .
gksudo gedit /etc/X11/xorg.conf
9. Place the following lines near the beginning of the file. If you have a touchpad, make sure you place these lines before the "Synaptics Touchpad" Section.
Code:
Section "InputDevice"
Driver "wacom"
Identifier "stylus"
Option "Device" "/dev/input/wacom"
Option "Type" "stylus"
# Option "ForceDevice" "ISDV4" # Tablet PC ONLY
Option "USB" "on"
EndSection

Section "InputDevice"
Driver "wacom"
Identifier "eraser"
Option "Device" "/dev/input/wacom"
Option "Type" "eraser"
# Option "ForceDevice" "ISDV4" # Tablet PC ONLY
Option "USB" "on"
EndSection

Section "InputDevice"
Driver "wacom"
Identifier "cursor"
Option "Device" "/dev/input/wacom"
Option "Type" "cursor"
# Option "ForceDevice" "ISDV4" # Tablet PC ONLY
Option "USB" "on"
EndSection

Section "InputDevice"
Driver "wacom"
Identifier "pad"
Option "Device" "/dev/input/wacom"
Option "Type" "pad"
Option "USB" "on"
EndSection
10. Find the section that looks somewhat like this. It will be near the end of the file.
Code:
Section "ServerLayout"
Identifier "Default Layout"
Screen "Default Screen"
Inputdevice "Synaptics Touchpad"
EndSection
11. Add these lines within the section you found in step 10.
Code:
 InputDevice     "stylus" "SendCoreEvents"
InputDevice "cursor" "SendCoreEvents"
InputDevice "eraser" "SendCoreEvents"
InputDevice "pad"
12. Save (Ctrl-S) and quit (Ctrl-Q).

13.
Code:
cp /lib/modules/`uname -r`/kernel/drivers/input/tablet/wacom.ko wacom.ko.`uname -r`
sudo cp linuxwacom-0.8.0-3/src/2.6.24/wacom.ko /lib/modules/`uname -r`/kernel/drivers/input/tablet/wacom.ko
You may get an error on this step. If you do, please write down the error. If your tablet does not work when you finish this HOWTO, please post this error so I (or someone else) can work through it with you.

14.
Code:
sudo depmod -e
15.
Code:
cd linuxwacom-0.8.0-3/prebuilt
sudo ./uninstall
sudo ./install
16.
Code:
wget 'http://git.debian.org/?p=users/ron/wacom-tools.git;a=blob_plain;f=debian/xserver-xorg-input-wacom.udev;hb=master' -O wacom.udev
cp /etc/udev/rules.d/50-xserver-xorg-input-wacom.rules wacom.udev.backup
sudo cp wacom.udev /etc/udev/rules.d/50-xserver-xorg-input-wacom.rules
17.
Code:
sudo apt-get remove wacom-tools xserver-xorg-input-wacom -y
sudo apt-get install wacom-tools xserver-xorg-input-wacom -y
18.
Code:
sudo ./uninstall
cd ..
sudo make install
19. Reboot your computer.

20. At this point, my tablet began working. If yours still is not, please post in this thread if you need help. Be sure to include any errors you received from the terminal. Also, include the ouput of the following two commands as an attachment (text file):
Code:
cat /etc/X11/xorg.conf
ls -l /dev/input

Troubleshooting

1.
Problem: X.org does not start after restarting your computer the first time.
Solution:
1. Restart your computer. You can do this either by pressing your power button or by pressing Ctrl-Alt-Delete.
2. When you see "GRUB Loading... Please Wait" on your screen, press the Escape key.
3. Scroll down to the "Recovery mode" entry with the arrow keys and press Enter. It is usually the second one.
4. Once the messages stop scrolling on the screen, enter the following commands. Press enter after each line. Remember to replace "USERNAME" with your actual username. If you do not remember your username, see the troubleshooting #2 entry.
Code:
cp /etc/X11/xorg.conf /etc/X11/xorg.conf.wacom_modified
cp /home/USERNAME/wacom/xorg.conf /etc/X11/xorg.conf
reboot
2.
Problem: You do not remember your username.
Solution: Run the following command. It will output a list of users. You will probably be able to recognize your username from this list.
Code:
cat /etc/passwd | grep "/home" | cut -d: -f1
3.
Problem: It didn't work.
Solution: Read though the posts in this topic. If you do not find a solution that applies to you, post a new reply asking for help.


출처: http://ubuntuforums.org/showthread.php?t=765915

2008년 10월 29일 수요일

우분투 grub 복구

1. 우분투 시디로 부팅을 한다.

2. 제일 위의 start or install... 로 가면 그래픽환경으로 터미널을 실행할 수 있다.

3. 터미널을 실행한뒤 sudo -i 로 관리자권한을 얻는다.

4. mkdir /mnt/linux -- 디렉토리를 만든다.

5. mount /dev/sda? /mnt/linux -- 위에서 만든 디렉토리로 리눅스가 설치된 파티션을 마운트 하는 것이다. 여기서 ?는 파티션번호인데 이것을 알기 위해서 "시스템 - 관리 - 디스크 - 파티션맵 " 에서 알 수 있다.

6. grub 이라고 명령을 준다.
그러면 grub> 이라는 프롬프트가 뜬다.

7. grub>find /boot/grub/stage1 이라고 하면
(hd0,4) 이런식으로 뜬다. 파티션 설정에 따라서 다를수 있다.

8. grub>root (hd0,4)
9. grub>setup (hd0)
10. grub>quit
11. grub>reboot

마지막 reboot 명령으로 자동으로 재시작하게 된다.

출처: http://greenground.blogspot.com/2007/04/grub.html

2008년 10월 28일 화요일

키보드 키값 알아내기

우분투에서 다음을 설치하고 실행하면 원하는 키 값을 알 수 있다.

$ sudo aptitude install xkeycaps
$ xkeycaps

2008년 10월 26일 일요일

Ubuntu 에서 HHK 키 리매핑

살짝 시도하다 시간이 없어 잠시 보류..
최종 목적은 HHK에서 놀고있는 두 개의 키를 다른 키로 매핑시키는 것.
Windows에서는 윈도키와 메타키를 매핑시켰는데, 우분투에서는 메타키가 과연 어떤 역할을 하는지 모르겠음.. 역할이 있긴 있나...-_-
앞선 글 http://manamisc.blogspot.com/2008/08/hhk-pro2-xpvista.html 의 연속 글 정도 될 듯.
하여간 왼쪽 fn키는 윈도키로 매핑하면 되고.... 오른쪽은 생각을 좀 해봐야 할 듯...

일단... 우분투에서 키값 알아내기.

터미널에서 다음 실행.
$ xev

실행하고 키를 누르면 아래와 같이 값이 나옴.

KeyRelease event, serial 31, synthetic NO, window 0x3c00001,
root 0x58, subw 0x0, time 19931452, (848,257), root:(855,309),
state 0x50, keycode 115 (keysym 0xffeb, Super_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False

이키의 값은 115임.

알아낸 키 값들

  • 윈도키 (노트북) : 115
  • 메타 (노트북) : 227
  • 왼쪽 Alt (HHK): 131
  • 오는쪽 Alt (HHK): 129
※ HHK 키에서 Alt는 설정변경에 따라 값이 바뀌는지 아닌지 확인해보지 않았음. 단지 각인된 상태를 의미함.


.
.
.

여기까지..
나중에 시간이 나면 완성해야겠다.

출처:

http://kldp.org/node/81986

http://blog.naver.com/euijin0602/10008919811

emacs 22에서 세벌식 최종 한글 입력 방식 설정

아래에서 파일 받음.

wget http://paero3.myzip.co.kr/applications/leim_sebeol_final.tar.bz2

압축파일에 있는 readme2003_0124.txt의 내용.

이 파일들은 이맥스 세벌식 최종 leim 패키지 (드보락 포함) 입니다.
임 채훈님이 emacs-kr 게시판에 올린 것을 exsider님께서 고친 것입니다.

마지막으로 세벌식 최종의 큰 따옴표를 바로 잡았습니다.
(쿼티 기준) &자리 "를 “로, *자리 "를 ”로 고침
참고로 세벌식 최종의 큰 따옴표는 “(열림), ”(닫힘), "(인치)입니다.
참고 : 세벌식 사랑 모임 http://www.sebeol.org/

--- 아래는 exsider님의 글입니다. (약간 고침)

※ 특징

- 겹모음 : ㅢ -> ie 로도 입력가능
ㅘ,ㅝ, ㅚ, ㅟ, ㅙ, ㅞ -> z, 9 대신에 k,x 로도 입력가능
- 겹받침 : 자음 두개를 눌러 입력가능
ㄲ, ㅆ, ㄵ, ㄺ, ㄶ, ㄼ, ㄻ, ㅀ
- 특수기호 입력가능 (※ , · , “ , ”)
- 파일명과 input-method 명 변경
(기존의 세벌식 390 파일을 덮어쓰지 않고 사용가능)

※ 파일 구성

- hangul3f.el hangul3f.elc :
쿼티 자판용 세벌식 최종 파일입니다.

- hangul3fd.el hangul3fd.elc :
드보락 자판용 세벌식 최종 파일입니다.

- leim-list.el :
원래 있던 것에 위의 파일들과 input-method 를 추가했습니다.

- readme.txt :
이 파일입니다.

※ 사용법

leim-list.el 을 이맥스 설치 경로 (보통 /usr/share/emacs 나
/usr/local/share/emacs/(버전/) 정도가 될 것입니다.) 내의 leim 디렉토리에
복사합니다. (원래 있던 파일은 백업해두세요.)

hangul3f.el , hangul3f.elc , hangul3fd.el , hangul3fd.elc
를 설치 경로 안의 leim/quail/ 디렉토리에 복사합니다.

자신의 .emacs 파일 앞부분에 다음과 비슷한 부분을 찾습니다.
---> 없으면 <이맥스>의 메뉴 Options / Save Options를 해서 만듭니다.

(custom-set-variables
'(default-input-method "korean-hangul3")
'(default-korean-keyboard "3" t)

아래처럼 바꾸고 저장합니다. (쓰는 영문 배열에 따라)
-- 쿼티 자판 --
(custom-set-variables
'(default-input-method "korean-hangul3f")
'(default-korean-keyboard "3f" t)

-- 드보락 자판 --
(custom-set-variables
'(default-input-method "korean-hangul3fd")
'(default-korean-keyboard "3fd" t)

XEmacs 의 경우에는 elc 파일은 삭제한 후 el 파일을 XEmacs 에서
다시 바이트 컴파일해서 사용하면 될 겁니다.(제가 XEmars 를 쓰지
않아서 확인은 못해봤습니다.)

혹시 잘못된 부분이 있으면 메일보내주세요.
exsider@shinbiro.com

출처:
http://wiki.kldp.org/wiki.php/EmacsHangulConfiguration
http://paero3.myzip.co.kr/use_sebeol_keyboard/linux_emacs/xwindow_emacs.htm

리눅스(우분투)에서 굴림 글꼴(고정폭 포함) 설정하기



리눅스(우분투)에서는 글꼴이 기본적으로 'Sans', 'Sans Bold' 그리고 'Monospace'로 설정되어 있습니다.
이 글꼴들은 실제로 존재하지 않지만 '은바탕' 글꼴로 연결되어 있습니다. 어떤 분들은 안티앨리어스되고 오토힌팅된 이런 글꼴들을 미려하다고 하시는 분들도 있지만, 저의 경우 글씨가 안개가 낀 것처럼 뿌옇게 보여서 보기에 불편합니다.

이런 문제를 해결하기 위하여 윈도우에 있는 gulim.ttc나 batang.ttc를 복사해서 쓰는 방법도 있지만 저작권에 따라 문제가 생길 수 있습니다.

다행히 네이버에서 공개한 '네이버사전' 글꼴은 윈도우의 굴림 글꼴과 거의 똑같습니다. 물론 자유롭게 사용할 수 있구요. 단점은 패키지 저장소에 없어서 별도로 설치해야 하고, 윈도우 굴림체처럼 고정폭을 지원하지 않는다는 것입니다.

저처럼 프로그램을 업으로 하는 사람들은 고정폭 글꼴을 좋아하는 사람들이 많습니다. 들여 쓰기(Indentation) 때문입니다. 하지만 고정폭을 지원하면서 비트맵을 내장하였으며 자유롭게 사용할 수 있는 한글 글꼴을 도저히 찾을 수가 없습니다.

이 문제를 "네이버사전" 글꼴과 "Lucida Sans Typewriter" 영문 글꼴을 혼합하여 해결하였으며, 이 글을 쓴 목적이 여기에 있습니다.

1. 글꼴 설치하기

1.1 네이버사전체 설치
- 네이버 사전체를 내려받습니다.
$ wget http://cndic.naver.com/font.nhn?menu=downloadt
위 명령어가 제대로 되지 않는 경우 다음 페이지에서 직접 받습니다.
http://cndic.naver.com/font.nhn

- 네이버 사전체 추가
$ tar xvfz naverdic.tgz
$ sudo mkdir /usr/share/fonts/truetype/naver
$ sudo mv naverdic.ttf /usr/share/fonts/truetype/naver
$ sudo fc-cache -v

1.2 Lucida 글꼴 설치
- Lucida 글꼴은 고정폭 글꼴을 포함하고 있습니다. 이 글꼴은 안티앨리어스를 껐을 때, 깔끔하게 보입니다. 이 글꼴은 자바 패키지에 포함되어 있습니다.
$ sudo apt-get install sun-java6-fonts

2. 글꼴 설정하기

2.1 글꼴 설정 설명
- $ man fonts.conf로 설명을 읽어보면, 핵심 폰트 설정 파일은 /etc/fonts/fonts.conf입니다. /etc/fonts/fonts.conf를 읽고 /etc/fonts/conf.d를 읽고 /etc/fonts/local.conf, ~/.fonts.conf를 읽는 구조로 되어있는 것 같습니다.
- /etc/fonts/fonts.conf는 패키지 업데이트 시에 대체되므로 이곳을 건드리는 것은 적절치 못합니다. 따라서 시스템 전역에 설정이 적용되게 하려면 /etc/fonts/local.conf를, 사용자 영역에 국한되게 하려면 ~/.fonts.conf를 작성하면 됩니다.

2.2 사용자 글꼴 설정

- /etc/fonts/local.conf나 ~/.fonts.conf를 아래와 같이 작성합니다.

원문 참조
http://kldp.org/node/92122











sans


sans-serif







serif


UnBatang
은바탕





sans-serif


naverdic
네이버사전







Monospace


Lucida Sans Typewriter
Andale Mono







Lucida Sans Typewriter


naverdic
네이버사전








방울
반달
Un


true


true


hintmedium







Andale Mono
Lucida Sans Typewriter


11


16


false


false


hintmedium




2.3 사용자 설정 적용
- 위에서 설정한 사항을 적용하기 위하여 X를 재시작합니다. 이게 뭔 말인지 모르시면 재부팅합니다.

3. 설정 완료
- 위 설정 파일과 Ubuntu 8.04 (Hardy Heron) 의 Gnome에서 설정 완료된 화면을 첨부합니다.
- 네이버사전체가 배포판에 기본으로 설치되어 있거나, 자유롭게 쓸 수 있고 고정폭을 지원하면서 비트맵을 내장한 한글 글꼴이 출현하기를 기대해 봅니다.

※ 참고 :
1. http://www.misari.codns.com/bbs/tb.php/linux/36
2. http://kldp.org/node/85853

2008년 10월 25일 토요일

ubuntu (8.04)/ windows samba 설정

파일을 공유하려는 서버에서 아래와 같이 삼바 패키지를 설치한다.
sudo apt-get install samba smbfs

이 공유에 접근할 아이디와 비밀번호를 설정한다.
sudo smbpasswd -a 아이디

접근 아이디를 지울 때는 다음과 같이 한다.
sudo smbpasswd -x system_username

삼바 서버를 설정하기 위해 문서 편집기로 설정파일을 연다.
sudo vim /etc/samba/smb.conf

* smb.conf 예

#======================= Global Settings =======================

[global]

## Browsing/Identification ###

# Change this to the workgroup/NT-domain name your Samba server will part of
workgroup = workgrp <= 윈도의 작업그룹과 같게 설정

# server string is the equivalent of the NT Description field
server string = %h server (Samba, Ubuntu) <= default

# This will prevent nmbd to search for NetBIOS names through DNS.
dns proxy = no <= default

# What naming service and in what order should we use to resolve host names
# to IP addresses
; name resolve order = lmhosts host wins bcast

#### Networking ####

# The specific set of interfaces / networks to bind to
# This can be either the interface name or an IP address/netmask;
# interface names are normally preferred
; interfaces = 127.0.0.0/8 eth0

#### Debugging/Accounting ####

# This tells Samba to use a separate log file for each machine
# that connects
log file = /var/log/samba/log.%m

# Cap the size of the individual log files (in KiB).
max log size = 1000

# If you want Samba to only log through syslog then set the following
# parameter to 'yes'.
; syslog only = no

# We want Samba to log a minimum amount of information to syslog. Everything
# should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log
# through syslog you should set the following parameter to something higher.
syslog = 0

# Do something sensible when Samba crashes: mail the admin a backtrace
panic action = /usr/share/samba/panic-action %d


####### Authentication #######

# "security = user" is always a good idea. This will require a Unix account
# in this server for every user accessing the server. See
# /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/ServerType.html
# in the samba-doc package for details.
; security = user

# You may wish to use password encryption. See the section on
# 'encrypt passwords' in the smb.conf(5) manpage before enabling.
encrypt passwords = true

# If you are using encrypted passwords, Samba will need to know what
# password database type you are using.
passdb backend = tdbsam

obey pam restrictions = yes

; guest account = nobody
invalid users = root

# This boolean parameter controls whether Samba attempts to sync the Unix
# password with the SMB password when the encrypted SMB password in the
# passdb is changed.
unix password sync = yes

# For Unix password sync to work on a Debian GNU/Linux system, the following
# parameters must be set (thanks to Ian Kahan < for
# sending the correct chat script for the passwd program in Debian Sarge).
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .

# This boolean controls whether PAM will be used for password changes
# when requested by an SMB client instead of the program listed in
# 'passwd program'. The default is 'no'.
pam password change = yes

# This option controls how nsuccessful authentication attempts are mapped
# to anonymous connections
map to guest = bad user

########## Domains ###########

# Is this machine able to authenticate users. Both PDC and BDC
# must have this setting enabled. If you are the BDC you must
# change the 'domain master' setting to no
#
; domain logons = yes
#
# The following setting only takes effect if 'domain logons' is set
# It specifies the location of the user's profile directory
# from the client point of view)
# The following required a [profiles] share to be setup on the
# samba server (see below)
; logon path = \\%N\profiles\%U
# Another common choice is storing the profile in the user's home directory
; logon path = \\%N\%U\profile

# The following setting only takes effect if 'domain logons' is set
# It specifies the location of a user's home directory (from the client
# point of view)
; logon drive = H:
; logon home = \\%N\%U

# The following setting only takes effect if 'domain logons' is set
# It specifies the script to run during logon. The script must be stored
# in the [netlogon] share
# NOTE: Must be store in 'DOS' file format convention
; logon script = logon.cmd

# This allows Unix users to be created on the domain controller via the SAMR
# RPC pipe. The example command creates a user account with a disabled Unix
# password; please adapt to your needs
; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u

########## Printing ##########

# If you want to automatically load your printer list rather
# than setting them up individually then you'll need this
; load printers = yes

# lpr(ng) printing. You may wish to override the location of the
# printcap file
; printing = bsd
; printcap name = /etc/printcap

# CUPS printing. See also the cupsaddsmb(8) manpage in the
# cupsys-client package.
; printing = cups
; printcap name = cups

############ Misc ############

# Using the following line enables you to customise your configuration
# on a per machine basis. The %m gets replaced with the netbios name
# of the machine that is connecting
; include = /home/samba/etc/smb.conf.%m

# Most people will find that this option gives better performance.
# See smb.conf(5) and /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/speed.html
# for details
# You may want to add the following on a Linux system:
# SO_RCVBUF=8192 SO_SNDBUF=8192
socket options = TCP_NODELAY

# The following parameter is useful only if you have the linpopup package
# installed. The samba maintainer and the linpopup maintainer are
# working to ease installation and configuration of linpopup and samba.
; message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' &

# Domain Master specifies Samba to be the Domain Master Browser. If this
# machine will be configured as a BDC (a secondary logon server), you
# must set this to 'no'; otherwise, the default behavior is recommended.
; domain master = auto

# Some defaults for winbind (make sure you're not using the ranges
# for something else.)
; idmap uid = 10000-20000
; idmap gid = 10000-20000
; template shell = /bin/bash

# The following was the default behaviour in sarge,
# but samba upstream reverted the default because it might induce
# performance issues in large organizations.
# See Debian bug #368251 for some of the consequences of *not*
# having this setting and smb.conf(5) for details.
; winbind enum groups = yes
; winbind enum users = yes

# Setup usershare options to enable non-root users to share folders
# with the net usershare command.

# Maximum number of usershare. 0 (default) means that usershare is disabled.
; usershare max shares = 100

# Allow users who've been granted usershare privileges to create
# public shares, not just authenticated ones
usershare allow guests = yes

#======================= Share Definitions =======================

# Un-comment the following (and tweak the other settings below to suit)
# to enable the default home directory shares. This will share each
# user's home directory as \\server\username
;[homes]
; comment = Home Directories
; browseable = no

# By default, the home directories are exported read-only. Change the
# next parameter to 'no' if you want to be able to write to them.
; read only = yes

# File creation mask is set to 0700 for security reasons. If you want to
# create files with group=rw permissions, set next parameter to 0775.
; create mask = 0700

# Directory creation mask is set to 0700 for security reasons. If you want to
# create dirs. with group=rw permissions, set next parameter to 0775.
; directory mask = 0700

# By default, \\server\username shares can be connected to by anyone
# with access to the samba server. Un-comment the following parameter
# to make sure that only "username" can connect to \\server\username
# This might need tweaking when using external authentication schemes
; valid users = %S

# Un-comment the following and create the netlogon directory for Domain Logons
# (you need to configure Samba to act as a domain controller too.)
;[netlogon]
; comment = Network Logon Service
; path = /home/samba/netlogon
; guest ok = yes
; read only = yes
; share modes = no

# Un-comment the following and create the profiles directory to store
# users profiles (see the "logon path" option above)
# (you need to configure Samba to act as a domain controller too.)
# The path below should be writable by all users so that their
# profile directory may be created the first time they log on
;[profiles]
; comment = Users profiles
; path = /home/samba/profiles
; guest ok = no
; browseable = no
; create mask = 0600
; directory mask = 0700

[printers]
comment = All Printers
browseable = no
path = /var/spool/samba
printable = yes
guest ok = no
read only = yes
create mask = 0700

# Windows clients look for this share name as a source of downloadable
# printer drivers
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
browseable = yes
read only = yes
guest ok = no
# Uncomment to allow remote administration of Windows print drivers.
# Replace 'ntadmin' with the name of the group your admin users are
# members of.
; write list = root, @ntadmin

# A sample share for sharing your CD-ROM with others.
;[cdrom]
; comment = Samba server's CD-ROM
; read only = yes
; locking = no
; path = /cdrom
; guest ok = yes

# The next two parameters show how to auto-mount a CD-ROM when the
# cdrom share is accesed. For this to work /etc/fstab must contain
# an entry like this:
#
# /dev/scd0 /cdrom iso9660 defaults,noauto,ro,user 0 0
#
# The CD-ROM gets unmounted automatically after the connection to the
#
# If you don't want to use auto-mounting/unmounting make sure the CD
# is mounted on /cdrom
#
; preexec = /bin/mount /cdrom
; postexec = /bin/umount /cdrom

# 접근을 허락할 아이피 범위
hosts allow = ***.***.
#
문자 인코딩 설정, 우분투는 utf-8을 기본적으로 사용하고
# 이것이 윈도우즈에서도 한글이 잘 깨지지 않는다.
unix charset=utf-8
dos charset=utf-8

#공유할 디렉토리 이름, 이것은 여러개를 만들 수도 있다.
[MyDoc]
comment = My Documents
path = /***/***/MyShares <= 미리 공유할 폴더 생성

#읽기/쓰기로 접근
read only = no
browsable = yes
writable = yes

Samba로 공유하기


1. ubuntu 설정
samba 서버 다시 시작

sudo testparm
sudo /etc/init.d/samba restart

우분투에서 패키지로 설치된 삼바는 컴퓨터가 켜질 때마다 실행될 것이다.

공유폴더 마운트

mount -t cifs //삼바서버아이피/삼바공유폴더이름 /공유가/지정될/로컬폴더 -o username=네트워크사용자아이디,password=비밀번호,iocharset=utf8,file_mode=0777,dir_mode=0777
-o 이후로는 띄어쓰기를 해서는 안된다.

2. windows 접근

ubuntu에서 마운트만 제대로 했다면 탐색기에 \\삼바서버아이피 를 입력하면 공유폴더가 보이고 로긴하면 접근가능!!!



※ 인용
************************************************
whoami

2007년 10월 4일 목요일
ubuntu에서 samba로 파일 공유하기

ubuntu에서 samba로 파일 공유하기

집필자 shinmoosung (2007-06-12 14:01)

우분투에서 samba를 이용해서 파일공유 사용하기
****************************************************

2008년 10월 15일 수요일

[AUCTeX] ESS (Sweave) and AucTeX "integration"

Tue, 19 Jun 2007 16:52:22 -0700

Kiermeier, Andreas \(PIRSA - SARDI\)
Dear all,

I posted this message to the ESS mailing list yesterday and received a
suggestion that this may also be of interest to members of this list (so
apologies for cross-posting).

Being a lisp neophyte I suspect that there are improvements which could
be made. In particular, I would be interested in improving the "compile
cycle" (e.g. Sweave -> Latex ->Bibtex -> Latex -> View). I read that
AucTeX tries to guess the next command, which has always worked well for
me, except for here (its different to what AucTeX is used to).

Any suggestions would be greatly welcome.

Cheers,

Andreas


-----Original Message-----
From: [EMAIL PROTECTED]
[EMAIL PROTECTED] On Behalf Of
Kiermeier,Andreas (PIRSA - SARDI)
Sent: Tuesday, 19 June 2007 11:06
To: [EMAIL PROTECTED]
Subject: [ESS] ESS (Sweave) and AucTeX integration

Hi folks,

David Whiting has previously published a set of functions which a very
useful for sweaving and consequent latex-ing. The only thing that has
not satisfied me (which is not a reflection on David's efforts) is that
they are somewhat separate from AucTeX (some hard-coding is involved).

I've played around with AucTeX and ESS a bit today and am happy to
report that I have come up with an alternative approach, which may be
useful for some of you. The only piece of code required in your .emacs
file is the following.


(add-to-list 'auto-mode-alist '("\\.Rnw\\'" . Rnw-mode))
(add-to-list 'auto-mode-alist '("\\.Snw\\'" . Snw-mode))

;; Linking ESS with AucTex
(add-hook 'Rnw-mode-hook
(lambda ()
(add-to-list 'TeX-command-list
'("Sweave" "R CMD Sweave %s"
TeX-run-command nil t :help "Run Sweave") t)
(add-to-list 'TeX-command-list
'("LatexSweave" "%l \"%(mode)\\input{%s}\""
TeX-run-TeX nil t :help "Run Latex after
Sweave") t)
(setq TeX-command-default "Sweave")))



The first two lines may already be in your .emacs file. Since Snw-mode
is a synonym (at least for now) to Rnw-mode we only need to modify the
Rnw-mode-hook.

The code above adds two new commands to "Command" menu when you visit a
.Rnw (or .Snw) file. These new commands are
* Sweave: Sweave the current file and produce a .tex file (the new
default for .Rnw files)
* LatexSweave: Run "latex" or "pdflatex" on the .tex file

Both of these commands can also be invoked when pressing C-c C-c inside
a documentation chunk in the .Rnw file - this is similar to the way you
would process a .tex file.

Note: Sweaving is done by invoking the Sweave.sh script inside the \bin
folder of your R installation (comes with R).

Note: latex or pdflatex is invoked based on whether "PDF Mode" is
enable" (see "TeX Options" under the "Commands" menu).

Note: Once the .tex file has been successfully and fully processed (you
may need to run bibtex and latex several times - in the usual way), a
further press of C-c C-c will prompt you for "View" which will give you
the default viewer (pdf or dvi) - all in the usual AucTeX compile cycle.

I have only tried this under the following configuration:
* Windows XP (SP2)
* GNU Emacs 22.1.1 (i386-mingw-nt5.1.2600) of 2007-06-02 on RELEASE
* AucTeX 11.83
* ESS 5.3.4

Any comments are welcome.

Cheers,

Andreas

_____________________________
Dr Andreas Kiermeier
Senior Statistician
Food Innovation & Safety
South Australian Research & Development Institute
33 Flemington Street, Glenside, SA, 5065

Ph: +61 8 8207 7884
Fax: +61 8 8207 7854
Web: http://www.sardi.sa.gov.au/
_____________________________
If you would like to correspond with me in a secure way, using public
key encryption, please contact me directly for details of my GPG public
key or visit the SARDI website, where you can download my public key
from my personal staff page.

The information in this e-mail and attachments (if any) may be
confidential and/or legally privileged. If you are not the intended
recipient, any disclosure, copying, distribution or action taken is
prohibited. SARDI, The South Australian Research and Development
Institute, is the research division of Primary Industries and Resources
(SA)

______________________________________________
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/ess-help


_______________________________________________
auctex mailing list
auctex@gnu.org
http://lists.gnu.org/mailman/listinfo/auctex

2008년 10월 9일 목요일

== # 일반적인 링크 ==

* 제가 학교에서는 불가피하게 MS를 사용하기 때문에 맥은 젬병입니다. 맥 유저 분들이라면 근자에 [http://www.oreillynet.com/pub/au/1251 Kevin O'Malley]가 연재한, [http://www.macdevcenter.com/pub/a/mac/2004/02/03/latex.html LaTeX: It's Not Just for Academia, Part I]와 [http://www.macdevcenter.com/pub/a/mac/2004/03/05/latex.html LaTeX: It's Not Just for Academia, Part II]를 참고하세요.
* [http://omega.enstb.org/ The Omega Typesetting and Document Processing System]
* [http://www.physicsforums.com/showthread.php?t=8997 Introducing LaTeX Math Typesetting]

=== # 단체 ===

|| 한글 텍 사용자 그룹 ||

|| [http://project.ktug.or.kr/hlatex/ HLaTex (한글라텍)] || [http://project.ktug.or.kr/hlatex/hlguide.pdf 한글라텍 길잡이] ||
|| || TeX User Group ||
|| http://www.latex-community.org/ || LaTex Community ||
|| http://www.latex-project.org/ || LaTex Project 홈페이지 : LaTeX3 Project 가 있습니다. ||
|| http://www.ctan.org || Comprehensive TeX Archive Network ||
|| || A (La)TeX Encyclopaedia ||
|| || 독일 아해들의 텍 사용자 모임(?) ||

|| [http://www.miktex.org/ MikTex Project] || Win용 Tex. 윈 상에서 LaTex2e을 완전하게 구현하고 있다...고 믿고 있습니다만... ||
|| [http://project.ktug.or.kr/miktex-ktug/ MikTeX-KTUG] || 한글 사용자들을 위해 MiKTeX 을 수정 및 보완하는 MiKTeX-KTUG 프로젝트 홈페이지. 조진환님 만세~! ||
|| http://knot.kaist.ac.kr/htex/ || 한글 TeX 인터넷 홈페이지 ||
|| http://faq.ktug.or.kr/mywiki/HLaTeX || 은광희님이 만든 한글TeX macro : HLaTeX은 hangul.sty라는 스타일 매크로를 중심으로 폰트와 부수 파일로 이루어진 한글 처리 시스템 ||
|| [http://www.fptex.org/ fpTex] || teTex을 윈에서 사용할 수 있도록 구현한 것이라고만 알고 있을 뿐...저는 미키텍 사용자라서리 :-) 일단은 [http://www.fptex.org/fptex-package.html 관련 팩키지]들을 둘러 보시고 선택하심이... ||
|| [http://www.tug.org/teTeX/ teTex] || 리눅서들이 가장 많이 사용하고 있는 teTex의 공식 홈피입니다. 참고로 [http://pluto.phys.northwestern.edu/teTeX/index.html Collection of teTex Manual]에 가시면 매뉴얼들을 보실 수가 있습니다. ||
|| [http://www.ams.org/tex/ AMS Tex Resources] || AMS의 텍 싸이트입니다. AMS-LaTex를 받을 수 있습니다. ||
|| [http://www.pctex.com/ PCTex] || 제 정신이라면 절대 구매하지 않겠습니다만, 연구비로 산다면야... ||
|| [http://publish.aps.org/revtex4/ REVTeX] || [http://www.aps.org/ APS], [http://www.aip.org/ AIP], [http://www.osa.org/ OSA] 등 물리학 관련 주요 저널 에서 사용하는 [http://publish.aps.org/revtex4/ REVTeX] 의 페이지 입니다. ||

=== # 개인 ===

|| http://www-cs-faculty.stanford.edu/~knuth/ || 그 유명하신 高德納 先生의 집입니다. 몇 개 되지는 않지만 고덕납 선생께서 직접 하시는[http://scpd.stanford.edu/scpd/students/Dam_ui/pages/ArchivedVideoList56K.asp?Include=knuthOther 텍 강의]도 들어 보실 수 있습니다. 다른 강의에 관해서는 [http://scpd.stanford.edu/knuth/ Don Knuth: Musings and More]를 참조하세요. ||
|| http://www.doeun.pe.kr/ || '''사회과학도를 위한 LaTeX/PDF'''로 유명한, 도은이네 집이랍니다.||
|| http://makingtexwork.sourceforge.net/mtw/ || 노만 월쉬의 '''Making TeX Work''' 최신(?) 버전을 웹으로 볼 수 있습니다. ||
|| http://math.postech.ac.kr/~kz/miktex/install.htm || 김택근 님의 '''PC에 TEX환경꾸미기'''입니다. 윈에서는 처음에 뭘 어떻게 설치해야 하고 또 뭐가 필요한지 몰라서 해멜 때, 가장 실질적인 도움이 되어 준 싸이트입니다. [http://math.postech.ac.kr/~kz/latexcad/latexcad.htm LaTexCAD 사용하기]도 있는데, 내부적으로는 링크가 되어 있지 않더군요. 아무튼, 상당히 친절하고 자세하게 차근차근 설명해 주시는 스타일이, 과외 선생님으로는 아마 연중 상종가를 기록하시는 분이 아닐까 합니다 :-) ||
|| http://my.dreamwiz.com/konghoon/ || 이공훈 님의 '''메타 포스트 활용 강좌'''입니다. 윈에서의 [http://my.dreamwiz.com/konghoon/latex_tip/index.html LaTex의 활용] 역시 아주 상세하게 설명해 주고 계십니다만, 아무래도 메타 포스트처럼 흔히 찾아 보기 힘든 내용이 더 구미가 땡기는 법이지요. ||
|| http://bukak.seokyeong.ac.kr/~nomos/index.html || 김도현님의 홈페이지입니다. 법학과 교수님이신데 LaTex 이야기 보다는 그 페이지에 있는 다른 이야기들이 더 흥미롭더군요. --[[Xanadu]] ||
|| http://free.kaist.ac.kr/ChoF/ || ChoF's TeX Archive ||
|| http://www.sci.usq.edu.au/staff/robertsa/LaTeX/latexintro.html || Tony Roberts의 from quick and dirty to style and finesse ||
|| http://www-h.eng.cam.ac.uk/help/tpl/textprocessing/ || Text Processing using LaTeX ||
|| http://www.icmm.csic.es/Fagullo/w3latex.htm || world wide web sites on LATEX of Fernando Agulló-Rueda ||

* http://pluto.phys.nwu.edu/teTeX/index.html

== # 프레젠테이션 관련 ==

* http://www.miwie.org/ 의 http://www.miwie.org/presentations/index.html

|| [http://latex-beamer.sourceforge.net/ LaTex Beamer] || 최근에 주로 사용하고 있는 물건!!||
|| [http://www.tex.ac.uk/tex-archive/help/Catalogue/entries/foiltex.html FoilTex] || PPower4와 함께 세트 메뉴로, 근자에 제가 가장 즐겨 사용하고 있습니다. 무엇보다도 사용이 쉽고(처음 foil이라는 패키지의 존재를 알고 나서 PPower4로 \pause 효과 넣는데까지 걸린 시간이 한 5시간이라고 할 때, 그 중 내용 만드는 데 들어간 시간이 한 4시간 ~ 4시간 30분 정도...?), 결과물이 깔끔하다는 것이 최대 장점이지요. 궁금하시면 혹은 일단 땡긴다 싶으시면 우선 [http://jiyeon.pe.kr/cgi-bin/spboard/board.cgi?id=image&action=download&gul=35 실제 사용례]를 보고 판단하세요. ||
|| [http://www-sp.iti.informatik.tu-darmstadt.de/software/ppower4/ PPower4] || Pdf Presentation Post Processor로, 요즘 제가 한창 사용하고 있는 FoilTex과 연동하여 사용하고 있습니다. 추가적인 콤파일을 통해 플래시 효과를 주는 데 사용하는 프로그램입니다. 저야 사용하는 거라고 해봤자 기껏해야 \pause 정도이지만, 그 외에도 기능들이 꽤 있는 것 같습니다. ||
|| [http://prosper.sourceforge.net/ Prosper] || 기존의 세미나 클래스를 기반으로 좀 더 다양한 모습이 추가된, 프레젠테이션 용 레이텍 클래스입니다. 전 사용해보질 않아서 잘 모르겠습니다만, 사용자들의 평들은 아주 좋은 것 같습니다. ||
|| [http://datamining.csiro.au/tex/entries/ifmslide.html ifmslide] || 많은 사람들이 가장 강력하게 추천하는 게 바로 얩니다. pdfslide의 업글 버전이라고 생각하면 딱 좋을 것 같습니다. 아무런 편견도 없는 상태라면, 이걸 첫경험의 대상으로 해 보시는 게 좋을 듯. ||
|| [http://texpower.sourceforge.net/ TeXPower] || TeXPower is a bundle of style and class files for creating dynamic online presentations with LaTeX. ||
|| [http://www.mew.org/mgp/ MagicPoint] || X11에서 사용할 수 있는 공짜 프레젠테이션 도구입니다. 처음에는 의욕적으로 써 볼 생각이었습니다만 약간 거추장스러운 것 같아서 그만 두었습니다. 따라서 별로 아는 바 없음 :-) ||

== # LaTex 환경, GUI, 그래픽 관련 ==

* 그림과 관련한 전반적인 사항은 [http://www.ktug.or.kr/doc/gfaq/gfaq.pdf LaTex에서의 그림 처리]를 읽어 보시면 됩니다.
* http://tex.loria.fr/english/prod-graph.html

* [http://chip.cuccio.us/documents/latex-lyx-mac/ LaTeX/LyX on Mac OS X HOWTO] / [http://www.xm1math.net/texmaker/ TexMaker]
* [http://www.macosxhints.com/article.php?story=20071024061901344 How to install Kile on Mac OS X]
* [http://projectsymphony.blogspot.com/2008/03/howto-install-kile-on-mac-os-x-natively.html Howto install KILE on Mac OS X natively]

|| [http://www.integretechpub.com/techexplorer/ Integre techexplorer] || IBM techexplorer를 승계한 아해들. 이런 애들은 정말 상을 줘야 하지 않나요? ||
|| [http://www.lyx.org LyX] || 맥용은 [http://wiki.lyx.org/Mac/Mac LyX for Mac OS X]를 참조하세요. [http://wiki.lyx.org/Mac/Walkthrough 설치]부터 사용까지 간단하게 따라할 수 있습니다. ||
|| [http://preview-latex.sourceforge.net/ preview-LaTex] || 이맥스 사촌들(저는 [http://www.xemacs.org/ Xemacs]를 애용하고 있습니다.)을 에디터로 사용할 경우, 얘네들의 내부 버퍼를 이용해 수식이나 그림을 직접 보면서 편집할 수 있도록 도와 준다고 합디다. LyX를 사용하면 그만이지만, Win에서 LyX를 쓰려면 [http://sources.redhat.com/cygwin/ CygWin]이 필요하기 때문에 좀 번거롭지요. 사실 제 경우는 십중팔구 수식이 훨 중요하기 때문에 홍석호 님의 [http://physics.kyunghee.ac.kr/~reds/Hpack_Project/mathntable_powerpoint.01.htm Math'n Table]을 사용하고 있고, 그것으로 대만족이기 때문에 이걸 사용해 본 적은 없습니다. ||
|| [http://www.texmacs.org/ GNU TeXmacs] || a free scientific text editor, which allows you to write structured documents via a wysiwyg and user friendly interface : 익숙해 지려 노력 중 -_-a 아직은 윈 용은 없는 듯. ||
|| [http://www.tug.org/applications/PSTricks/ PSTricks] || 포스트 스크립트의 기능을 야메로 사용가능하게 해 놓았다고 생각하면 가장 쉽게 이해하실 듯. 따라서 ps의 그래픽 기능도 사용이 가능하답니다. ||
|| [http://sarovar.org/projects/pdftricks/ pdftricks] || pdfTex에서 PSTricks 코드를 사용할 수 있도록 도와 주는 레이텍 패키지입니다. ||
|| [http://www.imagemagick.org/ ImageMagick] || 여러 기능이 있는 아담한 그림 편집기(?)입니다만, 저는 주로 이미지매직 안에 들어있는 convert를 이용해 TIFF, JPEG, PNG, PDF, PhotoCD, GIF 등을 eps로 바꾸는 데 사용하고 있습니다. ||
|| [http://netpbm.sourceforge.net/ netpbm] || 사용법을 익히기가 귀찮아 저는 사용해 보지 않았습니다만, 능력있는 분들은 상당히 믿고 쓰시는 듯한 눈치입니다. ||

== # 화학과 직접적으로 관련된 package나, LaTex과 연동하여 사용하는 프로그램들 ==

|| [http://www.pragma-ade.com/download-1.htm PPCHTEX] || Upload:mp-ch-en.pdf ||
|| [http://imt.chem.kit.ac.jp/fujita/fujitas3/xymtex/xym300/xymup3.html XyMTeX] || [http://www.klavis.info/xym.html Japanese pages], or [http://www-texdev.mpce.mq.edu.au/l2h/ChemTeX/xymtex/xymtex.html refer to this page unless you can read Japanese] ||
|| [http://www.nongnu.org/chemeq/ Chemeq] || Chemeq : a chemical equation parser ||
|| [http://homepages.uni-tuebingen.de/beitz/tse.html BioTeX Project] || [http://homepages.uni-tuebingen.de/beitz/tte.html TeXtopo] 같은 아해들을 탄생시킨 생화학/생물학 관련 레이텍 팩키지 제작 프로젝트 ||
|| [http://ruby.chemie.uni-freiburg.de/~martin/chemtool/ ChemTool] || a small program for drawing chemical structures on Linux and Unix systems using the GTK toolkit under X11 ||

* [http://www.homenet.se/matsd/latex/ Mats's LaTeX page]

== # 기타 유용한 package나, LaTex과 연동하여 사용하는 프로그램들 ==

|| [http://www.lysator.liu.se/~alla/dia/ Dia] || 간단히 말해, GNU판 Visio라고 생각하시면 됩니다. 물론, 비지오에 비해 다소 엉성하다는 느낌을 지울 수 없습니다만, 이 정도면 보고서나 논문 용으로 그려야 할 도표 정도는 충분히 커버할 수 있습니다. eps로 export해서 LaTex과 연동시켜 문서를 만들면 아주 쌈박하답니다. ||
|| [http://www.xfig.org/ Xfig] || 리눅서들에게 가장 널리 알려진 그림 툴이지요. 자바로 손을 댄 jfig은 윈에서도 별 까다로운 불평없이 잘 돌아 간다고들 하던데 저는 써보지를 않아서리...사실 맘만 먹으면 일러 정도는 너무 쉽게 들어 오는 게 현실인지라 그 쪽으로 손이 뻗치는 걸 주체할 수가 없는게 인지 상정이라고 할 수도... :-) ||
|| [http://www.mayura.com Mayura Draw] || 윈 상에서의, [http://www.w3.org/Graphics/SVG/ svg]나 eps를 위한 일러라고 생각하면 될 듯. 사실 그냥 일러 쓰면 다 해결되는 문제이긴 합니다만... ||
|| [http://w3.mecanica.upm.es/metapost/metagraf.php MetaGraf] || MetaPost의 GUI front end. 일러만 못한 거야 어쩔 수 없지만, 이공계 아해들이 레포트 제출하는 데는 거의 문제가 없을 것 같습니다. 나름대로 깔끔하군요. 단, JAVA로 만들어졌기 때문에 java VM이 필요합니다. 윈 용도 있습니다. ||
|| [http://www.mackichan.com/ Scientific WorkPlace] || 상용이라서 조금 거시키니 합니다만, 요즘은 이걸 한 번 써볼까 하고 있습니다. 학생용은 나름대로 적당한 가격대라서 구매까지 생각을 해 보고 있는 중...주로, 수학과, 경제학과, 물리학과, 화학과 사람들이 사용하고 있습니다. [http://www.sciencesoftware.co.kr 국내에서도 구매가 가능]하더군요. Mac에서 사용하는 [http://www.advanced-science.com/ ScientificAssistant ]와 유사한 거시기이지 싶습니다. ||
|| [http://www.math.washington.edu/~palmieri/Emacs/ultratex.html UltraTex] || 이맥스를 사용하는 분들은 많이 사용하고 계십디다: Ultra-TeX mode is a major mode for editing TeX documents. It features dynamic completion (see section Completion) of TeX commands, and a number of other handy things. ||

|| [http://www.physics.odu.edu/~musatov/ FeynmanGraph] || 윈도우 상에서 파인만 다이어그램을 그려서 ps 파일로 저장할 수 있습니다. ||
|| [http://icking-music-archive.sunsite.dk/software/indexmt6.html MusiXTex] || [http://icking-music-archive.org Werner Icking Music Archive]에서 관리(?)하고 있는 뮤지테흐입니다. 음대 친구들은 [http://mux2d.sourceforge.net/ MuX2d]와 함께 사용하는 것 같습디다. ||
|| [http://www.iut.univ-paris8.fr/~rosmord/archives/ HieroTeX] || Tex-package by S. Rosmorduc which allows you to type hieroglyphs in Latex ||

* [http://math.jnu.ac.kr/bcshin/mongtex.html MongTex Shell Editor]
* [http://t16web.lanl.gov/Kawano/ T. Kawano]'s [http://t16web.lanl.gov/Kawano/gnuplot/index-e.html Not So FAQ on Gnuplot]
* [http://wiki.kldp.org/KoreanDoc//html/GnuPlot-KLDP/index.html GnuPlot 3.7 한글 매뉴얼]

Compressed Images in PostScript and PDF with LaTeX HOWTO

Compressed Images in PostScript and PDF with LaTeX HOWTO

Daniel Käps

last revised: 2002-11-24
Abstract

It is a common problem that PostScript files (as generated by TeX/LaTeX users) become really large when users try to include pixel mapped images (also referred to as ``sampled images'', ``pixmaps'' or ``bitmaps''). The huge size of the resulting PostScript files is due to the fact, that many converters to Encapsulated PostScript decompress the images.

However, with the right tools and specifying the correct options it is possible to include certain image types (such as JPEG or PNG) retaining compression. This can greatly reduce the size of the resulting PostScript files and thus speed up downloading and displaying.

The article explains which tools and image formats can be used to put images into PostScript without decompression. Moreover, some considerations have been made about which image formats can be used when generating other output formats, namely PDF (Portable Document Format) and HTML, from a LaTeX source.

Contents

Generation of DVI/PS Files (e.g. using 'latex')
Inclusion of JPEG images
JPEG-to-EPS conversion using 'jpeg2ps'
Inclusion of PNG and TIFF images
PNG-to-EPS and TIFF-to-EPS conversion using 'bmeps'
PNG-to-EPS and TIFF-to-EPS conversion using ImageMagick's 'convert'
TIFF-to-EPS conversion using libtiff's 'tiff2ps'
Generation of PDF Files (using 'pdflatex')
Generation of HTML Files (using 'tex4ht')
Conclusions
Compilation Platform

Generation of DVI/PS Files (e.g. using 'latex')

Pixel mapped images can be included via LaTeX's '\includeimage' (see [1]) into PostScript output without problems when they are available in (Encapsulated) PostScript format.

Anyway, to put compressed images into the (Encapsulated) PostScript Format, (at least) PostScript Level II must be used. Decompression has to be done by the PostScript viewer/interpreter. Many PostScript viewers seem to be able to do this. Specifically, the following programs/versions were tested. All of them were able to display the PostScript files containing the compressed images (or the DVI files referencing the EPS files):

  • GNU Ghostscript 5.10 (1998-12-17) (for e.g. gv 3.5.8)
  • gv 3.5.8 (Debian 2.2)
  • gnome-gv 0.82 (Debian 2.2)
  • xdvi (Debian 2.2)
  • Aladdin Ghostscript 5.50 (1998-9-11) (for GSview 2.6)
  • GSview 2.6 (1998-09-17) (Win95b)
  • Yap 0.96a (Win95b)

Basically, the conversion of the images to Encapsulated PostScript can be accomplished in different ways:

  • invoking external tools before calling 'latex'
    External tools may be called manually or from a shell script to create the EPS files before 'latex' is invoked.
  • invoking external tools while running 'latex'
    Using the '\DeclareGraphicsRule{...}' macros, LaTeX can be told to call the specified external tool while compiling the LaTeX source.
  • using a modified 'dvips'
    The default 'dvips' cannot deal with image formats such as JPEG or PNG. However, there are some patches available to make it capable of dealing with some image formats.
    [ For example, if 'dvips' is compiled with the option '-Demtex', it will support inclusion of PCX, BMP, MSP bitmaps [2]. However, this is not very portable, the compression ratio with those image formats is usually poor compared to JPEG or PNG compression., and the driver probably decompresses the images when generating PostScript anyway. ]
    [ The 'bmeps' package ([6]) contains, besides the command line tool 'bmeps', modified sources for 'dvips' so that the 'bmeps'-library can be used implicitely. However, since the 'bmeps' library doesn't support JPEG(DCT) compression (at least not in version 1.0.4), one still had to use a different external tool to create EPS files with good compression for included JPEG/photographic images. ]

The following will concentrate on the usage of different external tools to convert images to PostScript Level II or III.

Inclusion of JPEG images

PostScript Level II supports direct inclusion of JPEG images using the 'DCT' (discrete cosine transform) filter [3]. To display a PostScript file containing images represented with the DCT-filter, the PostScript interpreter must support (at least) PostScript Level 2.

JPEG-to-EPS conversion using 'jpeg2ps'

JPEG images can be converted to PostScript with the 'jpeg2ps' program [4]:

jpeg2ps IMAGE.jpg >IMAGE.jpg.eps

This way the compressed image data is included into the PostScript file as is (without decompressing it), which reduces the size of the resulting PostScript file considerably.

Inclusion of PNG and TIFF images

PostScript Level 3 supports inclusion of TIFF and PNG images by the following means: The 'LZW' (Lempel-Ziv-Welch) and 'Flate' (zlib/deflate) filters are available for (de)compression. The PNG and TIFF pixel-predictor functions are supported [5]. However, while e.g. PNG images can have Alpha-transparency, PostScript seems to support only Bi-level transparency (using the 'imagemask'-operator).

In contrast, PostScript Level 2 only supports 'LZW'-compression and apparently it doesn't have support for pixel-predictor-functions. Thus, many images won't be compressed as well as it is possible with Level 3's features. Also note that the 'LZW' algorithm is patented, and using it may require paying license fees to the company holding the patent.

PNG-to-EPS and TIFF-to-EPS conversion using 'bmeps'

PNG and TIFF images can be converted into PostScript Level I, II or III with the program 'bmeps' [6]. To create an EPS file with maximum compression, use:

bmeps -p3 -c -e8f -tpng IMAGE.png >IMAGE.png.eps

which creates a Level 3 EPS file using 'flate'-compression for a colored PNG file. Only some small problems occured with the used version of 'bmeps':

  • image extension:
    Note that, unless the file comes from 'stdin', the image extension must be .png, .tif, .tiff or another to 'bmeps' known extension, otherwise the file will be silently ignored, even if using the switch '-t').
  • problems with Yap 0.96a:
    Yap 0.96a (a DVI viewer for Windows coming with MiKTeX) had some (correctable) problems with viewing DVI files.
    [ Yap wasn't able to handle DVI files referencing image files converted to EPS using 'bmeps 1.0.4', with the options '-p3 -c -e8f'. GSview 2.6, however, had no problem with displaying the final PostScript file. The problem can be simply corrected by manually moving in the generated EPS file the 'tilde-greater' end sequence of the ASCII-85 encoded image data to the preceding line. ]

For a TIFF file, the call is simply:

bmeps -p3 -c -e8f -ttiff IMAGE.tiff >IMAGE.tiff.eps

'bmeps' is also capable of mapping TIFF and PNG alpha channels to EPS level 3 (Bi-level) image masks.

PNG-to-EPS and TIFF-to-EPS conversion using ImageMagick's 'convert'

PNG and TIFF images can be converted into PostScript Level III using the program 'convert' which is part of the ImageMagick graphics tools [7]:

convert -compress zip IMAGE.png eps2:IMAGE.png.eps

This includes the PNG file without decompressing it into the PostScript file using 'flate'-compression. However, things are not as straightforward as they are for 'jpeg2ps' or 'bmeps':

  • ImageMagick version and platform:
    The used version of ImageMagick was: 4.2.8 99/08/01 under a Debian Linux 2.2 and ImageMagick 5.1.0 00/01/01 under SuSE Linux 6.4. The call didn't work for ImageMagick version 5.4.9 under Windows, nor did it work (under Windows) with any other combination of options that were tried .
  • PostScript level (version):
    One must specify 'eps2:' as PostScript output format (not just 'eps:'), otherwise the image is put uncompressed into the EPS file. (Actually, the option should have been named 'eps3:', not 'eps2:'.)
  • option -compress:
    For ImageMagick version 4.2.8 99/08/01 one must specify the option '-compress zip', otherwise the image will be put uncompressed into the EPS file. However, for ImageMagick version 5.1.0 00/01/01, '-compress zip' is used by default.
  • problems with some images:
    For http://www.libpng.org/pub/png/imgpng/AlphaBall.png, an RGB-type PNG image with an Alpha channel, the call produced an EPS file 10 times as big as the original PNG file (with ImageMagick 4.2.8 99/08/01). However, for another RGB-type PNG image with Alpha channel (specifically http://www.libpng.org/pub/png/imgpng/imgcomp-440x330.png), the size of the EPS file was ok (about 1.25 times the size of the PNG image), as it was for almost any other tested image.

To reduce the size of a PNG image itself, and to convert from a RGB-type to a palette-type PNG, the program 'pngquant' [9] can be used.

For a TIFF file, the call is:

convert -compress zip IMAGE.tiff eps2:IMAGE.tiff.eps
TIFF-to-EPS conversion using libtiff's 'tiff2ps'

TIFF images can be put compressed into a PostScript Level II file with the program 'tiff2ps', which is part of the libtiff tools [10]:

tiff2ps -2 -e -s IMAGE.tif >IMAGE.tif.eps

However, the following things should be taken into account:

  • libtiff version and platform:
    The used version of libtiff was 3.5.4 (under a Debian 2.2 Linux).
  • decompression of 'deflate'-encoded TIFF images:
    It seems that for 'deflate'-encoded TIFF images (check with 'tiffinfo'), 'tiff2ps' unfortunately decompresses the images so the generated Encapsulated PostScript files become really huge (scope: Version 3.5.4 under a Debian 2.2 Linux).
  • Patent problems with LZW encoding:
    The only compression method supported for EPS by 'tiff2ps' seems to be the LZW compression. Since this is legally encumbered, it should not be used, anyway.
  • compression ratio:
    The compression ratio obtained by 'tiff2ps' with LZW is usually poorer than the compression ratio obtained when using 'bmeps' or ImageMagick's 'convert' using 'flate'-compression as described above.

Generation of PDF Files (using 'pdflatex')

As with 'latex', pixel mapped images can be included with '\includeimage' (see [1]). 'pdflatex' supports inclusion of JPEG, PNG and TIFF directly, without the need to convert them before to something like Encapsulated PostScript [11].

Moreover, PDF can include EPDF (Encapsulated PDF), but cannot include EPS files. However, EPS files may be converted to EPDF using external tools, such as 'ps2pdf' (TODO: must test this).

Generation of HTML Files (using 'tex4ht')

Using 'tex4ht', an image can be embedded using the following LaTeX code (see [12]):

\Picture[ALT.-TEXT]{IMAGEFILENAME HTML-IMAGE-ATTR.}

Note that the HTML image attributes should define 'width' and 'height' so that Web-browsers can render the page correctly before all images have been loaded.

Most Web browsers can display JPEG and GIF, newer browsers can also display PNG (see [13]). To achieve compatibility also with older browsers, PNG images could be converted into GIF images. (Note that the 'LZW'-algorithm used to compress GIF images is patented). Formats like TIFF, EPS, EPDF and anything else usually cannot be displayed by Web browsers.

Conclusions

JPEG images can be included without decompression into PostScript Level II, III and PDF and can be displayed by most Web-Browsers.

PNG and TIFF images can be included without de-compression into PostScript Level III and PDF (and with lower compression also in PostScript Level II), but only newer Web-Browsers support displaying PNG images.

TIFF images can be included into PDF, but normally cannot be displayed by Web browsers.

Other image formats may require conversion to be usable for inclusion into PostScript, PDF or HTML. Conversion between various image formats can be done e.g. using ImageMagick's 'convert', which supports hundreds of different graphics formats.

JPEG and PNG generally provide better compression than most other image formats, so it seems reasonable to keep the 'source' images in either of these two formats, depending on which is better suited.

Note that some older printers may not be capable of directly printing PostScript files making use of Level III features. To print Level III files on such a printer, e.g. 'GSView' can be used.

For HTML output, one may choose to use GIF instead of PNG for compatibility with older Web-Browsers.

Compilation Platform

The versions of the tools to convert images were:

  • jpeg2ps V1.8 (under Linux)
  • bmeps 1.0.4 (under Linux),
    bmeps W32:2002/08/02 (under Win95b)
  • ImageMagick 4.2.8 99/08/01 (under Linux)
  • ImageMagick 5.1.0 00/01/01 (under Linux)
  • tiff2ps from libtiff v3.5.4 (under Linux)

The used TeX versions were:

  • TeX (Web2C 7.3.1) 3.14159 (under Linux)
  • pdfTeX (Web2C 7.3.1) 3.14159-0.13d (under Linux)
  • tex4ht.c (1999-07-18-00-02) (under Linux)
  • MiKTeX-TeX 1.15 (TeX 3.14159) (MiKTeX 1.20d build 110) (under Win95b)

References


[1] Packages in the `Graphics' Bundle,
http://www.ctan.org/tex-archive/macros/latex/required/graphics/grfguide.ps
[2] Keith Reckdahl: Using Imported Graphics in LaTeX 2e (Version 2.0, December 15, 1997),
http://www.ctan.org/tex-archive/info/epslatex.pdf (1.5 MB)
[3] Adobe PostScript Language Reference Manual, Second Edition, 1990,
http://partners.adobe.com/asn/developer/pdfs/tn/psrefman.pdf (3.3 MB)
Sections 3.8.4 (Filters) and 3.13.3 (Details of individual filters, p. 127)
[4] jpeg2ps utility - a JPEG to PostScript Level 2 (or PostScript 3) wrapper,
http://www.pdflib.com/jpeg2ps/index.html
[5] Adobe PostScript Language Reference, Third Edition, 1999,
http://partners.adobe.com/asn/developer/pdfs/tn/PLRM.pdf (7.4 MB)
Section 3.13.3 (Details of individual filters, p. 129)
[6] bmeps - command line tool, library and dvips patch for bitmap-to-EPS conversion,
http://www.e-technik.fh-schmalkalden.de/personen/dhp/krause/frames/index.php3?fc=entire&f=/personen/dhp/krause/pages/software/bmeps/index.html
[7] ImageMagick - Convert, Edit, and Compose Images,
http://www.imagemagick.org/
[8] libpng - A Basic Introduction to PNG Features,
http://www.libpng.org/pub/png/pngintro.html
[9] pngquant - utility to quantize and dither 32-bit RGBA PNGs down to 8-bit (or smaller) RGBA-palette PNGs,
http://www.libpng.org/pub/png/apps/pngquant.html
[10] TIFF Software - library, tools for TIFF images,
http://www.libtiff.org/
[11] The pdfTeX manual,
http://www.tug.org/applications/pdftex/pdftex-a.pdf
[12] tex4ht - From LaTeX to HTML - Pictures,
http://www.cis.ohio-state.edu/%7Egurari/TeX4ht/mn8.html
[13] libpng - Browsers with PNG Support,
http://www.libpng.org/pub/png/pngapbr.html
_________________________________________________________________________________

If you have comments or suggestions, mail to:
kaeps@-spam-away-.informatik.uni-leipzig.de
(remove the ``-spam-away-.'' spam protection).

2008년 9월 26일 금요일

How to link Lightning or Thunderbird with Google calendar

To access your calendar data, you need to retrieve your private XML URL from the Google Calendar UI. If you are not sure how, follow these steps:

  1. Open your Google Calendar
  2. Click on the Manage Calendars link located at the left of the page.
  3. Click on the Calendar you want to use with Thunderbird Lightning or Sunbird.
  4. Click on either of the two XML buttons shown at the bottom.

Note that the provider does not directly use your private url. The Calendar is still accessible when you reset your private url.

You may now use this url as the Location in the new remote calendar wizard.

There is a graphical tutorial available at bfish.xaedalus.net.
----------------------------------------------------------------

bfish.xaedalus.net

For a long time I have been looking for a rock solid calendaring system. I’ve gotten too used to working for companies who have Microsoft Exchange (or, God forbid, Scalix) installed which allow me to edit and update a calendar from multiple locations and even sync it with my Mobile Phone. When I first heard of Google Calendar I hoped that I would be able to enjoy such benefits again, but I am not a great fan of web-apps, and prefer a nice, solid desktop client to do my email / organisation from.

Queue Lightning, the calendaring extension for Thunderbird which brings the desktop email app one step closer to becoming a viable alternative to Microsoft Outlook. Installation can be a little bit confusing and you must remember that this add-on is still in the 0.x stages, so may be a tad unstable at times (but that’s ok, we love this kind of thing!)

Open up Thunderbird (I am using the 2.0.0.6 release) and on the Top Menu, go to:

Tools -> Add-ons

When the Add-ons window opens, click on the Install button on the bottom left and paste in the following URL to install the latest release of Lightning (Windows Only, Linux / Mac users will need to get this link by copying the XPI download path from the Mozilla Add-on repository, located here.

Win32 Lightning Add-On XPI Download Link:
https://addons.mozilla.org/en-US/thunderbird/downloads/file/20424/lightning-0.7-tb-win.xpi

If you get a warning similar to “Lightning could not be installed because it is not compatible with Firefox” then you are trying to install the XPI directly into Firefox. Instead, you need to either “open” the link from inside the Thunderbird Add-Ons Install Window, or save the XPI to your desktop and then drag it into the Thunderbird Add-Ons Window.

Installing an XPI Add-On in Thunderbird

Once you have installed the Lightning Extension, Thunderbird will ask you to restart. Upon restarting you will be greeted with a new Sidebar on the right displaying tasks and events and a tool bar underneath your folder list.

Thunderbird with the Lightning Extension installed.

This is all well and good and provides us with an easy to use local calendar, but that’s not much use if you wanted to update it at work, or on the road / mobile device. This is where the Provider Add-on comes in to play.

Provider allows bidirectional syncing between the Lightning Calendaring Extension in Thunderbird and Google’s GCal Service. This is possible because Google, being the lovely chaps that they are, decided to opt for the iCalendar standard in GCal, well done chaps :)

Installation of Provider is pretty similar to that of Lightning. Again, go to the Add-ons Window (Tools -> Add-Ons) and Install the XPI available for download from Provider’s Page in the Mozilla Add-on repository.

Win32 Provider Add-On XPI Download Link:
https://addons.mozilla.org/en-US/thunderbird/downloads/file/20552/provider_for_google_calendar-0.3.1-tb+sb.xpi

Again, once installed, Thunderbird will have to be restarted.

Now, the last piece of the Pie is to tie our Google Calendar into our Lightning Calendar. First of all, you will need to log into your Google Calendar account. Once you are at the main page, click on “Settings” from the Top Right Menu:

Google Calendar - Settings

Once on the settings page, you need to drill down into the “Calendars Settings” screen and then click on your Calendar from the list (I only had a single calendar.)

Google Calendar - Select your Calendar

Now, finally, you need to copy the URL of your Private Address XML Feed into the clipboard.

Google Calendar - Private Address XML

You’re done in Google Calendar for now and we can head back to Thunderbird to finally wrap this tutorial up ;). Once you are back in Thunderbird, you need to create a new calendar in Lightning. You can do this by clicking on the following Menu item:

File -> New -> Calendar…

Creating a new calendar in Lightning

Upon clicking the New Calendar menu item, another window will appear. The first option is the location of your Calendar - select “On the Network” and click Next.

The next option allows you to specify the Format of the Calendar, slect the “Google Calendar” radio button (if you don’t have a Google Calendar radio button, make sure your Provider Extension is installed correctly). In the location input box, paste in your Google Calendar Private Address XML Feed that we extracted above, and click Next.

Specify your Calendar Location

The next window asks you to give your new Calendar a Name and a Colour, I will leave these entirely up to you ;)

Finally (yes, at last) you will have a “Google Calendar Login” window which will ask for your Google Account login. If you only have a single Google Calendar, Provider will have automagically extracted your username from the XML feed you just specified; however, just double check that it reads @GMAIL.COM. Then enter your usual GMail password.

Well done, you can now enjoy the many benefits of being able to view and update your Google Calendar directly from Thunderbird - nice work ;)

The end result

2008년 9월 25일 목요일

구글 캘린더 + 아웃룩 싱크

  1. 아래의 사이트에서 프로그램을 다운받으삼http://dl.google.com/googlecalendarsync/GoogleCalendarSync_Installer.exe
  2. 다운로드 박스가 뜨면 '저장하기(save)'를 누르고, 안뜨면 브라우저의 다운로드창에서 다운 받아라.
  3. 실행시키고, exe파일을 실행시킬꺼냐 물어보면 오케이를 눌러라.
  4. 구글 캘린더 사용자 약관을 읽어보고 '동의(agree)'를 눌러라
  5. 설치옵션이 나오고 '설치(install)'를 누르면 설치가 완료된다.

2008년 8월 11일 월요일

HHK pro2 사용에 적합한 키보드 리매핑 (Windows XP/Vista)

윈도 (XP/Vista) 환경에서 HHK professional 2 키보드 사용하기에 적합한 키보드 리매핑임.

최종 사용형태

  1. 한/영 전환은 Shift + Space로 함.

  2. Alt 와 옵션키 (다이아몬드로 표시된 키) 위치 바꿈.

  3. 왼쪽 옵션키 (바뀐 옵션키, 다시 말해 키보드에 써있는 것으로는 왼쪽 Alt 키)는 Windows 키로 설정.

  4. 오른쪽 옵션키 (왼쪽의 경우와 마찬가지)는 meta 키로 설정.

  5. 한자키.. 그런거 없음. 오른쪽 Alt도 왼쪽 Alt와 동일하게 작동함. (취향에 따라서 오른쪽 옵션키를 메타키 대신 한자키로 매핑하는 것도 괜찮을 듯...)

HHK keyboard switch 순서

HHK switch: off off on off on off

기본적으로 유닉스 타입, Alt키와 옵션키 교환하고, Delete 키를 back space로 설정한 것임

키보드 타입 바꾸기

  1. [실행]->regedit 입력

  2. HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\i8042prt\Parameters 값 조정

    • LayerDriver Kor --> KBD101C.DLL
    • OverrideKeyboardIdentifier --> PCAT_101CKEY
    • OverrideKeyboardSubtype --> 5
    • OverrideKeyboardType --> 8

  3. Type 3은 kbd101c에 해당하며, Type 8은 한글 키보드, Subtype 5는 Type 3을 지칭하는 것임.

  4. 키보드 Type 3이 유닉스 키보드 타입으로 한/영키 전환을 Shift + Space로 함.

  5. Windows XP, Vista 모두 동일한 설정임.
링크: 요기

키보드 리매핑

  1. BIOS Key code

    • Left Opt: 7B 00
    • Right Opt: 79 00
    • Windows key: 5B E0
    • Meta key: 7D E0

  2. Left Opt 자리에 Windows key를 Right Opt 자리에 Meta key를 리매핑

    • [실행]->regedit 입력

    • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout 까지 찾아간다(Layouts 와 혼동하지 말기를)

    • 아래와 같이 Scancode Map 수정
    • 값 데이터(V):
      0000 00 00 00 00 00 00 00 00 ........
      0008 03 00 00 00 5B E0 7B 00 ........
      0010 5D E0 79 00 00 00 00 00 ........
      0018 ........
링크: 요기