1. set up with \newcommand


\newcommand\rbrackets[1]{\left({#1}\right)}
\newcommand\sbrackets[1]{\left[{#1}\right]}
\newcommand\cbrackets[1]{\left\{{#1}\right\}}
\newcommand\abrackets[1]{\left\langle{#1}\right\rangle}


2. usage


\begin{equation}

\sbrackets{\rbrackets{\frac{a}{b}}\times \frac{\frac{c}{d}}{e}}

\end{equation}


3. result



Keynote를 1년 전쯤에 샀는데 업데이트를 하려면 맨날 구매한 계정으로 로그인하라고 하는데 눈 씻고 다시 찾아봐도 구매한 계정으로 로그인한 게 맞다. 이놈의 애플 도대체 어쩌라는 거냐! 라고 생각만 하고 해결해보려고 하지 않다가 오늘 작심하고 구글링 해 봤더니 어처구니없게도 Spotlight 문제였다. 일전에 맥이 느리면 Spotlight의 indexing 기능을 끄라고 한 걸 보고 그걸 껐던 적이 있는데 이게 app store 업데이트에 문제를 일으킬 줄이야. 바보 같은 app store가 다른 계정으로 로그인하라는 어처구니없는 메시지만 줄창 보여준 덕에 괜히 딴 것만 계속 건드렸네. 구글링을 해서 겨우 찾아낸 해결책에도 언급되어 있듯이 애플 지원팀에서 에러 메시지만 조금 바꾸던지 spotlight indexing 기능을 켜라는 말만 추가해도 될 것을. 어쨌든 산 지 1년 만에 keynote를 업데이트하고 발표준비를 시작했다. 빨리 마무리해야지. 


Solution 1 – Spotlight works but the index is incomplete or empty:

1) Open System Preferences > Spotlight
2) Under the Privacy tab. Add your Macintosh HD (or whatever your main hard disk is called) to the list.
3) Close the window. Wait a few seconds. Then go back to Spotlight settings and remove the entry you just added.
4) The spotlight index should now begin to re-index completely. (A dot will fade-in/out inside the Spotlight icon in the taskbar)
5) Wait for it to finish and then launch the Mac App Store. You should now see updates in the Updates tab.


Solution 2 – Spotlight indexing is disabled (frequent on Mac OS X Server)

1) Open a Terminal window.
2) Type the following command: sudo mdutil -i on /
3) A message saying “Indexing enabled.” should appear after a few seconds.
4) Close the Terminal window and the Spotlight indexing should now start automatically. (Again, a dot will appear inside the Spotlight icon during the indexing process)

5) Wait for it to finish and then launch the Mac App Store. You should now see updates in the Updates tab.

출처 - http://www.ngpixel.com/2011/06/25/mac-app-store-you-have-updates-available-for-the-other-accounts-bug/



Keynote에 수식 넣을 때 어떻게 하시나요? 아직도 Latex으로 수식 만든뒤에 화면 캡처해서 넣으시나요? LatexIt을 써보세요. Interactive하지 못한점을 여전히 불편함을 주지만 history만 잘 사용해도 편하게 쓸 수 있는 것 같습니다. 좀 더 잘 하고 싶으시다고요? 다음 링크를 참고하세요.

http://pages.uoregon.edu/noeckel/Keynote.html 
http://guides.macrumors.com/Taking_Screenshots_in_Mac_OS_X

프린트 스크린 버튼이 없어서 어떻게 할까 고민하고 있었는데 찾아보니 더 좋은 기능들이 많네.

Command-Shift-3: Take a screenshot of the screen, and save it as a file on the desktop
Command-Shift-4, then select an area: Take a screenshot of an area and save it as a file on the desktop
Command-Shift-4, then space, then click a window: Take a screenshot of a window and save it as a file on the desktop
Command-Control-Shift-3: Take a screenshot of the screen, and save it to the clipboard
Command-Control-Shift-4, then select an area: Take a screenshot of an area and save it to the clipboard
Command-Control-Shift-4, then space, then click a window: Take a screenshot of a window and save it to the clipboard

In Leopard and later, the following keys can be held down while selecting an area (via Command-Shift-4 or Command-Control-Shift-4):

Space, to lock the size of the selected region and instead move it when the mouse moves
Shift, to resize only one edge of the selected region
Option, to resize the selected region with its center as the anchor point

http://idldatapoint.com/2011/10/20/hash-syntax-for-accessing-children-in-new-graphics/

IDL New Graphics(NG)를 이용해서 작업을 하는데 영 익숙치가 않다. NG의 장점이라면 Object Graphics와 같이 한번 표출된 Graphic units의 일부를 수정하고 싶을 때 다시 전체를 그리지 않고 범위를 조정한다던가 하는 작업을 할 수 있다는 것이다. 그런데 내가 주로 작업하는 방식은 IDLDE를 사용하지 않고 procedure를 통해 Graphic Window안에 여러개의 Graphic units을 그리는 식이라서 그림을 그려놓고 나면 main level에서는 개별 Graphic units에 대한 Objects가 넘어오지 않는다. 그 procedure내에서 Objects를 생성했다가 사용하고 버리기 때문이다.

procedure를 이용하는 이유는 매번 다른 인자 (예를들면 파일명)에 대해 같은 그림을 그리고 싶은 것인데 그렇다고 매번 stop을 할수도 없는 노릇이라 하다보니 전혀 NG의 장점을 살리지 못하는 상황이었다. 그러다 발견한 것이 위의 주소에 있는 내용인데 정리하자면 procedure가 아닌 function의 형태로 작업을 한뒤 Graphic Window Object를 return하면 그 Object안에 사실상 각 Graphic units을 HASH의 문법형태로 접근 할 수 있다는 것이다. 정리하면

1. 각 Graphic units에 "name" keyword로 이름을 정해준다. (ex, !NULL=plot(/test,name='plot'))
2. Window Object를 return한다. (ex, return, pWin)
3. 다시 접근하고 싶을때는 정해준 "name"을 key로 하는 HASH문법으로 접근한다. (ex, pPlot=pWin['plot'])
+ PLOT같은 경우 기본적으로 axes를 HASH key로 가지고 있다. (ex, axis1=pPlot['axis1']; 아래축부터 시계방향으로 numbering 되어 있다.)



뭐 이런식으로 해서 좀 더 쓸만해 지긴 했는데 여전히 그림을 자유자재로 그리는데는 어려움이 있다. buffer로 그릴때랑 window로 표출할때랑 그림의 annotation이 다르고, 첨에 정해준 dimension이랑 다르게 지가 맘대로 dimension을 바꾼다. -_-;; 그리고 보이는거랑 파일로 저장한게 또 다르다. 결국 삽질 몇번하다가 Direct Graphics로 돌아가던가 아님 NG를 DG처럼 쓰는 방향으로 갈 거 같다. 그림 자체는 좀 더 이쁘니까.

Q. 근데 쟤들이 무슨 하위 Graphic units을 갖고 있는지 알 수는 없나요? win.keys()라는 식의 HASH method는 안먹던데... 
Ubuntu에 IDL8.0을 깔아서 쓰고 있는데 New graphics를 사용하려고 할 때 마다 에러가 발생했다.

IDL> p = plot(/test)

% Loaded DLM: XML.
Segmentation fault 

몇 번 문제를 해결하려고 찾아봤었는데 잘 안되서 포기하고 direct graphics로 그림을 그리다가 그림을 좀 더 예쁘게 그리고 싶어서 다시 열심히(?) 찾아봤더니 너무 쉽게 해결방법을 찾았다.

IDL을 공급하는 본사(여기저기 팔려다녀서 지금은  Exelis VIS로 넘어갔다.)에서 제공하는 해결책이 있었는데 예전에는 왜 유심히 안봤나 모르겠다.

http://www.exelisvis.com/language/en-US/Support/HelpArticleDetail/articleid/4576.aspx?dnnprintmode=true&mid=6229&SkinSrc=%5BG%5DSkins%2F_default%2FNo+Skin&ContainerSrc=%5BG%5DContainers%2F_default%2FNo+Container

한글요약
1) http://rpm.pbone.net/index.php3/stat/2/simple/2에 가서 RedHat EL 4 옵션을 체크하고 libstdc++.so.6.0.3를 찾는다.

