Answers.Body: <p>I do not know about the semicolon, as ChessBase does not seem to use it, but based on the standard, that may be an either/or thing, and everyone has just opted for the braces, {}, when programming.</p>
  
  <p>On the other hand, the percent sign is used regularly by ChessBase preceding the moves of an annotated game, and sometimes within the annotations also. I am not going to give entire games since they are copyrighted, but if you go to Mega2020, and click on "Annotated Games", select a game, and then click Home>Copy game, and paste it into Notepad, you will find that most, if not all, have something like what is below before move one. I have not found one that does not have it, but I am not going to do this for many thousands of games just to be positive.</p>
  
  <p>I have no idea what it all means, but this might be what you are talking about. If not, please comment, and I will delete my answer.</p>
  
  <p>{[%evp 17,89,-32,13,-6,21,-7,12,-12,30,10,24,-7,20,-20,27,12,27,-19,0,-30,33,0,
  0,-56,-20,-86,17,6,17,0,27,-52,-32,-59,62,-86,10,-2,48,0,47,34,53,0,8,0,124,66,
  141,72,227,206,535,535,751,746,748,748,740,740,742,745,736,740,800,801,29988,
  29989,29989,29990,29990,29982,29991,29980]} 1. e4 c5 2. Nc3 Nc6 3. Nge2 g6 4.
  d4 cxd4 5. Nxd4 Bg7 6. Nb3 Nf6 7. Be2 d6 8. O-O O-O 9. Re1 b6 {etcetera - PhishMaster}</p>
  
  <p>Here was another example with times.</p>
  
  <p>{[%evp 0,9,32,32,13,-10,-5,6,25,35,23,7]} 1. d4 {[%emt 0:00:03]} d5 {[%emt 0:
  00:28]} 2. c4 {[%emt 0:00:08]} e6 {[%emt 0:00:00]} 3. Nc3 {[%emt 0:00:07]} c5 {
  [%emt 0:00:05]} 4. cxd5 {[%emt 0:00:09]} exd5 {[%emt 0:00:19]} 5. dxc5 {
  [%emt 0:00:05]} d4 {[%emt 0:04:20]} 6. Na4 {[%emt 0:00:07]} Bxc5 {[%emt 0:04:
  40]}</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-28T17:43:58.627Z
