My second chess diagram does not fit on the first column, so LaTeX increased paragraph spacing on the first column. This does ensure that the second diagram appears exactly on top of the second column. However, I prefer to keep the standard paragraph spacing, and the best solution I could come up with is to use \vfill to fill in the space. Here are my two questions:

  1. When I tried to use \columnbreak instead of \vfill, I received an error message saying that it is an undefined control sequence. Would \columnbreak and \vfill have given the same result in this case?
  2. How can I ask LaTeX to put in as much text as possible with normal paragraph spacing on the first column before displaying the second diagram on the second column? The second diagram will then be out of order, but I can put a put a caption on it.




  \textbf{Chiburdanizde - Watson} \\
  \textit{Brussels 1987}


 \newchessgame[setwhite={Pg3,Ph4,Kf2}, addblack={ph6,kd6}]

  pgfstyle=border, linewidth = 0.03em, markfield=f5, color=red,
  pgfstyle= {[base,at={\pgfpoint{0pt}{-0.4ex}}]text}, 
   text=\fontsize{1.2ex}{1.2ex}\bfseries \sffamily 1, markfield=f4, 
   text=\fontsize{1.2ex}{1.2ex}\bfseries \sffamily 2, markfield=g4, 
   text=\fontsize{1.2ex}{1.2ex}\bfseries \sffamily 2, markfield=e4,
   text=\fontsize{1.2ex}{1.2ex}\bfseries \sffamily 3, markfield=f3,
   text=\fontsize{1.2ex}{1.2ex}\bfseries \sffamily 4, markfield=e3,
  pgfstyle= {[base,at={\pgfpoint{0pt}{-0.4ex}}]text}, 
   text=\fontsize{1.2ex}{1.2ex}\bfseries \sffamily 1, markfield=h5,
   text=\fontsize{1.2ex}{1.2ex}\bfseries \sffamily 1, markfield=e6,
   text=\fontsize{1.2ex}{1.2ex}\bfseries \sffamily 2, markfield=f6,
   text=\fontsize{1.2ex}{1.2ex}\bfseries \sffamily 3, markfield=g6,
   text=\fontsize{1.2ex}{1.2ex}\bfseries \sffamily 3, markfield=e7,
   text=\fontsize{1.2ex}{1.2ex}\bfseries \sffamily 4, markfield=f7]


 The diagram above illustrates the system of corresponding squares in the pawn endgame.  If the kings are on corresponding squares, say white king on f4 and black king on e6, then whoever it is to move is in zugzwang.  In addition, White wins if he can maneuver his king to the key square f5.

 \fenboard{8/8/3k3p/8/7P/6P1/5K2/8 w - - 0 57}

 \mainline{57. Kf3?}

 This allows Black to put White in zugzwang with his next move.  From the diagram, it is clear that White wins after \variation{1. Ke3} as the black king cannot reach the corresponding square f7 in one move.

 \mainline{57... Ke7! 58.Kf4 Ke6 59.g4}

 White altered the pawn structure, so we need a new diagram of corresponding squares.  It is now a battle for the key squares d5, e5, and f5.



   pgfstyle=border, linewidth = 0.03em, markregion=d5-f5, color=red,
   pgfstyle= {[base,at={\pgfpoint{0pt}{-0.4ex}}]text}, 
    text=\fontsize{1.2ex}{1.2ex}\bfseries \sffamily 1, markfields={d4,d2},
    text=\fontsize{1.2ex}{1.2ex}\bfseries \sffamily 2, markfields={e4,e2},
    text=\fontsize{1.2ex}{1.2ex}\bfseries \sffamily 3, markfield=f2,
    text=\fontsize{1.2ex}{1.2ex}\bfseries \sffamily 4, markfields={d3,d1},
    text=\fontsize{1.2ex}{1.2ex}\bfseries \sffamily 5, markfields={e3,e1},
    text=\fontsize{1.2ex}{1.2ex}\bfseries \sffamily 6, markfields={f3,f1},
   pgfstyle= {[base,at={\pgfpoint{0pt}{-0.4ex}}]text}, 
    text=\fontsize{1.2ex}{1.2ex}\bfseries \sffamily 1, markfields={d6,d8},
    text=\fontsize{1.2ex}{1.2ex}\bfseries \sffamily 2, markfield=e8,
    text=\fontsize{1.2ex}{1.2ex}\bfseries \sffamily 3, markfields={f6,f8},
    text=\fontsize{1.2ex}{1.2ex}\bfseries \sffamily 4, markfield=d7,
    text=\fontsize{1.2ex}{1.2ex}\bfseries \sffamily 5, markfield=e7,
    text=\fontsize{1.2ex}{1.2ex}\bfseries \sffamily 6, markfield=f7,


 \mainline{59... Kf6 60.Kf3 Ke7?}

 Watson explained in \textit{New in Chess} that his blunder was due to extreme time pressure.  From the diagram, we see that the only move for Black is \variation{60... Kf7}.

 \mainline{61.Ke3! Kf7 62.Kd4 Kf6 63.Kd5 Ke7 64.Ke5 Kf7 65.Kf5 Kg7 66.Ke6 Kg6 67. h5+ Kg5 68.Kf7 Kxg4 69.Kg6 Kf4 70.Kxh6}

 and Black resigned. 


Have you tried making these floating figures? Replacing the \begin{center} ... \end{center} environment with


should do the job.

  • Thanks Joseph. It never occurred to me to use the figure enviroment for some reason. I suppose the diagram is a figure after all. Dec 24 '10 at 18:58

Use \newpage instead of \columnbreak. However, I would use something like this:

\twocolumn[\centering\textbf{Chiburdanizde --- Watson}\\ 
  \textit{Brussels 1987}]

or alternatively with your current header

\phantom{\parbox{\linewidth}{\begin{center}\textbf{Chiburdanizde --- Watson}\\ 
  \textit{Brussels 1987}\end{center}\smallskip}}

if your chess boards can be at another place then use the figure environment

  • Thanks for the clarification. I wonder where I got the idea to use \columnbreak. That command is simply not defined. Dec 24 '10 at 19:04

That's not an answer to your actual problem but looking at your example I think I should have introduced a way to set the font for the text in a more general way. I don't think that it is possible to smuggle it in the pgfstyle command as the internal command from pgf (\pgftext) sets its keys to late), but if you insert the following code in your preamble you should be able to use the key textfont=\fontsize{1.2ex}{1.2ex}\bfseries \sffamily either locally in a chessboard or in \setchessboard.

I would be glad to hear if it works and if you like the handling and the naming of the key. If yes I will add the code to the next version.




\define@key[UFCB]{locfill}{textfont}{% D

\define@key[UFCB]{glofill}{textfont}{% D

  • Hi Ulrike. I want to thank you again for writing the chessboard package. I would not have known how to put numbers on the board without your package and the documentation that comes with it. Dec 24 '10 at 19:08
  • I am not sure what to do after putting the code on my preamble. I tried getting rid of \fontsize... from my chessboard parameter, but the numbers get distorted. Could you try explaining again what it does? Dec 24 '10 at 19:13
  • Simply use \chessboard[...,textfont=your font commands, text=1,...] Dec 25 '10 at 11:44
  • This is great! The code is easier to maintain now that I just need to declare the font setting once. I just have one more comment. When I first tried it, I only deleted the font setting for one of the squares. The number for that square is displayed correctly, but not so everywhere else. It seems that "text=\fontsize{1.2ex}{1.2ex}\bfseries \sffamily 4" does not override the local setting. Dec 26 '10 at 2:35
  • How do you highlight a piece of code in a comment? Dec 26 '10 at 2:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.