2) libstdc++-3.4.6-3.1.x86_64.rpm나 libstdc++-3.4.6-3.1.i386.rpm를 버전에 맞게 다운로드한다.
3) 다운로드한 폴더에서 오른쪽 클릭해서 "Extract Here"를 선택한다.
4) 안에 있는 두개의 파일 libstdc++.so, libstdc++.so.6.0.3을 버전에 맞게 .../idl80/bin/bin.linux.x86나 .../idl80/bin/bin.linux.x86_64에 옮긴다.


위의 주소에서 시키는대로 하면 되는데 결국 libstdc++.so.6의 호환성 문제인 듯 하다. 첨에 문제를 해결하려고 찾았을 때는 단순히 저 라이브러리가 최신이 아니거나 없어서 그런줄 알고 최신 라이브러리를 설치 했는데도 안되길래 포기하고 있었던 건데 저기서 지정해주는 녀석을 찾아다가 깔았더니 그냥 해결되 버렸다. debian계열 linux에서 나타나는 문제인 듯 하다.

어쨌든 이제 연구만 열심히 하면 되는데... 응? 
CF 카드 리더기가 먹통이 되서 아마존에서 새로 CF 카드 리더를 주문했는데 올 생각을 하지 않는다. 근데 보니까 카메라를 USB로 컴퓨터에 연결 할 수 있길래 연결을 했는데 컴퓨터가 인식을 못 한다. 좀 알아보니 Canon에서 제공하는 프로그램이 있어서 설치를 하려고 보니 이게 다 Updater라서 기존 프로그램을 CD로 설치해놓지 않으면 못 쓰게 해놨다. 

