random technical thoughts from the Nominet technical team

Anti-aliased fonts in Vim on Mac OS X

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...
Posted by chris on May 10th, 2006

It is quite simple to get anti-aliased fonts working in Vim (that’s the GUI version obviously) on Mac OS X, but it doesn’t seem to be advertised very widely. The relevant line to add to your .gvimrc file is:

set anti

that’s it. While you’re there, you might want to set the font to something nice too. My suggestion is:

set gfn=Monaco:h13

which will use 13pt Monaco, but that’s just my preference.

UPDATE: Now that Vim 7.0 is out there are more details in this FAQ. Notice that they suggest 13pt Monaco too….

Make [Home] and [End] work in Mac OS X Terminal

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5 out of 5)
Loading ... Loading ...
Posted by chris on May 10th, 2006

For some reason, the Home and End keys don’t work as you might expect in Mac OS X’s Terminal.app. Instead of moving the cursor to the start and end of the current line, they scroll to the top and bottom of the window’s scrollback history.

You can get the behviour you might expect by pressing Shift+Home and Shift+End, but this is awkward. To fix this and make Home and End do what you expect:

  1. Open a fresh terminal window
  2. Choose Terminal->Window Settings from the menu
  3. Select “Keyboard” from the drop down list
  4. Select “End” in the list and press Edit
  5. Choose “send string to shell” and then move to the textbox
  6. Press <Esc> (33 will appear) then type [F. Press OK.
  7. Select “Home” in the list and press Edit
  8. Choose “send string to shell” and then move to the textbox
  9. Press <Esc> (33 will appear) then type [H. Press OK.
  10. Press “Use Settings As Default”

Producing PDF Files using teTeX 3.0 on Solaris

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...
Posted by patrick on May 10th, 2006

This document describes how to produce PDF documents in tetex and how to solve a specific problem with tetex 3.0 running on Solaris 8.
tetex is a UNIX distribution of the TeX typesetting system.
tetex is open-source software, www.tug.org/tetex.

Assume for this example you have created a program, makesometex, which produces tex output.

The simplest way to produce a pdf file would be to pipe tex commands into the tetex program pdftex:

./makesometex | pdftex

Unfortunately the PDF file produced causes an error when opened in Acrobat Reader,
e.g. “Cannot extract the embedded font ‘MWLMBK+FSAlbert-Light’. Some characters may not display or print correctly”.
The font affected will be the last one used in the document, and any line using this font will appear
as a row of dots, instead of the intended text.
The document will however open correctly using other pdf readers.

This is a known bug with the version of pdftex included in tetex 3.0, when compiled on Solaris 8,
see pdftex mailing list
and pdftex development mailing list.

An alternative method, which produces pdf files readable by Acrobat Reader,
is to use the tetex programs tex (to convert the tex output to a tex dvi file) and
dvipdfm (to convert the dvi file to a pdf file):

./makesometex | tex
dvipdfm makeseometex.dvi

Adding a Font to teTeX

1 Star2 Stars3 Stars4 Stars5 Stars (3 votes, average: 4 out of 5)
Loading ... Loading ...
Posted by patrick on May 10th, 2006

This document describes how to install a new font into tetex 3.0.
tetex is a UNIX distribution of the TeX typesetting system.
tetex is open-source software, www.tug.org/tetex.

This document uses as an example the installation of the font FS Albert.
It assumes possession of a Tex font metric file (FSAlbert.tfm)
and a PostScript Type 1 file (FSAlbert.pfb).
In our case tetex had been installed into /opt/tetex and
the new font was to be installed into the texmfdist directory tree (/opt/tetex/share/texmf-dist).

N.B. I realised afterwards that strictly speaking I should not have added the font into the texmfdist directory tree
(as this is meant to only hold fonts as originally distributed with tetex)
but should have instead created a new texmflocal directory tree (e.g. /opt/tetex/share/texmf-local).
However by this stage the font was in live use and could not be changed.

Create directories to hold the files relating to the new font(s).
In this example the directories are all named fontsmith:

mkdir /opt/tetex/share/texmf-dist/fonts/tfm/public/fontsmith
mkdir /opt/tetex/share/texmf-dist/fonts/type1/public/fontsmith
mkdir /opt/tetex/share/texmf-dist/fonts/map/dvips/fontsmith

Copy the font files into place:

cp FSAlbert.tfm /opt/tetex/share/texmf-dist/fonts/tfm/public/fontsmith
cp FSAlbert.pfb /opt/tetex/share/texmf-dist/fonts/type1/public/fontsmith

Create the file /opt/tetex/share/texmf-dist/fonts/map/dvips/fontsmith/fsalbert.map, containing the following:

FSAlbert FSAlbert <8r.enc <FSAlbert.pfb

Inform tetex of the newly-created files:

texhash

Run updmap-sys, which will add the new font to the font configuration files for all tetex programs:

updmap-sys --enable Map=fsalbert.map

Installing Ubuntu linux in Toshiba Portege S100

1 Star2 Stars3 Stars4 Stars5 Stars (3 votes, average: 4.67 out of 5)
Loading ... Loading ...
Posted by miquel on May 8th, 2006

Updated: look for [Feisty] for Feisty Fawn 7.04 tricks.

Ubuntu Linux works reasonable well in the Toshiba Portege S100. There is a report on testing for this computer at:

https://wiki.ubuntu.com/LaptopTestingTeam/ToshibaPortegeS100

Installation Issues
Hard disk detection

The installation process for Ubuntu Dapper has some problems detecting correctly the hard disk. There is no fix for this problem in version Ubuntu Dapper Flight 6 but the distribution can be installed following a work around described here:

https://launchpad.net/distros/ubuntu/+source/initramfs-tools/+bug/19749

Basically, what is needed is to unload a module and load another one. When the installation process arrives to the disk partitioning stage, there is no disk to partition, at this moment, a console can be opened by pressing ctr+f2 and the following commands can be given to load the appropriate driver:

modprobe -r ata_piix
modprobe ahci
modprobe -r ahci
modprobe ahci

the two last may be not necessary but some times are needed to force the driver to bind to disk resources. In anycase there is no harm on issuing all of them.

After this go back to the installation console (ctrl+f1) and retry the disk partitioning step, the hard disk should be now available and the installation process can be finalized.

[Feisty] Desktop installation is done from a running live which already has failed to detect the hard disk and as the module ata_piix is in use it can not be removed. I suggest downloading the Alternate Desktop CD from

http://www.ubuntu.com/getubuntu/download

And just after booting apply the modprobe sequence explained above. This will install the system properly but it will fail to boot as the kernel will not be able to find the disk. Gary Allen Garibaldi provided a solution for that:

Boot with the install CD again, mount your hard disk root partition in /mnt and Create a init-premount file in

/mnt/etc/initramfs-tools/scripts/init-premount/ahci

with the contents:

modprobe -r ata_piix
modprobe ahci
modprobe -r ahci
modprobe ahci
modprobe ata_piix

give execution permissions to the script:

sudo chmod +x /mnt/etc/initramfs-tools/scripts/init-premount/ahci

and update your initrd with:

sudo update-initramfs -u

The system should boot now.

Networking

[Feisty] Networking works straight in feisty and places lan card on eth0 and wireless in eth1.

Only wireless card is detected by the installer and placed in eth0, therefore installation must be carried using this interface.
After the installation is done, edit /etc/apt/sourceslist and comment out the CDROM line while the rest of lines for all repositories must be uncommented. Then the system can be updated using the following commands:

sudo apt-get update
sudo apt-get dist-upgrade

A newer kernel is updated from the net which contains support for the ethernet card which will be detected after rebooting the system and work fine

However, the ethernet NIC is configured as eth2 instead eth1. Use “ifconfig -a” after updating the system to see where to which interface the NIC has been assigned.

The interface must be configured in /etc/network/interfaces:

miquel@polldebrega:~$ cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp
# wireless-* options are implemented by the wireless-tools package
wireless-mode managed
wireless-essid Nominet
wireless-key1 TooManySecrets;)

auto eth2
iface eth2 inet dhcp

Recent Posts

Highest Rated

Categories

Archives

Meta: