5

I'm sure that this question has been answered elsewhere: I would like to know ho do I type this: 1.d4

enter image description here

in a XeTeX file.

Sebastiano
  • 54,118
user2925716
  • 1,940
  • Thank you for green check mark, but the better answer is of @UlrikeFischer. Please can you give this. I am happy thus. :-) – Sebastiano Sep 10 '21 at 20:19
  • 1
    I draw my own chessboards, so can do pretty much anything with them. See https://tex.stackexchange.com/questions/168281/how-to-draw-a-chessboard-with-numbers/168304?r=SearchResults&s=1|50.3108#168304 – John Kormylo Sep 10 '21 at 21:20
  • @JohnKormylo I vote up your question indicated in the link. – Sebastiano Sep 11 '21 at 18:45

2 Answers2

8
\documentclass{article}
\usepackage{xskak}
\begin{document}
\newchessgame
\mainline{1. d4}

\chessboard
\end{document}

enter image description here

Ulrike Fischer
  • 327,261
6

I'm using skak package without the option [ps] that not have the black square:

\documentclass{article}
\usepackage{skak}
\begin{document}
\newgame
\mainline{1. d4}
\[ \showboard \]
\end{document}

enter image description here

Addendum: showing the black with the arrow (with the option ps) ....whose next move is by the black player.

\documentclass{article}
\usepackage[ps]{skak}
\showmoverOn
\begin{document}
\newgame
\mainline{1.d4}
\storegame{game1}
\[ \showboard \]
\end{document}

enter image description here

Sebastiano
  • 54,118
  • 1
    the black square is asymbol to show who's move it is, and there is a skak option for it too (and it can naturally be suppressed with xskak/chessboard). – Ulrike Fischer Sep 10 '21 at 20:08
  • @UlrikeFischer I like the chess. But if the first move is by the white pawn, shouldn't there be a white square indicating that the first move is by the "white" player? – Sebastiano Sep 10 '21 at 20:12
  • 1
    the board shows the position after the white move, the next move will be a black move. – Ulrike Fischer Sep 10 '21 at 20:38
  • @UlrikeFischer Ah now I have understood...now I put an addendum....but I not want the green check mark ...hence I have put the community wiki :-))))) – Sebastiano Sep 10 '21 at 20:39