<?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>Avaktavyam &#187; Chinese</title>
	<atom:link href="http://lddubeau.com/avaktavyam/category/language/chinese/feed" rel="self" type="application/rss+xml" />
	<link>http://lddubeau.com/avaktavyam</link>
	<description>Some things just can't be expressed...</description>
	<lastBuildDate>Sat, 23 Apr 2011 00:36:14 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>OOHanzi 0.7 released</title>
		<link>http://lddubeau.com/avaktavyam/2009/04/25/oohanzi-07-released</link>
		<comments>http://lddubeau.com/avaktavyam/2009/04/25/oohanzi-07-released#comments</comments>
		<pubDate>Sat, 25 Apr 2009 11:35:21 +0000</pubDate>
		<dc:creator>Louis-Dominique</dc:creator>
				<category><![CDATA[Chinese]]></category>
		<category><![CDATA[OOHanzi]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://lddubeau.com/avaktavyam/?p=559</guid>
		<description><![CDATA[OOHanzi 0.7 has been released.
As usual please refer to the documentation to know how to use it.
I have not been able to work on getting OOHanzi to work on OS X so I presume it still does not work.
List of changes:
* Updated packaging dependencies for Ubuntu 9.04.
* Performance improvements in &#8220;Mark Words Present In&#8230;&#8221;.
* Added [...]]]></description>
			<content:encoded><![CDATA[<p>OOHanzi 0.7 has been released.</p>
<p>As usual please refer to the <a href="http://lddubeau.com/downloads/openoffice/extensions/oohanzi-0.7-doc.odt">documentation</a> to know how to use it.</p>
<p>I have not been able to work on getting OOHanzi to work on OS X so I presume it still does not work.</p>
<p>List of changes:</p>
<p>* Updated packaging dependencies for Ubuntu 9.04.</p>
<p>* Performance improvements in &#8220;Mark Words Present In&#8230;&#8221;.</p>
<p>* Added support for variant readings when using &#8220;Mark Words Present In&#8230;/DDB&#8221;.</p>
]]></content:encoded>
			<wfw:commentRss>http://lddubeau.com/avaktavyam/2009/04/25/oohanzi-07-released/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OOHanzi 0.6 released</title>
		<link>http://lddubeau.com/avaktavyam/2008/11/28/oohanzi-06-released</link>
		<comments>http://lddubeau.com/avaktavyam/2008/11/28/oohanzi-06-released#comments</comments>
		<pubDate>Fri, 28 Nov 2008 05:38:13 +0000</pubDate>
		<dc:creator>Louis-Dominique</dc:creator>
				<category><![CDATA[Chinese]]></category>
		<category><![CDATA[OOHanzi]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://lddubeau.com/avaktavyam/?p=333</guid>
		<description><![CDATA[Warning: OOHanzi 0.6 does not seem to be installable on Mac OS X.  I have tried this week to install it on a Mac without success.  I do not know whether previous versions would work or not.
OOHanzi 0.6 has been released.
Of all the releases of OOHanzi so far this is the one which [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Warning:</strong> OOHanzi 0.6 does not seem to be installable on Mac OS X.  I have tried this week to install it on a Mac without success.  I do not know whether previous versions would work or not.</p>
<p>OOHanzi 0.6 has been released.</p>
<p>Of all the releases of OOHanzi so far this is the one which has required the most work and which contains the most substantial changes.  There are significant visible improvements but the bulk of the work happened under the hood and is invisible to regular users.<br />
<span id="more-333"></span></p>
<p>There is one <strong>major usability improvement</strong>: OOHanzi can now be installed by downloading and installing a <strong>single package</strong> instead of 5 packages.   Please refer to the <a href="http://lddubeau.com/downloads/openoffice/extensions/oohanzi-0.6-doc.odt">documentation</a> to learn how to use this new method.</p>
<p>List of changes:</p>
<ul>
<li>The user documentation is now stored in an <strong>OpenOffice document</strong> rather than in an XML document.  This will allow for nicer, more friendly formatting of the documentation in the future.</li>
<li>OOHanzi now uses the officially recommended method to set preferences. </li>
<li>OOHanzi now checks whether strings passed for lookups are bigger than defined size and warns the user if it is the case. </li>
<li>OOHanzi now checks whether strings passed for lookups are Chinese and warns the user if the string does now look Chinese. </li>
<li>When performing a lookup, OOHanzi now sets the system clipboard to the selected text.</li>
<li>Major restructuring of the selection logic.  This allowed the next two changes.</li>
<li><strong>It now is possible to use OOHanzi in oobase</strong>. </li>
<li>OOHanzi would crash on any operation having to do with text in <strong>footnotes</strong>.  This has been fixed. </li>
<li>Fixed a bug which caused &#8220;Mark Words Present In&#8230;&#8221;->&#8221;DDB&#8221; to fail to scan the last character of a selection.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://lddubeau.com/avaktavyam/2008/11/28/oohanzi-06-released/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OOHanzi and Open Office 3</title>
		<link>http://lddubeau.com/avaktavyam/2008/10/12/oohanzi-and-open-office-3</link>
		<comments>http://lddubeau.com/avaktavyam/2008/10/12/oohanzi-and-open-office-3#comments</comments>
		<pubDate>Sun, 12 Oct 2008 06:29:43 +0000</pubDate>
		<dc:creator>Louis-Dominique</dc:creator>
				<category><![CDATA[Chinese]]></category>
		<category><![CDATA[OOHanzi]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://lddubeau.com/avaktavyam/?p=296</guid>
		<description><![CDATA[I&#8217;ve tested OOHanzi in Open Office 3 and have good news to report:

OOHanzi will work with Open Office 3 without modification.
There was a bug in Open Office 2.x which affected only people using compiz.  If compiz was running, all dialog boxes which were created by the Java virtual machine running in Open Office would [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve tested OOHanzi in Open Office 3 and have good news to report:</p>
<ol>
<li>OOHanzi will work with Open Office 3 without modification.</li>
<li>There was a bug in Open Office 2.x which affected only people using compiz.  If compiz was running, all dialog boxes which were created by the Java virtual machine running in Open Office would be displayed smaller than they should have been.  This bug crippled OOHanzi pretty badly.  After testing Open Office 3, I found the bug has been fixed.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://lddubeau.com/avaktavyam/2008/10/12/oohanzi-and-open-office-3/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OOHanzi 0.5 released</title>
		<link>http://lddubeau.com/avaktavyam/2008/06/28/oohanzi-05-released</link>
		<comments>http://lddubeau.com/avaktavyam/2008/06/28/oohanzi-05-released#comments</comments>
		<pubDate>Sat, 28 Jun 2008 23:58:18 +0000</pubDate>
		<dc:creator>Louis-Dominique</dc:creator>
				<category><![CDATA[Chinese]]></category>
		<category><![CDATA[Language]]></category>
		<category><![CDATA[OOHanzi]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://lddubeau.com/avaktavyam/2008/06/28/oohanzi-05-released/</guid>
		<description><![CDATA[
Change Log


20080628:

Updated for OOHanzi 0.5.
Added support for marking up words that are present in DDB.
OOHanzi is now fully installable in Ubuntu 8.04 (Hardy Heron).



20080302:

Updated for OOHanzi 0.3: the only new functionality is the addition of an &#8220;About&#8230;&#8221; menu item.



200802??:

Added some code to make things a bit more user friendly when a JRE is not properly [...]]]></description>
			<content:encoded><![CDATA[<div>
<h3>Change Log</h3>
<ul>
<li>
<p>20080628:</p>
<ul>
<li>Updated for OOHanzi 0.5.</li>
<li>Added support for marking up words that are present in DDB.</li>
<li>OOHanzi is now fully installable in Ubuntu 8.04 (Hardy Heron).</li>
</ul>
</li>
<li>
<p>20080302:</p>
<ul>
<li>Updated for OOHanzi 0.3: the only new functionality is the addition of an &#8220;About&#8230;&#8221; menu item.</li>
</ul>
</li>
<li>
<p>200802??:</p>
<ul>
<li>Added some code to make things a bit more user friendly when a JRE is not properly installed.</li>
<li>Modified the way web browsers are launched.</li>
<li>Changed the nomenclature of menus and some functions.</li>
<li>General fixes to improve stability in Windows.</li>
</ul>
</li>
</ul>
<h3>Status</h3>
<p>This documentation deals with version 0.5 of OOHanzi.  This software is very much at the Alpha stage of its life-cycle.  Expect bugs.  Expect nonsensical design decisions.  Expect quirks.</p>
<p>Note: Version 0.4 was never officially released.</p>
<p>Imagine a paper even before it is at the draft stage, when it is still just a bunch of thoughts quickly put together.  Or notes taken at a conference.  At this stage, OOHanzi is very much the programmatic equivalent of that paper or those notes.</p>
<p>If you use OOHanzi and find it useful, please manifest yourself.  If I do not hear from users I&#8217;m going to produce releases as I see fit and I&#8217;ll just cater ot my own needs.</p>
</div>
<p><span id="more-244"></span></p>
<div>
<h3>Acknowledgments</h3>
<p>My thanks go to Charles Muller for prompting me to release this and for testing and reporting bugs.  I was planing to release it for a long time but never got around to it.  When he asked to see what this was all about, I had to finally package it for other people.</p>
<h3>Support</h3>
<p>OOHanzi is <a href="https://launchpad.net/oohanzi-meta">hosted on Launchpad</a>.  Please use the Launchpad facilities to report bugs and ask questions.</p>
<p>You can keep informed of the latest development by subscribing to either of these RSS feeds:</p>
<ul>
<li>The <a href="/avaktavyam/category/software/oohanzi/feed">OOHanzi feed</a> on this blog.</li>
<li>The <a href="http://feeds.launchpad.net/oohanzi-meta/announcements.atom">feed for the OOHanzi project group</a> on Launchpad.</li>
</ul>
<p>All of the code is available on Launchpad.  If you want to hack the code, either leave a comment on this blog or find my email address on Launchpad and contact me.</p>
<h3>Prerequisites</h3>
<p>This code has been tested with <b>Open Office 2.4.1</b>.  I have used it with older versions of Open Office (2.0.x and higher, and specifically with 2.3.0) but the latest version of the code has not been tested on anything older than 2.1.1.</p>
<p>You need to be able to run Java code on your computer.  The extensions have been tested with <b>Java 6 or higher</b>.</p>
<p><b>Linux</b>: People running Ubuntu 7.4 or 7.10 must install either sun-java6-jre or icedtea-java7-jre.  (The latter seems preferable.)  People running Ubuntu 8.04 should install openjdk-6-jre. Other distributions probably have equivalent packages that can be installed.</p>
<p><b>NOTE FOR PEOPLE UPGRADING TO HARDY</b>: It seems that IcedTea does not exist for Hardy.  Unfortunately, if you have used OOHanzi in Gutsy with IcedTea as the JVM, OpenOffice recorded the JVM to be IcedTea.  Once you move to Hardy, you have a problem because that JVM no longer exists.  In order to get OpenOffice to forget which JVM you used, you need to execute the following in a shell:</p>
<pre>
$ rm ~/.openoffice.org2/user/config/javasettings_Linux_x86.xml
</pre>
<p>If you do not do this, the installation will fail.</p>
<p><b>Windows:</b>There are many options for Windows.  It is possible to download Open Office together with a Java 6 from the Open Office web site.  This is the option I used when I installed OO in Windows for testing OOHanzi.  I know nothing about the other options.</p>
<p>People running other systems should refer to their system&#8217;s documentation.</p>
<h3>Automatic Installation</h3>
<p>If you use Ubuntu, you can add my <a href="https://launchpad.net/~ldd/+archive">PPA archive</a> to your apt sources.  Look at the main page of my PPA archive for the specific lines you must add.  Then you can issue &#8220;apt-get install oohanzi&#8221;.  Whenever installing or removing extensions it is better to close all of Open Office.  The packages will install if Open Office is running and you will get a warning about that but the new extensions won&#8217;t be usable unless you restart Open Office.</p>
<p>If you used the manual installation first and want to switch to the automatic system, you should first remove everything you&#8217;ve installed manually.</p>
<p>Eventually there will be an automatic installation system for Windows but it may take a while before that is developed.</p>
<h3>Manual Installation</h3>
<ol>
<li>
<p>If you use the Open Office Quickstarter, please pay attention to the following.  If you don&#8217;t know what the Quickstarter is, please read page 6 of <a href="http://documentation.openoffice.org/manuals/oooauthors2/0102GS-StartingOOo.pdf">this document</a>.  Note that the OO Quickstarter is installed <b>by default</b> in Windows.  Here is the important part: <b>if you use the Quickstarter, then whenever the instructions tell you to restart Open Office, you must also go into the Quickstarter and select &#8220;Exit Quickstarter&#8221;.</b>  If you do not exit the Quickstarter, Open Office will not be unloaded from memory and thus will not restart when you open it again.  It will just work from what is already loaded.</p>
</li>
<li>
<p>You need to get three items:</p>
<ul>
<li>http://lddubeau.com/downloads/java/unihan-lib-[version].jar</li>
<li>http://lddubeau.com/downloads/java/webdict-lib-[version].jar</li>
<li>http://lddubeau.com/downloads/openoffice/extensions/oounihan-[version].oxt</li>
<li>http://lddubeau.com/downloads/openoffice/extensions/oowebdict-[version].oxt</li>
<li>http://lddubeau.com/downloads/openoffice/extensions/oohanzi-[version].oxt</li>
</ul>
<p>The string &#8220;[version]&#8221; stands for the version number of the respective  packages.  Always use the latest version numbers.  It is normal if all files do not have the same version number.  Here are links to the directories containing the files above:</p>
<ul>
<li><a href="http://lddubeau.com/downloads/java/">http://lddubeau.com/downloads/java/</a></li>
<li><a href="http://lddubeau.com/downloads/openoffice/extensions/">http://lddubeau.com/downloads/openoffice/extensions/</a></li>
</ul>
</li>
<li>
<p>Make sure that your Open Office setup is set to find the Java JRE. Go in &#8220;Tools->Options&#8221;.  Get to the &#8220;Java&#8221; tab (located under &#8220;Open Office.org&#8221; in the hierarchy on the left).  Once you open that tab, it will take a little bit of time but Open Office will search your disk for JREs already installed.  After it has found them, it will populate the table labeled &#8220;Java runtime environments (JRE) already installed:&#8221;.  Select the one you want to use (usually you want the latest version), and click &#8220;Ok&#8221;.</p>
<p>On Ubuntu systems, Open Office is able to find all properly packaged JREs.  (That is, all JREs provided by the Ubuntu repositories.)</p>
<p>If Open Office is unable to find your JRE, then you need to click &#8220;Add&#8230;&#8221;, find where your JRE is located and add it to the list. Because I run Ubuntu, I&#8217;ve never had to do this so I do not know the ins and outs of adding a JRE manually.</p>
<p>After you select your JRE, you will most likely have to restart Open Office.  You will get a dialog that will tell you to do so.  <b>If you use the Quickstarter, please also exit the Quickstarter.</b> [<b>NOTE</b>: you can wait until you preform step 4 to restart Open Office.]</p>
</li>
<li>
<p>You must make unihan-lib-[version].jar and webdict-lib-[version].jar available to the Java JRE. Whichever method you use is fine so if you already have your own method to make 3rd party jars available, use your method.  Otherwise, do the following.</p>
<p>Go back into the same Java configuration tab as you did in step 3. This time around you need to click &#8220;Class Path&#8230;&#8221; and then &#8220;Add Archive&#8230;&#8221;.  Find the unihan-lib-[version].jar that you saved in step 2 and click &#8220;Open&#8221;.  Do the same thing for webdict-lib-[version].jar</p>
<p>Restart Open Office so that the library will be loaded next time the JRE is run. <b>If you use the Quickstarter, remember to exit the Quickstarter too.</b></p>
</li>
<li>
<p>Start Open Office.  Go in &#8220;Tools->Extension Manager&#8230;&#8221;.  </p>
</li>
<li>
<p>Click on &#8220;Add&#8230;&#8221;, find oounihan-[version].oxt and click &#8220;Open&#8221;. Click on &#8220;Add&#8230;&#8221; again, find oowebdict-[version].oxt and click &#8220;Open&#8221;.  Click on &#8220;Add&#8230;&#8221; again, find oohanzi-[version].oxt and click &#8220;Open&#8221;.</p>
</li>
<li>
<p>You&#8217;re done!  You should now have menu item called &#8220;OOHanzi&#8221; in your menubar. If you do not get that menu item, then something went wrong.  Contact me.</p>
</li>
</ol>
<p>[<b>IMPORTANT NOTE:</b>When you use OOHanzi, if you immediately get some horrible message that says that it cannot load a Java class, it means that your java environment is not working properly.]</p>
<h3>Automatic Upgrading</h3>
<p>If you use my PPA repository then you can use use apt-upgrade to upgrade to the latest version.</p>
<h3>Manual Upgrading</h3>
<p>When you get a newer version of an oxt file you can just double click on it and Open Office will install it over the old version.  However, I have noticed that Open Office does not register menu changes until I restart it.  This seems to be a quirk in how Open Office operates.</p>
<p>Upgrading to a new jar requires that you uninstall the older jar and install the new one.  Go to the menu item &#8220;Tools->Options&#8221;.  Go to the Java tab.  Click &#8220;Class Path&#8230;&#8221;, remove the old archive and add the new one.</p>
<h3>Usage</h3>
<p>After installation, you have a new menu called &#8220;OOHanzi&#8221;.</p>
<p>[<b>KNOWN BUG:</b>None of the items in the menu "OOHanzi" are ever grayed out, even when they should not be usable.  For instance "Clear Pronunciation" should ideally be grayed out when no text is selected.  If no text is selected, there is no point using "Clear Pronunciation" since it works on the current selection.  Several other items in "OOHanzi" are the same.  Unfortunately, the documentation for writing extensions for OO is terrible.  Most of it is in a half-baked state or out of date or does not cover everything needed.  There is probably a way to ensure that menu items are active only when they should be active but I do not know how to do this.]</p>
<p>The functions under it are:</p>
<h4>Display Unihan Information</h4>
<p>This searches the Unihan database for the currently selected character and displays a window with the data found in Unihan.  See the <a href="http://www.unicode.org/Public/UNIDATA/Unihan.html">Unihan documentation</a> for meaning of each field.</p>
<h4>Mark Words Present In&#8230;</h4>
<p>This menu provides functionality to mark all words in text selected by the user.  The typical use would be to first select a passage from the text being edited.  Then select one item under this menu.  OOHanzi will then scan the selected passage and mark each word it finds in the database that the user has selected.  For instance, if the user select &#8220;Mark Words Present In&#8230;/DDB&#8221;, OOHanzi will mark all the words that are present in the DDB.</p>
<p>There are several things to keep in mind when using this function:</p>
<ol>
<li>The algorithm will try to find the longest possible terms from the start to the end of the selection.</li>
<li>The algorithm uses a two color scheme: blue and red, and alternates between them.</li>
<li>The algorithm is stupid.  It does not know which terms would provide a better payoff for the user.  For instance, if characters ABCD appear together and AB and BCD both exist in the database.  The algorithm will mark AB as one term and will <strong>not</strong> mark BCD.  If CD also exists, it will mark CD.  So basically, it does not handle overlapping hits very well.  It is a general problem when performing this kind of function and requires a) careful design and b) a proper interface for showing overlapping hits.</li>
</ol>
<h4>Lookup</h4>
<p>This menu contains menu items to perform searches in dictionaries hosted at various web sites.  The selected text is looked up at the web site which corresponds to the menu item selected.</p>
<p>DDB is Charles Muller&#8217;s <a href="http://www.buddhism-dict.net/ddb/">Digital Dictionary of Buddhism</a>.</p>
<p>CJKV is Charles Muller&#8217;s <a href="http://www.buddhism-dict.net/dealt/">Chinese Japanese Korean Vietnamese Dictionary</a>.</p>
<p>Etymology is <a href="http://www.yellowbridge.com/chinese/chinese-dictionary.php">YellowBridge&#8217;s Etymology Dictionary</a>.</p>
<h4>Fill Rubies Using Unihan</h4>
<p>This adds pronunciation to the selected text.  The pronunciation is taken from the Unihan database and added as &#8220;rubies&#8221; to each character of the selected text.  See <a href="http://en.wikipedia.org/wiki/Ruby_character">this page</a> if you don&#8217;t know the term &#8220;ruby&#8221; in this context.</p>
<p>The algorithm actually works in 2 steps:</p>
<ol>
<li>For a given character on which the user wants to add the pronunciation, it first tries to find the same character in the current document.  If that character already has its pronunciation in its ruby, then that pronunciation is copied to the current character.</li>
<li>If the search in step 1 fails, then Unihan is used to get the pronunciation.  The pronunciation extracted from Unihan is Mandarin.</li>
</ol>
<p>[<b>FOR FUTURE DEVELOPMENT:</b> Configure OOHanzi to be able to get various pronunciations out of Unihan rather than just Mandarin.]</p>
<h4>Fill Rubies Using Documents</h4>
<p>This adds pronunciation to the selected text.  The pronunciation is taken from any *currently opened Text* document (i.e. Open Office Writer documents).  This is like step 1 in &#8220;Fix Pronunciation Using Unihan&#8221; but the search is made across all currently opened Text documents.  If the search fail, Unihan is *not* consulted.</p>
<h4>Adjust Rubies</h4>
<p>The problem with doing Unihan lookups is that Unihan records all regular pronunciations of a character.  I vaguely remember doing a computation showing that there are at most 5 pronunciations for a given character (in Mandarin).  So under this item, you find 5 menu items that are used to select which pronunciation to keep.  Usage scenario:</p>
<ol>
<li>
<p>1. You select some text.</p>
</li>
<li>
<p>2. You use &#8220;Fix Pronunciation Using Unihan&#8221;.</p>
<p>After that is done, the first character has 5 pronunciations in its ruby.  You cant to fix it.</p>
</li>
<li>
<p>You select that character.</p>
</li>
<li>
<p>You execute &#8220;OOHanzi->Adjust Pronunciation->Keep 3rd&#8221;.</p>
</li>
<li>
<p>Now that character only has the 3rd of the 5 pronunciations.</p>
</li>
</ol>
<p>Note that it is always possible to arbitrarily edit the ruby of any character by going in &#8220;Format->Asian phonetic guide&#8230;&#8221;.</p>
<h4>Clear Rubies</h4>
<p>This removes all the rubies from the selected text.</p>
<h4>Preferences</h4>
<p>This menu item brings up a dialog that allows the user to specify how &#8220;Display Unihan Information&#8221; presents information extracted from the Unihan database.  It is a good idea to filter that information because Unihan contains a lot of data and some of that data is useful only to some users.</p>
<p>At the top of the dialog there is a checkbox labeled &#8220;Filter returned Unihan fields&#8221;.  If it is unchecked, then OOHanzi does not filter the data provided by Unihan.  If it is checked, OOHanzi will include only the fields listed in the &#8220;Included fields&#8221; list which appears just under the checkbox.</p>
<p>All fields which appear in the &#8220;Included fields&#8221; list will be displayed by &#8220;Display Unihan Information&#8221;.  All fields which appear in the &#8220;Excluded fields&#8221; list will not be displayed.  Use the two buttons between the two lists to move items from one list to the other.</p>
<h4>About&#8230;</h4>
<p>This item brings up a dialog which tells you which versions of OOHanzi, OOUnihan and the Java Unihan library are in use.  This is useful if you want to check what you are running or if you want to produce a bug report.</p>
<h3>Known Bugs</h3>
<p>As of June 26th, 2008 the &#8220;Mark Words Present In&#8230;&#8221; function does not work in Windows.  I suspect the problem is with the default encoding in which the Java JRE opens HTTP streams in Windows but I have not had time to investigate.</p>
<h3>Other Issues</h3>
<p>In Ubuntu, when running Open Office 2.3.0 or later with compiz the dialog windows are sometimes not sized properly.  <strong>This is not a bug with OOHanzi.</strong>  I have <a href="http://qa.openoffice.org/issues/show_bug.cgi?id=85009">reported the bug</a>.  This issue does not occur if compiz is turned off.  Moreover, this issue does not happen in Windows.</p>
<h3>Hacking</h3>
<p>Eventually the entire code for everything will be made available on the web.  Right now however, only the OOBasic portions are available. To get to them, go into &#8220;Tools->Macros->Organize Macros->OpenOffice.org Basic&#8230;&#8221;.  All the OOBasic code for OOHanzi will appear in the hierarchy under &#8220;My Macros/OOHanzi&#8221;.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://lddubeau.com/avaktavyam/2008/06/28/oohanzi-05-released/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Summer weirdness</title>
		<link>http://lddubeau.com/avaktavyam/2008/06/11/summer-weirdness</link>
		<comments>http://lddubeau.com/avaktavyam/2008/06/11/summer-weirdness#comments</comments>
		<pubDate>Thu, 12 Jun 2008 00:26:04 +0000</pubDate>
		<dc:creator>Louis-Dominique</dc:creator>
				<category><![CDATA[Chinese]]></category>
		<category><![CDATA[Language]]></category>
		<category><![CDATA[UVA]]></category>

		<guid isPermaLink="false">http://lddubeau.com/avaktavyam/2008/06/11/summer-weirdness/</guid>
		<description><![CDATA[Well, the Mandarin intensive at UVA started yesterday.  Small class (6 students).  That&#8217;s good.  For me though, the setting is a little weird.  
This is my third summer language intensive.  I took my second year of Hindi in an intensive summer program at Madison, WI.  I took my 4th [...]]]></description>
			<content:encoded><![CDATA[<p>Well, the Mandarin intensive at UVA started yesterday.  Small class (6 students).  That&#8217;s good.  For me though, the setting is a little weird.  </p>
<p>This is my third summer language intensive.  I took my second year of Hindi in an intensive summer program at Madison, WI.  I took my 4th year of Sanskrit in an intensive summer program in Pune, India.  Now I&#8217;m taking my first year of Mandarin in an intensive summer program at UVA.  For the first two programs, I had to temporarily <strong>live away</strong>.  In Madison, I shared a room with a student from Korea (who was studying something else than Hindi&#8230; I don&#8217;t remember what).  In Pune I shared a flat with an American student who was also in the Sanskrit program.  But UVA is where I&#8217;m doing my Ph.D.  So for the length of the program, I&#8217;m just using the same old efficiency I was using during the past academic year.  My lodging is the same.  The university is the same.  In the other programs, I was away from my wife for the whole duration of the program but during this program the isolation will be broken by weekend visits.  <strong>Somehow, without having to live in a different city, it does not feel like a summer intensive.</strong>  It&#8217;s not like I&#8217;m not doing all the work.  I&#8217;m practicing my pinyin and my Chinese characters to death.  There&#8217;s just some other intangible element missing.</p>
<p>Then there&#8217;s something more tangible missing: <strong>my friend Llerena.</strong>  We took our first year of Hindi together and then went into the summer program together.  After that, life took us into different directions.  One day during the Hindi intensive, our entire class was walking together.  I don&#8217;t quite remember what we were doing but what I remember however was that I was mumbling to Llerena that our path was not optimized.  Of course, I meant optimized for speed towards our final destination.  Instead of taking a direct but more boring route, we took the scenic route which meandered by the lake shore.   Llerena just laughed at me and asked, grosso modo: What about how pleasant the walk is?  Doesn&#8217;t that count?  <strong>She insightfully pointed out how my obsession with optimizing for speed was flawed: optimizing for speed would have meant sacrificing other, more pleasant, aspects of our walk.</strong></p>
<p>I should drop her a line&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://lddubeau.com/avaktavyam/2008/06/11/summer-weirdness/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OOHanzi on Ubuntu 8.04 (Hardy Heron)</title>
		<link>http://lddubeau.com/avaktavyam/2008/04/17/oohanzi-on-ubuntu-804-hardy-heron</link>
		<comments>http://lddubeau.com/avaktavyam/2008/04/17/oohanzi-on-ubuntu-804-hardy-heron#comments</comments>
		<pubDate>Thu, 17 Apr 2008 13:40:28 +0000</pubDate>
		<dc:creator>Louis-Dominique</dc:creator>
				<category><![CDATA[Chinese]]></category>
		<category><![CDATA[OOHanzi]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://lddubeau.com/avaktavyam/2008/04/17/oohanzi-on-ubuntu-804-hardy-heron/</guid>
		<description><![CDATA[I&#8217;ve started using Hardy Heron in its beta incarnation.  Right now, it is not possible to use my repository to install OOHanzi on Hardy.  The interface to install Open Office extensions has changed very slightly but that causes installation of my extensions to fail.  A few notes:

If you upgrade to Hardy form [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve started using Hardy Heron in its beta incarnation.  Right now, it is not possible to use my repository to install OOHanzi on Hardy.  The interface to install Open Office extensions has changed very slightly but that causes installation of my extensions to fail.  A few notes:</p>
<ol>
<li>If you upgrade to Hardy form Gutsy, all the OOHanzi packages will be uninstalled.</li>
<li>The packaging system will not prevent you from reinstalling OOHanzi on Hardy after you upgrade from Gutsy but the installation will get stuck.  <b>So do not install OOHanzi on Hardy by using the automatic method yet.</b></li>
<li><b>It is possible to do a manual installation</b> as documented <a href="http://lddubeau.com/avaktavyam/2008/03/02/oohanzi-03-released/">here</a>.</li>
<li><b>It is possible to do a semi-manual installation</b> by installing java-unihan-oosupport from the repository and then installing the oounihan and oohanzi extensions manually.  The actual steps to perform this are left as an exercise for the reader.</li>
</ol>
<p>I&#8217;m planning to fix this problem before Hardy goes gold but I have a lot of other things to do so I may delay the release for later.  If you use OOHanzi and are just burning to move to Hardy, please leave a comment.  It will incite me to do this faster.</p>
]]></content:encoded>
			<wfw:commentRss>http://lddubeau.com/avaktavyam/2008/04/17/oohanzi-on-ubuntu-804-hardy-heron/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OOHanzi 0.3 released</title>
		<link>http://lddubeau.com/avaktavyam/2008/03/02/oohanzi-03-released</link>
		<comments>http://lddubeau.com/avaktavyam/2008/03/02/oohanzi-03-released#comments</comments>
		<pubDate>Sun, 02 Mar 2008 19:11:29 +0000</pubDate>
		<dc:creator>Louis-Dominique</dc:creator>
				<category><![CDATA[Chinese]]></category>
		<category><![CDATA[OOHanzi]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://lddubeau.com/avaktavyam/2008/03/02/oohanzi-03-released/</guid>
		<description><![CDATA[
Change Log


20080302:

Updated for OOHanzi 0.3: the only new functionality is the addition of an &#8220;About&#8230;&#8221; menu item.



200802??:

Added some code to make things a bit more user friendly when a JRE is not properly installed.
Modified the way web browsers are launched.
Changed the nomenclature of menus and some functions.
General fixes to improve stability in Windows.



Status
This documentation deals [...]]]></description>
			<content:encoded><![CDATA[<div>
<h3>Change Log</h3>
<ul>
<li>
<p>20080302:</p>
<ul>
<li>Updated for OOHanzi 0.3: the only new functionality is the addition of an &#8220;About&#8230;&#8221; menu item.</li>
</ul>
</li>
<li>
<p>200802??:</p>
<ul>
<li>Added some code to make things a bit more user friendly when a JRE is not properly installed.</li>
<li>Modified the way web browsers are launched.</li>
<li>Changed the nomenclature of menus and some functions.</li>
<li>General fixes to improve stability in Windows.</li>
</ul>
</li>
</ul>
<h3>Status</h3>
<p>This documentation deals with version 0.3 of OOHanzi.  This software is very much at the Alpha stage of its life-cycle.  Expect bugs.  Expect nonsensical design decisions.  Expect quirks.</p>
<p>Imagine a paper even before it is at the draft stage, when it is still just a bunch of thoughts quickly put together.  Or notes taken at a conference.  At this stage, OOHanzi is very much the programmatic equivalent of that paper or those notes.</p>
</div>
<p><span id="more-233"></span></p>
<div>
<h3>Acknowledgments</h3>
<p>My thanks go to Charles Muller for prompting me to release this and for testing and reporting bugs.  I was planing to release it for a long time but never got around to it.  When he asked to see what this was all about, I had to finally package it for other people.</p>
<h3>Support</h3>
<p>OOHanzi is <a href="https://launchpad.net/oohanzi-meta">hosted on Launchpad</a>.  Please use the Launchpad facilities to report bugs and ask questions.</p>
<p>You can keep informed of the latest development by subscribing to either of these RSS feeds:</p>
<ul>
<li>The <a href="/avaktavyam/category/software/oohanzi/feed">OOHanzi feed</a> on this blog.</li>
<li>The <a href="http://feeds.launchpad.net/oohanzi-meta/announcements.atom">feed for the OOHanzi project group</a> on Launchpad.</li>
</ul>
<p>All of the code is available on Launchpad.  If you want to hack the code, either leave a comment on this blog or find my email address on Launchpad and contact me.</p>
<h3>Prerequisites</h3>
<p>This code has been tested with <b>Open Office 2.3.0</b>.  I have used it with older versions of Open Office (2.0.x and higher) but the latest version of the code has not been tested on anything older than 2.3.0.</p>
<p>You need to be able to run Java code on your computer.  The extensions have been tested with <b>Java 6 or higher</b>.</p>
<p><b>Linux</b>: People running Ubuntu 7.4 or 7.10 must install either sun-java6-jre or icedtea-java7-jre.  (The latter seems preferable.)  Other distributions probably have equivalent packages that can be installed.</p>
<p><b>Windows:</b>There are many options for Windows.  It is possible to download Open Office together with a Java 6 from the Open Office web site.  This is the option I used when I installed OO in Windows for testing OOHanzi.  I know nothing about the other options.</p>
<p>People running other systems should refer to their system&#8217;s documentation.</p>
<h3>Automatic Installation</h3>
<p>If you use Ubuntu, you can add my <a href="https://launchpad.net/~ldd/+archive">PPA archive</a> to your apt sources.  Look at the main page of my PPA archive for the specific lines you must add.  Then you can issue &#8220;apt-get install oohanzi&#8221;.  Whenever installing or removing extensions it is better to close all of Open Office.  The packages will install if Open Office is running and you will get a warning about that but the new extensions won&#8217;t be usable unless you restart Open Office.</p>
<p>If you used the manual installation first and want to switch to the automatic system, you should first remove everything you&#8217;ve installed manually.</p>
<p>Eventually there will be an automatic installation system for Windows but it may take a while before that is developed.</p>
<h3>Manual Installation</h3>
<ol>
<li>
<p>If you use the Open Office Quickstarter, please pay attention to the following.  If you don&#8217;t know what the Quickstarter is, please read page 6 of <a href="http://documentation.openoffice.org/manuals/oooauthors2/0102GS-StartingOOo.pdf">this document</a>.  Note that the OO Quickstarter is installed <b>by default</b> in Windows.  Here is the important part: <b>if you use the Quickstarter, then whenever the instructions tell you to restart Open Office, you must also go into the Quickstarter and select &#8220;Exit Quickstarter&#8221;.</b>  If you do not exit the Quickstarter, Open Office will not be unloaded from memory and thus will not restart when you open it again.  It will just work from what is already loaded.</p>
</li>
<li>
<p>You need to get three items:</p>
<ul>
<li>http://lddubeau.com/downloads/java/unihan-lib-[version].jar</li>
<li>http://lddubeau.com/downloads/openoffice/extensions/oounihan-[version].oxt</li>
<li>http://lddubeau.com/downloads/openoffice/extensions/oohanzi-[version].oxt</li>
</ul>
<p>The string &#8220;[version]&#8221; stands for the version number of the respective  packages.  Always use the latest version numbers.  It is normal if all three files do not have the same version number.  Here are links to the directories containing the files above:</p>
<ul>
<li><a href="http://lddubeau.com/downloads/java/">http://lddubeau.com/downloads/java/</a></li>
<li><a href="http://lddubeau.com/downloads/openoffice/extensions/">http://lddubeau.com/downloads/openoffice/extensions/</a></li>
</ul>
</li>
<li>
<p>Make sure that your Open Office setup is set to find the Java JRE. Go in &#8220;Tools->Options&#8221;.  Get to the &#8220;Java&#8221; tab (located under &#8220;Open Office.org&#8221; in the hierarchy on the left).  Once you open that tab, it will take a little bit of time but Open Office will search your disk for JREs already installed.  After it has found them, it will populate the table labeled &#8220;Java runtime environments (JRE) already installed:&#8221;.  Select the one you want to use (usually you want the latest version), and click &#8220;Ok&#8221;.</p>
<p>On Ubuntu systems, Open Office is able to find all properly packaged JREs.  (That is, all JREs provided by the Ubuntu repositories.)</p>
<p>If Open Office is unable to find your JRE, then you need to click &#8220;Add&#8230;&#8221;, find where your JRE is located and add it to the list. Because I run Ubuntu, I&#8217;ve never had to do this so I do not know the ins and outs of adding a JRE manually.</p>
<p>After you select your JRE, you will most likely have to restart Open Office.  You will get a dialog that will tell you to do so.  <b>If you use the Quickstarter, please also exit the Quickstarter.</b> [<b>NOTE</b>: you can wait until you preform step 4 to restart Open Office.]</p>
</li>
<li>
<p>You must make unihan-lib-[version].jar available to the Java JRE. Whichever method you use is fine so if you already have your own method to make 3rd party jars available, use your method.  Otherwise, do the following.</p>
<p>Go back into the same Java configuration tab as you did in step 3. This time around you need to click &#8220;Class Path&#8230;&#8221; and then &#8220;Add Archive&#8230;&#8221;.  Find the unihan-lib-[version].jar that you saved in step 2 and click &#8220;Open&#8221;.</p>
<p>Restart Open Office so that the library will be loaded next time the JRE is run. <b>If you use the Quickstarter, remember to exit the Quickstarter too.</b></p>
</li>
<li>
<p>Start Open Office.  Go in &#8220;Tools->Extension Manager&#8230;&#8221;.  </p>
</li>
<li>
<p>Click on &#8220;Add&#8230;&#8221;, find oounihan-[version].oxt and click &#8220;Open&#8221;. Click on &#8220;Add&#8230;&#8221; again, find oohanzi-[version].oxt and click &#8220;Open&#8221;.</p>
</li>
<li>
<p>You&#8217;re done!  You should now have menu item called &#8220;OOHanzi&#8221; in your menubar. If you do not get that menu item, then something went wrong.  Contact me.</p>
</li>
</ol>
<p>[<b>IMPORTANT NOTE:</b>When you use OOHanzi, if you immediately get some horrible message that says that it cannot load a Java class, it means that your java environment is not working properly.]</p>
<h3>Automatic Upgrading</h3>
<p>If you use my PPA repository then you can use use apt-upgrade to upgrade to the latest version.</p>
<h3>Manual Upgrading</h3>
<p>When you get a newer version of an oxt file you can just double click on it and Open Office will install it over the old version.  However, I have noticed that Open Office does not register menu changes until I restart it.  This seems to be a quirk in how Open Office operates.</p>
<p>Upgrading to a new jar requires that you uninstall the older jar and install the new one.  Go to the menu item &#8220;Tools->Options&#8221;.  Go to the Java tab.  Click &#8220;Class Path&#8230;&#8221;, remove the old archive and add the new one.</p>
<h3>Usage</h3>
<p>After installation, you have a new menu called &#8220;OOHanzi&#8221;.</p>
<p>[<b>KNOWN BUG:</b>None of the items in the menu "OOHanzi" are ever grayed out, even when they should not be usable.  For instance "Clear Pronunciation" should ideally be grayed out when no text is selected.  If no text is selected, there is no point using "Clear Pronunciation" since it works on the current selection.  Several other items in "OOHanzi" are the same.  Unfortunately, the documentation for writing extensions for OO is terrible.  Most of it is in a half-baked state or out of date or does not cover everything needed.  There is probably a way to ensure that menu items are active only when they should be active but I do not know how to do this.]</p>
<p>The functions under it are:</p>
<h4>Display Unihan Information</h4>
<p>This searches the Unihan database for the currently selected character and displays a window with the data found in Unihan.  See the <a href="http://www.unicode.org/Public/UNIDATA/Unihan.html">Unihan documentation</a> for meaning of each field.</p>
<h4>Lookup</h4>
<p>This menu contains menu items to perform searches in dictionaries hosted at various web sites.  The selected text is looked up at the web site which corresponds to the menu item selected.</p>
<p>DDB is Charles Muller&#8217;s <a href="http://www.buddhism-dict.net/ddb/">Digital Dictionary of Buddhism</a>.</p>
<p>CJKV is Charles Muller&#8217;s <a href="http://www.buddhism-dict.net/dealt/">Chinese Japanese Korean Vietnamese Dictionary</a>.</p>
<p>Etymology is <a href="http://www.yellowbridge.com/chinese/chinese-dictionary.php">YellowBridge&#8217;s Etymology Dictionary</a>.</p>
<h4>Fill Rubies Using Unihan</h4>
<p>This adds pronunciation to the selected text.  The pronunciation is taken from the Unihan database and added as &#8220;rubies&#8221; to each character of the selected text.  See <a href="http://en.wikipedia.org/wiki/Ruby_character">this page</a> if you don&#8217;t know the term &#8220;ruby&#8221; in this context.</p>
<p>The algorithm actually works in 2 steps:</p>
<ol>
<li>For a given character on which the user wants to add the pronunciation, it first tries to find the same character in the current document.  If that character already has its pronunciation in its ruby, then that pronunciation is copied to the current character.</li>
<li>If the search in step 1 fails, then Unihan is used to get the pronunciation.  The pronunciation extracted from Unihan is Mandarin.</li>
</ol>
<p>[<b>FOR FUTURE DEVELOPMENT:</b> Configure OOHanzi to be able to get various pronunciations out of Unihan rather than just Mandarin.]</p>
<h4>Fill Rubies Using Documents</h4>
<p>This adds pronunciation to the selected text.  The pronunciation is taken from any *currently opened Text* document (i.e. Open Office Writer documents).  This is like step 1 in &#8220;Fix Pronunciation Using Unihan&#8221; but the search is made across all currently opened Text documents.  If the search fail, Unihan is *not* consulted.</p>
<h4>Adjust Rubies</h4>
<p>The problem with doing Unihan lookups is that Unihan records all regular pronunciations of a character.  I vaguely remember doing a computation showing that there are at most 5 pronunciations for a given character (in Mandarin).  So under this item, you find 5 menu items that are used to select which pronunciation to keep.  Usage scenario:</p>
<ol>
<li>
<p>1. You select some text.</p>
</li>
<li>
<p>2. You use &#8220;Fix Pronunciation Using Unihan&#8221;.</p>
<p>After that is done, the first character has 5 pronunciations in its ruby.  You cant to fix it.</p>
</li>
<li>
<p>You select that character.</p>
</li>
<li>
<p>You execute &#8220;OOHanzi->Adjust Pronunciation->Keep 3rd&#8221;.</p>
</li>
<li>
<p>Now that character only has the 3rd of the 5 pronunciations.</p>
</li>
</ol>
<p>Note that it is always possible to arbitrarily edit the ruby of any character by going in &#8220;Format->Asian phonetic guide&#8230;&#8221;.</p>
<h4>Clear Rubies</h4>
<p>This removes all the rubies from the selected text.</p>
<h4>Preferences</h4>
<p>This menu item brings up a dialog that allows the user to specify how &#8220;Display Unihan Information&#8221; presents information extracted from the Unihan database.  It is a good idea to filter that information because Unihan contains a lot of data and some of that data is useful only to some users.</p>
<p>At the top of the dialog there is a checkbox labeled &#8220;Filter returned Unihan fields&#8221;.  If it is unchecked, then OOHanzi does not filter the data provided by Unihan.  If it is checked, OOHanzi will include only the fields listed in the &#8220;Included fields&#8221; list which appears just under the checkbox.</p>
<p>All fields which appear in the &#8220;Included fields&#8221; list will be displayed by &#8220;Display Unihan Information&#8221;.  All fields which appear in the &#8220;Excluded fields&#8221; list will not be displayed.  Use the two buttons between the two lists to move items from one list to the other.</p>
<h4>About&#8230;</h4>
<p>This item brings up a dialog which tells you which versions of OOHanzi, OOUnihan and the Java Unihan library are in use.  This is useful if you want to check what you are running or if you want to produce a bug report.</p>
<h3>Other known bugs</h3>
<p>In Ubuntu, when running Open Office 2.3.0 the dialog windows are sometimes not sized properly.  This is a random bug which I have been able to reproduce with extensions produced by other people so I know it is not a bug in OOHanzi.  I&#8217;ve also been able to reproduce it with new &#8220;virgin&#8221; installations of Open Office so I know it is not a bug in my configuration.  My best guess it is that this is a bug in Open Office itself.  I have <a href="http://qa.openoffice.org/issues/show_bug.cgi?id=85009">reported the bug</a>. As far as I know, this bug does not happen in Windows.</p>
<h3>Hacking</h3>
<p>Eventually the entire code for everything will be made available on the web.  Right now however, only the OOBasic portions are available. To get to them, go into &#8220;Tools->Macros->Organize Macros->OpenOffice.org Basic&#8230;&#8221;.  All the OOBasic code for OOHanzi will appear in the hierarchy under &#8220;My Macros/OOHanzi&#8221;.</p>
<p>Version of the documentation: $Id$</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://lddubeau.com/avaktavyam/2008/03/02/oohanzi-03-released/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The pain of writing OO extensions</title>
		<link>http://lddubeau.com/avaktavyam/2008/03/02/the-pain-of-writing-oo-extensions</link>
		<comments>http://lddubeau.com/avaktavyam/2008/03/02/the-pain-of-writing-oo-extensions#comments</comments>
		<pubDate>Sun, 02 Mar 2008 15:46:33 +0000</pubDate>
		<dc:creator>Louis-Dominique</dc:creator>
				<category><![CDATA[Chinese]]></category>
		<category><![CDATA[OOHanzi]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://lddubeau.com/avaktavyam/2008/03/02/the-pain-of-writing-oo-extensions/</guid>
		<description><![CDATA[Programing extensions for Open Office is painful.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working on some Chinese extensions for OO but at every step of the way I have to fight with <b>obscure documentation and really strange design decisions</b>.  Here&#8217;s the latest example.  Want to display an image in a dialog?  We&#8217;re not talking about anything fancy here but just one single image which remains static.  There&#8217;s nothing dynamic about this.  So can you just put in the relative path in the dlg:src parameter which indicates where the image lives (e.g. dlg:src=&#8221;../image.jpg&#8221;)?  No way!  That would be way too simple and would violate the spirit of OO which is &#8220;why make things simple when you can make them complicated&#8221;. Instead you have to create two additional XML files to tell Open Office where to find the image in your extension and then at run time you have to query Open Office to find where the image really lives and load it into your dialog.  Yay!  The reason for this is that you do not know ahead of time where your extension is going to reside on disk.  You&#8217;d think a relative path would be rock solid because it is relative to where your extension is located, but no: that does not work.  You have to file extra paperwork with Open Office to declare the existence of the images.</p>
<p>(I searched through the dialog files bundled with Open Office to see if I could find something useful in there but what I found were paths like &#8220;file://D:/&#8230;&#8221;.  Ooops, I guess even the Open Office developers are having a hard time keeping their paths portable.)</p>
<p>And this is just the latest in a loooooooooooooooooooong series of grievances.  Here&#8217;s a new motto: &#8220;you don&#8217;t know the meaning of bondage-and-discipline programing until you&#8217;ve tried to write extensions for Open Office.&#8221;  Open Office is like a bureaucrat: you can&#8217;t do anything without filing multiple forms to announce what you want to do and justify it.</p>
<p>References: <a href="http://www.oooforum.org/forum/viewtopic.phtml?t=54090">here</a>, <a href="http://www.oooforum.org/forum/viewtopic.phtml?t=53596">here</a> and <a href="http://api.openoffice.org/servlets/ReadMsg?list=dev&#038;msgNo=17307">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://lddubeau.com/avaktavyam/2008/03/02/the-pain-of-writing-oo-extensions/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OOHanzi now packaged for Ubuntu</title>
		<link>http://lddubeau.com/avaktavyam/2008/02/25/oohanzi-now-packaged-for-ubuntu</link>
		<comments>http://lddubeau.com/avaktavyam/2008/02/25/oohanzi-now-packaged-for-ubuntu#comments</comments>
		<pubDate>Mon, 25 Feb 2008 12:39:47 +0000</pubDate>
		<dc:creator>Louis-Dominique</dc:creator>
				<category><![CDATA[Chinese]]></category>
		<category><![CDATA[OOHanzi]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://lddubeau.com/avaktavyam/2008/02/25/oohanzi-now-packaged-for-ubuntu/</guid>
		<description><![CDATA[I&#8217;ve packaged all of OOHanzi for Ubuntu.  I&#8217;m using Launchpad to host them.  Follow the link for information about the sources that must be added to your /etc/apt/sources.list to use my repository.  It is also possible to just use the web interface to download all 3 packages individually and install them one [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve packaged all of OOHanzi for Ubuntu.  I&#8217;m using <a href="https://launchpad.net/~ldd/+archive">Launchpad</a> to host them.  Follow the link for information about the sources that must be added to your /etc/apt/sources.list to use my repository.  It is also possible to just use the web interface to download all 3 packages individually and install them one by one.  If you add the repository to your configuration, just installing oohanzi (e.g. apt-get install oohanzi) should pull everything needed.  If you install individually you need to install, in order:</p>
<ul>
<li>java-unihan-lib</li>
<li>oounihan</li>
<li>oohanzi</li>
</ul>
<p>Or you can issue a single dpkg -i command with all 3 listed.  If the installation system complains that it cannot complete the installation, issue &#8220;apt-get -f install&#8221; after the installation.</p>
<p>People who have already downloaded the files individually and who would like to switch to the Ubuntu packages should first uninstall the old OOHanzi extensions and the unihan java library.</p>
<p>People who want to keep abreast of developments can <a href="http://lddubeau.com/avaktavyam/category/software/oohanzi/feed">subscribe to an RSS feed</a> that contains only OOHanzi announcements.</p>
<p><b>Note for people who want to edit OOHanzi&#8217;s OOBasic code in OpenOffice&#8217;s IDE</b>: If you use the Ubuntu packages, there is no way to edit the OOBasic code.  If you want to install the extension so that you can modify the code as needed, you can install the java-unihan-lib and oounihan Ubuntu packages but you must install the .oxt for oohanzi manually as described in the <a href="/avaktavyam/2008/02/07/oohanzi-02-released/">previous release notes</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://lddubeau.com/avaktavyam/2008/02/25/oohanzi-now-packaged-for-ubuntu/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OOHanzi 0.2 released</title>
		<link>http://lddubeau.com/avaktavyam/2008/02/07/oohanzi-02-released</link>
		<comments>http://lddubeau.com/avaktavyam/2008/02/07/oohanzi-02-released#comments</comments>
		<pubDate>Thu, 07 Feb 2008 15:04:00 +0000</pubDate>
		<dc:creator>Louis-Dominique</dc:creator>
				<category><![CDATA[Chinese]]></category>
		<category><![CDATA[OOHanzi]]></category>

		<guid isPermaLink="false">http://lddubeau.com/avaktavyam/2008/02/07/oohanzi-02-released/</guid>
		<description><![CDATA[
Change Log

Added some code to make things a bit more user friendly when a JRE is not properly installed.
Modified the way web browsers are launched.
Changed the nomenclature of menus and some functions.
General fixes to improve stability in Windows.

Status
This documentation deals with version 0.2 of OOHanzi.  This software is very much at the Alpha stage [...]]]></description>
			<content:encoded><![CDATA[<div>
<h3>Change Log</h3>
<ul>
<li>Added some code to make things a bit more user friendly when a JRE is not properly installed.</li>
<li>Modified the way web browsers are launched.</li>
<li>Changed the nomenclature of menus and some functions.</li>
<li>General fixes to improve stability in Windows.</li>
</ul>
<h3>Status</h3>
<p>This documentation deals with version 0.2 of OOHanzi.  This software is very much at the Alpha stage of its life-cycle.  Expect bugs.  Expect nonsensical design decisions.  Expect quirks.</p>
<p>Imagine a paper even before it is at the draft stage, when it is still just a bunch of thoughts quickly put together.  Or notes taken at a conference.  At this stage, OOHanzi is very much the programmatic equivalent of that paper or those notes.</p>
</div>
<p><span id="more-219"></span></p>
<div>
<h3>Acknowledgments</h3>
<p>My thanks go to Charles Muller for prompting me to release this and for testing and reporting bugs.  I was planing to release it for a long time but never got around to it.  When he asked to see what this was all about, I had to finally package it for other people.</p>
<h3>Support</h3>
<p>OOHanzi is <a href="https://launchpad.net/oohanzi">hosted on Launchpad</a>.  Please use the Launchpad facilities to report bugs and ask questions.</p>
<p>I will soon put the entirety of the code base on Launchapd.</p>
<h3>Prerequisites</h3>
<p>This code has been tested with <b>Open Office 2.3.0</b>.  I have used it with older versions of Open Office (2.0.x and higher) but the latest version of the code has not been tested on anything older than 2.3.0.</p>
<p>You need to be able to run Java code on your computer.  The extensions have been tested with <b>Java 6 or higher</b>.</p>
<p><b>Linux</b>: People running Ubuntu 7.4 or 7.10 must install either sun-java6-jre or icedtea-java7-jre.  (The latter seems preferable.)  Other distributions probably have equivalent packages that can be installed.</p>
<p><b>Windows:</b>There are many options for Windows.  It is possible to download Open Office together with a Java 6 from the Open Office web site.  This is the option I used when I installed OO in Windows for testing OOHanzi.  I know nothing about the other options.</p>
<p>People running other systems should refer to their system&#8217;s documentation.</p>
<h3>Installation</h3>
<ol>
<li>
<p>If you use the Open Office Quickstarter, please pay attention to the following.  If you don&#8217;t know what the Quickstarter is, please read page 6 of <a href="http://documentation.openoffice.org/manuals/oooauthors2/0102GS-StartingOOo.pdf">this document</a>.  Note that the OO Quickstarter is installed <b>by default</b> in Windows.  Here is the important part: <b>if you use the Quickstarter, then whenever the instructions tell you to restart Open Office, you must also go into the Quickstarter and select &#8220;Exit Quickstarter&#8221;.</b>  If you do not exit the Quickstarter, Open Office will not be unloaded from memory and thus will not restart when you open it again.  It will just work from what is already loaded.</p>
</li>
<li>
<p>You need to get three items:</p>
<ul>
<li>http://lddubeau.com/downloads/java/unihan-lib-[version].jar</li>
<li>http://lddubeau.com/downloads/openoffice/extensions/oounihan-[version].oxt</li>
<li>http://lddubeau.com/downloads/openoffice/extensions/oohanzi-[version].oxt</li>
</ul>
<p>The string &#8220;[version]&#8221; stands for the version number of the respective  packages.  Always use the latest version numbers.  It is normal if all three files do not have the same version number.  Here are links to the directories containing the files above:</p>
<ul>
<li><a href="http://lddubeau.com/downloads/java/">http://lddubeau.com/downloads/java/</a></li>
<li><a href="http://lddubeau.com/downloads/openoffice/extensions/">http://lddubeau.com/downloads/openoffice/extensions/</a></li>
</ul>
</li>
<li>
<p>Make sure that your Open Office setup is set to find the Java JRE. Go in &#8220;Tools->Options&#8221;.  Get to the &#8220;Java&#8221; tab (located under &#8220;Open Office.org&#8221; in the hierarchy on the left).  Once you open that tab, it will take a little bit of time but Open Office will search your disk for JREs already installed.  After it has found them, it will populate the table labeled &#8220;Java runtime environments (JRE) already installed:&#8221;.  Select the one you want to use (usually you want the latest version), and click &#8220;Ok&#8221;.</p>
<p>On Ubuntu systems, Open Office is able to find all properly packaged JREs.  (That is, all JREs provided by the Ubuntu repositories.)</p>
<p>If Open Office is unable to find your JRE, then you need to click &#8220;Add&#8230;&#8221;, find where your JRE is located and add it to the list. Because I run Ubuntu, I&#8217;ve never had to do this so I do not know the ins and outs of adding a JRE manually.</p>
<p>After you select your JRE, you will most likely have to restart Open Office.  You will get a dialog that will tell you to do so.  <b>If you use the Quickstarter, please also exit the Quickstarter.</b> [<b>NOTE</b>: you can wait until you preform step 4 to restart Open Office.]</p>
</li>
<li>
<p>You must make unihan-lib-[version].jar available to the Java JRE. Whichever method you use is fine so if you already have your own method to make 3rd party jars available, use your method.  Otherwise, do the following.</p>
<p>Go back into the same Java configuration tab as you did in step 3. This time around you need to click &#8220;Class Path&#8230;&#8221; and then &#8220;Add Archive&#8230;&#8221;.  Find the unihan-lib-[version].jar that you saved in step 2 and click &#8220;Open&#8221;.</p>
<p>Restart Open Office so that the library will be loaded next time the JRE is run. <b>If you use the Quickstarter, remember to exit the Quickstarter too.</b></p>
</li>
<li>
<p>Start Open Office.  Go in &#8220;Tools->Extension Manager&#8230;&#8221;.  </p>
</li>
<li>
<p>Click on &#8220;Add&#8230;&#8221;, find oounihan-[version].oxt and click &#8220;Open&#8221;. Click on &#8220;Add&#8230;&#8221; again, find oohanzi-[version].oxt and click &#8220;Open&#8221;.</p>
</li>
<li>
<p>You&#8217;re done!  You should now have menu item called &#8220;OOHanzi&#8221; in your menubar. If you do not get that menu item, then something went wrong.  Contact me.</p>
</li>
</ol>
<p>[<b>IMPORTANT NOTE:</b>When you use OOHanzi, if you immediately get some horrible message that says that it cannot load a Java class, it means that your java environment is not working properly.]</p>
<h3>Upgrading</h3>
<p>When you get a newer version of an oxt file you can just double click on it and Open Office will install it over the old version.  However, I have noticed that Open Office does not register menu changes until I restart it.  This seems to be a quirk in how Open Office operates.</p>
<p>Upgrading to a new jar requires that you uninstall the older jar and install the new one.  Go to the menu item &#8220;Tools->Options&#8221;.  Go to the Java tab.  Click &#8220;Class Path&#8230;&#8221;, remove the old archive and add the new one.</p>
<h3>Usage</h3>
<p>After installation, you have a new menu called &#8220;OOHanzi&#8221;.</p>
<p>[<b>KNOWN BUG:</b>None of the items in the menu "OOHanzi" are ever grayed out, even when they should not be usable.  For instance "Clear Pronunciation" should ideally be grayed out when no text is selected.  If no text is selected, there is no point using "Clear Pronunciation" since it works on the current selection.  Several other items in "OOHanzi" are the same.  Unfortunately, the documentation for writing extensions for OO is terrible.  Most of it is in a half-baked state or out of date or does not cover everything needed.  There is probably a way to ensure that menu items are active only when they should be active but I do not know how to do this.]</p>
<p>The functions under it are:</p>
<h4>Display Unihan Information</h4>
<p>This searches the Unihan database for the currently selected character and displays a window with the data found in Unihan.  See the <a href="http://www.unicode.org/Public/UNIDATA/Unihan.html">Unihan documentation</a> for meaning of each field.</p>
<h4>Lookup</h4>
<p>This menu contains menu items to perform searches in dictionaries hosted at various web sites.  The selected text is looked up at the web site which corresponds to the menu item selected.</p>
<p>DDB is Charles Muller&#8217;s <a href="http://www.buddhism-dict.net/ddb/">Digital Dictionary of Buddhism</a>.</p>
<p>CJKV is Charles Muller&#8217;s <a href="http://www.buddhism-dict.net/dealt/">Chinese Japanese Korean Vietnamese Dictionary</a>.</p>
<p>Etymology is <a href="http://www.yellowbridge.com/chinese/chinese-dictionary.php">YellowBridge&#8217;s Etymology Dictionary</a>.</p>
<h4>Fill Rubies Using Unihan</h4>
<p>This adds pronunciation to the selected text.  The pronunciation is taken from the Unihan database and added as &#8220;rubies&#8221; to each character of the selected text.  See <a href="http://en.wikipedia.org/wiki/Ruby_character">this page</a> if you don&#8217;t know the term &#8220;ruby&#8221; in this context.</p>
<p>The algorithm actually works in 2 steps:</p>
<ol>
<li>For a given character on which the user wants to add the pronunciation, it first tries to find the same character in the current document.  If that character already has its pronunciation in its ruby, then that pronunciation is copied to the current character.</li>
<li>If the search in step 1 fails, then Unihan is used to get the pronunciation.  The pronunciation extracted from Unihan is Mandarin.</li>
</ol>
<p>[<b>FOR FUTURE DEVELOPMENT:</b> Configure OOHanzi to be able to get various pronunciations out of Unihan rather than just Mandarin.]</p>
<h4>Fill Rubies Using Documents</h4>
<p>This adds pronunciation to the selected text.  The pronunciation is taken from any *currently opened Text* document (i.e. Open Office Writer documents).  This is like step 1 in &#8220;Fix Pronunciation Using Unihan&#8221; but the search is made across all currently opened Text documents.  If the search fail, Unihan is *not* consulted.</p>
<h4>Adjust Rubies</h4>
<p>The problem with doing Unihan lookups is that Unihan records all regular pronunciations of a character.  I vaguely remember doing a computation showing that there are at most 5 pronunciations for a given character (in Mandarin).  So under this item, you find 5 menu items that are used to select which pronunciation to keep.  Usage scenario:</p>
<ol>
<li>
<p>1. You select some text.</p>
</li>
<li>
<p>2. You use &#8220;Fix Pronunciation Using Unihan&#8221;.</p>
<p>After that is done, the first character has 5 pronunciations in its ruby.  You cant to fix it.</p>
</li>
<li>
<p>You select that character.</p>
</li>
<li>
<p>You execute &#8220;OOHanzi->Adjust Pronunciation->Keep 3rd&#8221;.</p>
</li>
<li>
<p>Now that character only has the 3rd of the 5 pronunciations.</p>
</li>
</ol>
<p>Note that it is always possible to arbitrarily edit the ruby of any character by going in &#8220;Format->Asian phonetic guide&#8230;&#8221;.</p>
<h4>Clear Rubies</h4>
<p>This removes all the rubies from the selected text.</p>
<h4>Preferences</h4>
<p>This menu item brings up a dialog that allows the user to specify how &#8220;Display Unihan Information&#8221; presents information extracted from the Unihan database.  It is a good idea to filter that information because Unihan contains a lot of data and some of that data is useful only to some users.</p>
<p>At the top of the dialog there is a checkbox labeled &#8220;Filter returned Unihan fields&#8221;.  If it is unchecked, then OOHanzi does not filter the data provided by Unihan.  If it is checked, OOHanzi will include only the fields listed in the &#8220;Included fields&#8221; list which appears just under the checkbox.</p>
<p>All fields which appear in the &#8220;Included fields&#8221; list will be displayed by &#8220;Display Unihan Information&#8221;.  All fields which appear in the &#8220;Excluded fields&#8221; list will not be displayed.  Use the two buttons between the two lists to move items from one list to the other.</p>
<h3>Other known bugs</h3>
<p>In Ubuntu, when running Open Office 2.3.0 the dialog windows are sometimes not sized properly.  This is a random bug which I have been able to reproduce with extensions produced by other people so I know it is not a bug in OOHanzi.  I&#8217;ve also been able to reproduce it with new &#8220;virgin&#8221; installations of Open Office so I know it is not a bug in my configuration.  My best guess it is that this is a bug in Open Office itself.  I have <a href="http://qa.openoffice.org/issues/show_bug.cgi?id=85009">reported the bug</a>. As far as I know, this bug does not happen in Windows.</p>
<h3>Hacking</h3>
<p>Eventually the entire code for everything will be made available on the web.  Right now however, only the OOBasic portions are available. To get to them, go into &#8220;Tools->Macros->Organize Macros->OpenOffice.org Basic&#8230;&#8221;.  All the OOBasic code for OOHanzi will appear in the hierarchy under &#8220;My Macros/OOHanzi&#8221;.</p>
<p>Version of the documentation: $Id: oohanzi-doc.xml 256 2008-02-07 19:36:31Z ldd $</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://lddubeau.com/avaktavyam/2008/02/07/oohanzi-02-released/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