혹시나 해서 구글링을 했더니 역시나 여러가지 방법들이 있어서 성공적으로 설치했다.

참고 사이트:
http://www.northlight-images.co.uk/article_pages/install_canon_software.html
http://www.navjagpal.com/blog/?p=16&cpage=1#comment-176

핵심은 가짜 프로그램을 만들어서 마치 이게 기존의 EOS Utility인양 하는 것이다.
맥에서의 방법을 정리하면

1. 캐논 사이트에서 프로그램을 받는다. (아래 링크는 400D에 해당하는 것이고 canada 사이트 임.)
http://www.canon.ca/inetCA/serviceDetail?m=load&id=45&sid=7&mid=0002200289&type=D&opt=1 

2. 맥의 경우 dmg를 연결하면 updateinstaller.app이 있는데 여기서 오른쪽 클릭을 해서 "패키지 내용 보기 (Show Package Contents)"를 선택한다.

3. Contents/Resources/update.plist 파일을 Xcode로 열어보면 "UpdateApp/NeedAppsArray"와 "UpdateApp/Signature" 필드를 확인한다. 내가 설치한 버전의 경우 EOS Viewer Utility와 EVUX를 필요로 함을 알 수 있었다. 

4. Automator를 실행시켜 가짜 앱을 하나 만들자. 그리고 이름을 EOS Viewer Utility로 저장하고 마찬가지로 패키지 내용 보기를 통해 Contents/info.plist를 Xcode로 연다. 

5. 여기서 Bundle Name 필드를 EOS Viewer Utility로 Bundle OS Type Code와 Bundle creator OS Type code를 EVUX로 바꾼다.

6. 다운받은 updater를 실행하면 잘 설치한다! 

