ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Zhichu Chen" <zhichu.chen@gmail.com>
To: "mailing list for ConTeXt users" <ntg-context@ntg.nl>
Subject: Re: Draw chess board
Date: Fri, 25 May 2007 10:49:19 +0800	[thread overview]
Message-ID: <769ba7780705241949g7596a0fco77d06db3b682af99@mail.gmail.com> (raw)
In-Reply-To: <6faad9f00705241207j484c2dd7wb7ba1d531f1e690@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 5794 bytes --]

Hi Mojca

I original intention is:

First, check the sgf file to decide how many rows and lines should be used.
For some instance, there is no need to draw the full 19x19 board, like
conversion steps demostration---best choices around the corner of the board.


Second, I'd like to take advantage of PDF Javascript to show every step by
clicking on some area. \fieldstack seems to be a good choice. But if I use
some script like sgf2mpost, I don't know how to if there is an easy way to
determine how many steps does the sgf include.

If I solved the sgf problem, I think I can input a game manually by using
sgf syntax


On 5/25/07, Mojca Miklavec <mojca.miklavec.lists@gmail.com> wrote:
>
> 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
> > <schuster.wolfgang@googlemail.com> wrote:
> > > 2007/5/24, Zhichu Chen < zhichu.chen@gmail.com>:
> > > > 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
>
> ___________________________________________________________________________________
>



-- 
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
----------------------------------------------------------------

[-- Attachment #1.2: Type: text/html, Size: 11238 bytes --]

[-- Attachment #2: Type: text/plain, Size: 487 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

  reply	other threads:[~2007-05-25  2:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-24 11:59 Zhichu Chen
2007-05-24 14:01 ` Wolfgang Schuster
2007-05-24 15:40   ` Zhichu Chen
2007-05-24 19:07     ` Mojca Miklavec
2007-05-25  2:49       ` Zhichu Chen [this message]
     [not found]         ` <6faad9f00705260558r9e110bbk6dba90b490b4acbd@mail.gmail.com>
     [not found]           ` <769ba7780706051751t1b17756es2dd9000d8ba56397@mail.gmail.com>
2007-06-06  1:00             ` Fwd: " Zhichu Chen
2007-06-10  4:49             ` Mojca Miklavec
2007-06-11  2:10               ` Zhichu Chen
2007-06-11 13:41                 ` Zhichu Chen
2007-06-11 14:12                   ` Wolfgang Schuster
2007-06-12  1:06                     ` Zhichu Chen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=769ba7780705241949g7596a0fco77d06db3b682af99@mail.gmail.com \
    --to=zhichu.chen@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).