<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.2.3" -->
<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/"
	>

<channel>
	<title>olpa, OSS developer</title>
	<link>http://uucode.com/blog</link>
	<description>advocating olpa's open source developments</description>
	<pubDate>Wed, 10 Mar 2010 07:13:38 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.3</generator>
	<language>en</language>
			<item>
		<title>entering special characters in vim</title>
		<link>http://uucode.com/blog/2010/03/10/entering-special-characters-in-vim/</link>
		<comments>http://uucode.com/blog/2010/03/10/entering-special-characters-in-vim/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 07:13:38 +0000</pubDate>
		<dc:creator>olpa</dc:creator>
		
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://uucode.com/blog/2010/03/10/entering-special-characters-in-vim/</guid>
		<description><![CDATA[Time to time, I forget it. Found again in some wiki: &#8220;Entering special characters&#8220;. In short: ^Vnnn or ^Vxnn. Note also: &#8220;how to input diacritic characters&#8220;.
]]></description>
			<content:encoded><![CDATA[<p>Time to time, I forget it. Found again in some wiki: &#8220;<a href="http://vim.wikia.com/wiki/Entering_special_characters">Entering special characters</a>&#8220;. In short: ^Vnnn or ^Vxnn. Note also: &#8220;<a href="http://uucode.com/blog/2008/09/20/how-to-input-diacritic-characters/">how to input diacritic characters</a>&#8220;.</p>
]]></content:encoded>
			<wfw:commentRss>http://uucode.com/blog/2010/03/10/entering-special-characters-in-vim/feed/</wfw:commentRss>
		</item>
		<item>
		<title>converting sourceforge.net repository from CVS to subversion</title>
		<link>http://uucode.com/blog/2010/03/09/converting-sourceforgenet-repository-from-cvs-to-subversion/</link>
		<comments>http://uucode.com/blog/2010/03/09/converting-sourceforgenet-repository-from-cvs-to-subversion/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 05:06:50 +0000</pubDate>
		<dc:creator>olpa</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://uucode.com/blog/2010/03/09/converting-sourceforgenet-repository-from-cvs-to-subversion/</guid>
		<description><![CDATA[Probably there is no need to switch from CVS to subversion, but I&#8217;m starting to forget the options of the cvs command, therefore decided to migrate. Unfortunately, there is no button &#8220;convert&#8221; on the site, therefore I had to find how to do it manually.
A quick search gave a migration notes of Audacity: CVS To [...]]]></description>
			<content:encoded><![CDATA[<p>Probably there is no need to switch from CVS to subversion, but I&#8217;m starting to forget the options of the <tt>cvs</tt> command, therefore decided to migrate. Unfortunately, there is no button &#8220;convert&#8221; on the site, therefore I had to find how to do it manually.</p>
<p>A quick search gave a migration notes of Audacity: <a href="http://wiki.audacityteam.org/wiki/CVS_To_SVN_Migration">CVS To SVN Migration</a>. To get a better understanding what is happening, I read the following documents:</p>
<p>* <a href="http://svnbook.red-bean.com/en/1.5/svn.forcvs.convert.html">Version Control with Subversion / Converting a Repository from CVS to Subversion</a><br />
* <a href="http://cvs2svn.tigris.org/cvs2svn.html">cvs2svn Documentation</a></p>
<p>The dump was easy to produce:</p>
<p><code><pre>
$ rsync -av --delete-delay rsync://PROJECT.cvs.sourcefor
   ge.net/cvsroot/PROJECT/* PROJECT-cvsbackup/

$ cvs2svn --dumpfile=svndump PROJECT-cvsbackup > cvs2svn.log
</pre></code></p>
<p>The task of importing the dump was more challenging, but also easy solved thanks to the sourceforge documentation: <a href="http://sourceforge.net/apps/trac/sourceforge/wiki/SVN%20adminrepo">Managing your Subversion Repository with adminrepo</a></p>
<p>This moves the dump on the sourceforge servers and logs in:</p>
<p><code><pre>
$ rsync -aiv svndump USER,PROJECT@web.sourceforge.net:.
$ ssh -t USER,PROJECT@shell.sourceforge.net create
</pre></code></p>
<p>And this what happens after logging in:</p>
<p><code><pre>
$ mv /home/groups/P/PR/PROJECT/svndump .
$ adminrepo --checkout svn
$ rm -rf /svnroot/PROJECT/*
$ svnadmin create /svnroot/PROJECT/
$ svnadmin load /svnroot/PROJECT < svndump
$ adminrepo --save
</pre></code></p>
<h2>Project options</h2>
<p>Remembered after writing this post: one must to activate subversion before doing the conversion:</p>
<p>Project admin -> Feature settings -> Available Features</p>
<p>After conversion, disable CVS.</p>
]]></content:encoded>
			<wfw:commentRss>http://uucode.com/blog/2010/03/09/converting-sourceforgenet-repository-from-cvs-to-subversion/feed/</wfw:commentRss>
		</item>
		<item>
		<title>setting up a local macports repository</title>
		<link>http://uucode.com/blog/2010/02/12/setting-up-a-local-macports-repository/</link>
		<comments>http://uucode.com/blog/2010/02/12/setting-up-a-local-macports-repository/#comments</comments>
		<pubDate>Fri, 12 Feb 2010 13:20:01 +0000</pubDate>
		<dc:creator>olpa</dc:creator>
		
		<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://uucode.com/blog/2010/02/12/setting-up-a-local-macports-repository/</guid>
		<description><![CDATA[Many OSes have port systems, Mac OS X has too. Macports provides a lot of useful software, but not all. If a software can&#8217;t be in the macports for some reason (for example, the software isn&#8217;t intended for public), one has to setup a local macports repository.
Private Portfiles
For one-computer use, there is no need for [...]]]></description>
			<content:encoded><![CDATA[<p>Many OSes have port systems, Mac OS X has too. <a href="http://www.macports.org/">Macports</a> provides a lot of useful software, but not all. If a software can&#8217;t be in the macports for some reason (for example, the software isn&#8217;t intended for public), one has to setup a local macports repository.</p>
<h2>Private Portfiles</h2>
<p>For one-computer use, there is no need for a complete setup. There is enough to say something like &#8220;<tt>sudo port install -d -v</tt>&#8221; in the directory with a <tt>Portfile</tt>.</p>
<p>For details, see the official documentation. For introduction, read the book &#8220;Mac OS X Tiger for Unix Geeks&#8221;, the chapter &#8220;Creating and Installing Packages&#8221;, section &#8220;Creating DarwinPorts packages&#8221;.</p>
<h2>What is required</h2>
<p>1) I use the following structure for the local repository:</p>
<pre><code>
files/
  ... distribution archives ...
ports/
  PortIndex
  myorg/
    port1
    ...
    portN
  _resources/
    port1.0/
      fetch/
        mirror_sites.tcl
      group/
        syspython25-1.0.tcl
        syspython26-1.0.tcl
</code></pre>
<p>2) Access to the local ports server is available only through rsync (01.02.2010: probably things changed). A possible content of <tt>/etc/rsyncd.conf</tt>:</p>
<pre><code>
[orgmacports]
  path = ....../ports
  comment = My Organization MacPorts, the port files
  exclude = .** **~
</code></pre>
<p>To check: &#8220;<tt>rsync rsync://myhost.mydomain/orgmacports/</tt>&#8220;. This lists the content of the directory &#8220;<tt>ports</tt>&#8220;.</p>
<p>3) Unfortunately, macports system can&#8217;t download files through rsync (01.02.2010: maybe already able to). Therefore, share the content of &#8220;<tt>files</tt>&#8221; through FTP or HTTP.</p>
<p>4) Define the repository in &#8220;<tt>/opt/local/etc/macports/sources.conf</tt>&#8220;:</p>
<pre><code>
rsync://rsync.macports.org/release/ports/ [default,nosync]
rsync://myhost.mydomain/orgmacports/
</code></pre>
<p>Note that I&#8217;ve added &#8220;nosync&#8221; to the main macports reposotory: playing with the local repository, one says &#8220;sync&#8221; often, and no-sync for the main repo safes time.</p>
<p>To check, execute &#8220;<tt>$ sudo port -v sync</tt>&#8220;. The output should contain a note about synchronitzation with the local repository.</p>
<h2>Inside _resources</h2>
<p>I do not remember exactly why I had to add the file &#8220;<tt>mirror_sites.tcl</tt>&#8221; (nothing worked without this file). Also, I removed a lot of code, so the current version looks so:</p>
<pre><code>
# $Id$
namespace eval portfetch::mirror_sites { }

set portfetch::mirror_sites::sites(macports) {
    http://svn.macports.org/repository/macports/distfiles/
    http://svn.macports.org/repository/macports/distfiles/general/:nosubdir
    http://svn.macports.org/repository/macports/downloads/
}

set portfetch::mirror_sites::sites(macports_distfiles) {
    http://distfiles.macports.org/:mirror
    http://trd.no.distfiles.macports.org/:mirror
    http://arn.se.distfiles.macports.org/:mirror
}
</code></pre>
<p>The files &#8220;syspython25-1.0.tcl&#8221; and &#8220;syspython26-1.0.tcl&#8221; are my private groups, which define the settings to compile modules for the system python.</p>
]]></content:encoded>
			<wfw:commentRss>http://uucode.com/blog/2010/02/12/setting-up-a-local-macports-repository/feed/</wfw:commentRss>
		</item>
		<item>
		<title>TeXML is not at XML Prague 2010</title>
		<link>http://uucode.com/blog/2010/02/12/texml-is-not-at-xml-prague-2010/</link>
		<comments>http://uucode.com/blog/2010/02/12/texml-is-not-at-xml-prague-2010/#comments</comments>
		<pubDate>Fri, 12 Feb 2010 05:12:23 +0000</pubDate>
		<dc:creator>olpa</dc:creator>
		
		<category><![CDATA[TeXML]]></category>

		<guid isPermaLink="false">http://uucode.com/blog/2010/02/12/texml-is-not-at-xml-prague-2010/</guid>
		<description><![CDATA[To my great surprise, TeXML presentation was not accepted for XML Prague 2010. It&#8217;s so unexpected, that I&#8217;m even not upset, only puzzled. TeXML is one of a few projects which are somehow revolutionary. Seems it&#8217;s my fault I didn&#8217;t make it clear. The abstract, the reviews and conclusions follow.
Abstract
TeXML: XML to PDF through LaTeX
TeXML [...]]]></description>
			<content:encoded><![CDATA[<p>To my great surprise, TeXML presentation was not accepted for <a href="http://www.xmlprague.cz/2010/index.html">XML Prague 2010</a>. It&#8217;s so unexpected, that I&#8217;m even not upset, only puzzled. TeXML is one of a few projects which are somehow revolutionary. Seems it&#8217;s my fault I didn&#8217;t make it clear. The abstract, the reviews and conclusions follow.</p>
<h2>Abstract</h2>
<p>TeXML: XML to PDF through LaTeX</p>
<p>TeXML is an approach to XML to PDF conversion, an alternative to the XSLT/FO way. The characteristic features are:</p>
<p>* LaTeX is used as a typesetting engine.<br />
* XML logical markup is converted to LaTeX logical markup.<br />
* The low-level formatting details are hidden in LaTeX style files, not in conversion scripts.<br />
* XML to LaTeX conversion scripts are straightforward thanks to an intermediate XML-based language.<br />
* Generated LaTeX code is human-friendly and ready for modification.</p>
<p>To be a real alternative to the established standard, TeXML needs unique competitive advantages. The main are:</p>
<p>* Poor quality auto-layout artifacts in generated PDFs can be fixed by editing LaTeX code.<br />
* Separation of work is encouraged: programmers do programming, and typesetting specialists do layout definition.<br />
* The process is based on open-source tools.</p>
<p>The paper is written from the XML perspective. Only basic knowledge of LaTeX is assumed. TeXML is compared with alternative TeX-based XML-to-PDF projects. Practical experience of using TeXML in production is given. Problems and listed together with the solutions. An appendix provides an example of a simple publishing project, with step-by-step instructions how to convert XML to PDF using TeXML approach.</p>
<h2>Reviews</h2>
<p><b>Neutral</b></p>
<p>I think that TeXML is not new project and given it&#8217;s non-mainstream technology I don&#8217;t think that XML Prague is right venue for having presentation about it.</p>
<p><b>Reject</b></p>
<p>There&#8217;s nothing new in this paper that hasn&#8217;t been said in the last 10 years. Furthermore there is no paper attached.</p>
<p><b>Strong Reject</b></p>
<p>lacks enough detail to make a positive decision</p>
<p><b>Reject</b></p>
<p>Not matching this year&#8217;s topics.</p>
<p><b>Reject</b></p>
<p>The paper presents a tool for generating PDF output from XML via an XML representation of LaTeX called TeXML, which seems to be a useful light-weight approach for producing high-quality output in the kinds of applications where TeX excels. This topic, however, is a bit distant from the conference focus for this year.</p>
<h2>Conclusion</h2>
<p>My habit of sending an abstract only and writing the paper later has failed here: 2 rejects of 5 reviews. As of not matching this year&#8217;s topics, usually it doesn&#8217;t matter.</p>
<p>For me, it seems the failure is due to a bit of unluck. Being of non-mainstream (thanks to the first reviewer for pointing it to me), I get reviewers who a bit distant from publishing XML on paper and don&#8217;t see any use for TeXML. Contrary, the real users of TeXML are excited with it, and I believe the users more than reviewers.</p>
<p>TODO:</p>
<p>Re-write the abstract and paper so that even reviewers not in topic understand that something important happens.</p>
<p>Finally release the working DocBook stylesheets to be less non-mainstream.</p>
<p>Rework the site, add more new documentation.</p>
]]></content:encoded>
			<wfw:commentRss>http://uucode.com/blog/2010/02/12/texml-is-not-at-xml-prague-2010/feed/</wfw:commentRss>
		</item>
		<item>
		<title>chess diagrams on A6 cards using LaTeX - 2/2</title>
		<link>http://uucode.com/blog/2009/12/04/chess-diagrams-on-a6-cards-using-latex-22/</link>
		<comments>http://uucode.com/blog/2009/12/04/chess-diagrams-on-a6-cards-using-latex-22/#comments</comments>
		<pubDate>Fri, 04 Dec 2009 05:40:23 +0000</pubDate>
		<dc:creator>olpa</dc:creator>
		
		<category><![CDATA[chess]]></category>

		<category><![CDATA[TeX]]></category>

		<guid isPermaLink="false">http://uucode.com/blog/2009/12/04/chess-diagrams-on-a6-cards-using-latex-22/</guid>
		<description><![CDATA[In the first part I wrote: &#8220;put to a template in your favourite text processor&#8221;. Attached is a template (class-file) for LaTeX and an example, the explanations are below.
It seems that skak is the package to typeset chess using LaTeX. (See also an earlier post, &#8220;chess publishing in latex, starting&#8221;.)
Unfortunately, sometimes skak ignores castling moves. [...]]]></description>
			<content:encoded><![CDATA[<p>In <a href="http://uucode.com/blog/2009/11/27/chess-diagrams-on-a6-cards-using-latex-12/">the first part</a> I wrote: &#8220;put to a template in your favourite text processor&#8221;. <a href="http://uucode.com/blog/wp-content/uploads/2009/12/diakarte.zip">Attached</a> is a template (class-file) for LaTeX and an example, the explanations are below.</p>
<p>It seems that <a href="http://www.ctan.org/tex-archive/fonts/chess/skak/">skak</a> is the package to typeset chess using LaTeX. (See also an earlier post, &#8220;<a href="http://uucode.com/blog/2009/09/15/chess-publishing-in-latex-starting/">chess publishing in latex, starting</a>&#8221;.)</p>
<p>Unfortunately, sometimes skak ignores castling moves. I&#8217;m going to produce a minimal example and submit a bug report. But at the moment, in case case of such error, use the command <tt>\fenboard</tt> to correct a position.</p>
<p>My class <tt>diakarte</tt> imports <tt>skak</tt> and defines two new commands:</p>
<p><tt>\therest{&#8230;}</tt>: the argument is centered horizontally using <tt>\centerline</tt> and then centered vertically in the rest of the text flow.</p>
<p><tt>\restcomment{&#8230;}</tt>: the argument is centered horizontally using <tt>\centerline</tt> and then attached to the previous <tt>\therest</tt>.</p>
<p>Something like this:</p>
<p><code><pre>
\therest{\showboard}
\restcomment{What now?}
</pre></code></p>
<p>A complete example demonstrates also advanced usage. It is included in the zip-file with <a href="http://uucode.com/blog/wp-content/uploads/2009/12/diakarte.zip">diakarte package</a>.</p>
<p>If you&#8217;ve found the package useful, please drop me a note in comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://uucode.com/blog/2009/12/04/chess-diagrams-on-a6-cards-using-latex-22/feed/</wfw:commentRss>
		</item>
		<item>
		<title>chess diagrams on A6 cards using LaTeX - 1/2</title>
		<link>http://uucode.com/blog/2009/11/27/chess-diagrams-on-a6-cards-using-latex-12/</link>
		<comments>http://uucode.com/blog/2009/11/27/chess-diagrams-on-a6-cards-using-latex-12/#comments</comments>
		<pubDate>Fri, 27 Nov 2009 05:00:45 +0000</pubDate>
		<dc:creator>olpa</dc:creator>
		
		<category><![CDATA[chess]]></category>

		<guid isPermaLink="false">http://uucode.com/blog/2009/11/27/chess-diagrams-on-a6-cards-using-latex-12/</guid>
		<description><![CDATA[As a part of improvement in chess, it is often recommended to analyze positions. The idea is good, but how to find time to do it? One option is to use otherwise unproductive time: walking, in bus, queues etc. I have printed positions with me, and always can analyze something.
After different attempts, the best so [...]]]></description>
			<content:encoded><![CDATA[<p>As a part of improvement in chess, it is often recommended to analyze positions. The idea is good, but how to find time to do it? One option is to use otherwise unproductive time: walking, in bus, queues etc. I have printed positions with me, and always can analyze something.</p>
<p>After different attempts, the best so far option is found:</p>
<p>* I use thick paper index cards of size A6.<br />
* To hold all the card together, I use foldback clips.</p>
<h2>Printing, preprinting</h2>
<p>Many printers have a special slot to put thick paper into the printer.</p>
<p>I though it is enough to 1) put an A6 card to the slot, 2) print an A6 pdf/ps-file. Unfortunately, no. Regardless of the card size, the printer prints the document like on an A4 paper. As result, the text appears outside the card.</p>
<p>After spending time experimenting with CUPS, I gave up. The next easiest solution is to correctly position an A6 sheet on an A4 sheet.</p>
<p>After some calculations: if I want 1cm margins on A6, I should set the following margins for A4:</p>
<p>* left, right: 64mm<br />
* top: 1cm<br />
* bottom: 159mm</p>
<p>These values are best put to a template in your favourite text processors.</p>
<p>Just for a case, A-sizes: <a href="http://en.wikipedia.org/wiki/A4_paper">http://en.wikipedia.org/wiki/A4_paper</a></p>
<p><a href="http://uucode.com/blog/2009/12/04/chess-diagrams-on-a6-cards-using-latex-22/">Part 2</a></p>
]]></content:encoded>
			<wfw:commentRss>http://uucode.com/blog/2009/11/27/chess-diagrams-on-a6-cards-using-latex-12/feed/</wfw:commentRss>
		</item>
		<item>
		<title>TexML and unicode characters for math operators</title>
		<link>http://uucode.com/blog/2009/11/25/texml-and-unicode-characters-for-math-operators/</link>
		<comments>http://uucode.com/blog/2009/11/25/texml-and-unicode-characters-for-math-operators/#comments</comments>
		<pubDate>Wed, 25 Nov 2009 04:18:12 +0000</pubDate>
		<dc:creator>olpa</dc:creator>
		
		<category><![CDATA[TeX]]></category>

		<category><![CDATA[TeXML]]></category>

		<guid isPermaLink="false">http://uucode.com/blog/2009/11/25/texml-and-unicode-characters-for-math-operators/</guid>
		<description><![CDATA[Bug (?) report: &#8220;after switching from LaTeX(pdflatex) to XeTeX(xelatex) as the PDF generator something has ceased to work. Mathematical operators given as unicode characters in math formulas do not show up in the final document.´´
The letter continues:
I&#8217;ve diagnosed the problem. The cause is a change in the encoding option of the TexML converter, from -eISO-8859-1 [...]]]></description>
			<content:encoded><![CDATA[<p>Bug (?) report: &#8220;after switching from LaTeX(pdflatex) to XeTeX(xelatex) as the PDF generator something has ceased to work. Mathematical operators given as unicode characters in math formulas do not show up in the final document.´´</p>
<p>The letter continues:</p>
<p>I&#8217;ve diagnosed the problem. The cause is a change in the encoding option of the TexML converter, from <code>-eISO-8859-1</code> to <code>-eUTF-8</code>, as expected by XeTeX. Previously some unicode characters were automagically converted to the corresponding LaTeX mathematical symbols, but now they are just copied to the generated LaTeX code.</p>
<p>I&#8217;ve solved the problem myself by a quick-and-dirty hack of <code>texmlwr.py</code>. A new conditional section in <code>writech(...)</code> before the chained tests for TeXML modes forces the conversion inside math mode, regardless of the particular output encoding.</p>
<p><code><pre>
263c263
 &lt;     # First attempt to write symbol as-is
---
 &gt;     # First attempt to write symbol as-is  **** IF NOT IN MATH MODE ****
264a265,276
 &gt;     if self.mode == MATH:
 &gt;       #
 &gt;       # Math mode, lookup math map
 &gt;       #
 &gt;       try:
 &gt;         chord = ord(ch)
 &gt;         if chord &gt; 255:                            # no Latin-1
 &gt;           self.stream.write(unimap.mathmap[chord])
 &gt;           return                                             # return
 &gt;       except:
 &gt;         pass
 &gt;
</pre></code></p>
<h2>My coment</h2>
<p>So, XeTeX (and probably other TeXs, I think) doesn&#8217;t interpret the unicode math correctly. The solution is to avoid the unicode math and use the corresponding escape sequences instead.</p>
<p>I&#8217;m afraid it&#8217;s the only available solution right now. However, I vaguely remember discussions in XeTeX mailing list and articles in TUGboat, therefore I&#8217;d like to spend some time in looking for an alternative. Probably a magic option for XeTeX cures the problem.</p>
<p>Finally, I asked for a few examples of TeXML, generated TeX and PDF files (both correct and not). Hopefully, I&#8217;ll have a bit of time to find a better solution.</p>
]]></content:encoded>
			<wfw:commentRss>http://uucode.com/blog/2009/11/25/texml-and-unicode-characters-for-math-operators/feed/</wfw:commentRss>
		</item>
		<item>
		<title>running Fritz&#038;Fertig (eng: Fritz and Chesster) in the parental control mode (Mac OS X)</title>
		<link>http://uucode.com/blog/2009/09/24/running-fritzfertig-eng-fritz-and-chesster-in-the-parental-control-mode-mac-os-x/</link>
		<comments>http://uucode.com/blog/2009/09/24/running-fritzfertig-eng-fritz-and-chesster-in-the-parental-control-mode-mac-os-x/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 04:27:16 +0000</pubDate>
		<dc:creator>olpa</dc:creator>
		
		<category><![CDATA[chess]]></category>

		<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://uucode.com/blog/2009/09/24/running-fritzfertig-eng-fritz-and-chesster-in-the-parental-control-mode-mac-os-x/</guid>
		<description><![CDATA[I purchased &#8220;Fritz und Fertig: Schach lernen und trainieren (&#8221;Fritz and Chesster: learn to play chess&#8220;, other languages also available). My opinion is simple: it&#8217;s a masterpiece and the best ever computer game for children.
Unfortunately, I got technical problems. Fortunately, solved them.
The main issue is that my Mac Mini can&#8217;t read the CD. Therefore, I [...]]]></description>
			<content:encoded><![CDATA[<p>I purchased &#8220;<a href="http://www.chessbase.com/shopd/product.asp?pid=558">Fritz und Fertig: Schach lernen und trainieren</a> (&#8221;<a href="http://www.chessbase.com/shop/product.asp?pid=165">Fritz and Chesster: learn to play chess</a>&#8220;, other languages also available). My opinion is simple: it&#8217;s a masterpiece and the best ever computer game for children.</p>
<p>Unfortunately, I got technical problems. Fortunately, solved them.</p>
<p>The main issue is that my Mac Mini can&#8217;t read the CD. Therefore, I tried to rip the disk and use the image. To my big surprise, it worked. No idiotic anti-copy protection.</p>
<p>Ripping a CD. Probably user-friendly tools exist, but I used something like this:</p>
<pre><code>
$ sudo umount /Volumes/Fritz\ und\ Fertig
$ sudo dd if=/dev/disk1s1s2 of=ff.iso
</code></pre>
<p>To mount the image, just click on &#8220;<tt>ff.iso</tt>&#8221; in Finder.</p>
<p>But can you click on the image in Simplified Finder (parental control works)? Probably yes, but I don&#8217;t know how. Therefore, I wrote a wrapper script &#8220;<tt>FritzUndFertiz.command</tt>&#8220;:</p>
<pre><code>
#!/bin/sh

open /Users/.....path.to.../ff.iso
sleep 5
open '/Volumes/Fritz und Fertig/Fritz - OS X/Fritz und Fertig'
</code></pre>
<p>To run the script, set the executable flag (&#8221;<tt>chmod +x FritzUndFertiz.command</tt>&#8221; in the console). Move the script to &#8220;MyApplications&#8221;, try to run, allow all the required programs, and &#8211;</p>
<p>The child can run Fritz&#038;Fertig without assistance.</p>
]]></content:encoded>
			<wfw:commentRss>http://uucode.com/blog/2009/09/24/running-fritzfertig-eng-fritz-and-chesster-in-the-parental-control-mode-mac-os-x/feed/</wfw:commentRss>
		</item>
		<item>
		<title>chess publishing in latex, starting</title>
		<link>http://uucode.com/blog/2009/09/15/chess-publishing-in-latex-starting/</link>
		<comments>http://uucode.com/blog/2009/09/15/chess-publishing-in-latex-starting/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 04:43:28 +0000</pubDate>
		<dc:creator>olpa</dc:creator>
		
		<category><![CDATA[chess]]></category>

		<category><![CDATA[TeX]]></category>

		<guid isPermaLink="false">http://uucode.com/blog/2009/09/15/chess-publishing-in-latex-starting/</guid>
		<description><![CDATA[I&#8217;m experimenting with LaTeX and chess. As there is no &#8220;for dummies&#8221; information in internet, my notes (even if incorrect) could be useful for beginners.
So, the step 1. Print some game or some position.
I opened &#8220;LaTeX Graphics Companion&#8221; (first edition, 1999, probably I should upgrade) and read about chess. The package I needed is named [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m experimenting with LaTeX and chess. As there is no &#8220;for dummies&#8221; information in internet, my notes (even if incorrect) could be useful for beginners.</p>
<p>So, the step 1. Print some game or some position.</p>
<p>I opened &#8220;LaTeX Graphics Companion&#8221; (first edition, 1999, probably I should upgrade) and read about chess. The package I needed is named (surprise!) <tt>chess</tt>.</p>
<p>It&#8217;s a real monster. You put the moves in, and the package automatically traces how the figures move (including en passant etc). At any moment, it can typeset a diagramm. Very impressive!</p>
<p>It&#8217;s an overkill for me. All I need is diagramms. And after I found that the symbol &#8220;|&#8221; has a special meaning and can conflict with the usual use, I decided to find something else.</p>
<p>There is a number of chess-packages on CTAN. However, it was easy to minimize the choice. As the important question for me is &#8220;how to select/change a chess font&#8221;, I immediately was interested in the actively developing packages:</p>
<p>* <a href="http://tug.ctan.org/tex-archive/fonts/chess/enpassant/">enpassant</a>, a collection of type1 chessfonts ready for TeX, and<br />
* <a href="http://tug.ctan.org/tex-archive/macros/latex/contrib/chessfss/">chessfss</a>, chess fontselection scheme.</p>
<p>The author is Ulrike Fischer, the both packages are not in TeX Live, only on CTAN. In the package notes, it is said that the font collection is supported by the package &#8220;skak&#8221;:</p>
<p>* <a href="http://www.ctan.org/tex-archive/fonts/chess/skak/">skak</a>, fonts and macros for typesetting chess games.</p>
<p>The package &#8220;skak&#8221; seems an improvement of &#8220;chess&#8221;. It is included in TeX Live. The package provides sample files as documentation, this is enough to start using the package. The first steps are even easier with this program:</p>
<p>* <a href="http://pgn2ltx.sourceforge.net">Pgn2ltx</a> - A program for converting PGN (Portable Game Notation) data into a LaTeX input file. By Dirk Baechle, GPL2.</p>
<p>At the end, one more useful link:</p>
<p>* <a href="http://www.enpassant.dk/chess/homeeng.htm">EN PASSANT - Nørresundby Chess Club</a>. En Passant is a chess site with free chess software and resources for chess publishing like chess fonts, diagram utilities, graphics and more. En Passant is the homepage of Nørresundby Chess Club in Denmark.</p>
<p>TODO: check that I really can change chess fonts.</p>
]]></content:encoded>
			<wfw:commentRss>http://uucode.com/blog/2009/09/15/chess-publishing-in-latex-starting/feed/</wfw:commentRss>
		</item>
		<item>
		<title>my wrappers around &#8220;includegraphics&#8221;</title>
		<link>http://uucode.com/blog/2009/07/20/my-wrappers-around-includegraphics/</link>
		<comments>http://uucode.com/blog/2009/07/20/my-wrappers-around-includegraphics/#comments</comments>
		<pubDate>Mon, 20 Jul 2009 04:33:23 +0000</pubDate>
		<dc:creator>olpa</dc:creator>
		
		<category><![CDATA[TeX]]></category>

		<category><![CDATA[TeXML]]></category>

		<guid isPermaLink="false">http://uucode.com/blog/2009/07/20/my-wrappers-around-includegraphics/</guid>
		<description><![CDATA[To put an image to a document, LaTeX provides the command &#8220;\includegraphics&#8220;. As it often happens, due to LaTeX was designed for manual typesetting, this command is a nightmare for automatic generation. For a long time, I use a wrapper to solve 99% of the problems.
I.
\RequirePackage{grffile}
Without this package, code
\includegraphics{ANSIboat.v1.pdf}

raises the dummy error:

! LaTeX Error: Unknown [...]]]></description>
			<content:encoded><![CDATA[<p>To put an image to a document, LaTeX provides the command &#8220;<tt>\includegraphics</tt>&#8220;. As it often happens, due to LaTeX was designed for manual typesetting, this command is a nightmare for automatic generation. For a long time, I use a wrapper to solve 99% of the problems.</p>
<h3>I.</h3>
<pre style='color:#000000;background:#ffffff;'><code><span style='color:#808030; '>\</span><span style='color:#800000; font-weight:bold; '>RequirePackage</span><span style='color:#808030; '>{</span>grffile<span style='color:#808030; '>}</span></code></pre>
<p>Without this package, code</p>
<pre><code>\includegraphics{ANSIboat.v1.pdf}</pre></code>

raises the dummy error:
</pre>
<pre><code>! LaTeX Error: Unknown graphics extension: .boat.v1.pdf.</code></pre>
<h3>II.</h3>
<pre style='color:#000000;background:#ffffff;'><code><span style='color:#808030; '>\</span><span style='color:#800000; font-weight:bold; '>def</span><span style='color:#808030; '>\</span><span style='color:#800000; font-weight:bold; '>includegraphicsII</span><span style='color:#808030; '>[</span><span style='color:#808030; '>#</span><span style='color:#008c00; '>1</span><span style='color:#808030; '>]</span><span style='color:#808030; '>#</span><span style='color:#008c00; '>2</span><span style='color:#808030; '>{</span><span style='color:#696969; '>%</span>
<span style='color:#808030; '>\</span><span style='color:#800000; font-weight:bold; '>IfFileExists</span><span style='color:#808030; '>{</span><span style='color:#808030; '>#</span><span style='color:#008c00; '>2</span><span style='color:#808030; '>}</span><span style='color:#808030; '>{</span><span style='color:#808030; '>\</span><span style='color:#800000; font-weight:bold; '>includegraphics</span><span style='color:#808030; '>[</span><span style='color:#808030; '>#</span><span style='color:#008c00; '>1</span><span style='color:#808030; '>]</span><span style='color:#808030; '>{</span><span style='color:#808030; '>#</span><span style='color:#008c00; '>2</span><span style='color:#808030; '>}</span><span style='color:#808030; '>}</span><span style='color:#808030; '>{</span><span style='color:#696969; '>%</span>
<span style='color:#808030; '>\</span><span style='color:#800000; font-weight:bold; '>typeout</span><span style='color:#808030; '>{</span>! LaTeX warning: File `<span style='color:#808030; '>#</span><span style='color:#008c00; '>2</span>' not found.<span style='color:#808030; '>}</span><span style='color:#696969; '>%</span>
<span style='color:#808030; '>\</span><span style='color:#800000; font-weight:bold; '>includegraphics</span><span style='color:#808030; '>[</span><span style='color:#808030; '>#</span><span style='color:#008c00; '>1</span><span style='color:#808030; '>]</span><span style='color:#808030; '>{</span>dummy.pdf<span style='color:#808030; '>}</span><span style='color:#808030; '>}</span><span style='color:#808030; '>}</span>
</code></pre>
<p>If there is no image file, LaTeX</p>
<p>* annonces this problem to the console and the log file,<br />
* uses the image &#8220;dummy.pdf&#8221; instead</p>
<h3>III.</h3>
<pre style='color:#000000;background:#ffffff;'><code><span style='color:#808030; '>\</span><span style='color:#800000; font-weight:bold; '>catcode</span>`<span style='color:#808030; '>\</span><span style='color:#808030; '>_</span>=<span style='color:#008c00; '>11</span>
<span style='color:#808030; '>\</span><span style='color:#800000; font-weight:bold; '>edef</span><span style='color:#808030; '>\</span><span style='color:#800000; font-weight:bold; '>ImageUnderscore</span><span style='color:#808030; '>{</span><span style='color:#808030; '>_</span><span style='color:#808030; '>}</span>
<span style='color:#808030; '>\</span><span style='color:#800000; font-weight:bold; '>catcode</span>`<span style='color:#808030; '>\</span><span style='color:#808030; '>_</span>=<span style='color:#008c00; '>8</span>
<span style='color:#808030; '>\</span><span style='color:#800000; font-weight:bold; '>def</span><span style='color:#808030; '>\</span><span style='color:#800000; font-weight:bold; '>Image</span><span style='color:#808030; '>[</span><span style='color:#808030; '>#</span><span style='color:#008c00; '>1</span><span style='color:#808030; '>]</span><span style='color:#808030; '>#</span><span style='color:#008c00; '>2</span><span style='color:#808030; '>{</span><span style='color:#808030; '>{</span><span style='color:#696969; '>%</span>
<span style='color:#808030; '>\</span><span style='color:#800000; font-weight:bold; '>let</span><span style='color:#808030; '>\</span><span style='color:#808030; '>_</span>=<span style='color:#808030; '>\</span><span style='color:#800000; font-weight:bold; '>ImageUnderscore</span>
<span style='color:#808030; '>\</span><span style='color:#800000; font-weight:bold; '>includegraphicsII</span><span style='color:#808030; '>[</span><span style='color:#808030; '>#</span><span style='color:#008c00; '>1</span><span style='color:#808030; '>]</span><span style='color:#808030; '>{</span><span style='color:#808030; '>#</span><span style='color:#008c00; '>2</span><span style='color:#808030; '>}</span><span style='color:#808030; '>}</span><span style='color:#808030; '>}</span>
</code></pre>
<p>This allows to specify a file name with the underscore symbol using the standard LaTeX escaping rules:</p>
<pre><code>\Image{ANSI\_boat.pdf}</code></pre>
<p>instead of</p>
<pre><code>\includegraphicsII{ANSI_boat.pdf}</code></pre>
<p>Benefit: no need for special escaping rules in an automatic XML to LaTeX converter.</p>
<p>Actually, the code must be extended, to include &#8220;<code>\{</code>&#8221;, &#8220;<code>\textless</code>&#8221; and other special symbols, but it&#8217;s TODO.</p>
]]></content:encoded>
			<wfw:commentRss>http://uucode.com/blog/2009/07/20/my-wrappers-around-includegraphics/feed/</wfw:commentRss>
		</item>
		<item>
		<title>importing as module when a file has a non-identifier name</title>
		<link>http://uucode.com/blog/2009/06/12/importing-as-module-when-a-file-has-a-non-identifier-name/</link>
		<comments>http://uucode.com/blog/2009/06/12/importing-as-module-when-a-file-has-a-non-identifier-name/#comments</comments>
		<pubDate>Fri, 12 Jun 2009 11:18:07 +0000</pubDate>
		<dc:creator>olpa</dc:creator>
		
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://uucode.com/blog/2009/06/12/importing-as-module-when-a-file-has-a-non-identifier-name/</guid>
		<description><![CDATA[I need to reuse a function in a file. The usual way is just to import this file as a module. But what to do if the name is &#8220;bad&#8221;? The following doesn&#8217;t work:

import foo-bar as foo_bar
foo_bar.callme()

After trials and errors, the desired magic found: 

foo_bar = __import__('foo-bar', globals(),  locals(), [], -1)
foo_bar.callme()

See Python Documentation for [...]]]></description>
			<content:encoded><![CDATA[<p>I need to reuse a function in a file. The usual way is just to import this file as a module. But what to do if the name is &#8220;bad&#8221;? The following doesn&#8217;t work:</p>
<pre><code>
import foo-bar as foo_bar
foo_bar.callme()
</code></pre>
<p>After trials and errors, the desired magic found: </p>
<pre><code>
foo_bar = __import__('foo-bar', globals(),  locals(), [], -1)
foo_bar.callme()
</code></pre>
<p>See Python Documentation for details: in some cases you don&#8217;t want to use <tt>__import__</tt>.</p>
<p>The best solution is, obviously, to rename file. But I wanted to find an answer to this importing challenge.</p>
]]></content:encoded>
			<wfw:commentRss>http://uucode.com/blog/2009/06/12/importing-as-module-when-a-file-has-a-non-identifier-name/feed/</wfw:commentRss>
		</item>
		<item>
		<title>sharing files from linux to windows</title>
		<link>http://uucode.com/blog/2009/04/27/sharing-files-from-linux-to-windows/</link>
		<comments>http://uucode.com/blog/2009/04/27/sharing-files-from-linux-to-windows/#comments</comments>
		<pubDate>Mon, 27 Apr 2009 10:32:28 +0000</pubDate>
		<dc:creator>olpa</dc:creator>
		
		<category><![CDATA[windows]]></category>

		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://uucode.com/blog/2009/04/27/sharing-files-from-linux-to-windows/</guid>
		<description><![CDATA[Yes, one installs and configures Samba. All I need is to access a big folder in the read-only mode. The quick and dirty solution is:
In smb.conf:

security = share
guest account = nobody

[my-svn]
  comment = SVN files
  path = /path/to/svn
  read only = yes
  public = yes
  guest ok = yes

]]></description>
			<content:encoded><![CDATA[<p>Yes, one installs and configures Samba. All I need is to access a big folder in the read-only mode. The quick and dirty solution is:</p>
<p>In <tt>smb.conf</tt>:</p>
<pre>
security = share
guest account = nobody

[my-svn]
  comment = SVN files
  path = /path/to/svn
  read only = yes
  public = yes
  guest ok = yes
</pre>
]]></content:encoded>
			<wfw:commentRss>http://uucode.com/blog/2009/04/27/sharing-files-from-linux-to-windows/feed/</wfw:commentRss>
		</item>
		<item>
		<title>calling batch files with &#8216;exit&#8217;</title>
		<link>http://uucode.com/blog/2009/02/22/calling-batch-files-with-exit/</link>
		<comments>http://uucode.com/blog/2009/02/22/calling-batch-files-with-exit/#comments</comments>
		<pubDate>Sun, 22 Feb 2009 15:07:40 +0000</pubDate>
		<dc:creator>olpa</dc:creator>
		
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://uucode.com/blog/2009/02/22/calling-batch-files-with-exit/</guid>
		<description><![CDATA[Consider &#8216;main.bat&#8216;

call child1.bat
call child2.bat

What happens after &#8216;child1.bat&#8216; is finished?
I reasonably expected that &#8216;child2.bat&#8216; is executed. In a ideal world, yes.
In the real world, the first script contains the command &#8216;exit&#8216;, and this commands not only exists from &#8216;child1.bat&#8216;, but also terminates &#8216;main.bat&#8216;. Therefore, &#8216;child2.bat&#8216; isn&#8217;t executed. I don&#8217;t have words to comment this behavior.
As a [...]]]></description>
			<content:encoded><![CDATA[<p>Consider &#8216;<tt>main.bat</tt>&#8216;</p>
<pre><code>
call child1.bat
call child2.bat
</code></pre>
<p>What happens after &#8216;<tt>child1.bat</tt>&#8216; is finished?</p>
<p>I reasonably expected that &#8216;<tt>child2.bat</tt>&#8216; is executed. In a ideal world, yes.</p>
<p>In the real world, the first script contains the command &#8216;<tt>exit</tt>&#8216;, and this commands not only exists from &#8216;<tt>child1.bat</tt>&#8216;, but also terminates &#8216;<tt>main.bat</tt>&#8216;. Therefore, &#8216;<tt>child2.bat</tt>&#8216; isn&#8217;t executed. I don&#8217;t have words to comment this behavior.</p>
<p>As a workaround, I constructed the following. Not sure it&#8217;s correct, but right now it works for me.</p>
<pre><code>
start /B /wait child1.bat
start /B /wait child2.bat
</code></pre>
<p>And the order of the arguments is important. &#8220;<tt>/B wait</tt>&#8221; makes the trick, &#8220;<tt>/wait /B</tt>&#8221; doesn&#8217;t.</p>
<p>From documentation:</p>
<p>* /B: Start application without creating a new window. The application has ^C handling ignored. Unless the application enables ^C processing, ^Break is the only way to interrupt the application<br />
* /WAIT: Start application and wait for it to terminate</p>
]]></content:encoded>
			<wfw:commentRss>http://uucode.com/blog/2009/02/22/calling-batch-files-with-exit/feed/</wfw:commentRss>
		</item>
		<item>
		<title>extending a virtual disk in vmware</title>
		<link>http://uucode.com/blog/2008/12/26/extending-a-virtual-disk-in-vmware/</link>
		<comments>http://uucode.com/blog/2008/12/26/extending-a-virtual-disk-in-vmware/#comments</comments>
		<pubDate>Fri, 26 Dec 2008 17:11:30 +0000</pubDate>
		<dc:creator>olpa</dc:creator>
		
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://uucode.com/blog/2008/12/26/extending-a-virtual-disk-in-vmware/</guid>
		<description><![CDATA[Extending a virtual disk in vmware
1. Backup!
2. Somewhere in the vmware installation directory, there is a tool named &#8220;vmware-vdiskmanager.exe&#8220;. There is a lot of options, for resize use &#8220;-x&#8220;:
vmware-vdiskmanager.exe -x 8Gb ...path.to.vm..../vm_disk.vmdk
(hint: type the command manually, do not copy/paste from web. Otherwise you can get typographical spaces or minuses instead of the usual ones.)
3. The [...]]]></description>
			<content:encoded><![CDATA[<p>Extending a virtual disk in vmware</p>
<p>1. Backup!</p>
<p>2. Somewhere in the vmware installation directory, there is a tool named &#8220;<b>vmware-vdiskmanager.exe</b>&#8220;. There is a lot of options, for resize use &#8220;<b>-x</b>&#8220;:</p>
<pre><code>vmware-vdiskmanager.exe -x 8Gb ...path.to.vm..../vm_disk.vmdk</code></pre>
<p>(hint: type the command manually, do not copy/paste from web. Otherwise you can get typographical spaces or minuses instead of the usual ones.)</p>
<p>3. The disk is extended, now it&#8217;s time to update the partition table and the disk &#8220;C&#8221; to match the new size of the disk. Several options are availabe, they are listed in vmware&#8217;s knowledge base:</p>
<p><a href="http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&#038;cmd=displayKC&#038;externalId=1647">VMware Virtual Disk Manager Does Not Expand Partitions</a><br />
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&#038;cmd=displayKC&#038;externalId=1647</p>
<p>I tried GParted LiveCD and it worked:</p>
<p><a href="http://gparted.sourceforge.net/livecd.php">GParted &#8212; Live CD/USB/PXE/HD</a><br />
http://gparted.sourceforge.net/livecd.php</p>
<p>GParted run automatically, I had no problems to use it.</p>
<p>4. When Windows started, it noticed that something strange had happended with the disk and executed &#8220;chkdsk&#8221;. The tool validated that everything is in order, and Windows started as usual. With a bigger system disk.</p>
]]></content:encoded>
			<wfw:commentRss>http://uucode.com/blog/2008/12/26/extending-a-virtual-disk-in-vmware/feed/</wfw:commentRss>
		</item>
		<item>
		<title>wrong but fast fix</title>
		<link>http://uucode.com/blog/2008/12/12/wrong-but-fast-fix/</link>
		<comments>http://uucode.com/blog/2008/12/12/wrong-but-fast-fix/#comments</comments>
		<pubDate>Fri, 12 Dec 2008 05:05:27 +0000</pubDate>
		<dc:creator>olpa</dc:creator>
		
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://uucode.com/blog/2008/12/12/wrong-but-fast-fix/</guid>
		<description><![CDATA[After a small system upgrade an application started to crash with the message:
*** glibc detected *** sylpheed: double free or corruption (out): 0x0839e818 ***
The right thing is to trace the application and submit a bug report to the author, but I found a fast workaround. Set an environment variable before running the program:
export MALLOC_CHECK_=0
]]></description>
			<content:encoded><![CDATA[<p>After a small system upgrade an application started to crash with the message:</p>
<pre>*** glibc detected *** sylpheed: double free or corruption (out): 0x0839e818 ***</pre>
<p>The right thing is to trace the application and submit a bug report to the author, but I found a fast workaround. Set an environment variable before running the program:</p>
<pre>export MALLOC_CHECK_=0</pre>
]]></content:encoded>
			<wfw:commentRss>http://uucode.com/blog/2008/12/12/wrong-but-fast-fix/feed/</wfw:commentRss>
		</item>
		<item>
		<title>upgrading a macport package</title>
		<link>http://uucode.com/blog/2008/12/08/upgrading-a-macport-package/</link>
		<comments>http://uucode.com/blog/2008/12/08/upgrading-a-macport-package/#comments</comments>
		<pubDate>Mon, 08 Dec 2008 12:02:53 +0000</pubDate>
		<dc:creator>olpa</dc:creator>
		
		<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://uucode.com/blog/2008/12/08/upgrading-a-macport-package/</guid>
		<description><![CDATA[Upgrading a macports (darwinports) package is not as easy as
$ sudo port upgrade something
In many cases I need the following command:
$ sudo port -u -n -f upgrade something
(Use it only when you know what it means!)
1) -u: The upgrade option by default does not uninstall an upgraded port, it deactivates it. If you wish to [...]]]></description>
			<content:encoded><![CDATA[<p>Upgrading a macports (darwinports) package is not as easy as<br />
<code><pre>$ sudo port upgrade something</pre></code><br />
In many cases I need the following command:</p>
<p><code><pre>$ sudo port -u -n -f upgrade something</pre></code></p>
<p>(Use it only when you know what it means!)</p>
<p>1) <b>-u</b>: The upgrade option by default does not uninstall an upgraded port, it deactivates it. If you wish to uninstall the old version, use the -u<br />
option.</p>
<p>2) <b>-n</b>: If you wish not to upgrade a port&#8217;s dependencies, use the -n switch.</p>
<p>3) <b>-f</b>: The uninstall phase is a part of upgrade. If a port as installed as a dependency of another port, uninstall will not remove it unless you remove the dependent ports first. To override this behavior, use the -f (force) switch.</p>
]]></content:encoded>
			<wfw:commentRss>http://uucode.com/blog/2008/12/08/upgrading-a-macport-package/feed/</wfw:commentRss>
		</item>
		<item>
		<title>chess tournament checklist</title>
		<link>http://uucode.com/blog/2008/12/08/chess-tournament-checklist/</link>
		<comments>http://uucode.com/blog/2008/12/08/chess-tournament-checklist/#comments</comments>
		<pubDate>Mon, 08 Dec 2008 06:01:29 +0000</pubDate>
		<dc:creator>olpa</dc:creator>
		
		<category><![CDATA[chess]]></category>

		<guid isPermaLink="false">http://uucode.com/blog/2008/12/08/chess-tournament-checklist/</guid>
		<description><![CDATA[In addition to the conference checklist, I now need a checklist for local chess tournaments.
* Glasses cleaner
* Water
* Snacks
* Paper
* Pen
* mp3 player with audiobooks
* Reserve accumulators for the mp3 player
* Something to read
* Handy: charge in advance, switch off before play
* Money, coins
* Luck-bringing clothes
* In winter: in-house shoes
]]></description>
			<content:encoded><![CDATA[<p>In addition to the <a href="http://uucode.com/blog/2006/05/09/conference-checklist/">conference checklist</a>, I now need a checklist for local chess tournaments.</p>
<p>* Glasses cleaner<br />
* Water<br />
* Snacks<br />
* Paper<br />
* Pen<br />
* mp3 player with audiobooks<br />
* Reserve accumulators for the mp3 player<br />
* Something to read<br />
* Handy: charge in advance, switch off before play<br />
* Money, coins<br />
* Luck-bringing clothes<br />
* In winter: in-house shoes</p>
]]></content:encoded>
			<wfw:commentRss>http://uucode.com/blog/2008/12/08/chess-tournament-checklist/feed/</wfw:commentRss>
		</item>
		<item>
		<title>rsync server on mac os x</title>
		<link>http://uucode.com/blog/2008/11/11/rsync-server-on-mac-os-x/</link>
		<comments>http://uucode.com/blog/2008/11/11/rsync-server-on-mac-os-x/#comments</comments>
		<pubDate>Tue, 11 Nov 2008 10:01:54 +0000</pubDate>
		<dc:creator>olpa</dc:creator>
		
		<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://uucode.com/blog/2008/11/11/rsync-server-on-mac-os-x/</guid>
		<description><![CDATA[For development purposes, I&#8217;d like to run a rsync server on a Mac.
People in forums recommend to avoid the default system rsync, which is accused of being buggy. Instead, they recommend RSyncX.
Unfortunately, I failed to get the tool. Its home page (temporary) disappeared. I&#8217;ve downloaded a .sit-distro from some other server. How can I unpack [...]]]></description>
			<content:encoded><![CDATA[<p>For development purposes, I&#8217;d like to run a rsync server on a Mac.</p>
<p>People in forums recommend to avoid the default system <tt>rsync</tt>, which is accused of being buggy. Instead, they recommend <a href="http://www.apfelwiki.de/Main/RsyncX">RSyncX</a>.</p>
<p>Unfortunately, I failed to get the tool. Its home page (temporary) disappeared. I&#8217;ve downloaded a .sit-distro from some other server. How can I unpack a .sit? No way except using StuffIt tools. To download the expander, I had to register. I even did it, but something went wrong and I didn&#8217;t get a download URL.</p>
<p>Finally, I decided to go with the system <tt>rsync</tt>. Maybe it&#8217;s not ideal, but it should be enough for development. The production server will work under Linux.</p>
<p>The rest is easy. Google search by &#8220;rsync.plist&#8221; immediately gives the desired page: &#8220;<a href="http://www.designsolution.co.uk/resources/rsync/">Launching rsync daemon via launchd on Mac OS X 10.4 Tiger</a>&#8221; (I run 10.5, but it&#8217;s not importtant).</p>
<p>Additional steps:</p>
<p>1) Change ownership for the installed file:</p>
<pre>$ sudo chown root:wheel /Library/LaunchDaemons/rsync.plist</pre>
<p>2) It&#8217;s a good idea to create the file <tt>/etc/rsyncd.conf</tt>.</p>
<p>3) No need to reboot the machine to get the rsync daemon up and running. Enough to say:</p>
<pre>$ sudo launchctl load -w /Library/LaunchDaemons/rsync.plist</pre>
<p>Backup of <tt>rsync.plist</tt>:</p>
<p><code><pre>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;
&lt;plist version="1.0"&gt;
&lt;dict&gt;
        &lt;key&gt;Disabled&lt;/key&gt;
        &lt;false/&gt;
        &lt;key&gt;Label&lt;/key&gt;

        &lt;string&gt;rsync&lt;/string&gt;
        &lt;key&gt;Program&lt;/key&gt;
        &lt;string&gt;/usr/bin/rsync&lt;/string&gt;
        &lt;key&gt;ProgramArguments&lt;/key&gt;

        &lt;array&gt;
                &lt;string&gt;/usr/bin/rsync&lt;/string&gt;
                &lt;string&gt;--daemon&lt;/string&gt;
        &lt;/array&gt;
        &lt;key&gt;inetdCompatibility&lt;/key&gt;

        &lt;dict&gt;
                &lt;key&gt;Wait&lt;/key&gt;
                &lt;false/&gt;
        &lt;/dict&gt;
                &lt;key&gt;Sockets&lt;/key&gt;

                &lt;dict&gt;
                        &lt;key&gt;Listeners&lt;/key&gt;
                        &lt;dict&gt;
                                &lt;key&gt;SockServiceName&lt;/key&gt;
                                &lt;string&gt;rsync&lt;/string&gt;

                                &lt;key&gt;SockType&lt;/key&gt;
                                &lt;string&gt;stream&lt;/string&gt;
                        &lt;/dict&gt;
                &lt;/dict&gt;
&lt;/dict&gt;

&lt;/plist&gt;
</pre></code></p>
<h3>Useful config option</h3>
<p>For <i>my</i> needs, it&#8217;s useful to add (per each module (?)) the following to <tt>rsyncd.conf</tt>:</p>
<p><code><pre>exclude = .** **~</pre></code></p>
<p>This disables transfer of files like &#8220;<tt>.svn</tt>&#8220;, &#8220;<tt>.filename.swp</tt>&#8221; (the first pattern) or &#8220;<tt>filename~</tt>&#8221; (the second pattern).</p>
]]></content:encoded>
			<wfw:commentRss>http://uucode.com/blog/2008/11/11/rsync-server-on-mac-os-x/feed/</wfw:commentRss>
		</item>
		<item>
		<title>local macports (darwinports) repository, granting a network access</title>
		<link>http://uucode.com/blog/2008/11/11/local-macports-darwinports-repository-granting-a-network-access/</link>
		<comments>http://uucode.com/blog/2008/11/11/local-macports-darwinports-repository-granting-a-network-access/#comments</comments>
		<pubDate>Tue, 11 Nov 2008 09:41:26 +0000</pubDate>
		<dc:creator>olpa</dc:creator>
		
		<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://uucode.com/blog/2008/11/11/local-macports-darwinports-repository-granting-a-network-access/</guid>
		<description><![CDATA[It&#8217;s quite easy to create a local MacPorts repository. Unfortunately, the documentation doesn&#8217;t say how to share the repository with others. After trials, errors and reading the source code, I&#8217;ve found the answer: the only way is rsync.
My first optimistic attempt was to use the http protocol. In /opt/local/etc/macports/sources.conf I added:
http://myserver.localdomain/myports
The synchronization command (port sync) [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s quite easy to create a local <a href="http://www.macports.org/">MacPorts</a> repository. Unfortunately, the <a href="http://guide.macports.org/">documentation</a> doesn&#8217;t say how to share the repository with others. After trials, errors and reading the source code, I&#8217;ve found the answer: the only way is rsync.</p>
<p>My first optimistic attempt was to use the http protocol. In <tt>/opt/local/etc/macports/sources.conf</tt> I added:</p>
<pre>http://myserver.localdomain/myports</pre>
<p>The synchronization command (<tt>port sync</tt>) run successfully. But installing a port raised a mysterious error message:</p>
<pre>
$ sudo port install myportname
Error: Unable to open port: Port extract failed:
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error exit delayed from previous errors
</pre>
<p>The real reason of the problem is that the port file was missed on the file system. In theory, the port files are downloaded during the synchronization process. In practice, when the protocol is http, the system downloads only the file <tt>PortIndex</tt> and doesn&#8217;t recursively get other files.</p>
<p>According to the sources, the only protocol when the whole ports tree is downloaded is rsync.</p>
]]></content:encoded>
			<wfw:commentRss>http://uucode.com/blog/2008/11/11/local-macports-darwinports-repository-granting-a-network-access/feed/</wfw:commentRss>
		</item>
		<item>
		<title>XeLaTeX: change font for headers and footers</title>
		<link>http://uucode.com/blog/2008/10/24/xelatex-change-font-for-headers-and-footers/</link>
		<comments>http://uucode.com/blog/2008/10/24/xelatex-change-font-for-headers-and-footers/#comments</comments>
		<pubDate>Fri, 24 Oct 2008 08:32:04 +0000</pubDate>
		<dc:creator>olpa</dc:creator>
		
		<category><![CDATA[publishing]]></category>

		<category><![CDATA[TeX]]></category>

		<guid isPermaLink="false">http://uucode.com/blog/2008/10/24/xelatex-change-font-for-headers-and-footers/</guid>
		<description><![CDATA[I&#8217;ve noticed that headers and footers of the documents, generated by XeLaTeX, use some other font instead of Helvetica. After digging into the LaTeX code, the problem is solved.
Finding 1: the LaTeX&#8217;s output procedure uses \reset@font.
Finding 2: this command defined in latex.ltx as:
\let\reset@font\normalfont
Idea 1: So, I should re-define \normalfont to switch to the desired font [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve noticed that headers and footers of the documents, generated by XeLaTeX, use some other font instead of Helvetica. After digging into the LaTeX code, the problem is solved.</p>
<p><b>Finding 1:</b> the LaTeX&#8217;s output procedure uses <tt>\reset@font</tt>.</p>
<p><b>Finding 2:</b> this command defined in <tt>latex.ltx</tt> as:</p>
<pre><code>\let\reset@font\normalfont</code></pre>
<p><b>Idea 1:</b> So, I should re-define <tt>\normalfont</tt> to switch to the desired font (<tt>\switchtomainfont</tt> is a command defined through the XeLaTeX-specific command <tt>\newfontface</tt>):</p>
<pre><code>\let\normalfont\switchtomainfont</code></pre>
<p>But it didn&#8217;t help. It looked like the command was not called at all.</p>
<p><b>Finding 4: </b> actually, in runtime <tt>\reset@font</tt> is defined as:</p>
<pre><code>\protect\normalfont</code></pre>
<p>But it should make no difference.</p>
<p><b>Finding 5:</b> activating macrotracing, I found that my <tt>\normalfont</tt> was expanded as:</p>
<pre><code>
\reset@font ->\protect \normalfont  
\normalfont  ->\usefont \encodingdefault \familydef
  ault \seriesdefault \shapedefault \relax
</code></pre>
<p>What? Why this expansion instead of what expected?</p>
<p><b>Finding 6:</b> <tt>\reset@font</tt> uses not &#8220;<tt>\normalfont</tt>&#8221; but &#8220;<tt>\normalfont </tt>&#8220;. Command name includes the space at the end!</p>
<p><b>Solution:</b></p>
<pre><code>
\let\normalfont\switchtomainfont
\expandafter\let\csname normalfont \endcsname\switchtomainfont
</code></pre>
<p><b>Hint:</b> maybe use of <tt>\setromanfont</tt> would fix my problem before it appears, but I can&#8217;t make this command working on my Linux system. But as far as I remember, it worked under Mac.</p>
]]></content:encoded>
			<wfw:commentRss>http://uucode.com/blog/2008/10/24/xelatex-change-font-for-headers-and-footers/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
