TECkit
After the Mac arrived last week, one of the first programs I installed was TeXShop.
That caused me to play around with XeTeX, which – although it’s also available for Linux – I had never really got around to playing around with.
One interesting feature I noticed immediately was the maps: When loading a font one can specify an input mapping like this: \setmainfont[Mapping=tex-text]{Gentium} and this will cause -- to be mapped to – etc.
I wanted to play around with this, but there didn’t seem to be an information on these maps included.
However, a bit of googling told me that it’s a SIL invention. On Linux/Unix, just download the source code and compile it, and on Windows and Mac, you can download precompiled programs.
Once that’s in place, you can start having fun!
As an example, create a map file with the following contents and call it firsttest.map:
LHSName "FirstTest" RHSName "UNICODE" pass(Unicode) ;Greek U+0061 <> U+03B1 ; a U+0062 <> U+03B2 ; b U+0064 <> U+03B4 ; d U+0065 <> U+03B5 ; e U+0074 <> U+03C4 ; t U+0069 <> U+03B9 ; i ;Cyrillic U+0063 <> U+0446 ; c U+006C <> U+043B ; l U+006D <> U+043C ; m U+0067 <> U+0433 ; g
Now compile it with teckit_compile firsttest.map, and you can now load it in XeTeX like this: \setmainfont[Mapping=firsttest]{Gentium}.
After doing this, anything typeset with the main font will come out in an interesting mixture of Latin, Greek and Cyrillic (see the illustration above).
This is of course a fairly silly example, but it can be really useful if you’re not comfortable typing another language directly, or if there is no keyboard layout available and you don’t want to define one yourself.
How to make business cards in LaTeX
When we set up our company, we needed some business cards.
VistaPrint will make business cards from a PDF file made according to the following specifications: “Full Bleed Size: 90mm x 52mm; Document Trim Size: 87mm x 49mm”.
I prefer doing typography in LaTeX, so I just needed to set this up properly.
I had a few problems with the margins, but with some help from DK-TUG’s mailing list, I came up with the following:
\documentclass[11pt,a4paper]{memoir}
\setstocksize{52mm}{90mm}
\setpagecc{49mm}{87mm}{*}
\settypeblocksize{43mm}{81mm}{*}
\setulmargins{3mm}{*}{*}
\setlrmargins{3mm}{*}{*}
\setheadfoot{0.1pt}{0.1pt}
\setheaderspaces{1pt}{*}{*}
\checkandfixthelayout[fixed]
\pagestyle{empty}
\usepackage{color}
\begin{document}
\pagecolor[cmyk]{...}
...
\end{document}
The “[fixed]” option is very important here, but it is only available in the newest versions of memoir, so you might need to upgrade this package if you have problems getting it to work.
After designing the actual business card, I ran it through pdflatex and uploaded the resulting file to VistaPrint, and it worked beautifully, as can be seen on the photo.
Font design
Normally when you design a font these days, you use a program like FontForge, which is basically a glorified drawing program.
You can do anything you want, but it’s basically up to you to make the individual characters looks similar so that they combine to form a unified and beautiful font.
If you use a program like METAFONT instead, you have more options. You can define a “pen”, for instance a rotated oval, that you can draw shapes with, and you can define functions, for instance to produce serifs in a given location. However, you have to sacrifice drawing the basic shape with your mouse and have to use mathematical expressions instead.
So I’ve been wondering for some years whether it would be possible/feasible to write a font design program that lets you define a sophisticated “pen” that not only has a shape, but also comes with serifs to leave at the start and end points of a line. The serifs and the shape could depend on the direction of the stroke.
So with such a pen defined, you could then draw the basic shape in your drawing program and all the sophisticated bits would appear automagically.
In other words, I suggest drawing the top character on the right manually in the drawing program, but using fancy “pens” to turn that basic shape into all the variants beneath.
The resulting font could then be loaded into FontForge for fine-tuning, but it should be much faster than drawing an entire font by hand.
Has something like this ever been done yet?















