{"id":1650,"date":"2009-10-13T18:17:40","date_gmt":"2009-10-13T17:17:40","guid":{"rendered":"http:\/\/blog.widmann.org.uk\/?p=1650"},"modified":"2009-10-13T18:17:40","modified_gmt":"2009-10-13T17:17:40","slug":"teckit","status":"publish","type":"post","link":"https:\/\/widmanniana.org\/blog\/teckit\/","title":{"rendered":"TECkit"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/widmanniana.org\/blog\/wp-content\/uploads\/2009\/10\/tec.png\" alt=\"Mixing three alphabets\" title=\"Mixing three alphabets\" width=\"50%\"  class=\"alignright size-full wp-image-1649\" \/>After the Mac arrived last week, one of the first programs I installed was TeXShop.<\/p>\n<p>That caused me to play around with <a href=\"http:\/\/en.wikipedia.org\/wiki\/XeTeX\">XeTeX<\/a>, which &ndash; although it&#8217;s also available for Linux &ndash; I had never really got around to playing around with.<\/p>\n<p>One interesting feature I noticed immediately was the maps: When loading a font one can specify an input mapping like this: <code>\\setmainfont[Mapping=tex-text]{Gentium}<\/code> and this will cause <tt>--<\/tt> to be mapped to &ndash; etc.<\/p>\n<p>I wanted to play around with this, but there didn&#8217;t seem to be an information on these maps included.<\/p>\n<p>However, a bit of googling told me that it&#8217;s a <a href=\"http:\/\/scripts.sil.org\/cms\/scripts\/page.php?site_id=nrsi&#038;item_id=TECkitDownloads\">SIL invention<\/a>.   On Linux\/Unix, just download the source code and compile it, and on Windows and Mac, you can download precompiled programs.<\/p>\n<p>Once that&#8217;s in place, you can start having fun!<\/p>\n<p>As an example, create a map file with the following contents and call it firsttest.map:<\/p>\n<pre>LHSName\t\"FirstTest\"\nRHSName\t\"UNICODE\"\n\npass(Unicode)\n\n;Greek\nU+0061    <>   U+03B1    ; a\nU+0062    <>   U+03B2    ; b\nU+0064    <>   U+03B4    ; d\nU+0065    <>   U+03B5    ; e\nU+0074    <>   U+03C4    ; t\nU+0069    <>   U+03B9    ; i\n;Cyrillic\nU+0063    <>   U+0446    ; c\nU+006C    <>   U+043B    ; l\nU+006D    <>   U+043C    ; m\nU+0067    <>   U+0433    ; g\n<\/pre>\n<p>Now compile it with <code>teckit_compile firsttest.map<\/code>, and you can now load it in XeTeX like this: <code>\\setmainfont[Mapping=firsttest]{Gentium}<\/code>.<\/p>\n<p>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).<\/p>\n<p>This is of course a fairly silly example, but it can be really useful if you&#8217;re not comfortable typing another language directly, or if there is no keyboard layout available and you don&#8217;t want to define one yourself.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>After the Mac arrived last week, one of the first programs I installed was TeXShop. That caused me to play around with XeTeX, which &ndash; although it&#8217;s also available for Linux &ndash; 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 &#8212; to be mapped to &ndash; etc. I wanted to play around with this, but there didn&#8217;t seem to [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[159,114,147],"tags":[],"class_list":["post-1650","post","type-post","status-publish","format-standard","hentry","category-en","category-computing","category-typography"],"_links":{"self":[{"href":"https:\/\/widmanniana.org\/blog\/wp-json\/wp\/v2\/posts\/1650","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/widmanniana.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/widmanniana.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/widmanniana.org\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/widmanniana.org\/blog\/wp-json\/wp\/v2\/comments?post=1650"}],"version-history":[{"count":0,"href":"https:\/\/widmanniana.org\/blog\/wp-json\/wp\/v2\/posts\/1650\/revisions"}],"wp:attachment":[{"href":"https:\/\/widmanniana.org\/blog\/wp-json\/wp\/v2\/media?parent=1650"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/widmanniana.org\/blog\/wp-json\/wp\/v2\/categories?post=1650"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/widmanniana.org\/blog\/wp-json\/wp\/v2\/tags?post=1650"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}