Graphics, Figures & TablesCode for Chess Board fails

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
Sundial
Posts: 57
Joined: Thu Apr 19, 2012 7:28 pm

Code for Chess Board fails

Post by Sundial »

Please, may I ask somebody to compile the following code by PDFLaTeX?

Code: Select all

\documentclass{article}
\usepackage{skak}

\begin{document}

\section*{Chess}

\newgame
\mainline{1.e4 e5 2. Nf3 Nc6 3.Bb5}
\[
  \showboard
\]
\mainline{3...a6} Rarely used these days,
\variation{3...Nf6} is more in fashion since blah blah... \\
\mainline{4.Ba4}
\[
  \showboard
\]

\end{document}
Probably, I need some options to add, because the old way through DVI -> PS works properly.

Thx in advance

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Code for Chess Board fails

Post by Stefan Kottwitz »

What error message did you get? That code works fine for me with pdfLaTeX, and I got:
chess.png
chess.png (28.26 KiB) Viewed 4611 times
Click on "Open in writeLaTeX" at the top of the code box in your post for compiling it online.

Stefan
LaTeX.org admin
Sundial
Posts: 57
Joined: Thu Apr 19, 2012 7:28 pm

Re: Code for Chess Board fails

Post by Sundial »

What a surprise! Now, the compilation works fine in my PC, too.

Sorry for bothering the forum. So this topic can be deleted.

All the best.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Re: Code for Chess Board fails

Post by Stefan Kottwitz »

No problem, this happens. I'm glad that it works for you now. I will mark the topic as solved. No need to delete it, at least we now have a small example of typesetting chess here. :-)

Stefan
LaTeX.org admin
Sundial
Posts: 57
Joined: Thu Apr 19, 2012 7:28 pm

Re: Code for Chess Board fails

Post by Sundial »

Agree, Stefan.
Bye
Post Reply