1

Killer Chess Training is a chess training website.

They give out worksheets every week like https://p8e5c7t2.rocketcdn.me/wp-content/uploads/2021/03/Friendly-Homework-23-%E2%80%93-2021-03-23.pdf and ask for responses in PDF which are marked.

They ask students to do three things:

  • Mark weaknesses with green squares (alternate: mark with circle)
  • Mark the worst placed piece(s) on both sides with yellow squares (alternate: mark with square)
  • Indicate the opponent’s idea with red arrows

Is there a latex package that allows marking up chess diagrams in this way?

  • You could check the ‘chessboard’ package. – Tom Nov 24 '23 at 18:32
  • assuming that they give you a pdf and you have to add annotations then using a pdf reader like adobe is probably the easiest. Doing it with latex would need much measuring to get the positions correctly. – Ulrike Fischer Nov 24 '23 at 18:35
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Nov 24 '23 at 19:35

1 Answers1

1

Here's a way to do it in Latex. (You could do all this also with an image editor like Paint.net etc.)

Basic idea

  • make a screenshot of the page of interest, save as e.g. pg3.png (e.g. via your viewers tools)
  • use Tikz to enable all those drawings
  • load the image into a nodes text field
  • draw whatever you need over it (see also this question)

Relevant code lines

To read the image and to show it in a tikzpicture you load it into a \node. Think of using the node as a medium for typesetting more complex content here. // Package graphicx provide \includegraphics, see its documentation here at ctan.

    % ~~~ read and show pg3.png ~~~~~~~~~~~~~~~
    %     pin node to its upper left corner (= north west)
    \node[anchor=north west] {\includegraphics[width=\textwidth]{pg3}};

Draw some colored lines, which you remove later, to get a feel for the absolute positions:

        % ~~~ some lines for orientation // comment out later ~~~~~~
        \draw[blue]       (0,  0) -- (13 ,0);   % now referenced to north west
        \draw[red,dashed] (0, -5) -- (13,-5);
...

Finally place two nodes and draw a line with an arrow tip to indicate what the exercises ask for; use some trials to find positions, which works quickly and precise enough:

    % ~~~ examples for indications: ~~~~~~~~~~~~
    \node[weak] at (2.9,-1.6) {};
    \node[wrst] at (1.5,-4.2) {};
    \draw[idea]                 (1.5,-2) -- (2.5,-3);

To support all this define a few styles in the beginning, which:

  • specify color
  • shape
  • line width
  • minimum size (a bit larger makes placement easier)
 \begin{tikzpicture}[   % defining some styles
    weak/.style={draw=green,shape=rectangle,
                 line width=1.5pt,minimum size=5mm},
    wrst/.style={draw=yellow,shape=rectangle,
                 line width=2pt,minimum size=5mm},
    idea/.style={draw=red,->},
 ]

This leads to e.g.:

preliminary

Approaching positions

  • use the colored lines for a first estimate of coordinates
  • compile and refine
  • if you want to measure positions e.g. on paper, measure the nodes/squares/lines center

Final code

After deleting or commenting out the colored help lines:

final

\documentclass[10pt,border=3mm,tikz]{standalone}
%\usepackage{pdfpages}              % reads in pdf-pages
\usepackage{tikz}                   % to "draw" things
\usetikzlibrary{shapes.geometric}   % for the square

\begin{document} \begin{tikzpicture}[ % defining some styles weak/.style={draw=green,shape=rectangle, line width=1.5pt,minimum size=5mm}, wrst/.style={draw=yellow,shape=rectangle, line width=2pt,minimum size=5mm}, idea/.style={draw=red,->}, ] % ~~~ read and show pg3.png ~~~~~~~~~~~~~~~ % pin node to its upper left corner (= north west) \node[anchor=north west] {\includegraphics[width=\textwidth]{pg3}};

% % ~~~ some lines for orientation // comment out later ~~~~~~ % \draw[blue] (0, 0) -- (13 ,0); % now referenced to north west % \draw[red,dashed] (0, -5) -- (13,-5); % \draw[red,dashed] (0,-10) -- (13,-10); % \draw[red,dashed] (0,-15) -- (13,-15); % % \draw[orange,dashed] (4,0) -- (4,-15); % \draw[orange,dashed] (6.5,0) -- (6.5,-15);

% ~~~ examples for indications: ~~~~~~~~~~~~
\node[weak] at (2.9,-1.6) {};
\node[wrst] at (1.5,-4.2) {};
\draw[idea]                 (1.5,-2) -- (2.5,-3);

\end{tikzpicture}
\end{document}

A possible alternative

You could also load dedicated pdf-pages to use in Latex. However, \includepdf doesn't seem to work inside a \node, so I switched to the screenshot approach. The following shows the same page, in higher quality of course.

\documentclass[10pt,a4paper]{article}
\usepackage{pdfpages}   % reads in pdf-pages

\begin{document} % ~~~ show just page 3 ~~~~~~ \includepdf[pages=3]{homework}
\end{document}

MS-SPO
  • 11,519