Answers.Text: The percentage sign usage you state is not what I describe in the question. (Don't delete the answer!) What you highlight is a sort of standard for [engine annotation in comments](http://www.talkchess.com/forum3/viewtopic.php?f=7&t=72019&start=10#p814723) or [time information in comments](https://www.enpassant.dk/chess/palview/enhancedpgn.htm).
Answers.UserDisplayName: Remellion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-28T17:57:54.183Z
Answers.Text: @Remellion That is why I do not typically answer these types of questions, but your question looked so "lonely" having been up for 5+ hours with no answers. :) I guess I did not fully understand the differences, but knew I had seen the % used many times.
Answers.UserDisplayName: PhishMaster
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-28T18:03:55.057Z
Answers.Text: The one question I asked and really want answered went unanswered for 7 months, and only recently got a partial answer by... me. Which is not even the full answer I want. It's fine to have unanswered questions here. Anyway, the % character in your answer is in a brace comment, and so not the escape mechanism I was referring to, but it highlights an interesting "workaround" of the ancient standard to include further parsable information in comments.
Answers.UserDisplayName: Remellion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-28T16:42:55.150Z
Answers.LastActivityDate: 2020-01-28T16:42:55.150Z
Answers.UserDisplayName: PhishMaster
Answers.Body: <p>You can use the percent sign to comment out a line of text in your PGN file (<a href="https://www.overleaf.com/blog/619-tip-of-the-week-add-inline-or-margin-comments-to-your-pdf" rel="noreferrer">similar to Latex</a>). For example, if you'd like to include personal comments that categorize the games within the database, such as <code>% Games to study later</code>. All such lines <strong>starting</strong> with <code>%</code> will not be interpreted by a PGN parser, so you can safely leave self-notes or other comments (that you might want to later parse in a script) in a PGN database. </p>
  
  <p>An example of such a PGN file:</p>
  
  <pre><code>% Interesting games from Wijk aan zee
  
  1. e4 e5 2. Nf3 Nc6 3. Bb5 Nf6 4. d3 d6 5. c3 a6 6. Ba4 Be7 7. O-O O-O 8. Re1
  Re8 9. Nbd2 Bf8 10. h3 b5 11. Bc2 Bb7 12. d4 g6 13. a3 Nb8 14. d5 c6 15. c4 Nbd7
  16. a4 Qc7 17. b3 Rec8 18. Ra2 bxc4 19. bxc4 a5 20. Nf1 Ba6 21. Ne3 Nc5 22. Nd2
  cxd5 23. cxd5 Rab8 24. Ba3 Qd8 25. Qf3 h5 26. Raa1 Bh6 27. Rab1 Rxb1 28. Rxb1
  Kg7 29. Nef1 h4 30. Ne3 Bf4 31. Nef1 Qc7 32. g3 hxg3 33. fxg3 Bh6 34. h4 Qd7 35.
  Kg2 Nxa4 36. Bxa4 Qxa4 37. Bxd6 Qd4 38. Qf2 Qxf2+ 39. Kxf2 Bxf1 0-1
  
  
  % Caro-Kann games:
  
  1. e4 c6 2. Nf3 d5 3. Nc3 Bg4 4. h3 Bxf3 5. Qxf3 Nf6 6. Be2 e6 7. O-O dxe4 8.
  Nxe4 Nxe4 9. Qxe4 Nd7 10. d4 Nf6 11. Qd3 Qc7 12. Rd1 Be7 13. c4 O-O 14. Be3 Rfd8
  15. Qb3 Rd7 16. Bf3 Rad8 17. a3 h6 18. g3 b6 19. Kg2 c5 20. Qc3 a5 21. Rac1 cxd4
  22. Bxd4 Ne8 23. h4 Bf6 24. Bxf6 Nxf6 25. b4 axb4 26. axb4 Rxd1 27. Rxd1 Rxd1
  28. Bxd1 Kf8 29. Bf3 Ke7 30. c5 bxc5 31. bxc5 Kf8 32. Qb4 Ne8 33. Qb6 Qe5 34.
  Bc6 Ke7 35. Bxe8 Kxe8 36. c6 Qd6 37. Kg1 g5 38. h5 f5 39. Qb7 Qd1+ 40. Kg2 Qd5+
  41. Kh2 Qd4 42. Kg1 Qd1+ 43. Kg2 Qd5+ 44. Kh2 Qd4 45. Kg1 1/2-1/2
  </code></pre>
  
  <p>You can experiment with this by loading the PGN file (like the above) on for example <a href="https://chesstempo.com/pgn-viewer.html" rel="noreferrer">chesstempo</a> in order to sanity check the parsing, and see that those lines are indeed correctly ignored.</p>
  
  <hr>
  
  <p>As for annotations and the use of the semicolon see <a href="https://chess.stackexchange.com/a/15626/3594">this answer</a> by <a href="https://chess.stackexchange.com/users/12/andrew">Andrew</a>.</p>
  
  <p>Briefly, the semicolon is another way of indicating move annotations but it's not efficient as it requires including redundant characters and line-skips per annotation, e.g.:</p>
  
  <pre><code>1. d4; closed system 
  1...d5 2. c4 
  </code></pre>
  
  <p>instead of <code>1. d4 {closed system} d5 2. c4</code>. And the semicolon notation is rarely supported by PGN parsers. So the use of curly brackets <code>{}</code> is always recommended, as it's well supported, simple and intuitive to use and less prone to mistakes in the notation.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-28T17:50:11.540Z
