From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/34776 Path: news.gmane.org!not-for-mail From: "Mojca Miklavec" Newsgroups: gmane.comp.tex.context Subject: Re: Draw chess board Date: Thu, 24 May 2007 21:07:38 +0200 Message-ID: <6faad9f00705241207j484c2dd7wb7ba1d531f1e690@mail.gmail.com> References: <769ba7780705240459l4229c774x7993a5f0ae13eda0@mail.gmail.com> <115224fb0705240701v7a941c59i3f024c244072846b@mail.gmail.com> <769ba7780705240840u1317b749w1535c8483a85ef39@mail.gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1180033687 1092 80.91.229.12 (24 May 2007 19:08:07 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 24 May 2007 19:08:07 +0000 (UTC) To: "mailing list for ConTeXt users" Original-X-From: ntg-context-bounces@ntg.nl Thu May 24 21:07:59 2007 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1HrIfD-0006tM-Co for gctc-ntg-context-518@m.gmane.org; Thu, 24 May 2007 21:07:55 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 55B6420109; Thu, 24 May 2007 21:07:54 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 03180-07-3; Thu, 24 May 2007 21:07:46 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 77653200E5; Thu, 24 May 2007 21:07:46 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 79EDF200E5 for ; Thu, 24 May 2007 21:07:44 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 03180-07-2 for ; Thu, 24 May 2007 21:07:39 +0200 (CEST) Original-Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.171]) by ronja.ntg.nl (Postfix) with ESMTP id 11557200D7 for ; Thu, 24 May 2007 21:07:38 +0200 (CEST) Original-Received: by ug-out-1314.google.com with SMTP id g33so105028ugd for ; Thu, 24 May 2007 12:07:38 -0700 (PDT) Original-Received: by 10.66.220.17 with SMTP id s17mr2329704ugg.1180033658450; Thu, 24 May 2007 12:07:38 -0700 (PDT) Original-Received: by 10.67.60.14 with HTTP; Thu, 24 May 2007 12:07:38 -0700 (PDT) In-Reply-To: <769ba7780705240840u1317b749w1535c8483a85ef39@mail.gmail.com> Content-Disposition: inline X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:34776 Archived-At: On 5/24/07, Zhichu Chen wrote: > Thanks Wolfgang > > The first link is very useful. I will took its idea. I really want to use > metapost's scantoken to read sgf file directly, so it can easily be a > cross-platform solution. You can use either TeX or metapost to parse sgf file. But you can forget about TeX, I suppose. Metapost is an option if you love challenges, but it's not the only possibility if you're looking for cross-platform solutions. In http://match.stanford.edu/bump/sgf2dg-4.026.tar.gz you have sgf2mpost.c with 1000 lines of pure C code which parses the file and generates metapost output. If I was in your place, I would write a ruby (or lua ;) parser (the file above can help you, but you can probably parse the input in a much more clever & efficient way with ruby) + metapost code generator. Then you write a ConTeXt module with \startSGFscript{name} or \startSGFfile or \startSGFgame or \startGOgame .... the very special format of your game ... \stopSGFscript You write the content into a file (you can also prepare external files and tell ConTeXt which one is the source file), call "texmfstart your-great-ruby-script file.sgf", which generates metapost output, and then you include that one in the ConTeXt document. I'm really not sure if parsing SGF files with metapost can bring you anything ... ruby scripts are fully portable, at least in ConTeXt. Mojca > On 5/24/07, Wolfgang Schuster > wrote: > > 2007/5/24, Zhichu Chen : > > > Hi > > > > > > I love chess games, especially one kind of them which is generally > called > > > Go. > > > > > > I know there is some file can store each details in one game: > > > http://www.red-bean.com/sgf/ > > > > > > AFAIK, there is no module available to draw chess in ConTeXt now. I > wanna do > > > this by using MetaPost and fieldstack. But I don't know how to tell > metapost > > > the details of the sgf file. Can anyone give me a suggestion? > > > > > > BTW, I don't like the name. It's invented by acient Chinese and it's > called > > > Weiqi. I think we can call it Siege Chess in English. > > > > > > > > > -- > > > Best Regards > > > Chen > > > > Hi Chen, > > > > if you mean Go take a look at the following page: > > > > http://match.stanford.edu/bump/go.html > > > > There are also two packages on CTAN for LaTeX: > > > > > http://www.ctan.org/tex-archive/help/Catalogue/bytopic.html#gamesgo > > > > Wolfgang > > > ___________________________________________________________________________________ > > If your question is of interest to others as well, please add an entry to > the Wiki! > > > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > > archive : > https://foundry.supelec.fr/projects/contextrev/ > > wiki : http://contextgarden.net > > > ___________________________________________________________________________________ > > > > > > -- > Best Regards > Chen > ---------------------------------------------------------------- > > Zhi-chu Chen | Shanghai Synchrotron Radiation Facility > No. 2019 | Jialuo Rd. | Jiading | Shanghai | P.R. China > tel: 086 21 5955 3405 | zhichu.chen.googlepages.com > | > www.sinap.ac.cn > ---------------------------------------------------------------- > ___________________________________________________________________________________ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : https://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___________________________________________________________________________________ > > ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________