LaTeX forum ⇒ Text FormattingNon-breaking spacing with skak

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

Non-breaking spacing with skak

Postby ghuczek » Fri Jan 15, 2016 2:38 am

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.

  1. \documentclass[a4paper, twocolumn,openany]{memoir}
  2.  
  3. \usepackage[utf8]{inputenc} % If utf8 encoding
  4. \usepackage[T1]{fontenc} %
  5. \usepackage[final]{microtype} % Less badboxes
  6. \usepackage[ps]{skak} %Chess packages
  7. \usepackage{xskak}
  8. \usepackage{chessboard}
  9. \setchessboard{boardfontsize=16pt,labelfontsize=8pt}
  10. \usepackage{multicol}
  11. \usepackage[scaled]{helvet}
  12.  
  13.  
  14.  
  15. \styleB %Style choice in skak package
  16.  
  17.  
  18. \begin{document}
  19. \begin{Spacing}{1.5}
  20.  
  21. \newgame
  22. \mainline{
  23. 1. c4 c5
  24. 2. Nc3 Nc6
  25. 3. Nf3 Nf6
  26. 4. g3 g6
  27. 5. Bg2 Bg7
  28. 6. O-O O-O
  29. 7. d4 cxd4
  30. 8. Nxd4 Nxd4
  31. 9. Qxd4 d6
  32. 10. Bg5 Be6
  33. 11. Qf4 Qa5
  34. 12. Rac1 Rab8
  35. 13. b3 Rfc8
  36. 14. Qd2 a6
  37. 15. Be3 b5
  38. 16. Ba7 bxc4
  39. 17. Bxb8 Rxb8
  40. 18. bxc4 Bxc4
  41. 19. Rfd1 Nd7
  42. 20. Nd5 Qxd2
  43. 21. Nxe7+ Kf8
  44. 22. Rxd2 Kxe7
  45. }
  46.  
  47.  
  48. \end{Spacing} % Switch out of double spacing
  49.  
  50. \end{document}

ghuczek
Posts: 23
Joined: Sun Dec 23, 2012 8:09 pm

Postby ghuczek » Mon Mar 07, 2016 10:20 pm

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: 4173
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Tue Mar 08, 2016 10:28 am

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

Postby ghuczek » Wed Mar 09, 2016 1:23 am

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


Return to “Text Formatting”

Who is online

Users browsing this forum: No registered users and 2 guests