Answers.Text: I already understand how these work simply from reading the documentation. I'm more interested in how often these are used in practice -- the bit about the semicolon being rarely supported is interesting. (I'm actually preparing to write my own parser and want to know what it should conform to, then I ran into these things.)
Answers.UserDisplayName: Remellion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-28T19:15:13.930Z
Answers.Text: @Remellion *how often* cannot really be meaningfully answered as these things tend to be a question of style. Personally, I use `%` very frequently to add meta-information to my databases and personalize them (like the suggestions in my answer), and I also use it a lot to send commented PGN files to my students, classifying the games for them and including the question/exercise statements within the PGN file, such as: `% Find the positional mistakes by white in this game.` I do the same when I prepare openings for a student and do not want to over-annotate,then I use comments to discuss plans.
Answers.UserDisplayName: Ellie
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-02-02T12:18:57.447Z
Answers.Text: Fair enough; but sensible anecdotal evidence is enough to convince me there is a use case for these tokens. And therefore that I need to parse these correctly. >.<
Answers.UserDisplayName: Remellion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-28T17:08:53.790Z
Answers.LastActivityDate: 2020-01-28T17:08:53.790Z
Answers.UserDisplayName: Ellie
Body: <p>Trawling through the <a href="http://www.saremba.de/chessgml/standards/pgn/pgn-complete.htm" rel="noreferrer">PGN standard</a>, I was surprised by two of the specifications:</p>
  
  <p>An <a href="http://www.saremba.de/chessgml/standards/pgn/pgn-complete.htm#c6" rel="noreferrer">escape mechanism</a> triggered by <code>%</code> at the start of a new line:</p>
  
  <blockquote>
    <p>There is a special escape mechanism for PGN data. This mechanism is triggered by a percent sign character ("%") appearing in the first column of a line; the data on the rest of the line is ignored by publicly available PGN scanning software. This escape convention is intended for the private use of software developers and researchers to embed non-PGN commands and data in PGN streams.</p>
    
    <p>A percent sign appearing in any other place other than the first position in a line does not trigger the escape mechanism.</p>
  </blockquote>
  
  <p>A <a href="http://www.saremba.de/chessgml/standards/pgn/pgn-complete.htm#c5" rel="noreferrer">"rest of line" comment</a> initiated by a semicolon <code>;</code>:</p>
  
  <blockquote>
    <p>Comment text may appear in PGN data. There are two kinds of comments. The first kind is the "rest of line" comment; this comment type starts with a semicolon character and continues to the end of the line. [...]</p>
  </blockquote>
  
  <p>They surprised me because I have never encountered them in any PGNs I've found "in the wild", so to speak. <strong>Has anyone encountered PGNs where these (escape mechanism or semicolon comments) are used?</strong></p>
  
