In a PGN file, there are tags like:
[Event "Tournament"]
[White "John Smith"]
And so on. I would like to know all the possible tags for PGN files so I can use them in a PGN file that my friend is demanding for.
PGN standards are described here. There are seven more-or-less required tags:
[Event]
[Site]
[Date]
[Round]
[White]
[Black]
[Result]
and many different supplemental tags, for example [WhiteElo]
and [BlackElo]
for the players' ratings, [Board]
for the board number in team events, and [TimeControl]
for information about the time-control used.
Glorfindel cited the PGN standard, so if you feel you need to include fields that you're not familiar with, by all means consult it.
But like many standards, it's far too comprehensive to be implemented fully in most situations. For example, the standard provides for the [Date] of the game, and the [EventDate] of the tournament; both White's and Black's clock time at the end of the game; the 3-letter acronym for the player's country, the name of the player's team (in an Olympiad or World Team Championship, these will match, but otherwise the team is normally unrelated); the name of the source publication for the game, the [SourceDate] for the date of the publication that the game appeared in; the Site and the EventSite; ... you get the idea.
Way over the top for all but the professionals, primarily those involved in publishing tournament bulletins and chess e-/magazines.
I'd also encourage you to make sure your PGN fields include:
[Event] [Date] [White] [Black] [Result]
Of the seven mentioned, the following are optional, even in published games: [Site] [Round]
The Site can be multiple things: the city name, such "Baku", the server organization name (if online) such as "playchess.com", the correspondence chess association (if CC) such as "ICCF", or the tournament name, such as "Dos Hermanas".
The Round is used when there are multiple games in one event, as in most tournaments, but can also be a combination of Board # and Round # in team tournaments. So, in the Baku Olympiad, for example, "Round 1.1" signifies a game played on Board 1 in Round 1. In most older tournament scores, the Round information is often missing, although it could be reconstructed from the tournament crosstable.
Note that [Event] must be the first field for most PGN import processing.
If the game score doesn't begin from the start position, you can insert a FEN field to represent the position, who's on move, what castling rights remain, and any e.p. capture that is possible at the beginning position. Just look up Forsyth-Edwards Notation for more information.
Use spaces to separate the moves and move numbers as follows:
You may run into trouble with variations, if you transcribe them manually. Keep the following rules in mind.
A. The variation immediately follows the move that it varies from, so:
shows the alternative move 4...d5 in the proper position in the score, immediately following the main (or parent-variation) move.
B. Certain codes are used by some PGN translators to represent the position evaluations at the end of a variation. They don't always import and export them the same way, and they don't always accept the "+/-" Informator symbology.
C. The game score should end with the result. e.g. "1-0", or "*" if it is only a line.
D. The FEN diagram / game replayer used on Chess.StackExchange is non-conforming, so don't use your experience with it as a guide. Two examples:
PGN specification makes differences between import and output formats. For example, the seven tags event, site, date, round, white, black, result are mandatory for output in a specific order, but when importing you shouldn't be that strict - missing tags are ok, other order is ok, etc.
Then, there are a number of frequently used additional tags, like tags for rating, opening, title, etc. Open some of your favourite PGN files in an editor and have a look.
Then, when importing, I'd more or less accept anything that looks like a "key-value-pair" tag, and ignore (but maybe store) it if it's unknown.
I don't think most chess software give perfect PGN output, but most of them will also accept rather "exotic" interpretations. What does this mean for your use-case? Ask yourself what games you want to transfer, what info is in there, and then you'll probably find good tags for that. Maybe consider how your friend is going to process the PGN files.
I just have seen that old question, and I think I have a new (more complete) answer to it.
The PGN specification of course is the reference, because of its old state, I decided to have it published in a new fashion. See my GitHub repository on PGN Spec Commented for that. The following links are all linking to that repository:
So I have no idea if these additional tags are used at all, but they are at least described.