Most of the LaTeX users, especially who use pdflatex, keep a PDF viewer running to see changes while editing and compiling a LaTeX file. Also, they often use Make or SCons to automate the compile process.

In my case, I use SCons and it works well in Linux and Mac OS X. However, in Windows, SCons produces an error and is failed to update the PDF file when it is already opened by a PDF viewer. This is because most PDF viewers for Windows set a read-only attribute on an opened file and SCons removes a target file before build it as default. In other words, SCons would stop because it is simply failed to remove the locked file.

Other SCons users already experienced the same issue. Luckily, I find this “[scons-users] pdflatex preview on windows – file locking” thread. They examined an exact cause of this issue and suggested a very useful soultion using SCons’s the Precious Function which prevents target files from being removed.

Here is my wrap-up and solution to this issue.

import os
env=Environment()
# Look in standard directory ~/texmf for .sty files
env['ENV']['TEXMFHOME'] = os.path.join(os.environ['HOME'],'texmf')
env.PDF(target = 'main.pdf', source = 'main.tex')
env.Precious('main.pdf')

1

Lastly, I have an advice in choosing a PDF viewer. Do not use Adobe Reader. It prevents opened files from changing, so it ends up causing an error. At least, you need to use Foxit Reader, Sumatra PDF, Evince or so on. I prefer to Sumatra PDF because it reloads automatically when it detects a file changed.

Happy LaTeXing! :-)


  1. LatexSupport – SCons Wiki []

Tags: ,

Steve Jobs (1955-2011)

Steve Jobs (1955-2011)

당신은 스티브 잡스를 인용할 수도, 그의 의견에 반대할 수도, 그를 찬양하거나 혹은 비난할 수도 있다. 하지만 당신이 할 수 없는 단 한 가지는, 바로 그와 그의 창조물을 못 본 척 무시하는 것이다. 왜냐하면 그는 기존의 것을 전혀 새롭게 바꿨고 앞으로 가야 할 새 지평을 열었으며 그 결과 인류의 진보를 앞당겼기 때문이다. 그는 미친 사람이었지만, 동시에 천재였다. 스스로 세상을 바꿀 수 있다고 믿을 만큼 미쳤던 이 사람이 결국 세상을 바꿨고, 이제 그는 더 이상 우리 곁에 없다. 그를 기억한다.1

R.I.P. Steve Jobs (1955-2011)2

 

관련 동영상들

CNN에서 만든 “Apple’s passionate pitchman” 동영상이다. 실제로 지켜본 키노트들인데, 이렇게 다시 정리해서 보니 iPod Nano 발표 때 Nano를 코인 포켓에서 꺼냈을 때의 충격도 iPhone 발표 때는 “과연 컴퓨터 회사가…” 라고 회의적으로 생각했던 것도 새록새록 기억나면서 매우 감동적이다.

 

그리고 내가 번역 및 각색한 글의 원본인 Apple의 Think Different 광고이다. 실제 방송된 버전이 아닌 스티브 잡스가 직접 나레이션을 녹음한 버전이다.

“Here’s to the crazy ones. The misfits. The rebels. The troublemakers. The round pegs in the square holes. The ones who see things differently. They’re not fond of rules. And they have no respect for the status quo. You can quote them, disagree with them, glorify or vilify them. About the only thing you can’t do is ignore them. Because they change things. They push the human race forward. And while some may see them as the crazy ones, we see genius. Because the people who are crazy enough to think they can change the world, are the ones who do.”

페이스북 창업자 Mark Zuckerberg의 추도문이다. 여기 달린 리플에 따르면 스티브 잡스는 iCloud를 설치하러 올라갔다고 한다.

가수 비와 춤 대결을 펼쳤던 걸로 국내에 유명한 스티븐 콜베어의 “콜베어 리포트 – 스티브 잡스 헌정” 영상이다. 늘 그렇듯이 시종일관 재밌지만, 마지막 장면은 정말 짠하다.

