diff options
author | Norbert Preining <norbert@preining.info> | 2024-10-27 03:03:33 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2024-10-27 03:03:33 +0000 |
commit | ade38177952984be4fbae56a1f8d212db1d2b689 (patch) | |
tree | 1ed7e11480908e7bfab6d3edee14fe2a0e040817 /graphics/metapost/contrib/macros/mpchess/doc | |
parent | bcdaee1dcafa3d6898089a20f60acf2aee48c3e5 (diff) |
CTAN sync 202410270303
Diffstat (limited to 'graphics/metapost/contrib/macros/mpchess/doc')
-rw-r--r-- | graphics/metapost/contrib/macros/mpchess/doc/mpchess-doc-en.pdf | bin | 1000703 -> 1522202 bytes | |||
-rw-r--r-- | graphics/metapost/contrib/macros/mpchess/doc/mpchess-doc-en.tex | 49 | ||||
-rw-r--r-- | graphics/metapost/contrib/macros/mpchess/doc/mpchess-doc-fr.pdf | bin | 1005336 -> 1528692 bytes | |||
-rw-r--r-- | graphics/metapost/contrib/macros/mpchess/doc/mpchess-doc-fr.tex | 43 | ||||
-rw-r--r-- | graphics/metapost/contrib/macros/mpchess/doc/mpchess-preamble.tex | 2 |
5 files changed, 81 insertions, 13 deletions
diff --git a/graphics/metapost/contrib/macros/mpchess/doc/mpchess-doc-en.pdf b/graphics/metapost/contrib/macros/mpchess/doc/mpchess-doc-en.pdf Binary files differindex 741544029e..f786faf7b2 100644 --- a/graphics/metapost/contrib/macros/mpchess/doc/mpchess-doc-en.pdf +++ b/graphics/metapost/contrib/macros/mpchess/doc/mpchess-doc-en.pdf diff --git a/graphics/metapost/contrib/macros/mpchess/doc/mpchess-doc-en.tex b/graphics/metapost/contrib/macros/mpchess/doc/mpchess-doc-en.tex index 5ad5abdb1a..fa1bae3fde 100644 --- a/graphics/metapost/contrib/macros/mpchess/doc/mpchess-doc-en.tex +++ b/graphics/metapost/contrib/macros/mpchess/doc/mpchess-doc-en.tex @@ -68,8 +68,8 @@ } \vfill \begin{center} - Version 0.7, 2023, July, 20th \\ - \url{https://plmlab.math.cnrs.fr/mchupin/mpchess} + Version 0.8, 2024, October, 26th \\ + \url{https://gitlab.gutenberg-asso.fr/mchupin/mpchess} \end{center} %% == Page de garde ==================================================== \newpage @@ -297,7 +297,9 @@ command: \item \lstinline+"GreenLichess"+; \item \lstinline+"PinkPyramidalLichess"+; \item \lstinline+"Wood"+; -\item or \lstinline+"Classical"+. +\item \lstinline+"Classical"+; +\item \lstinline+"Dotted"+; +\item or \lstinline+"User"+; \end{itemize} \end{description} @@ -359,11 +361,41 @@ The table~\ref{tab:color} shows the different results of the different themes. draw backboard; endfig; \end{mplibcode}\\ +\lstinline+"Dotted"+ theme& \\ +\begin{mplibcode} + input mpchess + beginfig(0); + init_chessboard; + set_backboard_width(4cm); + set_color_theme("Dotted"); + init_backboard; + draw backboard; + endfig; +\end{mplibcode}&\\ \end{tabular} \caption{The different color themes provided by \mpchess.}\label{tab:color} \end{table} - +The use of \lstinline+"User"+ is a special case, as it allows you to +define black and white squares. For this to work +a another macro +\lstinline+buildUserSquare+\index{buildUserSquare@\lstinline+buildUserSquare+} +should be difined. It must build the +images (\lstinline+picture+) \lstinline+_blackSquarePic+\index{_blackSquarePic@\lstinline+_blackSquarePic+} and +\lstinline+_whiteSquarePic+\index{_whiteSquarePic@\lstinline+_whiteSquarePic+}. +Here is a prototype of such a command. +\begin{mpcode} + def buildUserSquare(expr _SquareUnit)= + _blackSquarePic:=image( + fill (unitsquare scaled _SquareUnit) withcolor red; + ); + _whiteSquarePic:=image( + fill unitsquare scaled _SquareUnit withcolor green; + ); + enddef; +\end{mpcode} +The macro takes a unit as argument, and must construct two squares with length +equal to this unit. \subsubsection{Configuring a Personal Color Theme} @@ -1448,8 +1480,11 @@ endfig; \section{History} \begin{description} -\item[v0.7, juillet 2023:] Black knight adjustment, adding color board themes (\lstinline+GreenLichess+, \lstinline+PinkPyramidalLichess+, -\lstinline+Wood+ with color type (\lstinline+set_board_type+). +\item[v0.8, October 26, 2024:] Adding \lstinline+"Dotted"+ board theme, and +\lstinline+"User"+ board theme that allows user to define black and white +squares. +\item[v0.7, July, 2023:] Black knight adjustment, adding color board themes (\lstinline+GreenLichess+, \lstinline+PinkPyramidalLichess+, +\lstinline+Wood+ with color type (\lstinline+set_board_type+)). \item[v0.6, April 26, 2023:] Fixed bugs concerning castling management, and moves ambiguities in \textsc{pgn} format. Changed \lstinline+set_white_color+ to @@ -1461,8 +1496,6 @@ Changed \lstinline+set_white_color+ to \lstinline+hide_whos_to_move+. Change \lstinline+set_coords_inside+ and \lstinline+set_coords_outside+ to \lstinline+set_coordinates_position+. Change \lstinline+set_coords_font+ to \lstinline+set_coordinates_font+. - -Translated with www.DeepL.com/Translator (free version) \item[v0.5, April 20, 2023:] Bug fixed, \textbf{changing the default piece set} for the \lstinline+mpchess+ set (which has been added to Lichess), added TrueType font, and updated documentation. \item[v0.4, April 6, 2023:] Corrections in the documentation, especially the diff --git a/graphics/metapost/contrib/macros/mpchess/doc/mpchess-doc-fr.pdf b/graphics/metapost/contrib/macros/mpchess/doc/mpchess-doc-fr.pdf Binary files differindex bcca5a85f9..f22a70502d 100644 --- a/graphics/metapost/contrib/macros/mpchess/doc/mpchess-doc-fr.pdf +++ b/graphics/metapost/contrib/macros/mpchess/doc/mpchess-doc-fr.pdf diff --git a/graphics/metapost/contrib/macros/mpchess/doc/mpchess-doc-fr.tex b/graphics/metapost/contrib/macros/mpchess/doc/mpchess-doc-fr.tex index db6a5f8b86..44f2b9966d 100644 --- a/graphics/metapost/contrib/macros/mpchess/doc/mpchess-doc-fr.tex +++ b/graphics/metapost/contrib/macros/mpchess/doc/mpchess-doc-fr.tex @@ -71,8 +71,8 @@ } \vfill \begin{center} - Version 0.7, 20 juillet 2023 \\ - \url{https://plmlab.math.cnrs.fr/mchupin/mpchess} + Version 0.8, 26 octobre 2024 \\ + \url{https://gitlab.gutenberg-asso.fr/mchupin/mpchess} \end{center} %% == Page de garde ==================================================== \newpage @@ -292,11 +292,13 @@ Plusieurs thèmes de couleurs sont accessibles. Pour choisir un thème de couleu \item \lstinline+"GreenLichess"+; \item \lstinline+"PinkPyramidalLichess"+; \item \lstinline+"Wood"+; -\item ou \lstinline+"Classical"+. +\item \lstinline+"Classical"+; +\item \lstinline+"Dotted"+; +\item ou \lstinline+"User"+. \end{itemize} \end{description} -Les exemples suivants montrent les résultats obtenus. +Les exemples suivants montrent les résultats obtenus pour les thèmes prédéfinis. \begin{ExempleMP} input mpchess beginfig(0); @@ -355,10 +357,40 @@ Thème \lstinline+"PinkPyramidalLichess"+&Thème \lstinline+"Wood"+\\ draw backboard; endfig; \end{mplibcode}\\ +Thème \lstinline+"Dotted"+&\\ +\begin{mplibcode} + input mpchess + beginfig(0); + init_chessboard; + set_backboard_width(4cm); + set_color_theme("Dotted"); + init_backboard; + draw backboard; + endfig; +\end{mplibcode}&\\ \end{tabular} \caption{Les différents thèmes de couleur fournis par \mpchess.}\label{tab:color} \end{table} +L’utilisation de \lstinline+"User"+ est un cas particulier, car il permet de +définir soit même les casses noires et blanches. Pour que cela fonctionne, il +faut définir en plus une macro \lstinline+buildUserSquare+\index{buildUserSquare@\lstinline+buildUserSquare+} qui construit les +images (\lstinline+picture+) internes \lstinline+_blackSquarePic+\index{_blackSquarePic@\lstinline+_blackSquarePic+} et +\lstinline+_whiteSquarePic+\index{_whiteSquarePic@\lstinline+_whiteSquarePic+} dont voici un prototype : +\begin{mpcode} +def buildUserSquare(expr _SquareUnit)= + _blackSquarePic:=image( + fill (unitsquare scaled _SquareUnit) withcolor red; + ); + _whiteSquarePic:=image( + fill unitsquare scaled _SquareUnit withcolor green; + ); +enddef; +\end{mpcode} +La macro prend en argument une unité, et doit construire deux carrés de côté +cette unité. + + \subsubsection{Configuration d’un thème personnel} \paragraph{Couleurs.} @@ -1424,6 +1456,9 @@ endfig; \section{Historique} \begin{description} + \item[v0.8, 26 octobre 2024:] Ajout du thème d’échiquier \lstinline+"Dotted"+ + et ajout du thème d’échiquier \lstinline+"User"+ qui permet à l’utilisateur ou + l’utilisatrice de définir les casses blanches et noires. \item[v0.7, juillet 2023:] Ajustement du cavalier noir, ajout de thèmes d'échiquier (\lstinline+GreenLichess+, \lstinline+PinkPyramidalLichess+, \lstinline+Wood+ avec des types de coloriage (\lstinline+set_board_type+). diff --git a/graphics/metapost/contrib/macros/mpchess/doc/mpchess-preamble.tex b/graphics/metapost/contrib/macros/mpchess/doc/mpchess-preamble.tex index 6a7f11d747..333fbd975c 100644 --- a/graphics/metapost/contrib/macros/mpchess/doc/mpchess-preamble.tex +++ b/graphics/metapost/contrib/macros/mpchess/doc/mpchess-preamble.tex @@ -97,7 +97,7 @@ set_no_coords,set_white_view,set_black_view, set_white_player,set_black_player,set_pieces_theme,set_players_side,init_chessboard,set_empty_chessboard,add_white_pieces,add_black_pieces,clear_areas,clear_files,clear_ranks,clear_squares,build_chessboard_from_fen,build_chessboards_from_pgn,clear_chessboard, color_square,draw_arrows,draw_circles,draw_comment,draw_crosses,get_halfmove_number,get_totalmove_number, - reset_mpchess,set_black_to_move,set_last_move_color,set_comment_color,set_white_to_move,set_whos_to_move,show_last_move,unset_whos_to_move,set_arrow_width,clip_chessboard,build_chessboard_from_fen_file,build_chessboard_from_pgn_file,draw_black_main_lines,draw_black_main_lines_step,draw_white_main_lines,draw_white_main_lines_step,set_main_lines_color,set_possible_moves_color,show_possible_moves,show_possible_moves_step,hide_coordinates,hide_whos_to_move,set_black_squares_color,set_coordinates_font,set_coordinates_position,set_white_squares_color,show_coordinates,show_whos_to_move,set_board_type}, + reset_mpchess,set_black_to_move,set_last_move_color,set_comment_color,set_white_to_move,set_whos_to_move,show_last_move,unset_whos_to_move,set_arrow_width,clip_chessboard,build_chessboard_from_fen_file,build_chessboard_from_pgn_file,draw_black_main_lines,draw_black_main_lines_step,draw_white_main_lines,draw_white_main_lines_step,set_main_lines_color,set_possible_moves_color,show_possible_moves,show_possible_moves_step,hide_coordinates,hide_whos_to_move,set_black_squares_color,set_coordinates_font,set_coordinates_position,set_white_squares_color,show_coordinates,show_whos_to_move,set_board_type,buildUserSquare,_blackSquarePic,_whiteSquarePic}, keywordstyle=\color{darkred}, classoffset=2,% frame=tb morekeywords={backboard,chessboard,chessboard_step}, |