Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] Nice kanji fonts for TeX/LaTeX
- Date: Thu, 23 Feb 2006 12:17:41 +0100
- From: Marcus Metzler <mocm@example.com>
- Subject: Re: [tlug] Nice kanji fonts for TeX/LaTeX
- References: <17405.30357.625333.705292@example.com><d8fcc0800602230220r4aef2f4ek@example.com>
>>>>> "Josh" == Josh Glover <jmglov@example.com> writes: Josh> On 23/02/06, Marcus Metzler <mocm@example.com> wrote: >> I am using Perl and Latex to make make kanji flashcards from >> kanjidic using Lingua::JP::Kanjidic, the flashcards style and >> the cjk for LaTeX. I use UTF8 as encoding. Josh> Marcus, Josh> I was just starting a project to produce high-quality kanji Josh> flashcards for my JLPT studies. My idea was to output XML Josh> and use a stylesheet to make the flashcards printable from Josh> say, Firefox. Josh> If you would consider licensing your flashcards under a Josh> Creative Commons licence[1], I would love to see what you Josh> are doing. Also, consider releasing the Perl code under your Josh> favourite Open Source license. Josh> I will probably use the Firefox platform to generate my Josh> cards, stealing some code from the rikaichan extension[2] Josh> (which I have just finished porting to Thunderbird--details Josh> to follow in a day or two). Josh> So I cannot really help you, except to suggest outputting to Josh> XML / XHTML to take advantage of the pretty, anti-aliased, Josh> Unicode fonts that people have these days. :) Josh> Oh yes, and please do consider sharing your flashcards. I Josh> have done some research, and I cannot find high-quality, Josh> Free (or even free) flashcards anywhere on the web. I will Josh> remedy this problem myself, but it will take some time. If Josh> you already have a solution that you would like to share Josh> with the world, all the better! Creating the flash cards is not that hard. The major component ist the Lingua::JP::Kanjidic module for PERL found here http://search.cpan.org/dist/Lingua-JP-Kanjidic/ and the latex flashcard style found here http://ftp.math.utah.edu/pub/mirrors/ctan.tug.org/tex-archive/macros/latex/contrib/flashcards/ With those and the appropriate debian packages for tetex and cjk (maybe also xemacs ucs support) installed you can create flashcards with a simple PERL script like this: #!/usr/bin/perl binmode(STDOUT, ":utf8"); use Lingua::JP::Kanjidic; #system("wget http://ftp.monash.edu.au/pub/nihongo/kanjidic.gz"); # Please see the license at # http://www.csse.monash.edu.au/groups/edrdg/licence.html #system("gunzip kanjidic.gz"); my $x = Lingua::JP::Kanjidic->new(); $co = 1; #while ($co < 20){ # $x->reset(); $f =0; while(($y = $x->next()) && !$f){ # if ($y->heiseg()==$co){ if ($y->heiseg()){ # $f=1; print $y->heiseg(),"\t"; print $y->kanji()," \@"; # $n= $y->hiragana; # $c = @$n; # for ($i=0;$i < $c; $i++){ # print $y->hiragana->[$i]," "; # } # $n= $y->katakana; # $c = @$n; # for ($i=0;$i < $c; $i++){ # print $y->katakana->[$i]," "; # } # print "\@"; # $n= $y->meaning; # $c = @$n; # for ($i=0;$i < $c; $i++){ # print $y->meaning->[$i]," "; # } # print "\@"; # $n= $y->pinyin; # $c = @$n; # for ($i=0;$i < $c; $i++){ # print $y->pinyin->[$i]," "; # } print "\n"; $co++; } } #} This is short version which doesn't output latex, but just sorts out the Heisig Kanji for knquiz on my Zaurus, but you can see the principle. If you want a version with latex output, I can put it on my website, but since you want to use xml, the example above should tell you all you need. You should also look at the README of the PERL module for other options you may need. Some are used in the # comment lines, which were not needed for knquiz, because it uses kanjidic internally and just needs to know the knajis you want to learn. Marcus -- /--------------------------------------------------------------------\ | Dr. Marcus O.C. Metzler | | | mocm@example.com | http://www.metzlerbros.de/ | \--------------------------------------------------------------------/ |>>> Quis custodiet ipsos custodes <<<|
- Follow-Ups:
- Re: [tlug] Nice kanji fonts for TeX/LaTeX
- From: Josh Glover
- References:
- [tlug] Nice kanji fonts for TeX/LaTeX
- From: Marcus Metzler
- Re: [tlug] Nice kanji fonts for TeX/LaTeX
- From: Josh Glover
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Nice kanji fonts for TeX/LaTeX
- Next by Date: Re: [tlug] Nice kanji fonts for TeX/LaTeX
- Previous by thread: Re: [tlug] Nice kanji fonts for TeX/LaTeX
- Next by thread: Re: [tlug] Nice kanji fonts for TeX/LaTeX
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links