Tags: <pgn>
Title: Does any PGN actually use the '%' (escape) or ';' (rest of line comment) mechanisms?
ThreadText: # Does any PGN actually use the '%' (escape) or ';' (rest of line comment) mechanisms?
  
  (Asked by: username_0 on 2020-01-28)
  
  Trawling through the [PGN standard](http://www.saremba.de/chessgml/standards/pgn/pgn-complete.htm), I was surprised by two of the specifications:
  
  An [escape mechanism](http://www.saremba.de/chessgml/standards/pgn/pgn-complete.htm#c6) triggered by `%` at the start of a new line:
  
  > There is a special escape mechanism for PGN data. This mechanism is triggered by a percent sign character ("%") appearing in the first column of a line; the data on the rest of the line is ignored by publicly available PGN scanning software. This escape convention is intended for the private use of software developers and researchers to embed non-PGN commands and data in PGN streams.
  >
  > A percent sign appearing in any other place other than the first position in a line does not trigger the escape mechanism.
  
  A ["rest of line" comment](http://www.saremba.de/chessgml/standards/pgn/pgn-complete.htm#c5) initiated by a semicolon `;`:
  
  > Comment text may appear in PGN data. There are two kinds of comments. The first kind is the "rest of line" comment; this comment type starts with a semicolon character and continues to the end of the line. [...]
  
  They surprised me because I have never encountered them in any PGNs I've found "in the wild", so to speak. **Has anyone encountered PGNs where these (escape mechanism or semicolon comments) are used?**
  
  **Tags:** pgn
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2020-01-28. Score: 6 | Accepted answer
  
  You can use the percent sign to comment out a line of text in your PGN file ([similar to Latex](https://www.overleaf.com/blog/619-tip-of-the-week-add-inline-or-margin-comments-to-your-pdf)). For example, if you'd like to include personal comments that categorize the games within the database, such as `% Games to study later`. All such lines **starting** with `%` will not be interpreted by a PGN parser, so you can safely leave self-notes or other comments (that you might want to later parse in a script) in a PGN database.
  
  An example of such a PGN file:
  
  ```
  % Interesting games from Wijk aan zee
  
  1. e4 e5 2. Nf3 Nc6 3. Bb5 Nf6 4. d3 d6 5. c3 a6 6. Ba4 Be7 7. O-O O-O 8. Re1
  Re8 9. Nbd2 Bf8 10. h3 b5 11. Bc2 Bb7 12. d4 g6 13. a3 Nb8 14. d5 c6 15. c4 Nbd7
  16. a4 Qc7 17. b3 Rec8 18. Ra2 bxc4 19. bxc4 a5 20. Nf1 Ba6 21. Ne3 Nc5 22. Nd2
  cxd5 23. cxd5 Rab8 24. Ba3 Qd8 25. Qf3 h5 26. Raa1 Bh6 27. Rab1 Rxb1 28. Rxb1
  Kg7 29. Nef1 h4 30. Ne3 Bf4 31. Nef1 Qc7 32. g3 hxg3 33. fxg3 Bh6 34. h4 Qd7 35.
  Kg2 Nxa4 36. Bxa4 Qxa4 37. Bxd6 Qd4 38. Qf2 Qxf2+ 39. Kxf2 Bxf1 0-1
  
  % Caro-Kann games:
  
  1. e4 c6 2. Nf3 d5 3. Nc3 Bg4 4. h3 Bxf3 5. Qxf3 Nf6 6. Be2 e6 7. O-O dxe4 8.
  Nxe4 Nxe4 9. Qxe4 Nd7 10. d4 Nf6 11. Qd3 Qc7 12. Rd1 Be7 13. c4 O-O 14. Be3 Rfd8
  15. Qb3 Rd7 16. Bf3 Rad8 17. a3 h6 18. g3 b6 19. Kg2 c5 20. Qc3 a5 21. Rac1 cxd4
  22. Bxd4 Ne8 23. h4 Bf6 24. Bxf6 Nxf6 25. b4 axb4 26. axb4 Rxd1 27. Rxd1 Rxd1
  28. Bxd1 Kf8 29. Bf3 Ke7 30. c5 bxc5 31. bxc5 Kf8 32. Qb4 Ne8 33. Qb6 Qe5 34.
  Bc6 Ke7 35. Bxe8 Kxe8 36. c6 Qd6 37. Kg1 g5 38. h5 f5 39. Qb7 Qd1+ 40. Kg2 Qd5+
  41. Kh2 Qd4 42. Kg1 Qd1+ 43. Kg2 Qd5+ 44. Kh2 Qd4 45. Kg1 1/2-1/2
  
  ```
  
  You can experiment with this by loading the PGN file (like the above) on for example [chesstempo](https://chesstempo.com/pgn-viewer.html) in order to sanity check the parsing, and see that those lines are indeed correctly ignored.
  
  ---
  
  As for annotations and the use of the semicolon see [this answer](https://chess.stackexchange.com/a/15626/3594) by [Andrew](https://chess.stackexchange.com/users/12/andrew).
  
  Briefly, the semicolon is another way of indicating move annotations but it's not efficient as it requires including redundant characters and line-skips per annotation, e.g.:
  
  ```
  1. d4; closed system 
  1...d5 2. c4 
  
  ```
  
  instead of `1. d4 {closed system} d5 2. c4`. And the semicolon notation is rarely supported by PGN parsers. So the use of curly brackets `{}` is always recommended, as it's well supported, simple and intuitive to use and less prone to mistakes in the notation.
  
  > **Comments:**
  > **username_0**: I already understand how these work simply from reading the documentation. I'm more interested in how often these are used in practice -- the bit about the semicolon being rarely supported is interesting. (I'm actually preparing to write my own parser and want to know what it should conform to, then I ran into these things.)  
  > **username_2**: @username_0 *how often* cannot really be meaningfully answered as these things tend to be a question of style. Personally, I use `%` very frequently to add meta-information to my databases and personalize them (like the suggestions in my answer), and I also use it a lot to send commented PGN files to my students, classifying the games for them and including the question/exercise statements within the PGN file, such as: `% Find the positional mistakes by white in this game.` I do the same when I prepare openings for a student and do not want to over-annotate,then I use comments to discuss plans.  
  > **username_0**: Fair enough; but sensible anecdotal evidence is enough to convince me there is a use case for these tokens. And therefore that I need to parse these correctly. >.<  
  
  ---
  
  ### Answer by username_1 on 2020-01-28. Score: 0
  
  I do not know about the semicolon, as ChessBase does not seem to use it, but based on the standard, that may be an either/or thing, and everyone has just opted for the braces, {}, when programming.
  
  On the other hand, the percent sign is used regularly by ChessBase preceding the moves of an annotated game, and sometimes within the annotations also. I am not going to give entire games since they are copyrighted, but if you go to Mega2020, and click on "Annotated Games", select a game, and then click Home>Copy game, and paste it into Notepad, you will find that most, if not all, have something like what is below before move one. I have not found one that does not have it, but I am not going to do this for many thousands of games just to be positive.
  
  I have no idea what it all means, but this might be what you are talking about. If not, please comment, and I will delete my answer.
  
  {[%evp 17,89,-32,13,-6,21,-7,12,-12,30,10,24,-7,20,-20,27,12,27,-19,0,-30,33,0,
  0,-56,-20,-86,17,6,17,0,27,-52,-32,-59,62,-86,10,-2,48,0,47,34,53,0,8,0,124,66,
  141,72,227,206,535,535,751,746,748,748,740,740,742,745,736,740,800,801,29988,
  29989,29989,29990,29990,29982,29991,29980]} 1. e4 c5 2. Nc3 Nc6 3. Nge2 g6 4.
  d4 cxd4 5. Nxd4 Bg7 6. Nb3 Nf6 7. Be2 d6 8. O-O O-O 9. Re1 b6 {etcetera - username_1}
  
  Here was another example with times.
  
  {[%evp 0,9,32,32,13,-10,-5,6,25,35,23,7]} 1. d4 {[%emt 0:00:03]} d5 {[%emt 0:
  00:28]} 2. c4 {[%emt 0:00:08]} e6 {[%emt 0:00:00]} 3. Nc3 {[%emt 0:00:07]} c5 {
  [%emt 0:00:05]} 4. cxd5 {[%emt 0:00:09]} exd5 {[%emt 0:00:19]} 5. dxc5 {
  [%emt 0:00:05]} d4 {[%emt 0:04:20]} 6. Na4 {[%emt 0:00:07]} Bxc5 {[%emt 0:04:
  40]}
  
  > **Comments:**
  > **username_0**: The percentage sign usage you state is not what I describe in the question. (Don't delete the answer!) What you highlight is a sort of standard for [engine annotation in comments](http://www.talkchess.com/forum3/viewtopic.php?f=7&t=72019&start=10#p814723) or [time information in comments](https://www.enpassant.dk/chess/palview/enhancedpgn.htm).  
  > **username_1**: @username_0 That is why I do not typically answer these types of questions, but your question looked so "lonely" having been up for 5+ hours with no answers. :) I guess I did not fully understand the differences, but knew I had seen the % used many times.  
  > **username_0**: The one question I asked and really want answered went unanswered for 7 months, and only recently got a partial answer by... me. Which is not even the full answer I want. It's fine to have unanswered questions here. Anyway, the % character in your answer is in a brace comment, and so not the escape mechanism I was referring to, but it highlights an interesting "workaround" of the ancient standard to include further parsable information in comments.  
  
  ---
  
  