* Draw chess board @ 2007-05-24 11:59 Zhichu Chen 2007-05-24 14:01 ` Wolfgang Schuster 0 siblings, 1 reply; 11+ messages in thread From: Zhichu Chen @ 2007-05-24 11:59 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 937 bytes --] 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 ---------------------------------------------------------------- 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: 1661 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Draw chess board 2007-05-24 11:59 Draw chess board Zhichu Chen @ 2007-05-24 14:01 ` Wolfgang Schuster 2007-05-24 15:40 ` Zhichu Chen 0 siblings, 1 reply; 11+ messages in thread From: Wolfgang Schuster @ 2007-05-24 14:01 UTC (permalink / raw) To: mailing list for ConTeXt users 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Draw chess board 2007-05-24 14:01 ` Wolfgang Schuster @ 2007-05-24 15:40 ` Zhichu Chen 2007-05-24 19:07 ` Mojca Miklavec 0 siblings, 1 reply; 11+ messages in thread From: Zhichu Chen @ 2007-05-24 15:40 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 2319 bytes --] 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. I'm not interested in the LaTeX package. It's against my original intention because I want to draw the board by importing the sgf file rather than by myself. But now I think manually input could be an option. 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 ---------------------------------------------------------------- [-- Attachment #1.2: Type: text/html, Size: 3864 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Draw chess board 2007-05-24 15:40 ` Zhichu Chen @ 2007-05-24 19:07 ` Mojca Miklavec 2007-05-25 2:49 ` Zhichu Chen 0 siblings, 1 reply; 11+ messages in thread From: Mojca Miklavec @ 2007-05-24 19:07 UTC (permalink / raw) To: mailing list for ConTeXt users 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Draw chess board 2007-05-24 19:07 ` Mojca Miklavec @ 2007-05-25 2:49 ` Zhichu Chen [not found] ` <6faad9f00705260558r9e110bbk6dba90b490b4acbd@mail.gmail.com> 0 siblings, 1 reply; 11+ messages in thread From: Zhichu Chen @ 2007-05-25 2:49 UTC (permalink / raw) To: mailing list for ConTeXt users [-- 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 11+ messages in thread
[parent not found: <6faad9f00705260558r9e110bbk6dba90b490b4acbd@mail.gmail.com>]
[parent not found: <769ba7780706051751t1b17756es2dd9000d8ba56397@mail.gmail.com>]
* Fwd: Draw chess board [not found] ` <769ba7780706051751t1b17756es2dd9000d8ba56397@mail.gmail.com> @ 2007-06-06 1:00 ` Zhichu Chen 2007-06-10 4:49 ` Mojca Miklavec 1 sibling, 0 replies; 11+ messages in thread From: Zhichu Chen @ 2007-06-06 1:00 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 8544 bytes --] ---------- Forwarded message ---------- From: Zhichu Chen <zhichu.chen@gmail.com> Date: Jun 6, 2007 8:51 AM Subject: Re: [NTG-context] Draw chess board To: Mojca Miklavec <mojca.miklavec.lists@gmail.com> Hi I've tried to write a test file which can only handle ;B[??], ;W[??], AB[??], AW[??] now, and I haven't added the interaction part. But it is a good start. Any suggestions? On 5/26/07, Mojca Miklavec <mojca.miklavec.lists@gmail.com> wrote: > > On 5/25/07, Zhichu Chen wrote: > > 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. > > Interesting idea! > > > \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. > > I didn't mean using sgf2mpost script directly, but to use it as a help > when creating a new one [in ruby for example]. > > > If I solved the sgf problem, I think I can input a game manually by > using > > sgf syntax > > That's what I meant. > > Mojca > > > > 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 > > ---------------------------------------------------------------- > > > ___________________________________________________________________________________ > > 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 ---------------------------------------------------------------- -- 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: 17217 bytes --] [-- Attachment #2: test.tex --] [-- Type: application/x-tex, Size: 5229 bytes --] [-- Attachment #3: 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Draw chess board [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 1 sibling, 1 reply; 11+ messages in thread From: Mojca Miklavec @ 2007-06-10 4:49 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1: Type: text/plain, Size: 1857 bytes --] On 6/6/07, Zhichu Chen wrote: > Hi > > I've tried to write a test file which can only handle ;B[??], ;W[??], > AB[??], AW[??] now, and I haven't added the interaction part. But it is a > good start. > > Any suggestions? Wow - that's really, really impressive! You indeed started parsing the strings in plain TeX! I've changed your source slightly, to give you an idea of yet another approach: using TikZ. It's main advantage over metapost might be: - you can draw more fancy stones (see the example - that could be made configurable of course), although teoretically the same could be achived with slightly improved smooth shading mechanism in mptopdf macros - might be easier to backport to (La)TeX - I can imagine your module to be a new, really nice TikZ package/module (that could be used in other flavours of TeX) + some fancy ConTeXt additions (user interface, javascript, ...). The main difference is that you need to store all the variables in TeX, not in metapost, so that part should be rewritten as well (which I didn't do). But simply forget about my stupid comments about (La)TeX for and do it your way now. Mojca (I have some other comments, but it's too early to speak about them, since the module is not ready/complete yet.) On 5/24/07, Zhichu Chen wrote: > 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 [-- Attachment #2: test.tex --] [-- Type: application/x-tex, Size: 7509 bytes --] [-- Attachment #3: 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Draw chess board 2007-06-10 4:49 ` Mojca Miklavec @ 2007-06-11 2:10 ` Zhichu Chen 2007-06-11 13:41 ` Zhichu Chen 0 siblings, 1 reply; 11+ messages in thread From: Zhichu Chen @ 2007-06-11 2:10 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 3568 bytes --] Hi Mojca, The stones are very very nice now, thank you for your hints. Since I haven't used TikZ before, I have no idea how to handle these events. I'll learn it later and rewrite my module to be more professional :) All I'm thinking now is how to make each step a single symbol so that I could use \fieldstack to demonstrate the game. By the way, I modified my module to do some fieldstack thing, but it gets a weird error. I have no idea what's the error about, it's fine when I'm using MPdrawing environment but it can't output anything when I switch to buffer and use \processMPbuffer. On 6/10/07, Mojca Miklavec <mojca.miklavec.lists@gmail.com> wrote: > > On 6/6/07, Zhichu Chen wrote: > > Hi > > > > I've tried to write a test file which can only handle ;B[??], ;W[??], > > AB[??], AW[??] now, and I haven't added the interaction part. But it is > a > > good start. > > > > Any suggestions? > > Wow - that's really, really impressive! You indeed started parsing the > strings in plain TeX! > > I've changed your source slightly, to give you an idea of yet another > approach: using TikZ. It's main advantage over metapost might be: > - you can draw more fancy stones (see the example - that could be made > configurable of course), although teoretically the same could be > achived with slightly improved smooth shading mechanism in mptopdf > macros > - might be easier to backport to (La)TeX > - I can imagine your module to be a new, really nice TikZ > package/module (that could be used in other flavours of TeX) + some > fancy ConTeXt additions (user interface, javascript, ...). > > The main difference is that you need to store all the variables in > TeX, not in metapost, so that part should be rewritten as well (which > I didn't do). > > But simply forget about my stupid comments about (La)TeX for and do it > your way now. > > Mojca > > (I have some other comments, but it's too early to speak about them, > since the module is not ready/complete yet.) > > > On 5/24/07, Zhichu Chen wrote: > > 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 > > > ___________________________________________________________________________________ > 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: 4972 bytes --] [-- Attachment #2: sgfstack.tex --] [-- Type: application/x-tex, Size: 8090 bytes --] [-- Attachment #3: 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Draw chess board 2007-06-11 2:10 ` Zhichu Chen @ 2007-06-11 13:41 ` Zhichu Chen 2007-06-11 14:12 ` Wolfgang Schuster 0 siblings, 1 reply; 11+ messages in thread From: Zhichu Chen @ 2007-06-11 13:41 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 4555 bytes --] Hi guys I've modified my module again, then you can click to demostrate a game. The source file is attached and the resulting pdf file is pretty huge so I just upload to my google page (I think there's a bandwidth limitation so I use winrar to compress it): http://zhichu.chen.googlepages.com/sgfstack.rar On 6/11/07, Zhichu Chen <zhichu.chen@gmail.com> wrote: > > Hi Mojca, > > The stones are very very nice now, thank you for your hints. > > Since I haven't used TikZ before, I have no idea how to handle these > events. I'll learn it later and rewrite my module to be more professional :) > > > All I'm thinking now is how to make each step a single symbol so that I > could use \fieldstack to demonstrate the game. > > By the way, I modified my module to do some fieldstack thing, but it gets > a weird error. I have no idea what's the error about, it's fine when I'm > using MPdrawing environment but it can't output anything when I switch to > buffer and use \processMPbuffer. > > On 6/10/07, Mojca Miklavec <mojca.miklavec.lists@gmail.com> wrote: > > > On 6/6/07, Zhichu Chen wrote: > > > Hi > > > > > > I've tried to write a test file which can only handle ;B[??], ;W[??], > > > AB[??], AW[??] now, and I haven't added the interaction part. But it > > is a > > > good start. > > > > > > Any suggestions? > > > > Wow - that's really, really impressive! You indeed started parsing the > > strings in plain TeX! > > > > I've changed your source slightly, to give you an idea of yet another > > approach: using TikZ. It's main advantage over metapost might be: > > - you can draw more fancy stones (see the example - that could be made > > configurable of course), although teoretically the same could be > > achived with slightly improved smooth shading mechanism in mptopdf > > macros > > - might be easier to backport to (La)TeX > > - I can imagine your module to be a new, really nice TikZ > > package/module (that could be used in other flavours of TeX) + some > > fancy ConTeXt additions (user interface, javascript, ...). > > > > The main difference is that you need to store all the variables in > > TeX, not in metapost, so that part should be rewritten as well (which > > I didn't do). > > > > But simply forget about my stupid comments about (La)TeX for and do it > > your way now. > > > > Mojca > > > > (I have some other comments, but it's too early to speak about them, > > since the module is not ready/complete yet.) > > > > > > On 5/24/07, Zhichu Chen wrote: > > > 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 > > > > > > ___________________________________________________________________________________ > > 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 > ---------------------------------------------------------------- > > -- 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: 7560 bytes --] [-- Attachment #2: sgfstack.tex --] [-- Type: application/x-tex, Size: 8169 bytes --] [-- Attachment #3: 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Draw chess board 2007-06-11 13:41 ` Zhichu Chen @ 2007-06-11 14:12 ` Wolfgang Schuster 2007-06-12 1:06 ` Zhichu Chen 0 siblings, 1 reply; 11+ messages in thread From: Wolfgang Schuster @ 2007-06-11 14:12 UTC (permalink / raw) To: mailing list for ConTeXt users 2007/6/11, Zhichu Chen <zhichu.chen@gmail.com>: > Hi guys > > I've modified my module again, then you can click to demostrate a game. The > source file is attached and the resulting pdf file is pretty huge so I just > upload to my google page (I think there's a bandwidth limitation so I use > winrar to compress it): > http://zhichu.chen.googlepages.com/sgfstack.rar Hi Chen, nice module. One suggestion for your Todo list: size option for the board (goban): - small (9 x 9) - medium (13 x 13) - big (19 x 19), default size 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Draw chess board 2007-06-11 14:12 ` Wolfgang Schuster @ 2007-06-12 1:06 ` Zhichu Chen 0 siblings, 0 replies; 11+ messages in thread From: Zhichu Chen @ 2007-06-12 1:06 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 2327 bytes --] Hi Wolfgang, Actually, the sgf file always contains strings like SZ[19] which indicates the board size is 19x19, so I think if I wanna manually input a game, just type SZ[??] will be more convenient. The main problem is how to move dead stones from the board, this is not so easy in tex or metapost. I looked at other sgf viewers, and still have no idea. Another problem is that the output file is very big (of course, because it contains like hundreds of graphics), can I use some command like \pdfcompresslevel to compress these graphics? The default value of \pdfcompresslevel is 9 and the pdf output file is like 4M, when I use winrar to compress it, it shrinked to less than 700k. So I think there should be some way to compress it more. On 6/11/07, Wolfgang Schuster <schuster.wolfgang@googlemail.com> wrote: > > 2007/6/11, Zhichu Chen <zhichu.chen@gmail.com>: > > Hi guys > > > > I've modified my module again, then you can click to demostrate a game. > The > > source file is attached and the resulting pdf file is pretty huge so I > just > > upload to my google page (I think there's a bandwidth limitation so I > use > > winrar to compress it): > > http://zhichu.chen.googlepages.com/sgfstack.rar > > Hi Chen, > > nice module. One suggestion for your Todo list: > > size option for the board (goban): > - small (9 x 9) > - medium (13 x 13) > - big (19 x 19), default size > > 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 ---------------------------------------------------------------- [-- Attachment #1.2: Type: text/html, Size: 3624 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2007-06-12 1:06 UTC | newest] Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2007-05-24 11:59 Draw chess board 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 [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
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).