Text FormattingNon-breaking spacing with skak

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
ghuczek
Posts: 23
Joined: Sun Dec 23, 2012 8:09 pm

Non-breaking spacing with skak

Post by ghuczek »

I have included a sample of a problem I am encountering with non-breaking spaces in chess figurine notation. I am using the memoir class because this is going to be a longer project.

In the notation, I would like the move number to include at least the white move before wrapping to the next line. In the example shown, I want white's move to appear beside the move number in moves like 9, 16, 19, 22. Ideally, both the white and black moves should appear with the move number before the line wrap, but I would be satisfied if at least the white move appeared after the move number before wrapping. Alternatively, the line should break before the next move number, so it does not get separated from the moves.

Code: Select all

\documentclass[a4paper, twocolumn,openany]{memoir}

\usepackage[utf8]{inputenc} % If utf8 encoding
\usepackage[T1]{fontenc}    %
\usepackage[final]{microtype} % Less badboxes
\usepackage[ps]{skak} %Chess packages
\usepackage{xskak}
\usepackage{chessboard}
	\setchessboard{boardfontsize=16pt,labelfontsize=8pt}
\usepackage{multicol}
\usepackage[scaled]{helvet}



\styleB %Style choice in skak package


\begin{document}
\begin{Spacing}{1.5}

\newgame
\mainline{
	1.	c4 	c5 
	2.	Nc3 	Nc6 
	3.	Nf3 	Nf6 
	4.	g3 	g6 
	5.	Bg2 	Bg7 
	6.	O-O 	O-O 
	7.	d4 	cxd4 
	8.	Nxd4 Nxd4 
	9.	Qxd4 d6 
	10.	Bg5 	Be6 
	11.	Qf4 	Qa5 
	12.	Rac1 Rab8 
	13.	b3 	Rfc8 
	14.	Qd2 	a6 
	15.	Be3 	b5 
	16.	Ba7 	bxc4 
	17.	Bxb8 Rxb8 
	18.	bxc4 Bxc4 
	19.	Rfd1 Nd7 
	20.	Nd5 	Qxd2 
	21.	Nxe7+ Kf8 
	22.	Rxd2 Kxe7 
} 	
	
	
\end{Spacing} % Switch out of double spacing

\end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
ghuczek
Posts: 23
Joined: Sun Dec 23, 2012 8:09 pm

Re: Non-breaking spacing with skak

Post by ghuczek »

This seems to be a more difficult problem than I anticipated, since many people have read the post but no one has been able to offer any suggestions.

Any help would still be appreciated. I have read the skak and xskak documentation, but was unable to find anything that would help.
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Re: Non-breaking spacing with skak

Post by Johannes_B »

The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
ghuczek
Posts: 23
Joined: Sun Dec 23, 2012 8:09 pm

Re: Non-breaking spacing with skak

Post by ghuczek »

Thank you very much. The ideas shown in the reference you gave solved the problem I was having.
Post Reply