วันพุธ, กันยายน 07, 2548

sig-alternative document class

สำหรับเป็น Template มีคำสั่ง เฉพาะที่น่าจดน่าจำดังนี้
  • \centering
  • \begin{table} \centering \caption \begin{tabular}
  • \begin{table*}, \begin{figure*} สำหรับ กว้างคลุมทั้ง 2 คอลัมน์
  • \epsfig, \psfig
  • \newtheorem{theorem}{Theorem}
  • \newdef{definition}{Definition} ใช้กับ \begin{definition}
  • \secit ใช้ทำตัวเอียงสำหรับ text ที่อยู่ตรง section โดยเฉพาะ
  • \ttlit สำหรับ Title
  • proof environment, \begin{proof}

วันจันทร์, กันยายน 05, 2548

เปลี่ยนมาใช้ WindowMaker แทน Gnome

How to switch to Thai keyboard layout in WindowMaker (or virtually any X11 window manager)
GNOME มันเดี้ยงๆ มาตั้งหลายวันแล้ว ไม่รู้ทำไม ก็เลยคิดจะลองเปลี่ยนมาใช้ WindowMaker ดู
แต่ว่ามีปัญหาเล็กน้อย คือติดเรื่อง การเปลี่ยนคีย์บอร์ดเลย์เอาท์ ภาษาไทย แต่วันนี้แก้ปัญหาได้แล้ว
พึ่งรู้ว่ามันง่ายขนาดนี้ แค่เติม
Option "XkbLayout" "us,th"
Option "XkbOptions" "grp:alt_shift_toggle,grp_led:scroll"

ลงไปก็เรียบร้อย ราบรื่น. รายละเอียดก็คือ บอกว่าจะใช้ keyboard layout แบบ us กับ th,
แล้วก็ toggle layouts ด้วย alt+shift, ใช้ LED ของ scroll lock เป็นตัว indicator (ไฟติด
คือใช้ layout ภาษาไทย)

ไฟล์ xorg.conf ทั้งหมด ก็เป็นดังข้างล่างนี้
---------------------------------------
Section "Files"
RgbPath "/usr/X11R6/lib/X11/rgb"
ModulePath "/usr/X11R6/lib/modules"
FontPath "/usr/X11R6/lib/X11/fonts/WindowsFonts/"
FontPath "/usr/X11R6/lib/X11/fonts/misc/"
FontPath "/usr/X11R6/lib/X11/fonts/TTF/"
FontPath "/usr/X11R6/lib/X11/fonts/Type1/"
FontPath "/usr/X11R6/lib/X11/fonts/CID/"
FontPath "/usr/X11R6/lib/X11/fonts/75dpi/"
FontPath "/usr/X11R6/lib/X11/fonts/100dpi/"
EndSection
Section "Module"
Load "dbe"
Load "dri"
Load "extmod"
Load "glx"
Load "record"
Load "xtrap"
Load "freetype"
Load "type1"
EndSection
Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
#### Thai Keyboard Switching config., Added by Chaiwat ####
# Option "XkbRules" "xorg"
Option "XkbLayout" "us,th"
Option "XkbOptions" "grp:alt_shift_toggle,grp_led:scroll"
EndSection
# VMware SVGA



Section "ServerFlags"
# Option NoTrapSignals
EndSection


Section "InputDevice"
Identifier "Mouse1"
Driver "vmmouse"
Option "Protocol" "SysMouse"
Option "Device" "/dev/sysmouse"
Option "ZAxisMapping" "4 5"
# Option "Emulate3Buttons"
# Option "Emulate3Timeout" "50"
# Option "ChordMiddle"
EndSection

Section "Monitor"
Identifier "vmware"
VendorName "VMware, Inc"
HorizSync 1-10000
VertRefresh 1-10000

ModeLine "640x480" 100 640 700 800 900 480 500 600 700
ModeLine "800x600" 100 800 900 1000 1100 600 700 800 900
ModeLine "1024x768" 100 1024 1100 1200 1300 768 800 900 1000
ModeLine "1152x864" 100 1152 1200 1300 1400 864 900 1000 1100
ModeLine "1152x900" 100 1152 1200 1300 1400 900 1000 1100 1200
ModeLine "1280x1024" 100 1280 1300 1400 1500 1024 1100 1200 1300
ModeLine "1376x1032" 100 1376 1400 1500 1600 1032 1100 1200 1300
ModeLine "1400x1050" 100 1400 1500 1600 1700 1050 1100 1200 1300
ModeLine "1600x1200" 100 1600 1700 1800 1900 1200 1300 1400 1500
ModeLine "2364x1773" 100 2364 2400 2500 2600 1773 1800 1900 2000
EndSection

Section "Device"
Identifier "VMware SVGA"
Driver "vmware"

EndSection

Section "Screen"
Identifier "Screen 1"
Device "VMware SVGA"
Monitor "vmware"

# Don't specify DefaultColorDepth unless you know what you're
# doing. It will override the driver's preferences which can
# cause the X server not to run if the host doesn't support the
# depth.

Subsection "Display"
# VGA mode: better left untouched
Depth 4
Modes "640x480"
ViewPort 0 0
EndSubsection
Subsection "Display"
Depth 8
Modes "1376x1032"
ViewPort 0 0
EndSubsection
Subsection "Display"
Depth 15
Modes "1376x1032"
ViewPort 0 0
EndSubsection
Subsection "Display"
Depth 16
Modes "1400x1050"
ViewPort 0 0
EndSubsection
Subsection "Display"
Depth 24
Modes "1400x1050"
ViewPort 0 0
EndSubsection
EndSection

Section "ServerLayout"
Identifier "Simple Layout"
Screen "Screen 1"
InputDevice "Mouse1" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection