« 2006年6月 | Main | 2006年8月 »

2006年7月18日

Virtual PC Is Now Free!

[ カテゴリ: MacOSX / Windows ]
Whether Microsoft virtualization technology is an important component of your existing infrastructure or you're just a Virtual PC enthusiast, you can now download Virtual PC 2004 absolutely free. Microsoft is also offering the free download of Virtual PC 2007, with support for Windows Vista in 2007.

へー。なんでもただにしないと戦えないんですなあ。

2006年7月25日

タブは邪魔だけどスクリーンの一覧は欲しい

[ カテゴリ: Emacsen ]

なんて話を、ElScreenでたまに聞くことがあります。 たとえば、frame-titleに表示するなんて云うのはどうなんでしょうね?

こんな感じで。

(defun elscreen-frame-title-update ()
  (when (elscreen-screen-modified-p 'elscreen-frame-title-update)
    (let ((screen-list (sort (elscreen-get-screen-list) '<))
	  (screen-to-name-alist (elscreen-get-screen-to-name-alist)))
      (setq frame-title-format
	    (mapconcat
	     (lambda (screen)
	       (format "%d%s %s"
		       screen (elscreen-status-label screen)
		       (get-alist screen screen-to-name-alist)))
	     screen-list " ")))))

(eval-after-load "elscreen"
  '(add-hook 'elscreen-screen-update-hook 'elscreen-frame-title-update))

2006年7月26日

Wimmo

[ カテゴリ: Life ]

Wimmo

特に物騒なところに住んでるというわけでもないんですが、 窃盗犯は場所を選んでくれるわけでもないので、 やっぱりそれなりの準備は必要だと思うわけです。 ところが、今まで車はほぼ無防備な状態でした (その気になれば一撃な車なんですけど、 まあ国産車なんて多かれ少なかれ一撃に近いものがあるので同じか)。

というわけで、ステアロックにWimmoを購入してみました。 赤と黄色で外から見ても見えやすく、抑止力にはなりそうです。 まあ、ワイヤーなので専用の工具があればすぐに切られそうですけど、 そういうのを持ち歩いて狙ってるひとにはなにをしても無駄なので、 そういう意味ではそれなりの意味はあるのではないでしょうか。

2006年7月28日

teTeX3とdvipdfmx

[ カテゴリ: MacOSX / NetBSD / Technology ]

MacOSXでpkgsrcを使ってるのは物好きらしいですが、その物好きなわけです。 理由はいろいろあるんだけど、まあそこは今回の主題ではないので触れないことで。

で、いつだったかteTeXを3系統に更新しました。 バージョン2ではコンパイルのときにちょっくら細工をしないとだめだったんですが、 そういうこともなくなり快適…かとおもいきや、思わぬ落とし穴が。 dvipdfmxがまともに動かないのです。

これ、ちゃんと調べてませんが、おそらくpkgsrcがどうこうというよりは、 teTeX3ではちゃんと環境にあった設定をしろよって方針に変わったんですかね。 結論から書くと、設定がことごとくされてなかったと云うことです。 まず、

** WARNING ** Could not locate a virtual/physical font for TFM "rml".
** WARNING ** >> There are no valid font mapping entry for this font.
** WARNING ** >> Font file name "rml" was assumed but failed to locate that font.
** ERROR ** Cannot proceed without .vf or "physical" font for PDF output...

って怒られます。dvipdfmxではフォントはcid-x.map (pkgsrcでは/usr/pkg/share/texmf-local/dvipdfm/config/cid-x.map) に書かれてるんですけど、見事に空っぽ。 ってことで、お好みに応じてなんですけど、次のような感じに。

%% This file 'cid-x.map' is read by dvipdfmx for default
%% dvipdfmx.cfg setting.  Please append fontmap entries here.

rml  H Ryumin-Light
gbm  H GothicBBB-Medium
rmlv V Ryumin-Light
gbmv V GothicBBB-Medium

さて、これで万事解決かというとそういうわけにもいかず。

** WARNING ** No image converter available for converting file "xxxxx.eps" to PDF format.
** WARNING ** >> Please check if you have 'D' option in config file.
** WARNING ** pdf: image inclusion failed for "xxxxx.eps".
** WARNING ** Failed to read image file: xxxxx.eps
** WARNING ** Interpreting special command PSfile (ps:) failed.
** WARNING ** >> at page="4" position="(141.304, 552.345)" (in PDF)
** WARNING ** >> xxx "PSfile="xxxxx.eps" llx=0 lly=0 urx=1039 ury=612 rwi=103"

まーじで。teTeX2ではこんなことはなかったんだがなーとおもいつつ、 云われるがままにDオプションを確認するとdvipdfmx.cfg (/usr/pkg/share/texmf-local/dvipdfm/config/dvipdfmx.cfg) を確認すると(ちょっと長いので途中折り返してます)、

%% *Examples* for GhostScript (PS-to-PDF)%%
%% The following example decode all DCT (i.e., JPEG) encoded images
%% and then recompress images with Flate (zlib, same as PNG) encode
%% filter. If you are using recent version of gs, then please remove
%% -dAutoFilterXXXImages and -dXXXImageFilter.
%% /FlateEncode is introduced to avoid quality loss of "EPS JPEG"
%% images.
%%
%% Also note that PAPERSIZE=a0 is specified below. This convert PS
%% files (including EPS) to A0 papersize PDF. This is necessary to
%% prevent gs from clipping PS figure at some papersize. (A0 above
%% simply means large size paper)%%
%% GhostScript (Unix/Linux):
%D  "gs -q -dNOPAUSE -dBATCH -sPAPERSIZE=a0 -sDEVICE=pdfwrite -dCompatibilityLevel=1.3 
  -dAutoFilterGrayImages=false -dGrayImageFilter=/FlateEncode -dAutoFilterColorImages=false 
  -dColorImageFilter=/FlateEncode -dUseFlateCompression=true -sOutputFile=%o %i -c quit"
  (略)

全部コメントアウトされてるじゃん… ってことで、gsのコメントアウトをはずして、めでたしめでたし。 ちなみに、Windowsの場合はその次のgswin32cを使えばいいだろうし、 Acrobat持ってるひとはdistill使えばいいってことでしょうね。 MacOSXのAcrobatではDistillerを単独起動できなさそうなので、 まあgsを使って満足。