Sunday, July 27, 2008

Linux mount ntfs hfsplus partition

okay, this pretty much drove me crazy today. Here are some entries from /dev/disk/by-label lrwxrwxrwx 1 root root 10 Aug 4 03:07 Neumann -> ../../sdb5 lrwxrwxrwx 1 root root 10 Aug 4 03:07 Newton -> ../../sdb1 lrwxrwxrwx 1 root root 10 Aug 4 03:07 opt -> ../../sda6 lrwxrwxrwx 1 root root 10 Aug 4 03:07 root -> ../../sda2 the respective file-systems and mount-points are (from /etc/fstab) LABEL=root / ext3 defaults 1 1 LABEL=opt /opt ext3 defaults 1 2 /dev/disk/by-label/Newton /Newton ntfs ro,umask=0222 0 0 /dev/disk/by-label/Neumann /Neumann hfsplus defaults 1 2 #LABEL=Newton /Newton ntfs ro,umask=0222 0 0 #LABEL=Neumann /Neumann hfsplus defaults 1 2 See the last two commented out entries starting with LABEL=Newton, and LABEL=Neumann? So now the million-dollar question is why is it that I'm able to mount the ext3 partitions / and /opt using their labels, while I've to use an explicit device path for the ntfs and hfsplus partitions (volums)? Mind you, the ntfs and hfsplus volumes do have labels, Newton, and Neumann, respectively. I put them there using gparted. Also the corresponding links are very much there in /dev/disk/by-label. I have a hunch that somebody somewhere is not able to read the ntfs/hfsplus labels, which are written on the partition itself (another guess) maybe in the first few sectors of the partiton, like the MBR. Meanwhile, if you are looking to mount your ntfs/hfsplus volumes and using labels, hopefully my experience will save you some time and frustration.

Friday, May 9, 2008

In TeX Command List -> LaTeX, changed %`%l%(mode)%`%t to %`%l%(mode)%t. The new command gets rid of the "\input" in the command line, and now works with a pre-compiled preamble. The file to be processed still appears as main.tex on the command line (via %t) Should get rid of the .tex extension.

Wednesday, May 7, 2008

Generating LeTeX preamble format (.fmt) file

I used to use a compiled preamble, but since i really didn't see a difference in the processing times, perhaps because my dynamic part in my documents is usually quite big, and also because i now have a quad-core machine (gasp!). Anyhow, so i stopped compiling, and over time, forgot the way to generate the .fmt file. Lately, have been doing some TeX-ing on my laptop, which obviously lacks the desktop's muscle, hence the need for a pre-compiled preamble. Searching on the net brought me to the blog [1], which gives a pretty good description of the process. First, some remarks about the command below, looking at which today, sort of connected together bits of knowledge i have about the inner workings of the TeX system. Also somewhat explains the various options in the command, which even to a seasoned LaTeX user would seem obscure. latex -ini "&latex preamble.tex \dump" so now, LaTeX (and it's other avatars), in my understanding, is just a front end; in that it provides a number of macros to TeX, which is the real typesetting engine. The macros are (pre-)compiled and stored in a format file, which in the case of LaTeX would be latex.fmt. So, ``&latex" in the command above, simply states that latex.fmt be loaded. Now, let's look using the compiled preamble while compiling the actual document main.tex. The first line of main.tex is: %&preamble well, other than the comment symbol ``%", we've figured out what's going on: the ``&" operator tells TeX to load the (binary ) format file preamble.fmt As I see on my Powerbook G4, the time saved in the compile cycle is significant when the compiled preamble is used. References:
  1. http://magic.aladdin.cs.cmu.edu/2007/11/02/precompiled-preamble-for-latex
  2. TeX info manual: memory dump
  3. LaTeX info manual