<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>(b)logophile &#187; linux</title>
	<atom:link href="http://www.logophile.org/blog/tags/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.logophile.org/blog</link>
	<description>blog of a logophile (not "logos", but "λόγος")</description>
	<lastBuildDate>Sun, 05 Feb 2012 08:00:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Some notes on fonts</title>
		<link>http://www.logophile.org/blog/2010/04/28/some-notes-on-fonts/</link>
		<comments>http://www.logophile.org/blog/2010/04/28/some-notes-on-fonts/#comments</comments>
		<pubDate>Wed, 28 Apr 2010 18:39:20 +0000</pubDate>
		<dc:creator>tikitu</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[(La)TeX]]></category>
		<category><![CDATA[fonts]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[typography]]></category>

		<guid isPermaLink="false">http://www.logophile.org/blog/?p=878</guid>
		<description><![CDATA[Recently I&#8217;ve discovered some fun new things about fonts, in LaTeX and under linux. (Yes, it&#8217;s another geek-out post. Sorry mum.) All this stuff can be found online (that&#8217;s where I found it), but it&#8217;s a bit scattered around. And I can&#8217;t remember where any of it is. Summary: XeTeX gives LaTeX access to non-TeX-installed [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I&#8217;ve discovered some fun new things about fonts, in LaTeX and under linux. (Yes, it&#8217;s another geek-out post. Sorry mum.) All this stuff can be found online (that&#8217;s where I found it), but it&#8217;s a bit scattered around. And I can&#8217;t remember where any of it is.</p>

<p>Summary:</p>

<ul>
<li><a href="http://scripts.sil.org/xetex">XeTeX</a> gives LaTeX access to non-TeX-installed fonts, and <a href="http://ctan.org/tex-archive/macros/xetex/latex/fontspec/"><code>fontspec</code></a> makes it easy.</li>
<li>XeTeX also lets you write in unicode; <a href="http://ctan.org/tex-archive/macros/latex/exptl/biblatex/"><code>biblatex</code></a> will play nicely if you use <a href="http://ctan.org/tex-archive/biblio/biber/"><code>biber</code></a> instead of <code>bibtex</code> as the backend.</li>
<li><code>fc-list</code> lists installed fonts (giving the names that XeTeX needs).</li>
<li><a href="http://fontforge.sourceforge.net/"><code>fontforge</code></a> will display every glyph in the font, nice and big (and you can print the result).</li>
<li><a href="http://fontmatrix.net/"><code>fontmatrix</code></a> has a <em>very</em> slick interface for font-browsing, from &#8220;tag-this-font&#8221; to &#8220;inspect-this-glyph&#8221;.</li>
<li>All of these except <code>biblatex</code> and <code>biber</code> (which are still in beta) are packaged for various Linux flavours; <code>biblatex</code> installation is easy, for <code>biber</code> I vaguely recall that I installed via CPAN, which is rather a pain. There may be easier alternatives by now though. </li>
</ul>

<p><span id="more-878"></span></p>

<h2>XeTeX lets you use all your fonts in LaTeX</h2>

<p>XeTeX is a TeX replacement; you compile your document with <code>xelatex</code> if you&#8217;ve been using <code>pdflatex</code>, and nothing much changes apart from that. But behind the scenes quite a lot happens; among other things, you get to use the <code>fontspec</code> package, which works with the font names that the rest of your Linux system knows about. (Another, less positive, feature of the move is that you XeTeX is incompatible with <a href="http://ctan.org/tex-archive/macros/latex/contrib/microtype/"><code>microtype</code></a>. Can&#8217;t have everything&#8230;)</p>


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #E02020; ">\</span><span style="color: #800000;">documentclass</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">article</span><span style="color: #E02020; ">}</span>
<span style="color: #E02020; ">\</span><span style="color: #800000;">usepackage</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">fontspec</span><span style="color: #E02020; ">}</span>
<span style="color: #E02020; ">\</span><span style="color: #800000;">usepackage</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">xunicode</span><span style="color: #E02020; ">}</span>
<span style="color: #E02020; ">\</span><span style="color: #800000;">usepackage</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">xltxtra</span><span style="color: #E02020; ">}</span>
<span style="color: #800000; font-weight: normal;">\setmainfont</span><span style="color: #E02020; ">[</span><span style="color: #C08020; font-weight: normal;">Mapping=tex-text</span><span style="color: #E02020; ">]{</span><span style="color: #2020C0; font-weight: normal;">Verdana</span><span style="color: #E02020; ">}</span></pre></div></div>


<p>If you pick a font with italic and bold alternatives, <code>\textit{}</code> and <code>\textbf{}</code> and so on will just work. Just like that. Which is nice.</p>

<p>If your font has Greek and Russian characters (Greek <em>text</em> characters, not a math alphabet), you can just type &#8216;em:</p>


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;">Lorem ipsem and so forth; ο ξυπόλητος πρίγκιπας; 
зону большого над, языке а; 
italic: <span style="color: #E02020; ">\</span><span style="color: #800000;">textit</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">in Latin και στα Ελληνικά</span><span style="color: #E02020; ">}</span>,</pre></div></div>


<p>Which is nice.</p>

<p>(I don&#8217;t know what the Russian says, nor do I remember where I got it. The Greek says &#8220;The barefoot prince&#8221; and &#8220;and in Greek&#8221;.)</p>

<p>That <code>Mapping=tex-text</code> says that XeTeX should recognise the old LaTeX style for quotes, long dashes, and so on. But you don&#8217;t have to use it: you can type them directly as unicode characters (which is nice).</p>


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;">When he goes---``Hello World!''<span style="color: #E02020; ">\\</span>
She replies—“Hello dear!”</pre></div></div>


<p>And if the font you&#8217;re using has fun OpenType features (and that&#8217;s the whole point, right?), you can access them easily too:</p>


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #800000; font-weight: normal;">\fontspec</span><span style="color: #E02020; ">[</span><span style="color: #C08020; font-weight: normal;">Ligatures={<span style="color: #2020C0; font-weight: normal;">Common, Rare</span>}</span><span style="color: #E02020; ">]{</span><span style="color: #2020C0; font-weight: normal;">Impact</span><span style="color: #E02020; ">}</span>
<span style="color: #800000; font-weight: normal;">\fontsize</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">12pt</span><span style="color: #E02020; ">}{</span><span style="color: #2020C0; font-weight: normal;">18pt</span><span style="color: #E02020; ">}</span><span style="color: #800000; font-weight: normal;">\selectfont</span> Questo è strano assai!
<span style="color: #800000; font-weight: normal;">\fontspec</span><span style="color: #E02020; ">[</span><span style="color: #C08020; font-weight: normal;">Numbers={<span style="color: #2020C0; font-weight: normal;">OldStyle</span>}</span><span style="color: #E02020; ">]{</span><span style="color: #2020C0; font-weight: normal;">Impact</span><span style="color: #E02020; ">}</span>Old style: 1234567<span style="color: #E02020; ">\\</span>
<span style="color: #800000; font-weight: normal;">\fontspec</span><span style="color: #E02020; ">[</span><span style="color: #C08020; font-weight: normal;">Numbers={<span style="color: #2020C0; font-weight: normal;">Lining</span>}</span><span style="color: #E02020; ">]{</span><span style="color: #2020C0; font-weight: normal;">Impact</span><span style="color: #E02020; ">}</span>Lining: 1234567</pre></div></div>


<p>See the <code>fontspec</code> documentation for much, much more. (If your pdf seems to have half its text missing, there&#8217;s something wrong with your pdf rendering library. I don&#8217;t remember what I did to fix this though; possibly just updated, or possibly changed to a different pdf viewer.)</p>

<h2><code>biblatex</code> with <code>biber</code> can handle unicode bibliographies</h2>

<p>So part of the reason I was originally playing around with all this was to help Olga write documents mixing Greek and Latin characters, with both Greek and Latin in the bibliography, with a minimum of hassle. It turns out that <code>bibtex</code> doesn&#8217;t like unicode, in particular it doesn&#8217;t know what to do with Greek. But <code>biber</code>, which is being developed as a backend for the <code>biblatex</code> package, is designed for unicode from the ground up. Both <code>biber</code> and <code>biblatex</code> are beta release software and there are still a few kinks to iron out, but they can already do <em>a lot</em>.</p>

<h2>List installed fonts with <code>fc-list</code></h2>

<p>If you&#8217;re anything like me, the first thing you&#8217;re going to want to do once you see how XeTeX and <code>fontspec</code> work is try out <em>lots</em> of fonts to see what you&#8217;ve got installed that you could use.</p>

<p>If you just want to know names, <code>fc-list</code> is your friend. Be prepared for a lot of output though&#8230;</p>

<p>Here&#8217;s a handy trick: use the <a href="http://ctan.org/tex-archive/graphics/pgf/base/plain/pgf/utilities"><code>pgffor</code></a> package (part of the fantastic graphics package <a href="http://ctan.org/tex-archive/graphics/pgf/"><code>pgf</code></a>) and you don&#8217;t have to constantly retype Lorem ipsem:</p>


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #E02020; ">\</span><span style="color: #800000;">usepackage</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">pgffor</span><span style="color: #E02020; ">}</span>
...
<span style="color: #800000; font-weight: normal;">\foreach</span> <span style="color: #800000; font-weight: normal;">\f</span> in <span style="color: #E02020; ">{</span>
  Droid Serif,
  Alfios,
  Alexander,
  Dustismo
  ...
  URW Bookman L<span style="color: #2C922C; font-style: italic;">%</span>
<span style="color: #E02020; ">}{</span><span style="color: #2020C0; font-weight: normal;">
  <span style="color: #800000; font-weight: normal;">\noindent</span><span style="color: #800000; font-weight: normal;">\setmainfont</span><span style="color: #E02020; ">{</span><span style="color: #800000; font-weight: normal;">\f</span></span><span style="color: #E02020; ">}</span><span style="color: #800000; font-weight: normal;">\f</span>:
  Lorem ipsem and so forth.
  <span style="color: #E02020; ">\</span><span style="color: #800000;">par</span><span style="color: #800000; font-weight: normal;">\medskip</span>
<span style="color: #E02020; ">}</span></pre></div></div>


<h2>Viewing fonts (and individual glyphs) with <code>fontforge</code> and <code>fontmatrix</code></h2>

<p>Somewhere along the line I picked up a free font with heaps of fleurons, and a font of 300 ampersands each by a different designer (yeah, a gimmick, but the proceeds went to charity). For both of these, I wanted a way to see all the glyphs the font contains, large enough to appreciate them as individual characters, and also with the codepoint information so I know how to get access to whichever one I might want to use.</p>

<p>The internet was silent on how to achieve this (or my google-fu was weak), until <a href="http://typophile.com/user/9108">JanekZ</a> helped me out <a href="http://typophile.com/node/69816">on typophile</a>. It seems <a href="http://fontforge.sourceforge.net/"><code>fontforge</code></a> is the only way to get a conveniently-formatted listing of every glyph the font contains (&#8220;Encoding >> Compact&#8221;); it can generate a pdf for printing but the pdf doesn&#8217;t contain codepoint information. But for simply browsing, <a href="http://fontmatrix.net/"><code>fontmatrix</code></a> is a thing of beauty. Unfortunately it seems to be buggy: &#8220;print&#8221; doesn&#8217;t produce any output, and &#8220;view all mapped glyphs&#8221; refuses to scroll. But the stuff that works works beautifully.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.logophile.org/blog/2010/04/28/some-notes-on-fonts/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Discoveries: stumpwm and screen-profiles</title>
		<link>http://www.logophile.org/blog/2009/05/16/discoveries-stumpwm-and-screen-profiles/</link>
		<comments>http://www.logophile.org/blog/2009/05/16/discoveries-stumpwm-and-screen-profiles/#comments</comments>
		<pubDate>Fri, 15 May 2009 22:14:09 +0000</pubDate>
		<dc:creator>tikitu</dc:creator>
				<category><![CDATA[non-transient]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[beautiful]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://www.logophile.org/blog/?p=682</guid>
		<description><![CDATA[Apparently my family don&#8217;t understand anything I write on this blog any more. This post isn&#8217;t going to help. The good news is, I&#8217;ve got a bundle of photos from Stockholm which I hope to put up sometime over the weekend. Travels in Scandinavia, that&#8217;s not geeky at all, right? This, on the other hand, [...]]]></description>
			<content:encoded><![CDATA[<p>Apparently my family don&#8217;t understand anything I write on this blog any more. This post isn&#8217;t going to help. The good news is, I&#8217;ve got a bundle of photos from Stockholm which I hope to put up sometime over the weekend. Travels in Scandinavia, that&#8217;s not geeky at all, right?</p>

<p>This, on the other hand, is.</p>

<p><span id="more-682"></span></p>

<p>I&#8217;ve used <a href="http://www.gnu.org/software/screen/">GNU <code>screen</code></a> for ages to keep my working environment set up the way I like it, wherever I am. I have a screen session permanently running on my office linux box, which I ssh to from wherever I happen to be.</p>

<p>That all changed this week, when my branch of our research institute moved to a new building. My linux box was taken offline and loaded into a truck; when it arrived at its new home, due to various cock-ups among the administration, it had no network access. (Word is they&#8217;re not going to let us ssh in anyway, sigh.)</p>

<p>So I&#8217;ve been playing around trying to set up my eee pc as a useful working environment. Step 1 was just copying all my configs from the desktop over to the netbook, and running everything from there instead. Imagine my surprise when some applications <em>did not work the same way as they used to!</em></p>

<p>Specifically, screen has gained a purely awesome addition: <a href="https://launchpad.net/byobu"><code>screen-profiles</code></a> provides something like the mode bar in emacs, configurable to add all sorts of goodies (battery monitor, wifi strength, lots of bits and pieces).</p>

<p>My other new discovery, which rather overshadows the first, is <a href="http://www.nongnu.org/stumpwm/index.html">StumpWM</a>. If screen and emacs had a baby, and brought it up to be a window manager, that would be stumpwm.</p>

<p>It&#8217;s a window manager written in lisp, like emacs,<sup>1</sup> and like emacs it&#8217;s configurable on-the-fly by lisp hacking.<sup>2</sup> Also like emacs it&#8217;s highly keyboard-driven, but more along the lines of screen: there&#8217;s a prefix key that diverts input to the stumpwm keymaps. (Actually I never realised before how similar the emacs and screen models are here; the only real difference is that screen gets away with only one keymap, hence only one prefix command. Stumpwm lets you define more if you need to, naturally.) Like screen, and unlike most window managers, you only see whatever you&#8217;re using at the moment (although you can tile windows the same way you can split emacs frames).<sup>3</sup></p>

<p>I started messing around with stumpwm because the display of the eee is so tiny, and I was frustrated with the amount of space being wasted on menu bars and panels and whatever.<sup>4</sup> I didn&#8217;t get very far at first, because I was trying to do everything by hand: shut down the Gnome display manager and restart X, pointing it at stumpwm. Of course all sorts of things stopped working, most importantly audio. But then I followed <a href="http://www.xsteve.at/prg/stumpwm/">XSteve&#8217;s instructions</a> for adding stumpwm as a session type under ubuntu, and magically <em>everything worked</em>.<sup>5</sup></p>

<p>By &#8220;everything&#8221;, I mean <em>everything</em>. Audio works (I&#8217;m listening to Bettye Lavette in Amarok right now). Two-finger touch-pad scrolling works. I can split a stumpwm screen into two panes, pull firefox into one pane and emacs into the other, mouse-select text in firefox and <em>drag and drop</em> it into emacs. It not only works, it shows the text being dragged (otherwise I never would have tried the experiment). Global shortcut keys defined in Gnome work (so I can control the volume Amarok plays at).</p>

<p>I am a complete convert: stumpwm is fantastic.</p>

<p>I have two complaints.</p>

<p>The first is that I want better ways to switch windows: a list across all groups, that works like <a href="http://www.emacswiki.org/emacs/InteractivelyDoThings"><code>ido</code> in emacs</a>: filter the list of possible targets by any sort of match, rather than just prefix-matching and tab-completion.<sup>6</sup></p>

<p>My second complaint is that both stumpwm and ido are written in (dialects of) lisp. Meaning that it&#8217;s conceivable that someone could hack bits of one into the other. Meaning that I&#8217;m <em>awfully</em> tempted to give it a try, instead of working on my dissertation. Shame on you, developers, for not protecting me from my instincts.</p>
<p>Notes:</p><ol class="footnotes"><li id="footnote_0_682" class="footnote">Well, stumpwm is written in what emacs would call an <em>inferior</em> brand of lisp&#8230;</li><li id="footnote_1_682" class="footnote">Yes, you can change the source code of your window manager while it&#8217;s running. And yes, once you can do this you&#8217;ll discover <em>all sorts</em> of reasons why you might want to.</li><li id="footnote_2_682" class="footnote">And just like screen, now that screen-profiles exists, there&#8217;s a configurable mode line.</li><li id="footnote_3_682" class="footnote">Emacs with no scrollbars and the font set to 8pt fits 80 characters twice, in a two-column split, which is <em>magical</em> for LaTeX. Viewing the pdf in Okular is less pleasant.</li><li id="footnote_4_682" class="footnote">XSteve is the author of the <a href="http://www.xsteve.at/prg/emacs/index.html"><code>psvn</code> package</a> (which adds excellent subversion support to emacs), among many other software projects. His config tips are worth checking out too.</li><li id="footnote_5_682" class="footnote">Ido (&#8216;interactively do things&#8217;) is another recent discovery; I&#8217;m <em>completely</em> sold on buffer-switching, and the fact that it lets me prefer <code>.tex</code> over <code>.aux</code> when opening files might be enough of a draw card to force me to get used to the way it treats backspace and tab.</li></ol>]]></content:encoded>
			<wfw:commentRss>http://www.logophile.org/blog/2009/05/16/discoveries-stumpwm-and-screen-profiles/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Kubuntu wireless woes</title>
		<link>http://www.logophile.org/blog/2006/08/13/kubuntu-wireless-woes/</link>
		<comments>http://www.logophile.org/blog/2006/08/13/kubuntu-wireless-woes/#comments</comments>
		<pubDate>Sun, 13 Aug 2006 11:49:24 +0000</pubDate>
		<dc:creator>tikitu</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.logophile.org/blog/?p=196</guid>
		<description><![CDATA[I just bought a wireless card, installed Kubuntu Dapper Drake, and imagine my delight when it just worked, out of the box, no problems at all! Glory be. So I ran a complete update, crowed publically, and went to bed. The next time I started up, the wireless card had apparently evaporated. The solution is [...]]]></description>
			<content:encoded><![CDATA[<p>I just bought a wireless card, installed Kubuntu Dapper Drake, and imagine my delight when it just worked, out of the box, no problems at all! Glory be. So I ran a complete update, crowed publically, and went to bed. The next time I started up, the wireless card had apparently evaporated.</p>

<p>The solution is actually pretty simple, but Google is apparently having trouble indexing the Kubuntu forums. Here&#8217;s the thread that explained it:
&#8220;<a href="http://kubuntuforums.net/forums/index.php?topic=7612.0">After update no wifi</a>&#8220;, and here&#8217;s my version of the fix-it-up steps.</p>

<p><span id="more-196"></span></p>

<p>First, the symptoms: on a fresh Dapper install the wireless PCI card (mine is an SMC, but it seems the problem is more general) is auto-detected and works. But after running updates and restarting, the Wireless Assistant quits after informing you that you have no wireless devices, and Network Settings doesn&#8217;t list a network interface for the card.</p>

<p>Next, the solution: First off, restart the machine but choose an older kernel version. You should have wireless again, and now we&#8217;re going to do the upgrade properly, so that you get your updated kernel back.</p>

<p>What&#8217;s happened is that the update includes a new kernel version, and the updated kernel module for the wireless card is not in the main repository (presumably it&#8217;s non-free or has problematic licensing or something). You need to add the <code>restricted</code> repository to the security updates in <code>/etc/apt/sources.list</code>:</p>

<p><code>deb http://security.ubuntu.com/ubuntu dapper-security main restricted</code></p>

<p>(If anyone can tell me the difference between <code>restricted</code> and <code>universe/multiverse</code> I&#8217;d be delighted.) Now when you run updates again, you&#8217;ll get the module you need. And this is why we started by booting up the older kernel: without wireless you can&#8217;t run the update, if (like me) you live on a boat without a cable connection to anywhere. Now restart, and choose the newer kernel, and everything should be golden.</p>

<p>(Incidentally, a tip for the terminally asleep: if you&#8217;re living in the Netherlands and getting atrocious download speeds on your updates, it&#8217;s worth checking that your repositories begin with <code>nl</code>, not for example <code>au</code>. And if you&#8217;ve been downloading from Australia and complaining about the speed of the wireless connection, give yourself a good slapping. I did.</p>

<p>Even better, with the Dapper install CD you could forestall the problem: <em>before</em> starting the install, set up networking. Yes, that means you&#8217;ll have to do it twice, but it also means that during installation you&#8217;ll have access to the repositories so &#8211;presumably&#8211; it will choose something sensible. Which is yet another reason for being delighted with the way they&#8217;ve handled installation: first run Kubuntu from the CD, then <em>within a working system</em> give you the install app. I guess you&#8217;ll probably still have to add the <code>restricted</code> repos by hand though.)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.logophile.org/blog/2006/08/13/kubuntu-wireless-woes/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