“나도 마찬가지예요. 그동안 고마웠어요.
(Right back at ‘cha. Thanks for everything.)”


  1. 이 글은 아래 Think Different 광고의 내용을 번역 및 조금 각색한 것이다. []
  2. 애플 홈페이지에서 위 사진을 가져오는데 파일명을 보니 t_hero.png 였다. 자기 회사의 창업자이자 전 CEO의 사진을 올리면서 파일명을 hero라고 네이밍하던 디자이너의 마음을 조금은 알 수 있을 것 같다. []

Tags: ,

Mortimer "Morte" Rictusgrin

한 노인이 어두운 길에 홀로 앉아 있었어. 그는 어느 방향으로 가야 할지 몰랐고, 행선지도, 자신이 누구인지도 망각하고 있었어. 그는 피곤한 다리를 쉬게 하기 위하여 잠시 앉았지. 그리고 올려다보니 갑자기 눈앞에 어떤 노파가 나타난 거야. 그녀는 이빨도 없이 싱긋 웃었지, 그리고 깔깔거리면서 말했어.

“이제 당신의 세 번째 소원을 말할 차례요. 무엇을 원하시오?”

“세 번째 소원?”

남자는 당황했어.

“첫 번째와 두 번째 소원도 말한 적이 없는데 어떻게 세 번째 소원을 말하라는 거요?”

“당신의 두 소원은 이미 성취되었소.”

노파가 말했지.

“하지만 당신의 두 번째 소원은 모든 걸 첫 번째 소원을 말하기 전 상태로 되돌려 달라는 것이었소. 그래서 당신은 아무것도 기억하지 못하는 거요. 왜냐하면, 모든 것이 정확히 당신이 어떤 소원도 말하기 전의 상태로 되돌아갔기 때문이오.”

그녀는 불쌍한 노인을 보며 깔깔 웃었지.

“그래서 하나의 소원만 남은 거요.”

“좋소.”

노인이 말했어.

“나는 이 얘기를 믿지 않소. 하지만 소원을 말해서 손해 볼 건 없으니까…
나는 내가 누군지 알고 싶소.”
.
.
.
“재미있군.”

노파는 소원을 들어주고, 영원히 사라지며 말했어.

“그게 바로 당신의 첫 번째 소원이었소.”

설명

Black Isle Studios가 만든 “Planescape: Torment“(플레인스케이프: 토먼트, 1999. 12. 12)라는 게임에 나오는 이야기이다. 작중 Morte라는 캐릭터1가 들려주는데, 옛날부터 소설이나 드라마, 영화 등에 자주 나오는 세 가지 소원(Three Wishes) 이야기의 약간 꼬아진 형태이다. Morte’s Tale의 영어 원문은 아래와 같다.

I was out of stories, but asked Morte if he had a story to trade.

He replied, “Me? Why do *I* have to tell a story?”

I told him to just tell a story, to which he complied.

“An elderly man was sitting alone on a dark path, right? He wasn’t certain of which direction to go, and he’d forgotten both where he was traveling to and who he was. He’d sat down for a moment to rest his weary legs, and suddenly looked up to see an elderly woman before him. She grinned toothlessly and with a cackle, spoke: ‘Now your *third* wish. What will it be?’”

“‘Third wish?’ The man was baffled. ‘How can it be a third wish if I haven’t had a first and second wish?’”

“‘You’ve had two wishes already,’ the hag said, ‘but your second wish was for me to return everything to the way it was before you had made your first wish. That’s why you remember nothing; because everything is the way it was before you made any wishes.’ She cackled at the poor berk. ‘So it is that you have one wish left.’”

“‘All right,’ said the man, “I don’t believe this, but there’s no harm in wishing. I wish to know who I am.’”

“‘Funny,’ said the old woman as she granted his wish and disappeared forever. ‘That was your first wish.’”2


  1. 사진을 보면 알겠지만, 떠다니는 해골이다[..] []
  2. YVES THE TALE-CHASER; Quotes: Planescape Torment []

Tags: , , ,

« Older entries