<?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>Luc Stepniewski&#039;s Blog &#187; chess</title>
	<atom:link href="http://www.gradstein.info/category/chess/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gradstein.info</link>
	<description></description>
	<lastBuildDate>Thu, 29 Dec 2011 22:59:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<atom:link rel='hub' href='http://www.gradstein.info/?pushpress=hub'/>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>New version of chess PGN to TeX to PDF converter</title>
		<link>http://www.gradstein.info/python/version-chess-pgn-tex-pdf-converter/</link>
		<comments>http://www.gradstein.info/python/version-chess-pgn-tex-pdf-converter/#comments</comments>
		<pubDate>Tue, 28 Dec 2010 01:37:08 +0000</pubDate>
		<dc:creator>Lior Gradstein</dc:creator>
				<category><![CDATA[chess]]></category>
		<category><![CDATA[kid]]></category>
		<category><![CDATA[latex]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[children]]></category>
		<category><![CDATA[convert]]></category>
		<category><![CDATA[converter]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[learning]]></category>
		<category><![CDATA[mate in one]]></category>
		<category><![CDATA[pdf]]></category>
		<category><![CDATA[pgn]]></category>
		<category><![CDATA[tetex]]></category>
		<category><![CDATA[tex]]></category>
		<category><![CDATA[tex live]]></category>

		<guid isPermaLink="false">http://www.gradstein.info/?p=418</guid>
		<description><![CDATA[OK, I&#8217;m shameful. After fighting with Scid&#8217;s exporter, and then correcting bugs in pgn2ltx&#8217;s source, I finally decided to take a look at that PGN file format. And guess what? It&#8217;s already composed of FEN notation. And guess what? that super-über cool new skaknew module for LaTeX gets its input as FEN!! So, if I [...]]]></description>
			<content:encoded><![CDATA[<p>OK, I&#8217;m shameful. After fighting with <a href="http://scid.sourceforge.net/" class="liexternal">Scid&#8217;s</a> exporter, and then correcting bugs in pgn2ltx&#8217;s source, I finally decided to take a look at that <a href="http://en.wikipedia.org/wiki/Portable_Game_Notation" rel="nofollow" class="liwikipedia">PGN</a> file format. And guess what? It&#8217;s already composed of <a href="http://en.wikipedia.org/wiki/Forsyth%E2%80%93Edwards_Notation" rel="nofollow" class="liwikipedia">FEN</a> notation. And guess what? that super-über cool new skaknew module for LaTeX gets its input as FEN!!</p>
<p><span id="more-418"></span></p>
<p>So, if I had a working brain 1 week ago (at least), I would write a small python program that would eat that PGN and make it into a nicely formatted skaknew TeX formatted file!</p>
<p>Here is that much wanted program, that took just 5 minutes to write:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
</pre></td><td class="code"><pre class="python" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">#!/usr/bin/env python</span>
<span style="color: #808080; font-style: italic;"># -*- coding: utf-8 -*-</span>
<span style="color: #808080; font-style: italic;">#</span>
<span style="color: #808080; font-style: italic;"># vim:syntax=python:sw=4:ts=4:expandtab</span>
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">sys</span>,<span style="color: #dc143c;">re</span>
&nbsp;
HEADER=<span style="color: #483d8b;">&quot;&quot;&quot;<span style="color: #000099; font-weight: bold;">\</span>
<span style="color: #000099; font-weight: bold;">\\</span>documentclass[10pt,twocolumn]{article}
&nbsp;
<span style="color: #000099; font-weight: bold;">\\</span>usepackage[skaknew]{chessboard,skak}
%<span style="color: #000099; font-weight: bold;">\\</span>usepackage[ps]{skak}
<span style="color: #000099; font-weight: bold;">\\</span>usepackage{latexsym}
<span style="color: #000099; font-weight: bold;">\\</span>usepackage[utf8]{inputenc}
<span style="color: #000099; font-weight: bold;">\\</span>font<span style="color: #000099; font-weight: bold;">\\</span>logo=logo10
<span style="color: #000099; font-weight: bold;">\\</span>font<span style="color: #000099; font-weight: bold;">\\</span>sknf=SkakNew-Figurine
<span style="color: #000099; font-weight: bold;">\\</span>font<span style="color: #000099; font-weight: bold;">\\</span>sknfbx=SkakNew-FigurineBold
<span style="color: #000099; font-weight: bold;">\\</span>font<span style="color: #000099; font-weight: bold;">\\</span>skndia=SkakNew-DiagramT
<span style="color: #000099; font-weight: bold;">\\</span>def<span style="color: #000099; font-weight: bold;">\\</span>Metafont{<span style="color: #000099; font-weight: bold;">\\</span>mbox{<span style="color: #000099; font-weight: bold;">\\</span>logo METAFONT}}
&nbsp;
<span style="color: #000099; font-weight: bold;">\\</span>usepackage{a4wide}
%<span style="color: #000099; font-weight: bold;">\\</span>usepackage{geometry} % to change the page dimensions
%<span style="color: #000099; font-weight: bold;">\\</span>geometry{a4paper}
%%<span style="color: #000099; font-weight: bold;">\\</span>geometry{margin=5in}
%<span style="color: #000099; font-weight: bold;">\\</span>geometry{portrait}
&nbsp;
<span style="color: #000099; font-weight: bold;">\\</span>usepackage{fancyhdr} % This should be set AFTER setting up the page geometry
<span style="color: #000099; font-weight: bold;">\\</span>pagestyle{fancy} % options: empty , plain , fancy
<span style="color: #000099; font-weight: bold;">\\</span>renewcommand{<span style="color: #000099; font-weight: bold;">\\</span>headrulewidth}{0pt} % customise the layout...
<span style="color: #000099; font-weight: bold;">\\</span>lhead{}<span style="color: #000099; font-weight: bold;">\\</span>chead{}<span style="color: #000099; font-weight: bold;">\\</span>rhead{}
<span style="color: #000099; font-weight: bold;">\\</span>lfoot{}<span style="color: #000099; font-weight: bold;">\\</span>cfoot{<span style="color: #000099; font-weight: bold;">\\</span>thepage}<span style="color: #000099; font-weight: bold;">\\</span>rfoot{}
&nbsp;
<span style="color: #000099; font-weight: bold;">\\</span>frenchspacing
<span style="color: #000099; font-weight: bold;">\\</span>begin{document}
&quot;&quot;&quot;</span>
&nbsp;
TEMPLATE=<span style="color: #483d8b;">&quot;&quot;&quot;<span style="color: #000099; font-weight: bold;">\</span>
<span style="color: #000099; font-weight: bold;">\\</span>chessboard[
   setfen=%s,
   ]
&nbsp;
&quot;&quot;&quot;</span>
&nbsp;
END_DOC = <span style="color: #483d8b;">&quot;<span style="color: #000099; font-weight: bold;">\\</span>end{document}&quot;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> main<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>:
    pre = <span style="color: #dc143c;">sys</span>.<span style="color: black;">argv</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span>.<span style="color: black;">split</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'.'</span>,<span style="color: #ff4500;">2</span><span style="color: black;">&#41;</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span>
    output_file = <span style="color: #008000;">open</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;%s-out.tex&quot;</span> <span style="color: #66cc66;">%</span> pre,<span style="color: #483d8b;">'w'</span><span style="color: black;">&#41;</span>
&nbsp;
    <span style="color: #808080; font-style: italic;"># First, write the header</span>
    output_file.<span style="color: black;">write</span><span style="color: black;">&#40;</span>HEADER<span style="color: black;">&#41;</span>
&nbsp;
    expr = <span style="color: #dc143c;">re</span>.<span style="color: #008000;">compile</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'^<span style="color: #000099; font-weight: bold;">\[</span>FEN &quot;([^&quot;]+)&quot;<span style="color: #000099; font-weight: bold;">\]</span>'</span><span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">for</span> line <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #008000;">open</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">sys</span>.<span style="color: black;">argv</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>.<span style="color: black;">xreadlines</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>:
        result = expr.<span style="color: black;">search</span><span style="color: black;">&#40;</span>line<span style="color: black;">&#41;</span>
        <span style="color: #ff7700;font-weight:bold;">if</span> result:
            output_file.<span style="color: black;">write</span><span style="color: black;">&#40;</span>TEMPLATE <span style="color: #66cc66;">%</span> result.<span style="color: black;">group</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
&nbsp;
    output_file.<span style="color: black;">write</span><span style="color: black;">&#40;</span>END_DOC<span style="color: black;">&#41;</span>
    output_file.<span style="color: black;">close</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">if</span> __name__ == <span style="color: #483d8b;">'__main__'</span>:
    main<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></pre></td></tr></table></div>

<p>And the best of all, is that I have now full control in its output (well, in my light LaTeX&#8217;s knowledge limits). So now I can add a marker to tell which turn it is (little colored square box next to each game). You wll still get 1<a href="http://www.gradstein.info/wp-content/uploads/mate_in_one-out.pdf" class="lipdf">96 pages</a>, that is 1171 mate in one diagrams to solve.</p>
<p><a href="http://www.gradstein.info/wp-content/uploads/2010/12/pdf-screen.png" class="liimagelink"><img class="aligncenter size-full wp-image-419" title="Example of chess diagram output" src="http://www.gradstein.info/wp-content/uploads/2010/12/pdf-screen.png" alt="" width="462" height="690" /></a></p>
<p>So, to summarize, here are the files:</p>
<ul>
<li>The <a href="http://www.gradstein.info/wp-content/uploads/mate_in_one-out.pdf" class="lipdf">generated PDF</a></li>
<li>The intermediate file, <a href="http://www.gradstein.info/wp-content/uploads/mate_in_one-out.tex" class="liinternal">in TeX format</a></li>
<li>The original file, in <a href="http://www.gradstein.info/static/mate_in_one.pgn.gz" class="lizip">PGN format</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.gradstein.info/python/version-chess-pgn-tex-pdf-converter/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Updated mate-in-one document, now includes chess coordinates</title>
		<link>http://www.gradstein.info/kid/updated-mate-in-one-document-includes-coordinates/</link>
		<comments>http://www.gradstein.info/kid/updated-mate-in-one-document-includes-coordinates/#comments</comments>
		<pubDate>Mon, 27 Dec 2010 23:18:18 +0000</pubDate>
		<dc:creator>Lior Gradstein</dc:creator>
				<category><![CDATA[chess]]></category>
		<category><![CDATA[kid]]></category>
		<category><![CDATA[latex]]></category>
		<category><![CDATA[checkmate]]></category>
		<category><![CDATA[coordinates]]></category>
		<category><![CDATA[échecs]]></category>
		<category><![CDATA[mate]]></category>
		<category><![CDATA[mate in one]]></category>
		<category><![CDATA[Portable Game Notation]]></category>

		<guid isPermaLink="false">http://www.gradstein.info/?p=415</guid>
		<description><![CDATA[After a request to have coordinates on the board, to be able to write answers (a really nice idea, especially that Ido begins writing), I noticed I couldn&#8217;t do it so easily, because the LaTeX module (chess12) didn&#8217;t support that. What a disappointment! And the only way I had for converting from PGN to TeX [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.gradstein.info/wp-content/uploads/2010/12/932337_chessman.jpg" class="liimagelink"><img class="size-thumbnail wp-image-417 alignright" title="Chess Knights" src="http://www.gradstein.info/wp-content/uploads/2010/12/932337_chessman-150x150.jpg" alt="" width="150" height="150" /></a>After a request to have coordinates on the board, to be able to write answers (a really nice idea, especially that Ido begins writing), I noticed I couldn&#8217;t do it so easily, because the LaTeX module (chess12) didn&#8217;t support that. What a disappointment!</p>
<p>And the only way I had for converting from PGN to TeX was through <a href="http://scid.sourceforge.net/" class="liexternal">Scid</a> (still cool, still being developed), but supporting only exports to <a href="http://scid.sourceforge.net/help/LaTeX.html" class="liexternal">TeX with chess12 module</a>. Fortunately, <a href="https://launchpad.net/~dl9obn" class="liexternal">Dirk Baechle</a> wrote a tool to convert directly from PGN format to TeX, using his tool <a href="http://pgn2ltx.sourceforge.net/" class="liexternal">pgn2ltx</a>. That tool, written in C++ hasn&#8217;t been updated since 2003, so after a small patch to the source, it worked!</p>
<p>And the best part, is that it generates TeX files for the <a href="http://www.ctan.org/tex-archive/fonts/chess/skaknew/" class="liexternal">skak module</a>, the best alternative to the old, dead chess12 module.</p>
<p><span id="more-415"></span></p>
<p>So, if you wan to generate yourself the PDF, here is my procedure:</p>
<ul>
<li>First, download the pgn2ltx zip file and uncompress it</li>
<li>Patch it with the following diff file:</li>
</ul>
<div id="_mcePaste">

<div class="wp_syntax"><div class="code"><pre class="diff" style="font-family:monospace;"><span style="color: #991111;">&lt;div id=&quot;_mcePaste&quot;&gt;--- pgn2ltx.cpp.ori	2010-12-27 21:06:56.000000000 +0100&lt;/div&gt;</span>
<span style="color: #991111;">&lt;div id=&quot;_mcePaste&quot;&gt;+++ pgn2ltx.cpp	2010-12-27 21:07:10.000000000 +0100&lt;/div&gt;</span>
<span style="color: #991111;">&lt;div id=&quot;_mcePaste&quot;&gt;@@ -35,6 +35,7 @@&lt;/div&gt;</span>
<span style="color: #991111;">&lt;div id=&quot;_mcePaste&quot;&gt;/*------------------------------------------------------------- Includes */&lt;/div&gt;</span>
<span style="color: #991111;">&lt;div id=&quot;_mcePaste&quot;&gt;#include &lt;iostream&gt;&lt;/div&gt;</span>
<span style="color: #991111;">&lt;div id=&quot;_mcePaste&quot;&gt;+#include &lt;cstring&gt;&lt;/div&gt;</span>
<span style="color: #991111;">&lt;div id=&quot;_mcePaste&quot;&gt;#include &lt;string&gt;&lt;/div&gt;</span>
<span style="color: #991111;">&lt;div id=&quot;_mcePaste&quot;&gt;#include &lt;fstream&gt;&lt;/div&gt;</span>
<span style="color: #991111;">&lt;div id=&quot;_mcePaste&quot;&gt;#include &lt;sstream&gt;&lt;/div&gt;</span></pre></div></div>

</div>
<div id="_mcePaste">In fact, just add the <strong>#include &lt;cstring&gt;</strong> besides the other includes.</div>
<div>
<ul>
<li>Now just compile it (you need g++ and usual compilation tools like make).</li>
<li>Download the <a href="http://www.gradstein.info/static/mate_in_one.pgn.gz" class="lizip">mate-in-one PGN database</a> I have in my <a href="http://www.gradstein.info/kid/easy-chess-games-for-kids-mate-in-one" class="liinternal">previous article</a> (no way to get the original, the web page we I found it was erased).</li>
<li>Generate the TeX file (did I tell you that <em><strong>you need the TeX Live distribution</strong></em>, which includes by default the skak module?) with the following command:</li>
</ul>
</div>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">.<span style="color: #000000; font-weight: bold;">/</span>pgn2ltx  <span style="color: #000000; font-weight: bold;">&lt;</span> mate_in_one.pgn  <span style="color: #000000; font-weight: bold;">&gt;</span> temp.tex</pre></div></div>

<p>Now, if you generate your PDF file with that temp.tex file, you&#8217;ll get just one diagram per page, and horrible text placement, so I modified the header to remove the useless text and also remove the answers. That makes space for 6 diagrams on each page.</p>
<p>I used this grep command to remove the text:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cat</span> temp.tex <span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-v</span> <span style="color: #ff0000;">&quot;White to Move and Mate in One&quot;</span> <span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-v</span> mate <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-v</span> mainline <span style="color: #000000; font-weight: bold;">&gt;</span> temp2.tex</pre></div></div>

<p>Replace the header with the following :</p>

<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #E02020; ">\</span><span style="color: #800000;">documentclass</span><span style="color: #E02020; ">[</span><span style="color: #C08020; font-weight: normal;">10pt,twocolumn</span><span style="color: #E02020; ">]{</span><span style="color: #2020C0; font-weight: normal;">article</span><span style="color: #E02020; ">}</span>
&nbsp;
<span style="color: #E02020; ">\</span><span style="color: #800000;">usepackage</span><span style="color: #E02020; ">[</span><span style="color: #C08020; font-weight: normal;">ps</span><span style="color: #E02020; ">]{</span><span style="color: #2020C0; font-weight: normal;">skak</span><span style="color: #E02020; ">}</span>
&nbsp;
<span style="color: #E02020; ">\</span><span style="color: #800000;">usepackage</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">latexsym</span><span style="color: #E02020; ">}</span>
<span style="color: #E02020; ">\</span><span style="color: #800000;">usepackage</span><span style="color: #E02020; ">[</span><span style="color: #C08020; font-weight: normal;">utf8</span><span style="color: #E02020; ">]{</span><span style="color: #2020C0; font-weight: normal;">inputenc</span><span style="color: #E02020; ">}\</span><span style="color: #800000;">usepackage</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">a4wide</span><span style="color: #E02020; ">}</span>
<span style="color: #E02020; ">\</span><span style="color: #800000;">usepackage</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">fancyhdr</span><span style="color: #E02020; ">}</span> <span style="color: #2C922C; font-style: italic;">% This should be set AFTER setting up the page geometry</span>
<span style="color: #E02020; ">\</span><span style="color: #800000;">pagestyle</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">fancy</span><span style="color: #E02020; ">}</span> <span style="color: #2C922C; font-style: italic;">% options: empty , plain , fancy</span>
<span style="color: #E02020; ">\</span><span style="color: #800000;">renewcommand</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;"><span style="color: #800000; font-weight: normal;">\headrulewidth</span></span><span style="color: #E02020; ">}{</span><span style="color: #2020C0; font-weight: normal;">0pt</span><span style="color: #E02020; ">}</span> <span style="color: #2C922C; font-style: italic;">% customise the layout...</span>
<span style="color: #800000; font-weight: normal;">\lhead</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">}<span style="color: #800000; font-weight: normal;">\chead</span>{</span><span style="color: #2020C0; font-weight: normal;">}<span style="color: #800000; font-weight: normal;">\rhead</span>{</span><span style="color: #2020C0; font-weight: normal;"><span style="color: #E02020; ">}</span>
<span style="color: #800000; font-weight: normal;">\lfoot</span>{</span><span style="color: #2020C0; font-weight: normal;">}<span style="color: #800000; font-weight: normal;">\cfoot</span><span style="color: #E02020; ">{</span><span style="color: #800000; font-weight: normal;">\thepage</span></span><span style="color: #E02020; ">}</span><span style="color: #800000; font-weight: normal;">\rfoot</span><span style="color: #E02020; ">{</span><span style="color: #E02020; ">}</span></pre></div></div>

<p>Here is the <a href="http://www.gradstein.info/wp-content/uploads/new-mate-in-one.pdf" class="lipdf">result, 196 pages of mate in one</a>! (<a href="http://www.gradstein.info/wp-content/uploads/new-mate-in-one.tex" class="liinternal">here is the .tex file</a>, if someone is interested)</p>
<p>Note: There are two problems left.</p>
<ul>
<li>First is that when generating the PDF, I get a lot of &#8220;<strong>Underfull \vbox (badness 10000) has occurred while \output is active</strong>&#8220;. If a LaTeX expert can take a look&#8230;</li>
<li>Second problem, I just noticed that some diagrams have the Black mate in one. I thought there were only White mate in one. So there is no way to know whose turn it is. A solution to this is to use a small coloredbox with the side to play. I think the skak module supports it. Some r<a href="ftp://ftp.inria.fr/pub/TeX/CTAN/fonts/chess/skaknew/SkakNew.pdf" class="lipdf">eading in perspective</a>&#8230;</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.gradstein.info/kid/updated-mate-in-one-document-includes-coordinates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New chess website for Chess education/promotion</title>
		<link>http://www.gradstein.info/kid/new-chess-website-for-chess-educationpromotion/</link>
		<comments>http://www.gradstein.info/kid/new-chess-website-for-chess-educationpromotion/#comments</comments>
		<pubDate>Tue, 29 Dec 2009 21:53:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[chess]]></category>
		<category><![CDATA[kid]]></category>
		<category><![CDATA[learning]]></category>

		<guid isPermaLink="false">http://www.gradstein.info/?p=277</guid>
		<description><![CDATA[BNPParibas in association with the FIDE created a new nicely done website (in french only). The goal of this website is to show the usefulness of chess to parents/teachers or schools. Children will also be happy to consult this website, there are cool games, and even a quiz, where one can win a sort of [...]]]></description>
			<content:encoded><![CDATA[<p><img class="size-full wp-image-280 alignright" title="Chess set" src="http://www.gradstein.info/wp-content/uploads/2009/12/chess.png" alt="Chess set" width="80" height="52" align="left" />BNPParibas in association with the FIDE created a <a href="http://www.jeu-echecs.bnpparibas.com" class="liexternal">new nicely done website</a> (in french only). The goal of this website is to show the usefulness of chess to parents/teachers or schools. Children will also be happy to consult this website, there are cool games, and even a quiz, where one can win a sort of printable &#8220;diploma&#8221;. A really nice initiative.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gradstein.info/kid/new-chess-website-for-chess-educationpromotion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Easy chess games for kids (mate in one)</title>
		<link>http://www.gradstein.info/kid/easy-chess-games-for-kids-mate-in-one/</link>
		<comments>http://www.gradstein.info/kid/easy-chess-games-for-kids-mate-in-one/#comments</comments>
		<pubDate>Mon, 02 Feb 2009 00:45:12 +0000</pubDate>
		<dc:creator>Lior Gradstein</dc:creator>
				<category><![CDATA[chess]]></category>
		<category><![CDATA[kid]]></category>
		<category><![CDATA[child]]></category>
		<category><![CDATA[children]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[diagrams]]></category>
		<category><![CDATA[generate]]></category>
		<category><![CDATA[generator]]></category>
		<category><![CDATA[kids]]></category>
		<category><![CDATA[mate]]></category>
		<category><![CDATA[mate in one]]></category>
		<category><![CDATA[pdf]]></category>
		<category><![CDATA[pgn]]></category>

		<guid isPermaLink="false">http://www.gradstein.info/?p=151</guid>
		<description><![CDATA[UPDATE: You can get a much better revised version of the PDF now, with coordinates, in this newer post. In my journey to teach chess to Ido, an easy (I thought) job was to generate diagrams where he has to find mate in a fixed number of turns. Starting with mate in one. It appeared [...]]]></description>
			<content:encoded><![CDATA[<p><span style="color: #ff0000;"><strong><span style="text-decoration: underline;">UPDATE:</span> You can get a much better revised version of the PDF now, with coordinates, <a href="/python/version-chess-pgn-tex-pdf-converter/" class="liinternal">in this newer post</a>.</strong></span></p>
<p>In my journey to teach chess to Ido, an easy (I thought) job was to generate diagrams where he has to find mate in a fixed number of turns. Starting with mate in one.<br />
It appeared that making diagrams is an easy task, as there are many programs (Linux and Windows) that permit this.<br />
On Linux, the best I could find is <a href="http://scid.sourceforge.net/" class="liexternal">scid</a>. That&#8217;s cool as I use it to maintain my databases of games. Even cooler, is that scid development has just restarted (stopped around 2004!), with the help of <a href="http://prolinux.free.fr/scid/" class="liexternal">Pascal Georges</a>. Using scid (I&#8217;m using the 3.7devel2009 version) I can export games to HTML or even to LaTeX files.</p>
<p>At first I thought I&#8217;d create the endings myself, for example, using <a href="http://www.apronus.com/chess/diagram.php" class="liexternal">online diagrams generators</a> or using <a href="http://en.wikipedia.org/wiki/Template:Chess_diagram" rel="nofollow" class="liwikipedia">Wikipedia/MediaWiki&#8217;s templates</a>, but it was not so easy, so I thought about making a program to generate them.<br />
Generating one from scratch would take me time I really don&#8217;t have, and there are just <a href="http://www.willmcgugan.com" class="liexternal">two</a> <a href="http://www.alcyone.com/pyos/church/" class="liexternal">python</a> modules that give high-level functions to chess.<br />
So I started looking for projects similar to mine, that include games with mate in one. I found a small database of mate in one on my favorite <a href="http://www.chess.com/" class="liexternal">chess website</a>, in the <a href="http://www.chess.com/download/view/1171-mates-in-1" class="liexternal">download section</a>: a Chessbase datafile with 1171 mate in one studies! So cool.</p>
<p>Well, It was really a pain to convert that Chessbase (.cbv) file, as the only program able to convert to PGN is <a href="http://www.chessbase.com/download/cblight2007/index.asp" class="liexternal">running on Windows</a> (at least it&#8217;s free). You just have to follow the <a href="http://www.avlerchess.com/chess-misc/Converting_chessbase_to_PGN_for_Scid_180896.html" class="liexternal">instructions from this thread</a>.<br />
After getting a <a href="/static/mate_in_one.pgn.gz" class="lizip">nice PGN file</a>, just open it with scid, go to &#8220;Tools&#8221;, then select &#8220;Write the filter&#8221;, and choose LaTeX. You&#8217;ll get a <a href="/static/mate_in_one.tex.gz" class="lizip">TeX file</a>. Use you favorite TeX generator (Live TeX seems to be the one today), like this for example, to generate directly a PDF file:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cat</span> mat_temp.tex <span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-v</span> <span style="color: #ff0000;">&quot;\\\<span style="color: #000099; font-weight: bold;">\$</span>&quot;</span> <span style="color: #000000; font-weight: bold;">&amp;</span>gt; mate_in_one.tex
latex <span style="color: #660033;">--output-format</span>=pdf mate_in_one.tex</pre></td></tr></table></div>

<p><em>(Yes I had to cleanup a bit the file before generating the .pdf)</em></p>
<p>The result is <a href="/static/mate_in_one.pdf" class="lipdf">here</a>, 196 pages of tests (6 one each page) if you don&#8217;t want to fight with the missing TeX modules (you&#8217;ll need chess12.sty) and get a nice result.</p>
<p>I&#8217;m sure many people search for this kind of file, so I&#8217;m pretty happy to help other parents/coaches.</p>
<div id="attachment_172" class="wp-caption aligncenter" style="width: 298px"><img class="size-full wp-image-172" title="Mate in one" src="http://www.gradstein.info/wp-content/uploads/2009/02/a.jpg" alt="White mate in one" width="288" height="288" /><p class="wp-caption-text">White mate in one</p></div>
<p>Edit: I added a <a href="/static/mate_in_one_without_solution.pdf" class="lipdf">PDF version without the solution included</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gradstein.info/kid/easy-chess-games-for-kids-mate-in-one/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Ido&#8217;s chess Journey: How to teach chess to a 3 year old kid</title>
		<link>http://www.gradstein.info/kid/idos-chess-journey-how-to-teach-chess-to-a-3-year-old-kid/</link>
		<comments>http://www.gradstein.info/kid/idos-chess-journey-how-to-teach-chess-to-a-3-year-old-kid/#comments</comments>
		<pubDate>Wed, 28 Jan 2009 01:20:24 +0000</pubDate>
		<dc:creator>Lior Gradstein</dc:creator>
				<category><![CDATA[chess]]></category>
		<category><![CDATA[kid]]></category>
		<category><![CDATA[Ã©cole]]></category>
		<category><![CDATA[children]]></category>
		<category><![CDATA[kindergarten]]></category>
		<category><![CDATA[learn]]></category>
		<category><![CDATA[petite section]]></category>
		<category><![CDATA[school]]></category>
		<category><![CDATA[teaching]]></category>

		<guid isPermaLink="false">http://www.gradstein.info/?p=115</guid>
		<description><![CDATA[How to teach chess to a 3 year old kid? That&#8217;s a good question. I wanted to teach Ido chess for a long time, but each time I tried, he lost focus after 2 minutes, even just for teaching him just rook movements. I decided I needed to plan it a little more, make it [...]]]></description>
			<content:encoded><![CDATA[<p>How to teach chess to a 3 year old kid? That&#8217;s a good question. I wanted to teach Ido chess for a long time, but each time I tried, he lost focus after 2 minutes, even just for teaching him just rook movements.<br />
I decided I needed to plan it a little more, make it much more fun, and &#8220;embed&#8221; it in mini-games. It seems to work much better now, but that&#8217;s maybe because he matured a lot.</p>
<p>Here are some ideas (some not yet implemented):</p>
<ul>
<li>Using a <a href="http://annathered.wordpress.com/2009/01/25/how-to-make-japanese-style-hamburg/" class="liexternal">DIY plastified</a> chess board, allows me to show/play different positions really fast, anywhere.</li>
<li>Colorize squares where a piece is allowed to go :<br />
<p class="flickrTag_container"><a href="http://farm4.static.flickr.com/3381/3227796869_f287f321c3.jpg" class="flickr" title="Ido colored in the squares where the bishop is allowed to go &lt;a href=&quot;http://www.flickr.com/photos/17782122@N00/3227796869/&quot;&gt;view&amp;nbsp;on&amp;nbsp;flickr&amp;raquo;&lt;/a&gt;" rel="lightbox"><img src="http://farm4.static.flickr.com/3381/3227796869_f287f321c3_m.jpg" alt="Ido colored in the squares where the bishop is allowed to go" class="flickr small photo" /></a></p></li>
<li><a href="http://www.chesskids.com/ckbook/ppawnrace.htm" class="liexternal">Pawn race games</a> (no en-passant rule yet).</li>
<li>Really small games (must not go over 5 minutes) with reduced chess set (for example Queen and 3 pawns vs Knight, bishop and 3 pawns).</li>
<li>Checkmate in one, using <a href="http://alain.blaisot.free.fr/DiagTransfer/English/home.htm" class="liexternal">DiagTransfer</a> program to draw series of chess diagrams. This program works only on Windows, but it works fine with Wine.<br />
<p class="flickrTag_container"><a href="http://farm4.static.flickr.com/3354/3228648000_7266b64e20.jpg" class="flickr" title="Ido found the mate in 1, for white &lt;a href=&quot;http://www.flickr.com/photos/17782122@N00/3228648000/&quot;&gt;view&amp;nbsp;on&amp;nbsp;flickr&amp;raquo;&lt;/a&gt;" rel="lightbox"><img src="http://farm4.static.flickr.com/3354/3228648000_7266b64e20_m.jpg" alt="Ido found the mate in 1, for white" class="flickr small photo" /></a></p></p>
<p>For quick single diagrams, I found <a href="http://www.apronus.com/chess/wbeditor.php" class="liexternal">wbeditor</a>, an online javascript diagram generator.</li>
</ul>
<p>There&#8217;s a <a href="http://blog.capakaspa.info/index.php?2006/12/10/30-apprentissage-des-echecs-aux-enfants" class="liexternal">thread</a> (french) about experience from different teachers, giving really good advices.<br />
Most notably, <a href="http://pagesperso-orange.fr/veronique.houck/" class="liexternal">Véronique Houck</a> who has 15 years of experience of teaching chess to kindergarten/maternelle children. She wrote two books (in french). One is named <a href="http://www.amazon.fr/Bibou-monde-%C3%A9checs-V%C3%A9ronique-Houck/dp/2878333934" class="liexternal">Bibou &amp; le monde des échecs</a>, and the other one <a href="http://www.echecs.com/actualites/actualites-le-jeu-d-echecs-au-cycle-2-1126.html" class="liexternal">Le jeu d&#8217;échecs au cycle2</a>. It&#8217;s not so easy to find, but using Google, you can find <a href="http://www.amazon.fr/jeu-d%C3%A9checs-cycle-2/dp/2866344081/ref=sr_1_6?ie=UTF8&amp;s=books&amp;qid=1233105118&amp;sr=8-6" class="liexternal">shows</a> <a href="http://www.decitre.fr/livres/Le-jeu-d-echecs-au-cycle-2.aspx/9782866344085" class="liexternal">many</a> <a href="http://www.priceminister.com/offer/buy/59851203/Houck-Veronique-Le-Jeu-D-echecs-Au-Cycle-2-Livre.html" class="liexternal">links</a>.</p>
<p>I&#8217;ve not yet read them. I&#8217;ll make a review when I get them.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gradstein.info/kid/idos-chess-journey-how-to-teach-chess-to-a-3-year-old-kid/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using memcached

Served from: www.stepniewski.fr @ 2012-02-06 07:49:10 -->