설치하고나니 CF 카드리더기 없이도 파일을 옮길 수 있고 카메라를 컴퓨터로 컨트롤도 가능하다. 일몰을 간격을 두고 촬영하는일을 하고 싶었는데 따로 타이머가 있는 릴리즈를 사야하나 한창 고민하던 차에 이런 방법으로 가능하다니! 물론 야외 촬영시 전원이 문제긴 하지만 그건 또 별개의 문제. 일단 집에서 24시간 인터벌 촬영을 시도해봐야겠다. 현재 컴퓨터와 카메라를 연결하는 선이 기존 CF카드리더기에서 사용하던 선이라 너무 짧아서 USB extension을 따로 사야한다. 카메라는 역시 돈먹는 기계!
http://www.ubuntu.or.kr/viewtopic.php?p=83658

이제 우분투 64비트에서도 daum cloud를 쓸 수 있다.

그리고 야구는 판도라 TV 팬캐스트로 보면 된다.

안되는게 없네. ubuntu에서 되는게 많아질수록 연구가 잘 안된다. 쳇. 
고흥에서 표박사님께 사사받은 vim-latexsuite.

기본적인 설정만 했지만 vi로 TeX작업을 하는데 상당히 강력한 도구가 될 것 같다.

몇 가지 필요한 기본 설정

1. vim-addons 설정 확인
vim-addons status
2. vim-addons에 latexsuite 추가
sudo vim-addons -w install latex-suite
and/or
vim-addons install latex-suite 
sudo로 실행하면 system wide하게 적용된다.

3. 불필요한 에러 메세지 제거
Error detected while processing /var/lib/vim/addons/plugin/remoteOpen.vim:
line   37:
E174: Command already exists: add ! to replace it
line   38:
E174: Command already exists: add ! to replace it
이런 에러가 발생하는 경우가 있는데 저 파일을 열어보면 37, 38째 줄에있는
com -nargs=1 RemoteOpen :call RemoteOpen('<args>')
com -nargs=? RemoteInsert :call RemoteInsert('<args>')  
두 문장을 주석처리 (") 해준다.

4. recommended setting
Make sure that you create a few necessary settings in your ~/.vimrc.
" REQUIRED. This makes vim invoke Latex-Suite when you open a tex file.
filetype plugin on

" IMPORTANT: win32 users will need to have 'shellslash' set so that latex
" can be called correctly.
set shellslash

" IMPORTANT: grep will sometimes skip displaying the file name if you
" search in a singe file. This will confuse Latex-Suite. Set your grep
" program to always generate a file-name.
set grepprg=grep\ -nH\ $*

" OPTIONAL: This enables automatic indentation as you type.
filetype indent on

" OPTIONAL: Starting with Vim 7, the filetype of empty .tex files defaults to
" 'plaintex' instead of 'tex', which results in vim-latex not being loaded.
" The following changes the default filetype back to 'tex':
let g:tex_flavor='latex'
In addition, the following settings could go in your ~/.vim/ftplugin/tex.vim file:

" this is mostly a matter of taste. but LaTeX looks good with just a bit
" of indentation.
set sw=2
" TIP: if you write your \label's as \label{fig:something}, then if you
" type in \ref{fig: and press <C-n> you will automatically cycle through
" all the figure labels. Very useful!
set iskeyword+=:

참고링크
http://vim-latex.sourceforge.net/
http://michaelgoerz.net/refcards/#latexsuite

데스크탑 하드가 맛가는 바람에 노트북 셋업을 위해서 간만에 인터넷의 바다를 헤엄쳤다.

1. monitor setting 확인
$xrandr --prop
 
2. external monitor를 dual로 쓰기
$xrandr --output VGA --right-of LVDS --auto

이렇게 간단한 것을 아예 모니터 못찾는 애들꺼 보면서 괜히 삽질했네.

미래를 위한 링크
http://www.chronox.de/x40_linux/linux_on_x40.html

삽질은 끝이 없다.
 

+ Recent posts