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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
Stefan Kottwitz
Site Admin
Posts: 10348
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 4771 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: 10348
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