From: Joost 't H. <joo...@pl...> - 2011-01-31 22:51:26
|
On 01/31/2011 11:30 PM, Joost 't Hart wrote: > On 01/31/2011 11:10 PM, Gerd Lorscheid wrote: > > Hi! > > Ah, now (after testing myself) I remember it. Sorry for the wrong-footing: > > The spurious blanks arise if you have a variation in the game. > > Suppose following context. > > 10. h3 e6 {comment} ( 10... 0-0-0 ) > > With your patch, a blank line is inserted between the comment and the > variation (if you enable "indent variations" as well). The > "modification" was there to remove this blank line. > > Obviously, your patch is correct. > > A proper fix for the spurious blank is still to be found... I understand it. The two "indent operations are currently independent and do not know of each other. The "indent variations" logic does not check whether comment rendering just before the current variation has concluded with a <br> or not. It should do. In other words, the operations should not be independent. I think we need some time prior to the release to really correct this. Will not be able to do so until saturday. You have some spare time before that? Cheers, Joost. > > Cheers, > Joost. > > >> Hello, >> >> with column style it would look like: >> >> 1. e4 e5 >> >> 2. Nf3 Nc6 >> >> "This is the first comment" >> >> 3. Bb5 a6 >> >> 4. Ba4 >> >> "This is the second comment" >> >> 4 ... Nf6 >> >> which looks normal to me. The code is used only for PgnStyle and >> PGN_STYLE_INDENT_COMMENTS, so Latex is not involved. >> >> Gerd >> >> *Von:*Joost 't Hart [mailto:joo...@pl...] >> *Gesendet:* Montag, 31. Januar 2011 22:53 >> *An:* Gerd Lorscheid >> *Cc:* sci...@li... >> *Betreff:* Re: [Scid-users] Strange format in pgn window >> >> On 01/31/2011 10:31 PM, Gerd Lorscheid wrote: >> >> Hi, >> >> >> Hello, >> >> the if condition in the following piece of code in game.cpp >> >> // Modification to remove extra lines >> >> if (CurrentPos->GetToMove() == WHITE) >> >> tb->PrintString ("<br>"); >> >> has the following really unique format as result: >> >> 1.e4 e5 2.Nf3 Nc6 >> >> "This is the first comment" 3.Bb5 a6 4.Ba4 >> >> "This is the second comment" 4... Nf6 >> >> >> Is this what you intended to show (might be an e-mail markup thingy)? >> My feeling is that this bit of code is responsible for adding a >> newline after the comment (in either white or black case, the >> observer function is confusing...). I see none here.... (?) >> >> >> I think this is very hard to read and should be replaced by its >> original implementation: >> >> tb->PrintString ("<br>"); >> >> with a standard format as result. >> >> 1.e4 e5 2.Nf3 Nc6 >> >> "This is the first comment" >> >> 3.Bb5 a6 4.Ba4 >> >> "This is the second comment" >> >> 4... Nf6 >> >> The rule is easy: Moves of the main variation and only these moves >> start left bound and so are easy to read and cannot be missed. >> >> If somebody does live without newlines he may prefer >> >> 1.e4 e5 2.Nf3 Nc6 "This is the first comment" 3.Bb5 a6 4.Ba4 >> >> "This is the second comment" 4... Nf6 >> >> but this is another story. >> >> I would like to see this little change in 4.3 if still possible. >> >> >> This will be possible; certainly. We still have some time to go, I am >> afraid... >> >> One question (admittedly, before trying this myself - will do): >> Did you test this in conjunction with column-style moves? CVS is >> down, but this bit of code may have to do with a recent correction of >> spurious blank lines in the pgn window (by Alexander)... >> Besides, the code may be reused by other pgn markup stuff (to >> LaTeX?). I tried to digest this, but sort of gave up on it :-) >> >> Cheers, >> Joost. >> >> >> Gerd >> >> |